#include "zasm_GOOS_GOARCH.h"
#include "../../cmd/ld/textflag.h"
TEXT runtime·setldt(SB),NOSPLIT,$0
RET
TEXT runtime·open(SB),NOSPLIT,$0
MOVQ $0x8000, AX
MOVQ $14, BP
SYSCALL
RET
TEXT runtime·pread(SB),NOSPLIT,$0
MOVQ $0x8000, AX
MOVQ $50, BP
SYSCALL
RET
TEXT runtime·pwrite(SB),NOSPLIT,$0
MOVQ $0x8000, AX
MOVQ $51, BP
SYSCALL
RET
TEXT _seek<>(SB),NOSPLIT,$0
MOVQ $0x8000, AX
MOVQ $39, BP
SYSCALL
RET
TEXT runtime·seek(SB),NOSPLIT,$56
LEAQ new+48(SP), CX
MOVQ CX, 0(SP)
MOVQ fd+0(FP), CX
MOVQ CX, 8(SP)
MOVQ off+8(FP), CX
MOVQ CX, 16(SP)
MOVQ whence+16(FP), CX
MOVQ CX, 24(SP)
CALL _seek<>(SB)
CMPL AX, $0
JGE 2(PC)
MOVQ $-1, new+48(SP)
MOVQ new+48(SP), AX
RET
TEXT runtime·close(SB),NOSPLIT,$0
MOVQ $0x8000, AX
MOVQ $4, BP
SYSCALL
RET
TEXT runtime·exits(SB),NOSPLIT,$0
MOVQ $0x8000, AX
MOVQ $8, BP
SYSCALL
RET
TEXT runtime·brk_(SB),NOSPLIT,$0
MOVQ $0x8000, AX
MOVQ $24, BP
SYSCALL
RET
TEXT runtime·sleep(SB),NOSPLIT,$0
MOVQ $0x8000, AX
MOVQ $17, BP
SYSCALL
RET
TEXT runtime·plan9_semacquire(SB),NOSPLIT,$0
MOVQ $0x8000, AX
MOVQ $37, BP
SYSCALL
RET
TEXT runtime·plan9_tsemacquire(SB),NOSPLIT,$0
MOVQ $0x8000, AX
MOVQ $52, BP
SYSCALL
RET
TEXT runtime·notify(SB),NOSPLIT,$0
MOVQ $0x8000, AX
MOVQ $28, BP
SYSCALL
RET
TEXT runtime·noted(SB),NOSPLIT,$0
MOVQ $0x8000, AX
MOVQ $29, BP
SYSCALL
RET
TEXT runtime·plan9_semrelease(SB),NOSPLIT,$0
MOVQ $0x8000, AX
MOVQ $38, BP
SYSCALL
RET
TEXT runtime·nanotime(SB),NOSPLIT,$0
MOVQ $0x8000, AX
MOVQ $60, BP
SYSCALL
RET
TEXT runtime·rfork(SB),NOSPLIT,$0
MOVQ $0x8000, AX
MOVQ $19, BP
SYSCALL
CMPQ AX, $0
JEQ 2(PC)
RET
MOVQ mm+24(SP), BX
MOVQ gg+32(SP), DX
MOVQ fn+40(SP), SI
MOVQ stack+16(SP), CX
MOVQ CX, SP
get_tls(AX)
MOVQ DX, g(AX)
MOVQ BX, m(AX)
MOVQ 0(FS), AX
MOVQ AX, m_procid(BX)
CALL runtime·stackcheck(SB)
MOVQ 0(DX), DX
MOVQ 0(BX), BX
CALL SI
CALL runtime·exit(SB)
RET
TEXT runtime·settls(SB),NOSPLIT,$0
RET
TEXT runtime·sigtramp(SB),NOSPLIT,$0
get_tls(AX)
MOVQ m(AX), BX
CMPQ BX, $0
JNE 3(PC)
CALL runtime·badsignal2(SB)
RET
MOVQ ureg+8(SP), CX
MOVQ note+16(SP), DX
MOVQ m_gsignal(BX), R10
MOVQ g_stackbase(R10), BP
MOVQ BP, SP
SUBQ $32, SP
MOVQ g(AX), BP
MOVQ BP, 24(SP)
MOVQ R10, g(AX)
MOVQ CX, 0(SP)
MOVQ DX, 8(SP)
MOVQ BP, 16(SP)
CALL runtime·sighandler(SB)
get_tls(BX)
MOVQ 24(SP), R10
MOVQ R10, g(BX)
MOVQ AX, 0(SP)
CALL runtime·noted(SB)
RET
TEXT runtime·setfpmasks(SB),NOSPLIT,$8
STMXCSR 0(SP)
MOVL 0(SP), AX
ANDL $~0x3F, AX
ORL $(0x3F<<7), AX
MOVL AX, 0(SP)
LDMXCSR 0(SP)
RET
#define ERRMAX 128
TEXT runtime·errstr(SB),NOSPLIT,$0
get_tls(AX)
MOVQ m(AX), BX
MOVQ m_errstr(BX), CX
MOVQ CX, 8(SP)
MOVQ $ERRMAX, 16(SP)
MOVQ $0x8000, AX
MOVQ $41, BP
SYSCALL
MOVQ 8(SP), CX
PUSHQ CX
CALL runtime·findnull(SB)
POPQ CX
MOVQ AX, 16(SP)
RET