	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_wmi_regdomain_event
_ath6kl_wmi_regdomain_event:            ## @ath6kl_wmi_regdomain_event
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	(%rsi), %edi
	callq	_le32_to_cpu
	movl	%eax, %ebx
	movq	_ATH6KL_COUNTRY_RD_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%ebx, %eax
	sarl	%cl, %eax
	movq	_COUNTRY_ERD_FLAG@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movl	%ebx, %edi
	callq	_ath6kl_regd_find_country
	movq	%rax, %r15
LBB0_6:
	testq	%r15, %r15
	je	LBB0_9
## %bb.7:
	movq	(%r14), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_9
## %bb.8:
	movq	(%r15), %rcx
	movb	(%rcx), %dl
	movb	%dl, -34(%rbp)
	movb	1(%rcx), %cl
	movb	%cl, -33(%rbp)
	movl	(%rax), %edi
	leaq	-34(%rbp), %rsi
	callq	_regulatory_hint
	movq	_ATH6KL_DBG_WMI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movsbl	-34(%rbp), %edx
	movsbl	-33(%rbp), %ecx
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_ath6kl_dbg
	jmp	LBB0_9
LBB0_2:
	movq	_WORLD_SKU_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	movq	_WORLD_SKU_PREFIX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_3
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%ebx, %edi
	callq	_ath6kl_get_regpair
	movq	%rax, %r12
	movl	%ebx, %edi
	callq	_ath6kl_regd_find_country_by_rd
	movq	%rax, %r15
	testq	%r12, %r12
	je	LBB0_5
## %bb.4:
	movq	_ATH6KL_DBG_WMI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movsbl	(%r12), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_ath6kl_dbg
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	callq	_ath6kl_warn
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH6KL_COUNTRY_RD_SHIFT,4,2    ## @ATH6KL_COUNTRY_RD_SHIFT
	.comm	_COUNTRY_ERD_FLAG,4,2           ## @COUNTRY_ERD_FLAG
	.comm	_WORLD_SKU_MASK,4,2             ## @WORLD_SKU_MASK
	.comm	_WORLD_SKU_PREFIX,4,2           ## @WORLD_SKU_PREFIX
	.comm	_ATH6KL_DBG_WMI,4,2             ## @ATH6KL_DBG_WMI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Regpair used: 0x%0x\n"

L_.str.1:                               ## @.str.1
	.asciz	"Regpair not found reg_code 0x%0x\n"

L_.str.2:                               ## @.str.2
	.asciz	"Country alpha2 being used: %c%c\n"

	.no_dead_strip	_ath6kl_wmi_regdomain_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath6kl_wmi_regdomain_event
_ath6kl_wmi_regdomain_event:            ; @ath6kl_wmi_regdomain_event
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	w0, [x1]
	bl	_le32_to_cpu
	mov	x20, x0
Lloh0:
	adrp	x8, _ATH6KL_COUNTRY_RD_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATH6KL_COUNTRY_RD_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	asr	w8, w0, w8
Lloh3:
	adrp	x9, _COUNTRY_ERD_FLAG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _COUNTRY_ERD_FLAG@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w8, w9
	b.eq	LBB0_5
; %bb.1:
	mov	x0, x20
	bl	_ath6kl_regd_find_country
	mov	x21, x0
LBB0_2:
	cbz	x21, LBB0_6
; %bb.3:
	ldr	x8, [x19]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_6
; %bb.4:
	ldr	x9, [x21]
	ldrb	w10, [x9]
	strb	w10, [sp, #14]
	ldrb	w9, [x9, #1]
	strb	w9, [sp, #15]
	ldr	w0, [x8]
	add	x1, sp, #14
	bl	_regulatory_hint
Lloh6:
	adrp	x8, _ATH6KL_DBG_WMI@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ATH6KL_DBG_WMI@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldrsb	w2, [sp, #14]
	ldrsb	x8, [sp, #15]
	str	x8, [sp]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_ath6kl_dbg
	b	LBB0_6
LBB0_5:
Lloh11:
	adrp	x8, _WORLD_SKU_MASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _WORLD_SKU_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	and	w8, w8, w20
Lloh14:
	adrp	x9, _WORLD_SKU_PREFIX@GOTPAGE
Lloh15:
	ldr	x9, [x9, _WORLD_SKU_PREFIX@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_7
LBB0_6:
	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
	add	sp, sp, #64
	ret
LBB0_7:
	mov	x0, x20
	bl	_ath6kl_get_regpair
	mov	x22, x0
	mov	x0, x20
	bl	_ath6kl_regd_find_country_by_rd
	mov	x21, x0
	cbz	x22, LBB0_9
; %bb.8:
Lloh17:
	adrp	x8, _ATH6KL_DBG_WMI@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ATH6KL_DBG_WMI@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	ldrsb	w2, [x22]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ath6kl_dbg
	b	LBB0_2
LBB0_9:
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_ath6kl_warn
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH6KL_COUNTRY_RD_SHIFT,4,2    ; @ATH6KL_COUNTRY_RD_SHIFT
	.comm	_COUNTRY_ERD_FLAG,4,2           ; @COUNTRY_ERD_FLAG
	.comm	_WORLD_SKU_MASK,4,2             ; @WORLD_SKU_MASK
	.comm	_WORLD_SKU_PREFIX,4,2           ; @WORLD_SKU_PREFIX
	.comm	_ATH6KL_DBG_WMI,4,2             ; @ATH6KL_DBG_WMI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Regpair used: 0x%0x\n"

l_.str.1:                               ; @.str.1
	.asciz	"Regpair not found reg_code 0x%0x\n"

l_.str.2:                               ; @.str.2
	.asciz	"Country alpha2 being used: %c%c\n"

	.no_dead_strip	_ath6kl_wmi_regdomain_event
.subsections_via_symbols
