section .text
    global _start

_start:
    xor rax, rax    ; Limpia RAX (acumulador = 0)
    mov rcx, 4      ; Inicializa el contador del bucle en 4

bucle:
    add rax, rcx    ; Suma el contador actual al acumulador
    dec rcx         ; Decrementa el contador (RCX = RCX - 1)
    jnz bucle       ; Si RCX no es cero, repite el bucle

    mov rdi, rax    ; Pone el resultado total (10) en RDI
    mov rax, 60     ; Syscall de salida
    syscall