	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_InternetTransport_ReadLine     ## -- Begin function InternetTransport_ReadLine
	.p2align	4, 0x90
_InternetTransport_ReadLine:            ## @InternetTransport_ReadLine
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	(%rdi), %rax
	movq	_IXP_DISCONNECTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_IXP_E_NOT_CONNECTED@GOTPCREL(%rip), %rbx
	jmp	LBB0_6
LBB0_2:
	movq	%rdi, %rbx
	cmpq	$0, 40(%rdi)
	je	LBB0_4
## %bb.3:
	movq	_IXP_E_BUSY@GOTPCREL(%rip), %rbx
	jmp	LBB0_6
LBB0_4:
	movq	%rsi, 40(%rbx)
	movl	$1024, 8(%rbx)                  ## imm = 0x400
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	8(%rbx), %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapAlloc
	movl	%eax, 32(%rbx)
	movq	$0, 24(%rbx)
	movl	12(%rbx), %esi
	movl	16(%rbx), %edi
	movq	_IX_READLINE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_FD_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_WSAAsyncSelect
	movq	_SOCKET_ERROR@GOTPCREL(%rip), %rcx
	movq	_S_OK@GOTPCREL(%rip), %rbx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	callq	_WSAGetLastError
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_ERR
LBB0_6:
	movl	(%rbx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IXP_DISCONNECTED,8,3           ## @IXP_DISCONNECTED
	.comm	_IXP_E_NOT_CONNECTED,4,2        ## @IXP_E_NOT_CONNECTED
	.comm	_IXP_E_BUSY,4,2                 ## @IXP_E_BUSY
	.comm	_IX_READLINE,4,2                ## @IX_READLINE
	.comm	_FD_READ,4,2                    ## @FD_READ
	.comm	_SOCKET_ERROR,8,3               ## @SOCKET_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WSAAsyncSelect failed with error %d\n"

	.comm	_S_OK,4,2                       ## @S_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_InternetTransport_ReadLine     ; -- Begin function InternetTransport_ReadLine
	.p2align	2
_InternetTransport_ReadLine:            ; @InternetTransport_ReadLine
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _IXP_DISCONNECTED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IXP_DISCONNECTED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _IXP_E_NOT_CONNECTED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IXP_E_NOT_CONNECTED@GOTPAGEOFF]
	b	LBB0_7
LBB0_2:
	mov	x19, x0
	ldr	x8, [x0, #40]
	cbz	x8, LBB0_4
; %bb.3:
Lloh5:
	adrp	x8, _IXP_E_BUSY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IXP_E_BUSY@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
	str	x1, [x19, #40]
	mov	w8, #1024
	str	w8, [x19, #8]
	bl	_GetProcessHeap
	ldr	w2, [x19, #8]
	mov	w1, #0
	bl	_HeapAlloc
	str	w0, [x19, #32]
	str	xzr, [x19, #24]
	ldp	w1, w0, [x19, #12]
Lloh7:
	adrp	x8, _IX_READLINE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IX_READLINE@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
Lloh10:
	adrp	x8, _FD_READ@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FD_READ@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
	bl	_WSAAsyncSelect
Lloh13:
	adrp	x8, _SOCKET_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SOCKET_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.5:
	bl	_WSAGetLastError
	mov	x1, x0
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERR
LBB0_6:
Lloh18:
	adrp	x8, _S_OK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _S_OK@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_IXP_DISCONNECTED,8,3           ; @IXP_DISCONNECTED
	.comm	_IXP_E_NOT_CONNECTED,4,2        ; @IXP_E_NOT_CONNECTED
	.comm	_IXP_E_BUSY,4,2                 ; @IXP_E_BUSY
	.comm	_IX_READLINE,4,2                ; @IX_READLINE
	.comm	_FD_READ,4,2                    ; @FD_READ
	.comm	_SOCKET_ERROR,8,3               ; @SOCKET_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WSAAsyncSelect failed with error %d\n"

	.comm	_S_OK,4,2                       ; @S_OK
.subsections_via_symbols
