Skip to content

Instantly share code, notes, and snippets.

@xacrimon
Created February 2, 2025 15:09
Show Gist options
  • Save xacrimon/933e00d9535a9ce3c7518f2c75b12e77 to your computer and use it in GitHub Desktop.
Save xacrimon/933e00d9535a9ce3c7518f2c75b12e77 to your computer and use it in GitHub Desktop.
x86-64-v4 ec873589f7e70a8462ba9a23dfd41276a581cf3f
Found sysroot: /Volumes/Q/repos/rust/build/x86_64-unknown-linux-gnu/stage1
Finished `release` profile [optimized] target(s) in 0.17s
Artifact files: ["/Volumes/Q/repos/bytestr-match/target/release/libbytestr_match.rlib", "/Volumes/Q/repos/bytestr-match/target/release/deps/libbytestr_match-f651d9a6f574924b.rmeta"]
Working with file: /Volumes/Q/repos/bytestr-match/target/release/deps/bytestr_match-f651d9a6f574924b.s
.section .text.test,"ax",@progbits
.globl test
.p2align 4, 0x90
.type test,@function
test:
.cfi_startproc
cmp rdx, 1
jbe .LBB0_1
movzx eax, word ptr [rsi]
cmp eax, 256
je .LBB0_4
cmp eax, 768
je .LBB0_8
cmp eax, 512
jne .LBB0_10
mov eax, 6
movzx eax, byte ptr [rdi + rax]
ret
.LBB0_1:
test rdx, rdx
je .LBB0_2
movzx eax, byte ptr [rsi]
.LBB0_10:
movzx eax, al
cmp al, 8
ja .LBB0_12
movzx eax, byte ptr [rdi + rax]
ret
.LBB0_2:
mov eax, 8
movzx eax, byte ptr [rdi + rax]
ret
.LBB0_8:
mov eax, 7
movzx eax, byte ptr [rdi + rax]
ret
.LBB0_4:
mov eax, 5
movzx eax, byte ptr [rdi + rax]
ret
.LBB0_12:
push rax
.cfi_def_cfa_offset 16
lea rdx, [rip + .L__unnamed_1]
mov esi, 9
mov rdi, rax
call qword ptr [rip + core::panicking::panic_bounds_check@GOTPCREL]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment