	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TCPSendIoctl                   ## -- Begin function TCPSendIoctl
	.p2align	4, 0x90
_TCPSendIoctl:                          ## @TCPSendIoctl
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r15
                                        ## kill: def $r8d killed $r8d def $r8
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movl	%edx, %ebx
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, -48(%rbp)
	movq	_FALSE@GOTPCREL(%rip), %r13
	movq	_INVALID_HANDLE_VALUE@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	jne	LBB0_1
## %bb.2:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	leaq	l_.str(%rip), %rdi
	callq	_RTL_CONSTANT_STRING
	movl	%eax, -56(%rbp)
	leaq	L_.str.1(%rip), %rdi
	callq	_FIXME
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_OBJ_CASE_INSENSITIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-100(%rbp), %r14
	leaq	-56(%rbp), %rsi
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_InitializeObjectAttributes
	movq	_GENERIC_EXECUTE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FILE_ATTRIBUTE_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_FILE_SHARE_READ@GOTPCREL(%rip), %rax
	movq	_FILE_SHARE_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movq	_FILE_OPEN_IF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	leaq	-48(%rbp), %rdi
	leaq	-72(%rbp), %rcx
	movq	%r14, %rdx
	xorl	%r8d, %r8d
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	%rax
	pushq	%rbx
	callq	_NtCreateFile
	addq	$48, %rsp
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_NT_SUCCESS
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	_FALSE@GOTPCREL(%rip), %r13
	movq	(%r13), %rdx
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_5
LBB0_1:
	movq	(%r13), %rdx
	movq	%rdx, %r12
LBB0_5:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	xorl	%edi, %edi
	xorl	%ecx, %ecx
	callq	_CreateEventW
	testq	%rax, %rax
	je	LBB0_6
## %bb.9:
	movq	%rax, %r14
	movq	_STATUS_SUCCESS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)
	movq	$0, -64(%rbp)
	movq	-48(%rbp), %rdi
	leaq	-72(%rbp), %r8
	movq	%r14, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	-52(%rbp), %r9d                 ## 4-byte Reload
	pushq	(%r15)
	pushq	-88(%rbp)                       ## 8-byte Folded Reload
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	pushq	(%rax)
	pushq	%rbx
	callq	_NtDeviceIoControlFile
	addq	$32, %rsp
	movq	%rax, %rbx
	movq	_STATUS_PENDING@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_11
## %bb.10:
	movq	(%r13), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_NtWaitForSingleObject
	movq	-72(%rbp), %rbx
LBB0_11:
	movq	%r14, %rdi
	callq	_CloseHandle
	movq	-64(%rbp), %rax
	movq	%rax, (%r15)
	testq	%r12, %r12
	je	LBB0_13
## %bb.12:
	movq	-48(%rbp), %rdi
	callq	_CloseHandle
LBB0_13:
	movq	%rbx, %rdi
	callq	_NT_SUCCESS
	testl	%eax, %eax
	je	LBB0_3
## %bb.14:
	movq	_ERROR_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_15
LBB0_3:
	movq	%rbx, %rdi
	callq	_RtlNtStatusToDosError
	jmp	LBB0_15
LBB0_6:
	testq	%r12, %r12
	je	LBB0_8
## %bb.7:
	movq	-48(%rbp), %rdi
	callq	_CloseHandle
LBB0_8:
	xorl	%eax, %eax
	callq	_GetLastError
LBB0_15:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_INVALID_HANDLE_VALUE,8,3       ## @INVALID_HANDLE_VALUE
	.section	__TEXT,__const
	.p2align	2                               ## @.str
l_.str:
	.long	92                              ## 0x5c
	.long	68                              ## 0x44
	.long	101                             ## 0x65
	.long	118                             ## 0x76
	.long	105                             ## 0x69
	.long	99                              ## 0x63
	.long	101                             ## 0x65
	.long	92                              ## 0x5c
	.long	73                              ## 0x49
	.long	112                             ## 0x70
	.long	0                               ## 0x0

	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"Using the handle hack\n"

	.comm	_TRUE,8,3                       ## @TRUE
	.comm	_OBJ_CASE_INSENSITIVE,4,2       ## @OBJ_CASE_INSENSITIVE
	.comm	_GENERIC_EXECUTE,4,2            ## @GENERIC_EXECUTE
	.comm	_FILE_ATTRIBUTE_NORMAL,4,2      ## @FILE_ATTRIBUTE_NORMAL
	.comm	_FILE_SHARE_READ,4,2            ## @FILE_SHARE_READ
	.comm	_FILE_SHARE_WRITE,4,2           ## @FILE_SHARE_WRITE
	.comm	_FILE_OPEN_IF,4,2               ## @FILE_OPEN_IF
	.comm	_STATUS_SUCCESS,8,3             ## @STATUS_SUCCESS
	.comm	_STATUS_PENDING,8,3             ## @STATUS_PENDING
	.comm	_ERROR_SUCCESS,4,2              ## @ERROR_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TCPSendIoctl                   ; -- Begin function TCPSendIoctl
	.p2align	2
_TCPSendIoctl:                          ; @TCPSendIoctl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x5
	mov	x22, x4
	mov	x23, x3
	mov	x20, x2
	mov	x21, x1
	str	x0, [sp, #56]
Lloh0:
	adrp	x25, _FALSE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _FALSE@GOTPAGEOFF]
Lloh2:
	adrp	x8, _INVALID_HANDLE_VALUE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _INVALID_HANDLE_VALUE@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x27, _TRUE@GOTPAGE
Lloh6:
	ldr	x27, [x27, _TRUE@GOTPAGEOFF]
	cmp	x8, x0
	b.ne	LBB0_3
; %bb.1:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RTL_CONSTANT_STRING
	str	w0, [sp, #36]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_FIXME
	ldr	x26, [x27]
Lloh11:
	adrp	x8, _OBJ_CASE_INSENSITIVE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _OBJ_CASE_INSENSITIVE@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	add	x0, sp, #32
	add	x1, sp, #36
	mov	x3, #0
	mov	x4, #0
	bl	_InitializeObjectAttributes
Lloh14:
	adrp	x8, _GENERIC_EXECUTE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GENERIC_EXECUTE@GOTPAGEOFF]
Lloh16:
	adrp	x9, _FILE_ATTRIBUTE_NORMAL@GOTPAGE
Lloh17:
	ldr	x9, [x9, _FILE_ATTRIBUTE_NORMAL@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	ldr	w5, [x9]
Lloh20:
	adrp	x8, _FILE_SHARE_READ@GOTPAGE
Lloh21:
	ldr	x8, [x8, _FILE_SHARE_READ@GOTPAGEOFF]
Lloh22:
	adrp	x9, _FILE_SHARE_WRITE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _FILE_SHARE_WRITE@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	ldr	w9, [x9]
	orr	w6, w9, w8
Lloh26:
	adrp	x8, _FILE_OPEN_IF@GOTPAGE
Lloh27:
	ldr	x8, [x8, _FILE_OPEN_IF@GOTPAGEOFF]
Lloh28:
	ldr	w7, [x8]
	str	wzr, [sp, #16]
	str	xzr, [sp, #8]
	add	x0, sp, #56
	add	x2, sp, #32
	add	x3, sp, #40
	str	wzr, [sp]
	mov	w4, #0
	bl	_NtCreateFile
	mov	x24, x0
	bl	_NT_SUCCESS
	cbz	w0, LBB0_14
; %bb.2:
	ldr	x2, [x25]
	b	LBB0_4
LBB0_3:
	ldr	x2, [x25]
	mov	x26, x2
LBB0_4:
	ldr	x1, [x27]
	mov	x0, #0
	mov	x3, #0
	bl	_CreateEventW
	cbz	x0, LBB0_11
; %bb.5:
	mov	x24, x0
Lloh29:
	adrp	x8, _STATUS_SUCCESS@GOTPAGE
Lloh30:
	ldr	x8, [x8, _STATUS_SUCCESS@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	stp	x8, xzr, [sp, #40]
	ldr	x0, [sp, #56]
	ldr	x7, [x23]
	ldr	x8, [x19]
	str	x8, [sp, #8]
	str	w22, [sp]
	add	x4, sp, #40
	mov	x1, x24
	mov	x2, #0
	mov	x3, #0
	mov	x5, x21
	mov	x6, x20
	bl	_NtDeviceIoControlFile
	mov	x20, x0
Lloh32:
	adrp	x8, _STATUS_PENDING@GOTPAGE
Lloh33:
	ldr	x8, [x8, _STATUS_PENDING@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.6:
	ldr	x1, [x25]
	mov	x0, x24
	mov	x2, #0
	bl	_NtWaitForSingleObject
	ldr	x20, [sp, #40]
LBB0_7:
	mov	x0, x24
	bl	_CloseHandle
	ldr	x8, [sp, #48]
	str	x8, [x19]
	cbz	x26, LBB0_9
; %bb.8:
	ldr	x0, [sp, #56]
	bl	_CloseHandle
LBB0_9:
	mov	x0, x20
	bl	_NT_SUCCESS
	cbz	w0, LBB0_15
; %bb.10:
Lloh35:
	adrp	x8, _ERROR_SUCCESS@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ERROR_SUCCESS@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	b	LBB0_17
LBB0_11:
	cbz	x26, LBB0_13
; %bb.12:
	ldr	x0, [sp, #56]
	bl	_CloseHandle
LBB0_13:
	bl	_GetLastError
	b	LBB0_17
LBB0_14:
	mov	x0, x24
	b	LBB0_16
LBB0_15:
	mov	x0, x20
LBB0_16:
	bl	_RtlNtStatusToDosError
LBB0_17:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh24
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh18
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_INVALID_HANDLE_VALUE,8,3       ; @INVALID_HANDLE_VALUE
	.section	__TEXT,__const
	.p2align	2                               ; @.str
l_.str:
	.long	92                              ; 0x5c
	.long	68                              ; 0x44
	.long	101                             ; 0x65
	.long	118                             ; 0x76
	.long	105                             ; 0x69
	.long	99                              ; 0x63
	.long	101                             ; 0x65
	.long	92                              ; 0x5c
	.long	73                              ; 0x49
	.long	112                             ; 0x70
	.long	0                               ; 0x0

	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"Using the handle hack\n"

	.comm	_TRUE,8,3                       ; @TRUE
	.comm	_OBJ_CASE_INSENSITIVE,4,2       ; @OBJ_CASE_INSENSITIVE
	.comm	_GENERIC_EXECUTE,4,2            ; @GENERIC_EXECUTE
	.comm	_FILE_ATTRIBUTE_NORMAL,4,2      ; @FILE_ATTRIBUTE_NORMAL
	.comm	_FILE_SHARE_READ,4,2            ; @FILE_SHARE_READ
	.comm	_FILE_SHARE_WRITE,4,2           ; @FILE_SHARE_WRITE
	.comm	_FILE_OPEN_IF,4,2               ; @FILE_OPEN_IF
	.comm	_STATUS_SUCCESS,8,3             ; @STATUS_SUCCESS
	.comm	_STATUS_PENDING,8,3             ; @STATUS_PENDING
	.comm	_ERROR_SUCCESS,4,2              ; @ERROR_SUCCESS
.subsections_via_symbols
