change labels from global to local in functions, align function calls in stack

This commit is contained in:
2025-08-06 20:10:05 +02:00
parent 2a65c14032
commit caa21a3fb0
11 changed files with 119 additions and 108 deletions

View File

@ -57,18 +57,18 @@ call_free_elem:
ft_list_remove_if:
test rdi, rdi
jz end
jz .end
test rdx, rdx
jz end
jz .end
test rcx, rcx
jz end
jz .end
xor r8, r8
mov rax, [rdi]
loop:
.loop:
test rax, rax
jz end
jz .end
push rax
push rdi
@ -89,20 +89,20 @@ loop:
pop rsi
pop rdi
jnz loop_end ;if call to rdx returned zero, don't remove
jnz .loop_end ;if call to rdx returned zero, don't remove
pop rax
sub rsp, 8
call remove_element
add rsp, 8
jmp loop
jmp .loop
loop_end:
.loop_end:
pop rax
mov r8, rax
mov rax, [rax + 8]
jmp loop
jmp .loop
end:
.end:
ret