	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cw1200_upload_beacon
_cw1200_upload_beacon:                  ## @cw1200_upload_beacon
	.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	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	$0, -32(%rbp)
	movq	_WSM_FRAME_TYPE_BEACON@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	movl	$0, -20(%rbp)
	movq	(%rdi), %rax
	movq	_NL80211_IFTYPE_STATION@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.1:
	movq	_NL80211_IFTYPE_MONITOR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.2:
	movq	_NL80211_IFTYPE_UNSPECIFIED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.3:
	movq	%rdi, %r14
	movq	8(%rdi), %rsi
	cmpq	$0, (%rsi)
	je	LBB0_5
## %bb.4:
	movq	_WSM_TRANSMIT_RATE_6@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -20(%rbp)
LBB0_5:
	movl	16(%r14), %edi
	leaq	-40(%rbp), %rdx
	leaq	-36(%rbp), %rcx
	callq	_ieee80211_beacon_get_tim
	movq	%rax, -32(%rbp)
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	leaq	-32(%rbp), %rsi
	movq	%r14, %rdi
	callq	_wsm_set_template_frame
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	movq	-32(%rbp), %rax
	movq	(%rax), %rbx
	movq	_IEEE80211_FTYPE_MGMT@GOTPCREL(%rip), %rax
	movq	_IEEE80211_STYPE_PROBE_RESP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	callq	___cpu_to_le16
	movl	%eax, (%rbx)
	movq	_WSM_FRAME_TYPE_PROBE_RESPONSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	movq	8(%r14), %rax
	cmpq	$0, (%rax)
	je	LBB0_10
## %bb.9:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_wsm_set_probe_responder
	movl	%eax, %ebx
	jmp	LBB0_11
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_10:
	leaq	-32(%rbp), %rsi
	movq	%r14, %rdi
	callq	_wsm_set_template_frame
	movl	%eax, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_wsm_set_probe_responder
LBB0_11:
	movq	-32(%rbp), %rdi
	callq	_dev_kfree_skb
LBB0_12:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WSM_FRAME_TYPE_BEACON,4,2      ## @WSM_FRAME_TYPE_BEACON
	.comm	_NL80211_IFTYPE_STATION,8,3     ## @NL80211_IFTYPE_STATION
	.comm	_NL80211_IFTYPE_MONITOR,8,3     ## @NL80211_IFTYPE_MONITOR
	.comm	_NL80211_IFTYPE_UNSPECIFIED,8,3 ## @NL80211_IFTYPE_UNSPECIFIED
	.comm	_WSM_TRANSMIT_RATE_6,4,2        ## @WSM_TRANSMIT_RATE_6
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IEEE80211_FTYPE_MGMT,4,2       ## @IEEE80211_FTYPE_MGMT
	.comm	_IEEE80211_STYPE_PROBE_RESP,4,2 ## @IEEE80211_STYPE_PROBE_RESP
	.comm	_WSM_FRAME_TYPE_PROBE_RESPONSE,4,2 ## @WSM_FRAME_TYPE_PROBE_RESPONSE
	.no_dead_strip	_cw1200_upload_beacon
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cw1200_upload_beacon
_cw1200_upload_beacon:                  ; @cw1200_upload_beacon
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	w20, #0
	str	xzr, [sp, #16]
Lloh0:
	adrp	x8, _WSM_FRAME_TYPE_BEACON@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WSM_FRAME_TYPE_BEACON@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	w8, wzr, [sp, #24]
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _NL80211_IFTYPE_STATION@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NL80211_IFTYPE_STATION@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _NL80211_IFTYPE_MONITOR@GOTPAGE
Lloh7:
	ldr	x10, [x10, _NL80211_IFTYPE_MONITOR@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x8, x9
Lloh9:
	adrp	x9, _NL80211_IFTYPE_UNSPECIFIED@GOTPAGE
Lloh10:
	ldr	x9, [x9, _NL80211_IFTYPE_UNSPECIFIED@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	ccmp	x8, x10, #4, ne
	ccmp	x8, x9, #4, ne
	b.eq	LBB0_9
; %bb.1:
	mov	x19, x0
	ldr	x1, [x0, #8]
	ldr	x8, [x1]
	cbz	x8, LBB0_3
; %bb.2:
Lloh12:
	adrp	x8, _WSM_TRANSMIT_RATE_6@GOTPAGE
Lloh13:
	ldr	x8, [x8, _WSM_TRANSMIT_RATE_6@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [sp, #28]
LBB0_3:
	ldr	w0, [x19, #16]
	add	x2, sp, #12
	add	x3, sp, #8
	bl	_ieee80211_beacon_get_tim
	str	x0, [sp, #16]
	cbz	x0, LBB0_7
; %bb.4:
	add	x1, sp, #16
	mov	x0, x19
	bl	_wsm_set_template_frame
	mov	x20, x0
	cbnz	w0, LBB0_9
; %bb.5:
	ldr	x8, [sp, #16]
Lloh15:
	adrp	x9, _IEEE80211_FTYPE_MGMT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _IEEE80211_FTYPE_MGMT@GOTPAGEOFF]
	ldr	x20, [x8]
Lloh17:
	ldr	w8, [x9]
Lloh18:
	adrp	x9, _IEEE80211_STYPE_PROBE_RESP@GOTPAGE
Lloh19:
	ldr	x9, [x9, _IEEE80211_STYPE_PROBE_RESP@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	___cpu_to_le16
	str	w0, [x20]
Lloh21:
	adrp	x8, _WSM_FRAME_TYPE_PROBE_RESPONSE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _WSM_FRAME_TYPE_PROBE_RESPONSE@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.6:
	mov	x0, x19
	mov	w1, #1
	bl	_wsm_set_probe_responder
	mov	x20, x0
	b	LBB0_9
LBB0_7:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_10
LBB0_8:
	add	x1, sp, #16
	mov	x0, x19
	bl	_wsm_set_template_frame
	mov	x20, x0
	mov	x0, x19
	mov	w1, #0
	bl	_wsm_set_probe_responder
LBB0_9:
	ldr	x0, [sp, #16]
	bl	_dev_kfree_skb
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_WSM_FRAME_TYPE_BEACON,4,2      ; @WSM_FRAME_TYPE_BEACON
	.comm	_NL80211_IFTYPE_STATION,8,3     ; @NL80211_IFTYPE_STATION
	.comm	_NL80211_IFTYPE_MONITOR,8,3     ; @NL80211_IFTYPE_MONITOR
	.comm	_NL80211_IFTYPE_UNSPECIFIED,8,3 ; @NL80211_IFTYPE_UNSPECIFIED
	.comm	_WSM_TRANSMIT_RATE_6,4,2        ; @WSM_TRANSMIT_RATE_6
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IEEE80211_FTYPE_MGMT,4,2       ; @IEEE80211_FTYPE_MGMT
	.comm	_IEEE80211_STYPE_PROBE_RESP,4,2 ; @IEEE80211_STYPE_PROBE_RESP
	.comm	_WSM_FRAME_TYPE_PROBE_RESPONSE,4,2 ; @WSM_FRAME_TYPE_PROBE_RESPONSE
	.no_dead_strip	_cw1200_upload_beacon
.subsections_via_symbols
