	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_l2_packet_init                 ## -- Begin function l2_packet_init
	.p2align	4, 0x90
_l2_packet_init:                        ## @l2_packet_init
	.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	%r9d, -44(%rbp)                 ## 4-byte Spill
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r12
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	_l2_ndisuio_global@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	movl	$48, %edi
	callq	_os_zalloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_17
## %bb.2:
	movw	%r14w, (%rax)
LBB0_3:
	movl	4(%rax), %ecx
	cmpl	$2, %ecx
	jl	LBB0_5
## %bb.4:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_wpa_printf
	jmp	LBB0_18
LBB0_5:
	incl	%ecx
	movl	%ecx, 4(%rax)
	movl	$48, %edi
	callq	_os_zalloc
	testq	%rax, %rax
	je	LBB0_17
## %bb.6:
	movq	%rax, %rbx
	movq	_l2_ndisuio_global@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	40(%rax), %rcx
	movslq	4(%rax), %rax
	movq	%rbx, -8(%rcx,%rax,8)
	movl	40(%rbx), %edi
	movq	%r13, %rsi
	movl	$4, %edx
	callq	_os_strlcpy
	movq	%r12, (%rbx)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 32(%rbx)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%rbx)
	testq	%r15, %r15
	je	LBB0_8
## %bb.7:
	movl	24(%rbx), %edi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rsi
	callq	_os_memcpy
LBB0_8:
	movzwl	%r14w, %r14d
	movl	%r14d, %edi
	callq	_l2_ndisuio_set_ether_type
	testq	%rax, %rax
	js	LBB0_16
## %bb.9:
	movq	_l2_ndisuio_global@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	cmpl	$2, 4(%rax)
	jl	LBB0_14
## %bb.10:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	(%r15), %rax
	movq	40(%rax), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_18
## %bb.11:
	movq	16(%rax), %rax
	movq	%rax, 16(%rbx)
	jmp	LBB0_18
LBB0_14:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	xorl	%ecx, %ecx
	callq	_CreateEvent
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	_l2_packet_rx_event@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	movl	$8, %esi
	movq	%rbx, %rcx
	xorl	%r8d, %r8d
	callq	_eloop_register_event
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_l2_ndisuio_start_read
	jmp	LBB0_18
LBB0_16:
	movq	%rbx, %rdi
	callq	_os_free
LBB0_17:
	xorl	%ebx, %ebx
LBB0_18:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_l2_ndisuio_global,8,3          ## @l2_ndisuio_global
	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"L2(NDISUIO): Not more than two simultaneous connections allowed"

	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"L2(NDISUIO): Temporarily setting filtering ethertype to %04x"

	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_l2_packet_rx_event,4,2         ## @l2_packet_rx_event
	.comm	_MSG_INFO,4,2                   ## @MSG_INFO
	.comm	_l2_packet_rx_thread,4,2        ## @l2_packet_rx_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_l2_packet_init                 ; -- Begin function l2_packet_init
	.p2align	2
_l2_packet_init:                        ; @l2_packet_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x22, x5
	mov	x23, x4
	mov	x24, x3
	mov	x20, x2
	mov	x21, x1
	mov	x25, x0
Lloh0:
	adrp	x26, _l2_ndisuio_global@GOTPAGE
Lloh1:
	ldr	x26, [x26, _l2_ndisuio_global@GOTPAGEOFF]
	ldr	x0, [x26]
	cbnz	x0, LBB0_3
; %bb.1:
	mov	w0, #48
	bl	_os_zalloc
	str	x0, [x26]
	cbz	x0, LBB0_15
; %bb.2:
	strh	w20, [x0]
LBB0_3:
	ldr	w8, [x0, #4]
	cmp	w8, #2
	b.lt	LBB0_5
; %bb.4:
Lloh2:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	b	LBB0_15
LBB0_5:
	add	w8, w8, #1
	str	w8, [x0, #4]
	mov	w0, #48
	bl	_os_zalloc
	mov	x19, x0
	cbz	x0, LBB0_16
; %bb.6:
	ldr	x8, [x26]
	ldr	x9, [x8, #40]
	ldrsw	x8, [x8, #4]
	add	x8, x9, x8, lsl #3
	stur	x19, [x8, #-8]
	ldr	w0, [x19, #40]
	mov	x1, x25
	mov	w2, #4
	bl	_os_strlcpy
	str	x24, [x19]
	str	x23, [x19, #32]
	str	w22, [x19, #8]
	cbz	x21, LBB0_8
; %bb.7:
	ldr	w0, [x19, #24]
Lloh7:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x1, x21
	bl	_os_memcpy
LBB0_8:
	mov	x0, x20
	bl	_l2_ndisuio_set_ether_type
	tbnz	x0, #63, LBB0_14
; %bb.9:
	ldr	x8, [x26]
	ldr	w8, [x8, #4]
	cmp	w8, #2
	b.lt	LBB0_12
; %bb.10:
Lloh10:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	mov	w8, w20
	str	x8, [sp]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
	ldr	x8, [x26]
	ldr	x8, [x8, #40]
	ldr	x8, [x8]
	cbz	x8, LBB0_16
; %bb.11:
	ldr	x8, [x8, #16]
	str	x8, [x19, #16]
	b	LBB0_16
LBB0_12:
Lloh15:
	adrp	x8, _TRUE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _FALSE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, #0
	mov	x3, #0
	bl	_CreateEvent
	str	x0, [x19, #16]
	cbz	x0, LBB0_14
; %bb.13:
Lloh21:
	adrp	x8, _l2_packet_rx_event@GOTPAGE
Lloh22:
	ldr	x8, [x8, _l2_packet_rx_event@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	w1, #8
	mov	x3, x19
	mov	x4, #0
	bl	_eloop_register_event
	mov	x0, x19
	mov	w1, #0
	bl	_l2_ndisuio_start_read
	b	LBB0_16
LBB0_14:
	mov	x0, x19
	bl	_os_free
LBB0_15:
	mov	x19, #0
LBB0_16:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_l2_ndisuio_global,8,3          ; @l2_ndisuio_global
	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"L2(NDISUIO): Not more than two simultaneous connections allowed"

	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"L2(NDISUIO): Temporarily setting filtering ethertype to %04x"

	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_l2_packet_rx_event,4,2         ; @l2_packet_rx_event
	.comm	_MSG_INFO,4,2                   ; @MSG_INFO
	.comm	_l2_packet_rx_thread,4,2        ; @l2_packet_rx_thread
.subsections_via_symbols
