	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_tap                       ## -- Begin function read_tap
	.p2align	4, 0x90
_read_tap:                              ## @read_tap
	.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
	movq	%rdi, %r15
	movq	_Z_NULL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	xorl	%edi, %edi
	xorl	%edx, %edx
	callq	_crc32
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	(%r15), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	(%r15), %r13
	addq	$46, %r13
	movl	68(%r15), %edi
	movq	%r13, %rsi
	movl	$-38, %edx
	callq	_read
	movl	%eax, %r14d
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_2:
	leaq	-54(%rbp), %r12
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	$6, %edx
	callq	_memcpy
	movq	(%r15), %rbx
	movq	_IEEE80211_FC0_TYPE_DATA@GOTPCREL(%rip), %rax
	movq	40(%rbx), %rcx
	movl	(%rcx), %edx
	movl	4(%rcx), %esi
	orl	(%rax), %edx
	movl	%edx, (%rcx)
	movq	_IEEE80211_FC0_SUBTYPE_DATA@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%edx, (%rcx)
	movq	_IEEE80211_FC1_PROTECTED@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_IEEE80211_FC1_DIR_TODS@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	%esi, 4(%rcx)
	movq	(%rbx), %rax
	movl	$105, (%rax)
	movq	8(%rbx), %rdi
	movq	8(%r15), %rsi
	movl	$6, %edx
	callq	_memcpy
	movq	16(%rbx), %rdi
	movq	16(%r15), %rsi
	movl	$6, %edx
	callq	_memcpy
	movq	24(%rbx), %rdi
	movq	%r12, %rsi
	movl	$6, %edx
	callq	_memcpy
	movq	32(%rbx), %r12
	movl	64(%r15), %edi
	leal	1(%rdi), %eax
	movl	%eax, 64(%r15)
                                        ## kill: def $edi killed $edi killed $rdi
	xorl	%esi, %esi
	callq	_seqfn
	movw	%ax, (%r12)
	leaq	48(%rbx), %rdi
	movq	24(%r15), %rsi
	movl	$3, %edx
	callq	_memcpy
	leaq	52(%rbx), %r12
	movb	$0, 51(%rbx)
	leaq	l_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	$6, %edx
	callq	_memcpy
	movslq	%r14d, %r13
	leaq	-6(%r13), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_crc32
	movq	%rax, 46(%rbx,%r13)
	leal	-2(%r14), %r13d
	xorl	%edi, %edi
	cmpl	%r13d, 32(%r15)
	setge	%dil
	callq	_assert
	cmpl	$3, %r14d
	jl	LBB0_9
## %bb.3:
	movl	%r13d, %edi
	cmpl	$1, %r13d
	jne	LBB0_5
## %bb.4:
	xorl	%ecx, %ecx
	jmp	LBB0_7
LBB0_5:
	movl	%edi, %edx
	andl	$-2, %edx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	40(%r15), %rsi
	movzbl	(%rsi,%rcx), %eax
	xorb	%al, 52(%rbx,%rcx)
	movq	40(%r15), %rax
	movzbl	1(%rax,%rcx), %eax
	xorb	%al, 53(%rbx,%rcx)
	addq	$2, %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_6
LBB0_7:
	testb	$1, %dil
	je	LBB0_9
## %bb.8:
	movq	40(%r15), %rax
	movb	(%rax,%rcx), %al
	xorb	%al, (%r12,%rcx)
LBB0_9:
	addl	$50, %r14d
	movl	%r14d, 48(%r15)
	movq	$0, 56(%r15)
	movq	%r15, %rdi
	callq	_send_packet
	movq	_S_WAIT_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%r15)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Z_NULL,8,3                     ## @Z_NULL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read()"

	.comm	_IEEE80211_FC0_TYPE_DATA,4,2    ## @IEEE80211_FC0_TYPE_DATA
	.comm	_IEEE80211_FC0_SUBTYPE_DATA,4,2 ## @IEEE80211_FC0_SUBTYPE_DATA
	.comm	_IEEE80211_FC1_PROTECTED,4,2    ## @IEEE80211_FC1_PROTECTED
	.comm	_IEEE80211_FC1_DIR_TODS,4,2     ## @IEEE80211_FC1_DIR_TODS
	.section	__TEXT,__const
l_.str.1:                               ## @.str.1
	.asciz	"\252\252\003\000\000\000"

	.comm	_S_WAIT_ACK,4,2                 ## @S_WAIT_ACK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_tap                       ; -- Begin function read_tap
	.p2align	2
_read_tap:                              ; @read_tap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _Z_NULL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Z_NULL@GOTPAGEOFF]
Lloh2:
	ldr	x1, [x8]
	mov	x0, #0
	mov	w2, #0
	bl	_crc32
	mov	x21, x0
	ldr	x0, [x19]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	x8, [x19]
	add	x22, x8, #46
	ldr	w0, [x19, #68]
	mov	x1, x22
	mov	w2, #-38
	bl	_read
	mov	x20, x0
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_2:
	add	x0, sp, #10
	mov	x1, x22
	mov	w2, #6
	bl	_memcpy
Lloh5:
	adrp	x8, _IEEE80211_FC0_TYPE_DATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IEEE80211_FC0_TYPE_DATA@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldp	x23, x1, [x19]
	ldr	x9, [x23, #40]
	ldp	w10, w11, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
Lloh8:
	adrp	x10, _IEEE80211_FC0_SUBTYPE_DATA@GOTPAGE
Lloh9:
	ldr	x10, [x10, _IEEE80211_FC0_SUBTYPE_DATA@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	orr	w8, w10, w8
Lloh11:
	adrp	x10, _IEEE80211_FC1_PROTECTED@GOTPAGE
Lloh12:
	ldr	x10, [x10, _IEEE80211_FC1_PROTECTED@GOTPAGEOFF]
	str	w8, [x9]
Lloh13:
	ldr	w8, [x10]
	orr	w8, w11, w8
Lloh14:
	adrp	x10, _IEEE80211_FC1_DIR_TODS@GOTPAGE
Lloh15:
	ldr	x10, [x10, _IEEE80211_FC1_DIR_TODS@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	orr	w8, w10, w8
	str	w8, [x9, #4]
	mov	w8, #105
	ldp	x9, x0, [x23]
	str	w8, [x9]
	mov	w2, #6
	bl	_memcpy
	ldr	x0, [x23, #16]
	ldr	x1, [x19, #16]
	mov	w2, #6
	bl	_memcpy
	ldr	x0, [x23, #24]
	add	x1, sp, #10
	mov	w2, #6
	bl	_memcpy
	ldr	x22, [x23, #32]
	ldr	w0, [x19, #64]
	add	w8, w0, #1
	str	w8, [x19, #64]
	mov	w1, #0
	bl	_seqfn
	strh	w0, [x22]
	add	x0, x23, #48
	ldr	x1, [x19, #24]
	mov	w2, #3
	bl	_memcpy
	add	x22, x23, #52
	strb	wzr, [x23, #51]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	w2, #6
	bl	_memcpy
	sxtw	x8, w20
	sub	x23, x8, #6
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	bl	_crc32
	str	x0, [x22, x23]
	sub	w21, w20, #2
	ldr	w8, [x19, #32]
	cmp	w8, w21
	cset	w0, ge
	bl	_assert
	cmp	w20, #3
	b.lt	LBB0_5
; %bb.3:
	mov	x8, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #40]
	ldrb	w9, [x9, x8]
	ldrb	w10, [x22, x8]
	eor	w9, w10, w9
	strb	w9, [x22, x8]
	add	x8, x8, #1
	cmp	x21, x8
	b.ne	LBB0_4
LBB0_5:
	add	w8, w20, #50
	str	w8, [x19, #48]
	str	xzr, [x19, #56]
	mov	x0, x19
	bl	_send_packet
Lloh19:
	adrp	x8, _S_WAIT_ACK@GOTPAGE
Lloh20:
	ldr	x8, [x8, _S_WAIT_ACK@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x19, #52]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_Z_NULL,8,3                     ; @Z_NULL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read()"

	.comm	_IEEE80211_FC0_TYPE_DATA,4,2    ; @IEEE80211_FC0_TYPE_DATA
	.comm	_IEEE80211_FC0_SUBTYPE_DATA,4,2 ; @IEEE80211_FC0_SUBTYPE_DATA
	.comm	_IEEE80211_FC1_PROTECTED,4,2    ; @IEEE80211_FC1_PROTECTED
	.comm	_IEEE80211_FC1_DIR_TODS,4,2     ; @IEEE80211_FC1_DIR_TODS
	.section	__TEXT,__const
l_.str.1:                               ; @.str.1
	.asciz	"\252\252\003\000\000\000"

	.comm	_S_WAIT_ACK,4,2                 ; @S_WAIT_ACK
.subsections_via_symbols
