	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_wifi                      ## -- Begin function read_wifi
	.p2align	4, 0x90
_read_wifi:                             ## @read_wifi
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_read_wifi.buf(%rip), %rsi
	testq	%rsi, %rsi
	jne	LBB0_3
## %bb.1:
	movl	$4096, %edi                     ## imm = 0x1000
	callq	_malloc
	movq	%rax, %rsi
	movq	%rax, _read_wifi.buf(%rip)
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_err
	movq	_read_wifi.buf(%rip), %rsi
LBB0_3:
	movl	12(%r14), %edi
	movl	$4096, %edx                     ## imm = 0x1000
	callq	_sniff
	movl	%eax, -20(%rbp)
	cmpl	$-1, %eax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_5:
	movq	_read_wifi.buf(%rip), %rdi
	leaq	-20(%rbp), %rsi
	callq	_get_wifi
	testq	%rax, %rax
	je	LBB0_13
## %bb.6:
	movq	%rax, %rbx
	movq	_IEEE80211_FC0_TYPE_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IEEE80211_FC0_SUBTYPE_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_frame_type
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movl	8(%r14), %edi
	movl	(%rbx), %esi
	movl	$6, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_8
LBB0_9:
	movq	_IEEE80211_FC0_TYPE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IEEE80211_FC0_SUBTYPE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_frame_type
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movl	-20(%rbp), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_wanted
	testl	%eax, %eax
	je	LBB0_13
## %bb.11:
	movl	-20(%rbp), %ecx
	leaq	_read_wifi.buf(%rip), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_enque
	movq	(%r14), %rax
	movq	_S_START@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	callq	_send_queue
	jmp	LBB0_13
LBB0_8:
	movq	%r14, %rdi
	callq	_got_ack
LBB0_13:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_read_wifi.buf,8,3 ## @read_wifi.buf
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"malloc()"

L_.str.1:                               ## @.str.1
	.asciz	"sniff()"

	.comm	_IEEE80211_FC0_TYPE_CTL,4,2     ## @IEEE80211_FC0_TYPE_CTL
	.comm	_IEEE80211_FC0_SUBTYPE_ACK,4,2  ## @IEEE80211_FC0_SUBTYPE_ACK
	.comm	_IEEE80211_FC0_TYPE_DATA,4,2    ## @IEEE80211_FC0_TYPE_DATA
	.comm	_IEEE80211_FC0_SUBTYPE_DATA,4,2 ## @IEEE80211_FC0_SUBTYPE_DATA
	.comm	_S_START,8,3                    ## @S_START
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_wifi                      ; -- Begin function read_wifi
	.p2align	2
_read_wifi:                             ; @read_wifi
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	adrp	x20, _read_wifi.buf@PAGE
	ldr	x1, [x20, _read_wifi.buf@PAGEOFF]
	cbnz	x1, LBB0_3
; %bb.1:
	mov	w0, #4096
	bl	_malloc
	mov	x1, x0
	str	x0, [x20, _read_wifi.buf@PAGEOFF]
	cbnz	x0, LBB0_3
; %bb.2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
	ldr	x1, [x20, _read_wifi.buf@PAGEOFF]
LBB0_3:
	ldr	w0, [x19, #12]
	mov	w2, #4096
	bl	_sniff
	str	w0, [sp, #12]
	cmn	w0, #1
	b.ne	LBB0_5
; %bb.4:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_5:
	ldr	x0, [x20, _read_wifi.buf@PAGEOFF]
	add	x1, sp, #12
	bl	_get_wifi
	cbz	x0, LBB0_13
; %bb.6:
	mov	x20, x0
Lloh4:
	adrp	x8, _IEEE80211_FC0_TYPE_CTL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IEEE80211_FC0_TYPE_CTL@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x8, _IEEE80211_FC0_SUBTYPE_ACK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IEEE80211_FC0_SUBTYPE_ACK@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	bl	_frame_type
	cbz	x0, LBB0_8
; %bb.7:
	ldr	w0, [x19, #8]
	ldr	w1, [x20]
	mov	w2, #6
	bl	_memcmp
	cbz	x0, LBB0_12
LBB0_8:
Lloh10:
	adrp	x8, _IEEE80211_FC0_TYPE_DATA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IEEE80211_FC0_TYPE_DATA@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _IEEE80211_FC0_SUBTYPE_DATA@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IEEE80211_FC0_SUBTYPE_DATA@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_frame_type
	cbz	x0, LBB0_13
; %bb.9:
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	x1, x20
	bl	_wanted
	cbz	w0, LBB0_13
; %bb.10:
	ldr	w3, [sp, #12]
Lloh16:
	adrp	x1, _read_wifi.buf@PAGE
Lloh17:
	add	x1, x1, _read_wifi.buf@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_enque
	ldr	x8, [x19]
Lloh18:
	adrp	x9, _S_START@GOTPAGE
Lloh19:
	ldr	x9, [x9, _S_START@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.11:
	mov	x0, x19
	bl	_send_queue
	b	LBB0_13
LBB0_12:
	mov	x0, x19
	bl	_got_ack
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_read_wifi.buf,8,3 ; @read_wifi.buf
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"malloc()"

l_.str.1:                               ; @.str.1
	.asciz	"sniff()"

	.comm	_IEEE80211_FC0_TYPE_CTL,4,2     ; @IEEE80211_FC0_TYPE_CTL
	.comm	_IEEE80211_FC0_SUBTYPE_ACK,4,2  ; @IEEE80211_FC0_SUBTYPE_ACK
	.comm	_IEEE80211_FC0_TYPE_DATA,4,2    ; @IEEE80211_FC0_TYPE_DATA
	.comm	_IEEE80211_FC0_SUBTYPE_DATA,4,2 ; @IEEE80211_FC0_SUBTYPE_DATA
	.comm	_S_START,8,3                    ; @S_START
.subsections_via_symbols
