	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_cfg80211_reg_notify
_ath6kl_cfg80211_reg_notify:            ## @ath6kl_cfg80211_reg_notify
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_wiphy_priv
	movq	%rax, %r14
	movq	_NUM_NL80211_BANDS@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	_ATH6KL_DBG_WLAN_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%rbx), %rax
	movl	(%rax), %edx
	movl	4(%rax), %ecx
	cmpq	$0, 32(%rbx)
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %r8
	cmoveq	%rax, %r8
	cmpq	$0, 24(%rbx)
	leaq	L_.str.3(%rip), %r9
	cmoveq	%rax, %r9
	movl	16(%rbx), %eax
	leaq	L_.str(%rip), %rsi
	pushq	(%rbx)
	pushq	%rax
	callq	_ath6kl_dbg
	addq	$16, %rsp
	movq	(%rbx), %rax
	movq	_NL80211_USER_REG_HINT_CELL_BASE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
## %bb.1:
	movl	(%r14), %edi
	movq	8(%rbx), %rsi
	callq	_ath6kl_wmi_set_regdomain_cmd
	testl	%eax, %eax
	je	LBB0_2
## %bb.5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_20
## %bb.6:
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath6kl_err                     ## TAILCALL
LBB0_2:
	movl	(%r13), %eax
	testl	%eax, %eax
	jle	LBB0_16
## %bb.3:
	movq	(%r15), %rsi
	cmpl	$1, %eax
	jne	LBB0_7
## %bb.4:
	xorl	%edx, %edx
LBB0_13:
	testb	$1, %al
	je	LBB0_16
## %bb.14:
	movq	(%rsi,%rdx,8), %rax
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movb	(%rax), %cl
	movl	$-1, %eax
	shll	%cl, %eax
	notl	%eax
	movl	%eax, (%r12,%rdx,4)
LBB0_16:
	movl	(%r14), %edi
	movq	_WMI_LONG_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ATH6KL_FG_SCAN_INTERVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%r12
	pushq	$0
	pushq	$0
	pushq	$0
	pushq	%rax
	callq	_ath6kl_wmi_beginscan_cmd
	addq	$48, %rsp
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	leaq	L_.str.5(%rip), %rdi
	movl	%eax, %esi
	callq	_ath6kl_err
LBB0_18:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_20
## %bb.19:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	%eax, %edi
	andl	$-2, %edi
	xorl	%edx, %edx
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	addq	$2, %rdx
	cmpq	%rdx, %rdi
	je	LBB0_13
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rsi,%rdx,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movzbl	(%rcx), %ecx
	movl	$-1, %ebx
	shll	%cl, %ebx
	notl	%ebx
	movl	%ebx, (%r12,%rdx,4)
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	8(%rsi,%rdx,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movzbl	(%rcx), %ecx
	movl	$-1, %ebx
	shll	%cl, %ebx
	notl	%ebx
	movl	%ebx, 4(%r12,%rdx,4)
	jmp	LBB0_12
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_NL80211_BANDS,4,2          ## @NUM_NL80211_BANDS
	.comm	_ATH6KL_DBG_WLAN_CFG,4,2        ## @ATH6KL_DBG_WLAN_CFG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cfg reg_notify %c%c%s%s initiator %d hint_type %d\n"

L_.str.1:                               ## @.str.1
	.asciz	" intersect"

L_.str.2:                               ## @.str.2
	.space	1

L_.str.3:                               ## @.str.3
	.asciz	" processed"

	.comm	_NL80211_USER_REG_HINT_CELL_BASE,8,3 ## @NL80211_USER_REG_HINT_CELL_BASE
L_.str.4:                               ## @.str.4
	.asciz	"failed to set regdomain: %d\n"

	.comm	_WMI_LONG_SCAN,4,2              ## @WMI_LONG_SCAN
	.comm	_ATH6KL_FG_SCAN_INTERVAL,4,2    ## @ATH6KL_FG_SCAN_INTERVAL
L_.str.5:                               ## @.str.5
	.asciz	"failed to start scan for a regdomain change: %d\n"

	.no_dead_strip	_ath6kl_cfg80211_reg_notify
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath6kl_cfg80211_reg_notify
_ath6kl_cfg80211_reg_notify:            ; @ath6kl_cfg80211_reg_notify
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [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 w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #16
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	bl	_wiphy_priv
	mov	x19, x0
Lloh3:
	adrp	x23, _NUM_NL80211_BANDS@GOTPAGE
Lloh4:
	ldr	x23, [x23, _NUM_NL80211_BANDS@GOTPAGEOFF]
	ldr	w8, [x23]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x22, x9, x8
	mov	sp, x22
Lloh7:
	adrp	x8, _ATH6KL_DBG_WLAN_CFG@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ATH6KL_DBG_WLAN_CFG@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x8, l_.str.1@PAGE
Lloh11:
	add	x8, x8, l_.str.1@PAGEOFF
	ldp	x7, x9, [x21]
	ldp	w2, w3, [x9]
Lloh12:
	adrp	x9, l_.str.2@PAGE
Lloh13:
	add	x9, x9, l_.str.2@PAGEOFF
	ldp	x11, x10, [x21, #24]
	cmp	x10, #0
	csel	x4, x9, x8, eq
Lloh14:
	adrp	x8, l_.str.3@PAGE
Lloh15:
	add	x8, x8, l_.str.3@PAGEOFF
	cmp	x11, #0
	csel	x5, x9, x8, eq
	ldr	w6, [x21, #16]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ath6kl_dbg
	ldr	x8, [x21]
Lloh18:
	adrp	x9, _NL80211_USER_REG_HINT_CELL_BASE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _NL80211_USER_REG_HINT_CELL_BASE@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.1:
	ldr	w0, [x19]
	ldr	x1, [x21, #8]
	bl	_ath6kl_wmi_set_regdomain_cmd
	cbz	w0, LBB0_4
; %bb.2:
	ldur	x8, [x29, #-56]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.3:
	mov	x1, x0
Lloh24:
	adrp	x0, l_.str.4@PAGE
Lloh25:
	add	x0, x0, l_.str.4@PAGEOFF
	sub	sp, x29, #48
	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	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ath6kl_err
LBB0_4:
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.5:
	ldr	x9, [x20]
	mov	w10, #-1
	mov	x11, x22
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x11, x11, #4
	add	x9, x9, #8
	subs	x8, x8, #1
	b.eq	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x9]
	cbz	x12, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w12, [x12]
	lsl	w12, w10, w12
	mvn	w12, w12
	str	w12, [x11]
	b	LBB0_6
LBB0_9:
	ldr	w0, [x19]
Lloh26:
	adrp	x8, _WMI_LONG_SCAN@GOTPAGE
Lloh27:
	ldr	x8, [x8, _WMI_LONG_SCAN@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
Lloh29:
	adrp	x8, _ATH6KL_FG_SCAN_INTERVAL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ATH6KL_FG_SCAN_INTERVAL@GOTPAGEOFF]
Lloh31:
	ldr	w6, [x8]
	sub	sp, sp, #32
	str	x22, [sp, #16]
	str	wzr, [sp, #8]
	str	xzr, [sp]
	mov	w1, #0
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	mov	w7, #0
	bl	_ath6kl_wmi_beginscan_cmd
	add	sp, sp, #32
	cbz	w0, LBB0_11
; %bb.10:
	mov	x1, x0
Lloh32:
	adrp	x0, l_.str.5@PAGE
Lloh33:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_ath6kl_err
LBB0_11:
	ldur	x8, [x29, #-56]
Lloh34:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh35:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	sub	sp, x29, #48
	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	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_NL80211_BANDS,4,2          ; @NUM_NL80211_BANDS
	.comm	_ATH6KL_DBG_WLAN_CFG,4,2        ; @ATH6KL_DBG_WLAN_CFG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cfg reg_notify %c%c%s%s initiator %d hint_type %d\n"

l_.str.1:                               ; @.str.1
	.asciz	" intersect"

l_.str.2:                               ; @.str.2
	.space	1

l_.str.3:                               ; @.str.3
	.asciz	" processed"

	.comm	_NL80211_USER_REG_HINT_CELL_BASE,8,3 ; @NL80211_USER_REG_HINT_CELL_BASE
l_.str.4:                               ; @.str.4
	.asciz	"failed to set regdomain: %d\n"

	.comm	_WMI_LONG_SCAN,4,2              ; @WMI_LONG_SCAN
	.comm	_ATH6KL_FG_SCAN_INTERVAL,4,2    ; @ATH6KL_FG_SCAN_INTERVAL
l_.str.5:                               ; @.str.5
	.asciz	"failed to start scan for a regdomain change: %d\n"

	.no_dead_strip	_ath6kl_cfg80211_reg_notify
.subsections_via_symbols
