	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_l2_packet_send                 ## -- Begin function l2_packet_send
	.p2align	4, 0x90
_l2_packet_send:                        ## @l2_packet_send
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$-1, %r12d
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.1:
	movq	%r8, %r14
	movq	%rcx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r13
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	leaq	-44(%rbp), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_os_memset
	cmpq	$0, 8(%r13)
	je	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	callq	_driver_ndis_get_ndisuio_handle
	leaq	-56(%rbp), %rcx
	leaq	-44(%rbp), %r8
	movl	%eax, %edi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_WriteFile
	movq	%rax, %rbx
	jmp	LBB0_5
LBB0_3:
	leaq	24(%r14), %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_os_malloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.4:
	movq	16(%rax), %rdi
	movq	%rbx, %r12
	movq	_ETH_ALEN@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	movq	%r15, %rsi
	movq	%rax, %r15
	callq	_os_memcpy
	movq	8(%r15), %rdi
	movq	(%r13), %rsi
	movq	(%rbx), %rdx
	callq	_os_memcpy
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_htons
	movl	%eax, (%r15)
	movq	%r15, %rdi
	addq	$24, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_os_memcpy
	xorl	%eax, %eax
	callq	_driver_ndis_get_ndisuio_handle
	leaq	-56(%rbp), %rcx
	leaq	-44(%rbp), %r8
	movl	%eax, %edi
	movq	%r15, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_WriteFile
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_os_free
LBB0_5:
	xorl	%r12d, %r12d
	testq	%rbx, %rbx
	jne	LBB0_11
## %bb.6:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_GetLastError
	movq	_ERROR_IO_PENDING@GOTPCREL(%rip), %rcx
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r14d
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.7:
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	xorl	%eax, %eax
	callq	_wpa_printf
	xorl	%eax, %eax
	callq	_driver_ndis_get_ndisuio_handle
	movq	_TRUE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	-44(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	movl	%eax, %edi
	callq	_GetOverlappedResult
	testq	%rax, %rax
	jne	LBB0_11
## %bb.8:
	movl	(%rbx), %ebx
	xorl	%eax, %eax
	callq	_GetLastError
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	jmp	LBB0_10
LBB0_9:
	xorl	%eax, %eax
	callq	_GetLastError
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edi
LBB0_10:
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_wpa_printf
	movl	$-1, %r12d
LBB0_11:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_ALEN,8,3                   ## @ETH_ALEN
	.comm	_ERROR_IO_PENDING,8,3           ## @ERROR_IO_PENDING
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"L2(NDISUIO): Wait for pending write to complete"

	.comm	_TRUE,4,2                       ## @TRUE
L_.str.1:                               ## @.str.1
	.asciz	"L2(NDISUIO): GetOverlappedResult failed: %d"

L_.str.2:                               ## @.str.2
	.asciz	"L2(NDISUIO): WriteFile failed: %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_l2_packet_send                 ; -- Begin function l2_packet_send
	.p2align	2
_l2_packet_send:                        ; @l2_packet_send
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	cbz	x0, LBB0_11
; %bb.1:
	mov	x19, x4
	mov	x20, x3
	mov	x23, x2
	mov	x25, x1
	mov	x24, x0
	add	x0, sp, #20
	mov	w1, #0
	mov	w2, #4
	bl	_os_memset
	ldr	x8, [x24, #8]
	cbz	x8, LBB0_3
; %bb.2:
	bl	_driver_ndis_get_ndisuio_handle
	add	x3, sp, #24
	add	x4, sp, #20
	mov	x1, x20
	mov	x2, x19
	bl	_WriteFile
	mov	x19, x0
	cbnz	x19, LBB0_7
	b	LBB0_5
LBB0_3:
	add	x21, x19, #24
	mov	x0, x21
	bl	_os_malloc
	cbz	x0, LBB0_11
; %bb.4:
	mov	x22, x0
	ldr	x0, [x0, #16]
Lloh0:
	adrp	x26, _ETH_ALEN@GOTPAGE
Lloh1:
	ldr	x26, [x26, _ETH_ALEN@GOTPAGEOFF]
	ldr	x2, [x26]
	mov	x1, x25
	bl	_os_memcpy
	ldr	x0, [x22, #8]
	ldr	x1, [x24]
	ldr	x2, [x26]
	bl	_os_memcpy
	mov	x0, x23
	bl	_htons
	str	w0, [x22]
	add	x0, x22, #24
	mov	x1, x20
	mov	x2, x19
	bl	_os_memcpy
	bl	_driver_ndis_get_ndisuio_handle
	add	x3, sp, #24
	add	x4, sp, #20
	mov	x1, x22
	mov	x2, x21
	bl	_WriteFile
	mov	x19, x0
	mov	x0, x22
	bl	_os_free
	cbnz	x19, LBB0_7
LBB0_5:
	bl	_GetLastError
Lloh2:
	adrp	x8, _ERROR_IO_PENDING@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ERROR_IO_PENDING@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x20, _MSG_DEBUG@GOTPAGE
Lloh6:
	ldr	x20, [x20, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w19, [x20]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.6:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_wpa_printf
	bl	_driver_ndis_get_ndisuio_handle
Lloh9:
	adrp	x8, _TRUE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	add	x1, sp, #20
	add	x2, sp, #24
	bl	_GetOverlappedResult
	cbz	x0, LBB0_9
LBB0_7:
	mov	w0, #0
	b	LBB0_12
LBB0_8:
	bl	_GetLastError
	str	x0, [sp]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_9:
	ldr	w19, [x20]
	bl	_GetLastError
	str	x0, [sp]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_10:
	mov	x0, x19
	bl	_wpa_printf
LBB0_11:
	mov	w0, #-1
LBB0_12:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_ALEN,8,3                   ; @ETH_ALEN
	.comm	_ERROR_IO_PENDING,8,3           ; @ERROR_IO_PENDING
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"L2(NDISUIO): Wait for pending write to complete"

	.comm	_TRUE,4,2                       ; @TRUE
l_.str.1:                               ; @.str.1
	.asciz	"L2(NDISUIO): GetOverlappedResult failed: %d"

l_.str.2:                               ; @.str.2
	.asciz	"L2(NDISUIO): WriteFile failed: %d"

.subsections_via_symbols
