#include "zasm_GOOS_GOARCH.h"
#include "../../cmd/ld/textflag.h"
TEXT runtime·asmstdcall(SB),NOSPLIT,$0
MOVL c+0(FP), BX
MOVL $0, 0x34(FS)
MOVL SP, BP
MOVL libcall_n(BX), CX
MOVL CX, AX
SALL $2, AX
SUBL AX, SP
MOVL SP, DI
MOVL libcall_args(BX), SI
CLD
REP; MOVSL
CALL libcall_fn(BX)
MOVL BP, SP
MOVL c+0(FP), BX
MOVL AX, libcall_r1(BX)
MOVL DX, libcall_r2(BX)
MOVL 0x34(FS), AX
MOVL AX, libcall_err(BX)
RET
TEXT runtime·badsignal2(SB),NOSPLIT,$24
MOVL $-12, 0(SP)
MOVL SP, BP
CALL *runtime·GetStdHandle(SB)
MOVL BP, SP
MOVL AX, 0(SP)
MOVL $runtime·badsignalmsg(SB), DX
MOVL DX, 4(SP)
MOVL runtime·badsignallen(SB), DX
MOVL DX, 8(SP)
LEAL 20(SP), DX
MOVL $0, 0(DX)
MOVL DX, 12(SP)
MOVL $0, 16(SP)
CALL *runtime·WriteFile(SB)
MOVL BP, SI
RET
TEXT runtime·getlasterror(SB),NOSPLIT,$0
MOVL 0x34(FS), AX
RET
TEXT runtime·setlasterror(SB),NOSPLIT,$0
MOVL err+0(FP), AX
MOVL AX, 0x34(FS)
RET
TEXT runtime·sigtramp(SB),NOSPLIT,$0-0
MOVL ptrs+0(FP), CX
SUBL $28, SP
MOVL BX, 12(SP)
MOVL BP, 16(SP)
MOVL SI, 20(SP)
MOVL DI, 24(SP)
MOVL 0(CX), BX
MOVL 4(CX), CX
get_tls(DX)
MOVL m(DX), AX
CMPL AX, $0
JNE 2(PC)
CALL runtime·badsignal2(SB)
MOVL g(DX), DX
MOVL BX, 0(SP)
MOVL CX, 4(SP)
MOVL DX, 8(SP)
CALL runtime·sighandler(SB)
MOVL 24(SP), DI
MOVL 20(SP), SI
MOVL 16(SP), BP
MOVL 12(SP), BX
ADDL $28, SP
BYTE $0xC2; WORD $4
RET
TEXT runtime·ctrlhandler(SB),NOSPLIT,$0
PUSHL $runtime·ctrlhandler1(SB)
CALL runtime·externalthreadhandler(SB)
MOVL 4(SP), CX
ADDL $12, SP
JMP CX
TEXT runtime·profileloop(SB),NOSPLIT,$0
PUSHL $runtime·profileloop1(SB)
CALL runtime·externalthreadhandler(SB)
MOVL 4(SP), CX
ADDL $12, SP
JMP CX
TEXT runtime·externalthreadhandler(SB),NOSPLIT,$0
PUSHL BP
MOVL SP, BP
PUSHL BX
PUSHL SI
PUSHL DI
PUSHL 0x14(FS)
MOVL SP, DX
SUBL $m_end, SP
MOVL SP, 0(SP)
MOVL $m_end, 4(SP)
CALL runtime·memclr(SB)
LEAL m_tls(SP), CX
MOVL CX, 0x14(FS)
MOVL SP, m(CX)
MOVL SP, BX
SUBL $g_end, SP
MOVL SP, g(CX)
MOVL SP, m_g0(BX)
MOVL SP, 0(SP)
MOVL $g_end, 4(SP)
CALL runtime·memclr(SB)
LEAL -4096(SP), CX
MOVL CX, g_stackguard(SP)
MOVL DX, g_stackbase(SP)
PUSHL 16(BP)
CALL 8(BP)
POPL CX
get_tls(CX)
MOVL g(CX), CX
MOVL g_stackbase(CX), SP
POPL 0x14(FS)
POPL DI
POPL SI
POPL BX
POPL BP
RET
GLOBL runtime·cbctxts(SB), $4
TEXT runtime·callbackasm1+0(SB),NOSPLIT,$0
MOVL 0(SP), AX
ADDL $4, SP
LEAL 4(SP), CX
PUSHL DI
PUSHL SI
PUSHL BP
PUSHL BX
SUBL $runtime·callbackasm(SB), AX
MOVL $0, DX
MOVL $5, BX
DIVL BX,
MOVL runtime·cbctxts(SB), BX
MOVL -4(BX)(AX*4), BX
MOVL cbctxt_gobody(BX), AX
MOVL cbctxt_argsize(BX), DX
PUSHL 0(CX)(DX*1)
ADDL $4, DX
MOVL cbctxt_restorestack(BX), BX
PUSHL BX
PUSHL DX
PUSHL CX
PUSHL AX
CLD
CALL runtime·cgocallback_gofunc(SB)
POPL AX
POPL CX
POPL DX
POPL BX
MOVL -4(CX)(DX*1), AX
POPL -4(CX)(DX*1)
MOVL BX, CX
POPL BX
POPL BP
POPL SI
POPL DI
POPL DX
ADDL CX, SP
PUSHL DX
CLD
RET
TEXT runtime·tstart(SB),NOSPLIT,$0
MOVL newm+4(SP), CX
MOVL m_g0(CX), DX
MOVL SP, AX
MOVL AX, g_stackbase(DX)
SUBL $(64*1024), AX
MOVL AX, g_stackguard(DX)
LEAL m_tls(CX), SI
MOVL SI, 0x14(FS)
MOVL CX, m(SI)
MOVL DX, g(SI)
CLD
CALL runtime·stackcheck(SB)
CALL runtime·mstart(SB)
RET
TEXT runtime·tstart_stdcall(SB),NOSPLIT,$0
MOVL newm+4(SP), BX
PUSHL BX
CALL runtime·tstart(SB)
POPL BX
MOVL (SP), AX
ADDL $4, SP
MOVL AX, (SP)
XORL AX, AX
RET
TEXT runtime·setldt(SB),NOSPLIT,$0
MOVL address+4(FP), CX
MOVL CX, 0x14(FS)
RET
TEXT runtime·usleep1(SB),NOSPLIT,$0
MOVL duration+0(FP), BX
MOVL $runtime·usleep2(SB), AX
get_tls(CX)
CMPL CX, $0
JNE 3(PC)
CALL AX
RET
MOVL m(CX), BP
MOVL (SP), SI
MOVL SI, m_libcallpc(BP)
MOVL g(CX), SI
MOVL SI, m_libcallg(BP)
LEAL 4(SP), SI
MOVL SI, m_libcallsp(BP)
MOVL m_g0(BP), SI
CMPL g(CX), SI
JNE usleep1_switch
CALL AX
JMP usleep1_ret
usleep1_switch:
MOVL (g_sched+gobuf_sp)(SI), SI
MOVL SP, -4(SI)
LEAL -4(SI), SP
CALL AX
MOVL 0(SP), SP
usleep1_ret:
get_tls(CX)
MOVL m(CX), BP
MOVL $0, m_libcallsp(BP)
RET
TEXT runtime·usleep2(SB),NOSPLIT,$20
NEGL BX
MOVL $-1, hi-4(SP)
MOVL BX, lo-8(SP)
LEAL lo-8(SP), BX
MOVL BX, ptime-12(SP)
MOVL $0, alertable-16(SP)
MOVL $-1, handle-20(SP)
MOVL SP, BP
MOVL runtime·NtWaitForSingleObject(SB), AX
CALL AX
MOVL BP, SP
RET