global ft_list_push_front extern malloc section .text ft_list_push_front: test rdi, rdi jz .err push rdi push rsi mov rdi, 16 sub rsp, 8 call malloc wrt ..plt add rsp, 8 pop rsi pop rdi test rax, rax ; did malloc return 0 jz .err push rdi mov rdi, [rdi] mov [rax + 8], rdi ;set both settings mov [rax], rsi pop rdi mov [rdi], rax .err: ret