.global __x86_64_entry

.pushsection .text.entry
__x86_64_entry:
    // %eax - loader magic
    // %rcx - load base address
    mov ${yboot_loader_magic}, %edi
    cmp %edi, %eax
    jne .not_yboot

    leaq ({stack_bottom} + {stack_size})(%rip), %rsp
    call {entry}

.not_yboot:
    cli
    hlt
    jmp .not_yboot
.popsection // .text.entry
