#include "zasm_GOOS_GOARCH.h"
#include "../../cmd/ld/textflag.h"
TEXT runtime·settls(SB),NOSPLIT,$8
RET
TEXT runtime·miniterrno(SB),NOSPLIT,$0
CALL DI
get_tls(CX)
MOVQ m(CX), BX
MOVQ AX, m_perrno(BX)
RET
TEXT runtime·nanotime1(SB),NOSPLIT,$0
SUBQ $64, SP
MOVQ $3, DI
MOVQ SP, SI
MOVQ libc·clock_gettime(SB), AX
CALL AX
MOVQ (SP), AX
IMULQ $1000000000, AX
ADDQ 8(SP), AX
ADDQ $64, SP
RET
TEXT runtime·pipe1(SB),NOSPLIT,$0
SUBQ $16, SP
MOVQ SP, DI
MOVQ libc·pipe(SB), AX
CALL AX
MOVL 0(SP), AX
MOVL 4(SP), DX
ADDQ $16, SP
RET
TEXT runtime·asmsysvicall6(SB),NOSPLIT,$0
PUSHQ DI
MOVQ libcall_fn(DI), AX
MOVQ libcall_args(DI), R11
MOVQ libcall_n(DI), R10
get_tls(CX)
MOVQ m(CX), BX
MOVQ m_perrno(BX), DX
CMPQ DX, $0
JEQ skiperrno1
MOVL $0, 0(DX)
skiperrno1:
CMPQ R11, $0
JEQ skipargs
MOVQ 0(R11), DI
MOVQ 8(R11), SI
MOVQ 16(R11), DX
MOVQ 24(R11), CX
MOVQ 32(R11), R8
MOVQ 40(R11), R9
skipargs:
CALL AX
POPQ DI
MOVQ AX, libcall_r1(DI)
MOVQ DX, libcall_r2(DI)
get_tls(CX)
MOVQ m(CX), BX
MOVQ m_perrno(BX), AX
CMPQ AX, $0
JEQ skiperrno2
MOVL 0(AX), AX
MOVQ AX, libcall_err(DI)
skiperrno2:
RET
TEXT runtime·tstart_sysvicall(SB),NOSPLIT,$0
MOVQ m_g0(DI), DX
get_tls(BX)
MOVQ DX, g(BX)
MOVQ DI, m(BX)
MOVQ SP, AX
MOVQ AX, g_stackbase(DX)
SUBQ $(0x100000), AX
MOVQ AX, g_stackguard(DX)
MOVQ AX, g_stackguard0(DX)
CLD
CALL runtime·stackcheck(SB)
CALL runtime·mstart(SB)
XORL AX, AX
RET
TEXT runtime·sigtramp(SB),NOSPLIT,$0
SUBQ $184, SP
MOVQ BX, 32(SP)
MOVQ BP, 40(SP)
MOVQ R12, 48(SP)
MOVQ R13, 56(SP)
MOVQ R14, 64(SP)
MOVQ R15, 72(SP)
get_tls(BX)
MOVQ m(BX), BP
CMPQ BP, $0
JNE allgood
MOVQ DI, 0(SP)
MOVQ $runtime·badsignal(SB), AX
CALL AX
RET
allgood:
MOVQ g(BX), R10
MOVQ R10, 80(SP)
LEAQ m_libcall(BP), R11
MOVQ libcall_fn(R11), R10
MOVQ R10, 88(SP)
MOVQ libcall_args(R11), R10
MOVQ R10, 96(SP)
MOVQ libcall_n(R11), R10
MOVQ R10, 104(SP)
MOVQ libcall_r1(R11), R10
MOVQ R10, 168(SP)
MOVQ libcall_r2(R11), R10
MOVQ R10, 176(SP)
LEAQ m_scratch(BP), R11
MOVQ 0(R11), R10
MOVQ R10, 112(SP)
MOVQ 8(R11), R10
MOVQ R10, 120(SP)
MOVQ 16(R11), R10
MOVQ R10, 128(SP)
MOVQ 24(R11), R10
MOVQ R10, 136(SP)
MOVQ 32(R11), R10
MOVQ R10, 144(SP)
MOVQ 40(R11), R10
MOVQ R10, 152(SP)
MOVQ m_perrno(BP), R10
MOVL 0(R10), R10
MOVQ R10, 160(SP)
MOVQ g(BX), R10
MOVQ m_gsignal(BP), BP
MOVQ BP, g(BX)
MOVQ DI, 0(SP)
MOVQ SI, 8(SP)
MOVQ DX, 16(SP)
MOVQ R10, 24(SP)
CALL runtime·sighandler(SB)
get_tls(BX)
MOVQ m(BX), BP
LEAQ m_libcall(BP), R11
MOVQ 88(SP), R10
MOVQ R10, libcall_fn(R11)
MOVQ 96(SP), R10
MOVQ R10, libcall_args(R11)
MOVQ 104(SP), R10
MOVQ R10, libcall_n(R11)
MOVQ 168(SP), R10
MOVQ R10, libcall_r1(R11)
MOVQ 176(SP), R10
MOVQ R10, libcall_r2(R11)
LEAQ m_scratch(BP), R11
MOVQ 112(SP), R10
MOVQ R10, 0(R11)
MOVQ 120(SP), R10
MOVQ R10, 8(R11)
MOVQ 128(SP), R10
MOVQ R10, 16(R11)
MOVQ 136(SP), R10
MOVQ R10, 24(R11)
MOVQ 144(SP), R10
MOVQ R10, 32(R11)
MOVQ 152(SP), R10
MOVQ R10, 40(R11)
MOVQ m_perrno(BP), R11
MOVQ 160(SP), R10
MOVL R10, 0(R11)
MOVQ 80(SP), R10
MOVQ R10, g(BX)
MOVQ 32(SP), BX
MOVQ 40(SP), BP
MOVQ 48(SP), R12
MOVQ 56(SP), R13
MOVQ 64(SP), R14
MOVQ 72(SP), R15
ADDQ $184, SP
RET