.section .text._start, "ax"
.global _start
_start:
    # 🕵️ BSS Clearing 
    la t0, __bss_start
    la t1, __bss_end
1:  bge t0, t1, 2f
    sd zero, 0(t0)
    addi t0, t0, 8
    j 1b
2:
    fence rw, rw

    # Valid Args from Stack (Linux ABI)
    ld a0, 0(sp)          # argc
    addi a1, sp, 8        # argv
    
    # Calculate envp in a2: envp = argv + (argc + 1) * 8
    addi t0, a0, 1        # t0 = argc + 1
    slli t0, t0, 3        # t0 = (argc + 1) * 8
    add a2, a1, t0        # a2 = argv + offset

    call main

    # Call exit(result)
    call exit

1:  j 1b
