	.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
	pushq	%rax
	movl	$4136, %eax                     ## imm = 0x1028
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%ebx, %ebx
	cmpl	$0, 4(%rdi)
	setne	%bl
	leal	18(,%rbx,4), %eax
	shll	$2, %ebx
	movq	%rax, -4152(%rbp)               ## 8-byte Spill
	leaq	(%rax,%rbp), %r13
	addq	$-4144, %r13                    ## imm = 0xEFD0
	xorl	$4078, %ebx                     ## imm = 0xFEE
	leaq	-4144(%rbp), %rdi
	xorl	%esi, %esi
	movl	$4096, %edx                     ## imm = 0x1000
	callq	_memset
	movl	12(%r15), %edi
	movq	%r13, %rsi
	movl	%ebx, %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	-4158(%rbp), %r12
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	$6, %edx
	callq	_memcpy
	addq	$6, %r13
	leaq	-4164(%rbp), %rbx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	$6, %edx
	callq	_memcpy
	leaq	-4144(%rbp), %rdi
	movq	%r15, %rsi
	callq	_fill_basic
	movq	-4144(%rbp), %rdi
	movq	%rbx, %rsi
	movl	$8, %edx
	callq	_memcpy
	movq	-4136(%rbp), %rdi
	movq	%r12, %rsi
	movl	$8, %edx
	callq	_memcpy
	movq	_IEEE80211_FC0_TYPE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-4128(%rbp), %rax
	orl	%ecx, (%rax)
	movq	_IEEE80211_FC1_DIR_FROMDS@GOTPCREL(%rip), %rdx
	movl	4(%rax), %ecx
	orl	(%rdx), %ecx
	movl	%ecx, 4(%rax)
	cmpl	$0, 4(%r15)
	je	LBB0_3
## %bb.5:
	movq	_IEEE80211_FC1_PROTECTED@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	%ecx, 4(%rax)
	cmpl	$0, 4(%r15)
	leaq	-4120(%rbp), %rdi
	je	LBB0_4
## %bb.6:
	xorl	%eax, %eax
	leaq	-4116(%rbp), %rcx
	jmp	LBB0_7
LBB0_3:
	leaq	-4120(%rbp), %rdi
LBB0_4:
	movb	$1, %al
	movq	%rdi, %rcx
LBB0_7:
	movb	$-86, (%rcx)
	movl	%eax, %ecx
	xorb	$1, %cl
	movzbl	%cl, %ecx
	movl	$938, -4119(%rbp,%rcx,4)        ## imm = 0x3AA
	movb	$0, -4115(%rbp,%rcx,4)
	addl	-4152(%rbp), %r14d              ## 4-byte Folded Reload
	testb	%al, %al
	jne	LBB0_9
## %bb.8:
	movq	%r15, %rsi
	movl	$3, %edx
	callq	_memcpy
	movb	$0, -4117(%rbp)
	incb	(%r15)
	movl	4(%r15), %ecx
	movl	8(%r15), %edx
	leaq	-4144(%rbp), %rdi
	movl	%r14d, %esi
	callq	_wep_encrypt
	addl	$4, %r14d
LBB0_9:
	leaq	-4144(%rbp), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_send_frame
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	addq	$4136, %rsp                     ## imm = 0x1028
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read()"

	.comm	_IEEE80211_FC0_TYPE_DATA,4,2    ## @IEEE80211_FC0_TYPE_DATA
	.comm	_IEEE80211_FC1_DIR_FROMDS,4,2   ## @IEEE80211_FC1_DIR_FROMDS
	.comm	_IEEE80211_FC1_PROTECTED,4,2    ## @IEEE80211_FC1_PROTECTED
.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:
	stp	x28, x27, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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 w27, -56
	.cfi_offset w28, -64
	mov	w9, #4128
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #1, lsl #12             ; =4096
	sub	sp, sp, #32
	mov	x19, x0
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	w8, [x0, #4]
	mov	w9, #22
	mov	w10, #18
	cmp	w8, #0
	csel	w22, w10, w9, eq
	add	x8, sp, #24
	add	x21, x8, x22
	mov	w8, #4096
	sub	w20, w8, w22
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #4096
	bl	_memset
	ldr	w0, [x19, #12]
	mov	x1, x21
	mov	x2, x20
	bl	_read
	mov	x20, x0
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_2:
	add	x0, sp, #12
	mov	x1, x21
	mov	w2, #6
	bl	_memcpy
	add	x1, x21, #6
	add	x0, sp, #18
	mov	w2, #6
	bl	_memcpy
	add	x21, sp, #24
	add	x0, sp, #24
	mov	x1, x19
	bl	_fill_basic
	ldr	x0, [sp, #24]
	add	x1, sp, #18
	mov	w2, #8
	bl	_memcpy
	ldr	x0, [sp, #32]
	add	x1, sp, #12
	mov	w2, #8
	bl	_memcpy
Lloh7:
	adrp	x8, _IEEE80211_FC0_TYPE_DATA@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IEEE80211_FC0_TYPE_DATA@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x8]
	ldr	x8, [sp, #40]
	ldp	w10, w11, [x8]
	orr	w9, w10, w9
	str	w9, [x8]
Lloh10:
	adrp	x9, _IEEE80211_FC1_DIR_FROMDS@GOTPAGE
Lloh11:
	ldr	x9, [x9, _IEEE80211_FC1_DIR_FROMDS@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w9, w11, w9
	str	w9, [x8, #4]
	ldr	w10, [x19, #4]
	cbz	w10, LBB0_5
; %bb.3:
Lloh13:
	adrp	x10, _IEEE80211_FC1_PROTECTED@GOTPAGE
Lloh14:
	ldr	x10, [x10, _IEEE80211_FC1_PROTECTED@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	orr	w9, w10, w9
	str	w9, [x8, #4]
	ldr	w8, [x19, #4]
	add	x0, x21, #24
	cbz	w8, LBB0_6
; %bb.4:
	mov	w8, #0
	add	x9, x21, #28
	b	LBB0_7
LBB0_5:
	add	x0, x21, #24
LBB0_6:
	mov	w8, #1
	mov	x9, x0
LBB0_7:
	cmp	w8, #0
	mov	w10, #29
	mov	w11, #25
	csel	x11, x11, x10, ne
	mov	w12, #170
	strb	w12, [x9]
	mov	w9, #30
	mov	w13, #26
	csel	x9, x13, x9, ne
	add	x13, sp, #24
	strb	w12, [x13, x11]
	mov	w11, #31
	mov	w12, #27
	csel	x11, x12, x11, ne
	mov	w12, #3
	strb	w12, [x13, x9]
	mov	w9, #32
	mov	w12, #28
	csel	x9, x12, x9, ne
	strb	wzr, [x13, x11]
	mov	w11, #33
	csel	x10, x10, x11, ne
	strb	wzr, [x13, x9]
	strb	wzr, [x13, x10]
	add	w20, w20, w22
	tbnz	w8, #0, LBB0_9
; %bb.8:
	mov	x1, x19
	mov	w2, #3
	bl	_memcpy
	strb	wzr, [sp, #51]
	ldrb	w8, [x19]
	add	w8, w8, #1
	strb	w8, [x19]
	ldp	w3, w2, [x19, #4]
	add	x0, sp, #24
	mov	x1, x20
	bl	_wep_encrypt
	add	w20, w20, #4
LBB0_9:
	add	x1, sp, #24
	mov	x0, x19
	mov	x2, x20
	bl	_send_frame
	ldur	x8, [x29, #-56]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	add	sp, sp, #1, lsl #12             ; =4096
	add	sp, sp, #32
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read()"

	.comm	_IEEE80211_FC0_TYPE_DATA,4,2    ; @IEEE80211_FC0_TYPE_DATA
	.comm	_IEEE80211_FC1_DIR_FROMDS,4,2   ; @IEEE80211_FC1_DIR_FROMDS
	.comm	_IEEE80211_FC1_PROTECTED,4,2    ; @IEEE80211_FC1_PROTECTED
.subsections_via_symbols
