	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cw1200_start_ap
_cw1200_start_ap:                       ## @cw1200_start_ap
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	8(%rdi), %rbx
	movl	$100, -112(%rbp)
	movq	$0, -104(%rbp)
	movl	$0, -96(%rbp)
	movl	28(%rbx), %esi
	callq	_cw1200_rate_mask_to_wsm
	movl	%eax, -92(%rbp)
	movl	8(%rbx), %r8d
	movl	%r8d, -88(%rbp)
	movl	12(%rbx), %edi
	movl	%edi, -84(%rbp)
	movq	32(%r12), %rsi
	movl	4(%rsi), %ecx
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_1
## %bb.2:
	movq	_WSM_PHY_BAND_5G@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_1:
	movq	_WSM_PHY_BAND_2_4G@GOTPCREL(%rip), %rcx
LBB0_3:
	movl	(%rcx), %r13d
	movl	%r13d, -80(%rbp)
	movl	(%rsi), %r14d
	movl	%r14d, -76(%rbp)
	cmpl	$0, 32(%rbx)
	jne	LBB0_4
## %bb.5:
	movq	_WSM_JOIN_PREAMBLE_LONG@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_4:
	movq	_WSM_JOIN_PREAMBLE_SHORT@GOTPCREL(%rip), %rcx
LBB0_6:
	movl	(%rcx), %ecx
	movl	%ecx, -72(%rbp)
	movq	8(%r12), %rcx
	cmpq	$0, (%rcx)
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	jne	LBB0_7
## %bb.8:
	movq	_WSM_START_MODE_AP@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_WSM_START_MODE_P2P_GO@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	movl	%eax, -68(%rbp)
	movl	$1, -64(%rbp)
	movq	_cw1200_power_mode@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	cmpl	$0, 24(%rbx)
	jne	LBB0_11
## %bb.10:
	movl	20(%rbx), %r15d
	movl	%r15d, -96(%rbp)
	movl	16(%rbx), %esi
	xorl	%edi, %edi
	movl	%r15d, %edx
	callq	_memcpy
LBB0_11:
	movl	12(%rbx), %eax
	movl	%eax, 24(%r12)
	movl	8(%rbx), %eax
	movl	%eax, 20(%r12)
	leaq	16(%r12), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	%r13d, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movl	-52(%rbp), %r9d                 ## 4-byte Reload
	xorl	%eax, %eax
	pushq	$0
	pushq	%r15
	callq	_pr_debug
	addq	$16, %rsp
	leaq	-112(%rbp), %rsi
	movq	%r12, %rdi
	callq	_wsm_start
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_16
## %bb.12:
	movq	%r12, %rdi
	callq	_cw1200_upload_keys
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_16
## %bb.13:
	movq	8(%r12), %rax
	cmpq	$0, (%rax)
	je	LBB0_15
## %bb.14:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_debug
	leaq	4(%r12), %rsi
	movq	%r12, %rdi
	callq	_wsm_set_p2p_ps_modeinfo
LBB0_15:
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_wsm_set_block_ack_policy
	movq	_CW1200_JOIN_STATUS_AP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	movq	%r12, %rdi
	callq	_cw1200_update_filtering
LBB0_16:
	leaq	-64(%rbp), %rsi
	movq	%r12, %rdi
	callq	_wsm_set_operational_mode
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NL80211_BAND_5GHZ,4,2          ## @NL80211_BAND_5GHZ
	.comm	_WSM_PHY_BAND_5G,4,2            ## @WSM_PHY_BAND_5G
	.comm	_WSM_PHY_BAND_2_4G,4,2          ## @WSM_PHY_BAND_2_4G
	.comm	_WSM_JOIN_PREAMBLE_SHORT,4,2    ## @WSM_JOIN_PREAMBLE_SHORT
	.comm	_WSM_JOIN_PREAMBLE_LONG,4,2     ## @WSM_JOIN_PREAMBLE_LONG
	.comm	_WSM_START_MODE_P2P_GO,4,2      ## @WSM_START_MODE_P2P_GO
	.comm	_WSM_START_MODE_AP,4,2          ## @WSM_START_MODE_AP
	.comm	_cw1200_power_mode,4,2          ## @cw1200_power_mode
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[AP] ch: %d(%d), bcn: %d(%d), brt: 0x%.8X, ssid: %.*s.\n"

L_.str.1:                               ## @.str.1
	.asciz	"[AP] Setting p2p powersave configuration.\n"

	.comm	_CW1200_JOIN_STATUS_AP,4,2      ## @CW1200_JOIN_STATUS_AP
	.no_dead_strip	_cw1200_start_ap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cw1200_start_ap
_cw1200_start_ap:                       ; @cw1200_start_ap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x24, [x0, #8]
	mov	w8, #100
	str	w8, [sp, #64]
	str	xzr, [sp, #72]
	str	wzr, [sp, #80]
	ldr	w1, [x24, #28]
	bl	_cw1200_rate_mask_to_wsm
	mov	x20, x0
	str	w0, [sp, #84]
	ldr	w22, [x24, #8]
	str	w22, [sp, #88]
	ldr	w23, [x24, #12]
	str	w23, [sp, #92]
	ldr	x8, [x19, #32]
	ldr	w9, [x8, #4]
Lloh0:
	adrp	x10, _NL80211_BAND_5GHZ@GOTPAGE
Lloh1:
	ldr	x10, [x10, _NL80211_BAND_5GHZ@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
Lloh3:
	adrp	x11, _WSM_PHY_BAND_5G@GOTPAGE
Lloh4:
	ldr	x11, [x11, _WSM_PHY_BAND_5G@GOTPAGEOFF]
Lloh5:
	adrp	x12, _WSM_PHY_BAND_2_4G@GOTPAGE
Lloh6:
	ldr	x12, [x12, _WSM_PHY_BAND_2_4G@GOTPAGEOFF]
	cmp	w9, w10
	csel	x9, x11, x12, eq
	ldr	w25, [x9]
	str	w25, [sp, #96]
	ldr	w26, [x8]
	str	w26, [sp, #100]
	ldr	w8, [x24, #32]
Lloh7:
	adrp	x9, _WSM_JOIN_PREAMBLE_SHORT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _WSM_JOIN_PREAMBLE_SHORT@GOTPAGEOFF]
Lloh9:
	adrp	x10, _WSM_JOIN_PREAMBLE_LONG@GOTPAGE
Lloh10:
	ldr	x10, [x10, _WSM_JOIN_PREAMBLE_LONG@GOTPAGEOFF]
	cmp	w8, #0
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
	str	w8, [sp, #104]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
Lloh11:
	adrp	x9, _WSM_START_MODE_P2P_GO@GOTPAGE
Lloh12:
	ldr	x9, [x9, _WSM_START_MODE_P2P_GO@GOTPAGEOFF]
Lloh13:
	adrp	x10, _WSM_START_MODE_AP@GOTPAGE
Lloh14:
	ldr	x10, [x10, _WSM_START_MODE_AP@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
	str	w8, [sp, #108]
	mov	w8, #1
Lloh15:
	adrp	x9, _cw1200_power_mode@GOTPAGE
Lloh16:
	ldr	x9, [x9, _cw1200_power_mode@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #56]
	mov	x0, #0
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	mov	w21, #0
	ldr	w8, [x24, #24]
	cbnz	w8, LBB0_2
; %bb.1:
	ldr	w21, [x24, #20]
	str	w21, [sp, #80]
	ldr	w1, [x24, #16]
	mov	x0, #0
	mov	x2, x21
	bl	_memcpy
LBB0_2:
	ldr	d0, [x24, #8]
	stur	d0, [x19, #20]
	add	x0, x19, #16
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	stp	x21, xzr, [sp, #40]
	stp	x22, x20, [sp, #24]
	stp	x25, x23, [sp, #8]
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	str	x26, [sp]
	bl	_pr_debug
	add	x1, sp, #64
	mov	x0, x19
	bl	_wsm_start
	mov	x20, x0
	cbnz	w0, LBB0_7
; %bb.3:
	mov	x0, x19
	bl	_cw1200_upload_keys
	mov	x20, x0
	cbnz	w0, LBB0_7
; %bb.4:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.5:
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
	add	x1, x19, #4
	mov	x0, x19
	bl	_wsm_set_p2p_ps_modeinfo
LBB0_6:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_wsm_set_block_ack_policy
Lloh22:
	adrp	x8, _CW1200_JOIN_STATUS_AP@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CW1200_JOIN_STATUS_AP@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	str	w8, [x19]
	mov	x0, x19
	bl	_cw1200_update_filtering
	mov	w20, #0
LBB0_7:
	add	x1, sp, #56
	mov	x0, x19
	bl	_wsm_set_operational_mode
	mov	x0, x20
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_NL80211_BAND_5GHZ,4,2          ; @NL80211_BAND_5GHZ
	.comm	_WSM_PHY_BAND_5G,4,2            ; @WSM_PHY_BAND_5G
	.comm	_WSM_PHY_BAND_2_4G,4,2          ; @WSM_PHY_BAND_2_4G
	.comm	_WSM_JOIN_PREAMBLE_SHORT,4,2    ; @WSM_JOIN_PREAMBLE_SHORT
	.comm	_WSM_JOIN_PREAMBLE_LONG,4,2     ; @WSM_JOIN_PREAMBLE_LONG
	.comm	_WSM_START_MODE_P2P_GO,4,2      ; @WSM_START_MODE_P2P_GO
	.comm	_WSM_START_MODE_AP,4,2          ; @WSM_START_MODE_AP
	.comm	_cw1200_power_mode,4,2          ; @cw1200_power_mode
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[AP] ch: %d(%d), bcn: %d(%d), brt: 0x%.8X, ssid: %.*s.\n"

l_.str.1:                               ; @.str.1
	.asciz	"[AP] Setting p2p powersave configuration.\n"

	.comm	_CW1200_JOIN_STATUS_AP,4,2      ; @CW1200_JOIN_STATUS_AP
	.no_dead_strip	_cw1200_start_ap
.subsections_via_symbols
