x86 ASM using rustc 1.83.0 <&T as core : : fmt : :Display>:: fmt : : hd1455fa1363db9bf :
push rax
mov rdi , qword ptr [ rdi ]
call qword ptr [ rip + core : : fmt : : num : : imp : :<impl core : : fmt : :Display for u32>:: fmt : :h9a4153c5c33033b1@GOTPCREL]
and al , 1
pop rcx
ret
core : : fmt : : Arguments : : new_v1 : : h833399cf78fd70f5 :
mov rax , rdi
mov qword ptr [ rdi ], rsi
mov qword ptr [ rdi + 8 ], 2
mov rsi , qword ptr [ rip + .L__unnamed_1]
mov rcx , qword ptr [ rip + .L__unnamed_1+ 8 ]
mov qword ptr [ rdi + 32 ], rsi
mov qword ptr [ rdi + 40 ], rcx
mov qword ptr [ rdi + 16 ], rdx
mov qword ptr [ rdi + 24 ], 1
ret
core : : slice : : iter : :<impl core : : iter : : traits : : collect : :IntoIterator for &[T]>:: into_iter : : hbf95bf381c6fda3b :
mov qword ptr [ rsp - 24 ], rdi
mov qword ptr [ rsp - 16 ], rsi
mov rax , qword ptr [ rsp - 24 ]
mov rcx , qword ptr [ rsp - 16 ]
shl rcx , 2
add rax , rcx
mov qword ptr [ rsp - 8 ], rax
mov rax , qword ptr [ rsp - 24 ]
mov rdx , qword ptr [ rsp - 8 ]
ret
< core : : slice : : iter : :Iter<T> as core : : iter : : traits : : iterator : :Iterator>:: next : : hd468f210e6c91097 :
mov qword ptr [ rsp - 40 ], rdi
mov rax , qword ptr [ rsp - 40 ]
mov rcx , qword ptr [ rax + 8 ]
mov qword ptr [ rsp - 16 ], rcx
mov rax , qword ptr [ rax ]
cmp rax , qword ptr [ rsp - 16 ]
sete al
and al , 1
mov byte ptr [ rsp - 17 ], al
test byte ptr [ rsp - 17 ], 1
jne .LBB3_4
mov rax , qword ptr [ rsp - 40 ]
mov rax , qword ptr [ rax ]
mov qword ptr [ rsp - 8 ], rax
jmp .LBB3_5
. LBB3_4 :
mov qword ptr [ rsp - 32 ], 0
jmp .LBB3_7
. LBB3_5 :
mov rax , qword ptr [ rsp - 40 ]
mov rcx , qword ptr [ rax ]
add rcx , 4
mov qword ptr [ rax ], rcx
mov rax , qword ptr [ rsp - 8 ]
mov qword ptr [ rsp - 32 ], rax
. LBB3_7 :
mov rax , qword ptr [ rsp - 32 ]
ret
create :
mov rax , rdi
mov dword ptr [ rdi ], 5
mov dword ptr [ rdi + 4 ], 42
mov dword ptr [ rdi + 8 ], 12
mov dword ptr [ rdi + 12 ], 9
mov dword ptr [ rdi + 16 ], 38
ret
access_sequentially :
sub rsp , 136
call qword ptr [ rip + core : : slice : : iter : :<impl core : : iter : : traits : : collect : :IntoIterator for &[T]>:: into_iter : :hbf95bf381c6fda3b@GOTPCREL]
mov qword ptr [ rsp + 8 ], rax
mov qword ptr [ rsp + 16 ], rdx
. LBB5_1 :
lea rdi , [ rsp + 8 ]
call qword ptr [ rip + < core : : slice : : iter : :Iter<T> as core : : iter : : traits : : iterator : :Iterator>:: next : :hd468f210e6c91097@GOTPCREL]
mov qword ptr [ rsp + 24 ], rax
mov rdx , qword ptr [ rsp + 24 ]
mov eax , 1
xor ecx , ecx
cmp rdx , 0
cmove rax , rcx
cmp rax , 0
jne .LBB5_3
add rsp , 136
ret
. LBB5_3 :
mov rax , qword ptr [ rsp + 24 ]
mov qword ptr [ rsp + 32 ], rax
lea rax , [ rsp + 32 ]
mov qword ptr [ rsp + 120 ], rax
mov rax , qword ptr [ rip + <&T as core : : fmt : :Display>:: fmt : :hd1455fa1363db9bf@GOTPCREL]
mov qword ptr [ rsp + 128 ], rax
mov rax , qword ptr [ rsp + 120 ]
mov qword ptr [ rsp + 104 ], rax
mov rax , qword ptr [ rsp + 128 ]
mov qword ptr [ rsp + 112 ], rax
mov rax , qword ptr [ rsp + 104 ]
mov qword ptr [ rsp + 88 ], rax
mov rax , qword ptr [ rsp + 112 ]
mov qword ptr [ rsp + 96 ], rax
lea rdi , [ rsp + 40 ]
lea rsi , [ rip + .L__unnamed_2]
lea rdx , [ rsp + 88 ]
call qword ptr [ rip + core : : fmt : : Arguments : : new_v1 : :h833399cf78fd70f5@GOTPCREL]
lea rdi , [ rsp + 40 ]
call qword ptr [ rip + std :: io : : stdio : : _print : :he7d505d4f02a1803@GOTPCREL]
jmp .LBB5_1
access_element :
sub rsp , 24
mov qword ptr [ rsp + 8 ], rdi
mov qword ptr [ rsp + 16 ], rsi
mov eax , 1
cmp rax , rsi
jae .LBB6_2
mov rax , qword ptr [ rsp + 8 ]
mov eax , dword ptr [ rax + 4 ]
add rsp , 24
ret
. LBB6_2 :
mov rsi , qword ptr [ rsp + 16 ]
lea rdx , [ rip + .L__unnamed_3]
mov rax , qword ptr [ rip + core : : panicking : : panic_bounds_check : :h8307ccead484a122@GOTPCREL]
mov edi , 1
call rax
update_element :
sub rsp , 24
mov qword ptr [ rsp + 8 ], rdi
mov qword ptr [ rsp + 16 ], rsi
mov eax , 2
cmp rax , rsi
jae .LBB7_2
mov rax , qword ptr [ rsp + 8 ]
mov dword ptr [ rax + 8 ], 13
add rsp , 24
ret
. LBB7_2 :
mov rsi , qword ptr [ rsp + 16 ]
lea rdx , [ rip + .L__unnamed_4]
mov rax , qword ptr [ rip + core : : panicking : : panic_bounds_check : :h8307ccead484a122@GOTPCREL]
mov edi , 2
call rax
access_and_update_element :
sub rsp , 24
mov qword ptr [ rsp + 8 ], rdi
mov qword ptr [ rsp + 16 ], rsi
mov eax , 3
cmp rax , rsi
jae .LBB8_2
mov rax , qword ptr [ rsp + 8 ]
mov eax , dword ptr [ rax + 12 ]
add eax , 1
mov dword ptr [ rsp + 4 ], eax
setb al
jb .LBB8_4
jmp .LBB8_3
. LBB8_2 :
mov rsi , qword ptr [ rsp + 16 ]
lea rdx , [ rip + .L__unnamed_5]
mov rax , qword ptr [ rip + core : : panicking : : panic_bounds_check : :h8307ccead484a122@GOTPCREL]
mov edi , 3
call rax
. LBB8_3 :
mov rcx , qword ptr [ rsp + 16 ]
mov eax , 3
cmp rax , rcx
jb .LBB8_5
jmp .LBB8_6
. LBB8_4 :
lea rdi , [ rip + .L__unnamed_5]
mov rax , qword ptr [ rip + core : : panicking : : panic_const : : panic_const_add_overflow : :hf2f4fb688348b3b0@GOTPCREL]
call rax
. LBB8_5 :
mov rax , qword ptr [ rsp + 8 ]
mov ecx , dword ptr [ rsp + 4 ]
mov dword ptr [ rax + 12 ], ecx
add rsp , 24
ret
. LBB8_6 :
mov rsi , qword ptr [ rsp + 16 ]
lea rdx , [ rip + .L__unnamed_6]
mov rax , qword ptr [ rip + core : : panicking : : panic_bounds_check : :h8307ccead484a122@GOTPCREL]
mov edi , 3
call rax
access_element_5 :
mov eax , dword ptr [ rdi + 4 ]
ret
update_element_5 :
mov dword ptr [ rdi + 8 ], 13
ret
access_and_update_element_5 :
sub rsp , 24
mov qword ptr [ rsp + 8 ], rdi
mov eax , dword ptr [ rdi + 12 ]
add eax , 1
mov dword ptr [ rsp + 20 ], eax
setb al
jb .LBB11_2
mov rax , qword ptr [ rsp + 8 ]
mov ecx , dword ptr [ rsp + 20 ]
mov dword ptr [ rax + 12 ], ecx
add rsp , 24
ret
. LBB11_2 :
lea rdi , [ rip + .L__unnamed_7]
mov rax , qword ptr [ rip + core : : panicking : : panic_const : : panic_const_add_overflow : :hf2f4fb688348b3b0@GOTPCREL]
call rax
. L__unnamed_1 :
.zero 8
.zero 8
. L__unnamed_8 :
. byte 10
. L__unnamed_2 :
.quad 1
.zero 8
.quad .L__unnamed_8
.asciz "\ 001 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 "
. L__unnamed_9 :
.ascii "/app/example.rs"
. L__unnamed_3 :
.quad .L__unnamed_9
.asciz "\ 017 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 027 \ 000 \ 000 \ 000 \ 005 \ 000 \ 000 "
. L__unnamed_4 :
.quad .L__unnamed_9
.asciz "\ 017 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 034 \ 000 \ 000 \ 000 \ 005 \ 000 \ 000 "
. L__unnamed_5 :
.quad .L__unnamed_9
.asciz "\ 017 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 !\ 000 \ 000 \ 000 \ 020 \ 000 \ 000 "
. L__unnamed_6 :
.quad .L__unnamed_9
.asciz "\ 017 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 !\ 000 \ 000 \ 000 \ 005 \ 000 \ 000 "
. L__unnamed_7 :
.quad .L__unnamed_9
.asciz "\ 017 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 0001 \ 000 \ 000 \ 000 \ 020 \ 000 \ 000 "