	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wait_ack                       ## -- Begin function wait_ack
	.p2align	4, 0x90
_wait_ack:                              ## @wait_ack
	.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	%rbx
	pushq	%rax
	movl	$4120, %eax                     ## imm = 0x1018
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	leaq	-4136(%rbp), %rdi
	xorl	%esi, %esi
	callq	_gettimeofday
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_2:
	leaq	20(%r15), %r14
	leaq	-4136(%rbp), %rsi
	movq	%r14, %rdi
	callq	_elapsed
	cmpl	$10000, %eax                    ## imm = 0x2710
	jl	LBB0_6
## %bb.3:
	cmpl	$3, (%r15)
	jl	LBB0_5
## %bb.4:
	movq	_S_START@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	jmp	LBB0_19
LBB0_5:
	movq	%r15, %rdi
	callq	_send_packet
	xorl	%eax, %eax
LBB0_6:
	movl	$10000, %ecx                    ## imm = 0x2710
	subl	%eax, %ecx
	imulq	$1125899907, %rcx, %rax         ## imm = 0x431BDE83
	shrq	$50, %rax
	movl	%eax, -4136(%rbp)
	imull	$-1000000, %eax, %eax           ## imm = 0xFFF0BDC0
	addl	%ecx, %eax
	movl	%eax, -4132(%rbp)
	leaq	-4144(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_FD_ZERO
	movq	32(%r15), %rdi
	movq	%rbx, %rsi
	callq	_FD_SET
	movq	32(%r15), %rdi
	incq	%rdi
	leaq	-4136(%rbp), %r8
	movq	%rbx, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_select
	cmpl	$-1, %eax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_8:
	movq	32(%r15), %rdi
	leaq	-4144(%rbp), %rsi
	callq	_FD_ISSET
	testl	%eax, %eax
	je	LBB0_19
## %bb.9:
	movq	32(%r15), %rdi
	leaq	-4128(%rbp), %rsi
	movl	$4096, %edx                     ## imm = 0x1000
	callq	_sniff
	movl	%eax, -4140(%rbp)
	cmpl	$-1, %eax
	jne	LBB0_11
## %bb.10:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_11:
	leaq	-4128(%rbp), %rdi
	leaq	-4140(%rbp), %rsi
	callq	_get_wifi
	testq	%rax, %rax
	je	LBB0_19
## %bb.12:
	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
	testl	%eax, %eax
	je	LBB0_19
## %bb.13:
	movl	28(%r15), %edi
	movl	(%rbx), %esi
	movl	$6, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_14
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_21
## %bb.20:
	addq	$4120, %rsp                     ## imm = 0x1018
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	cmpq	$0, 8(%r15)
	je	LBB0_15
## %bb.17:
	movq	_S_SEND_FRAG@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_15:
	movq	_S_WAIT_RELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_gettimeofday
	cmpl	$-1, %eax
	jne	LBB0_19
## %bb.16:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_err
	jmp	LBB0_19
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gettimeofday()"

	.comm	_S_START,4,2                    ## @S_START
L_.str.1:                               ## @.str.1
	.asciz	"select()"

L_.str.2:                               ## @.str.2
	.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	_S_WAIT_RELAY,4,2               ## @S_WAIT_RELAY
	.comm	_S_SEND_FRAG,4,2                ## @S_SEND_FRAG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wait_ack                       ; -- Begin function wait_ack
	.p2align	2
_wait_ack:                              ; @wait_ack
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	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, #-40]
	add	x0, sp, #16
	mov	x1, #0
	bl	_gettimeofday
	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	x20, x19, #20
	add	x1, sp, #16
	mov	x0, x20
	bl	_elapsed
	mov	w21, #10000
	cmp	w0, w21
	b.lt	LBB0_7
; %bb.3:
	ldr	w8, [x19]
	cmp	w8, #3
	b.lt	LBB0_6
; %bb.4:
Lloh7:
	adrp	x8, _S_START@GOTPAGE
Lloh8:
	ldr	x8, [x8, _S_START@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	b	LBB0_15
LBB0_6:
	mov	x0, x19
	bl	_send_packet
	mov	w0, #0
LBB0_7:
	sub	w8, w21, w0
	mov	w9, #56963
	movk	w9, #17179, lsl #16
	umull	x9, w8, w9
	lsr	x9, x9, #50
	mov	w10, #48576
	movk	w10, #65520, lsl #16
	madd	w8, w9, w10, w8
	stp	w9, w8, [sp, #16]
	add	x0, sp, #12
	bl	_FD_ZERO
	ldr	x0, [x19, #32]
	add	x1, sp, #12
	bl	_FD_SET
	ldr	x8, [x19, #32]
	add	x0, x8, #1
	add	x1, sp, #12
	add	x4, sp, #16
	mov	x2, #0
	mov	x3, #0
	bl	_select
	cmn	w0, #1
	b.ne	LBB0_9
; %bb.8:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_9:
	ldr	x0, [x19, #32]
	add	x1, sp, #12
	bl	_FD_ISSET
	cbz	w0, LBB0_15
; %bb.10:
	ldr	x0, [x19, #32]
	add	x1, sp, #24
	mov	w2, #4096
	bl	_sniff
	str	w0, [sp, #8]
	cmn	w0, #1
	b.ne	LBB0_12
; %bb.11:
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_12:
	add	x0, sp, #24
	add	x1, sp, #8
	bl	_get_wifi
	cbz	x0, LBB0_15
; %bb.13:
	mov	x21, x0
Lloh13:
	adrp	x8, _IEEE80211_FC0_TYPE_CTL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IEEE80211_FC0_TYPE_CTL@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _IEEE80211_FC0_SUBTYPE_ACK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IEEE80211_FC0_SUBTYPE_ACK@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	bl	_frame_type
	cbz	w0, LBB0_15
; %bb.14:
	ldr	w0, [x19, #28]
	ldr	w1, [x21]
	mov	w2, #6
	bl	_memcmp
	cbz	x0, LBB0_17
LBB0_15:
	ldur	x8, [x29, #-40]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.16:
	add	sp, sp, #1, lsl #12             ; =4096
	add	sp, sp, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_17:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_19
; %bb.18:
Lloh22:
	adrp	x8, _S_SEND_FRAG@GOTPAGE
Lloh23:
	ldr	x8, [x8, _S_SEND_FRAG@GOTPAGEOFF]
	b	LBB0_5
LBB0_19:
Lloh24:
	adrp	x8, _S_WAIT_RELAY@GOTPAGE
Lloh25:
	ldr	x8, [x8, _S_WAIT_RELAY@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	mov	x0, x20
	mov	x1, #0
	bl	_gettimeofday
	cmn	w0, #1
	b.ne	LBB0_15
; %bb.20:
Lloh27:
	adrp	x1, l_.str@PAGE
Lloh28:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
	b	LBB0_15
LBB0_21:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gettimeofday()"

	.comm	_S_START,4,2                    ; @S_START
l_.str.1:                               ; @.str.1
	.asciz	"select()"

l_.str.2:                               ; @.str.2
	.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	_S_WAIT_RELAY,4,2               ; @S_WAIT_RELAY
	.comm	_S_SEND_FRAG,4,2                ; @S_SEND_FRAG
.subsections_via_symbols
