	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath10k_mac_get_wrdd_regulatory
_ath10k_mac_get_wrdd_regulatory:        ## @ath10k_mac_get_wrdd_regulatory
	.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	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	$0, -48(%rbp)
	movq	_ACPI_ALLOCATE_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movl	(%rdi), %edi
	callq	_ACPI_HANDLE
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movq	_WRD_METHOD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-40(%rbp), %rdx
	movl	%eax, %edi
	callq	_acpi_get_handle
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	_ATH10K_DBG_BOOT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movq	%rbx, %rcx
	callq	_ath10k_dbg
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_3:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
LBB0_5:
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	-40(%rbp), %edi
	xorl	%ebx, %ebx
	leaq	-64(%rbp), %rcx
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_acpi_evaluate_object
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_ATH10K_DBG_BOOT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	movq	%r12, %rcx
	callq	_ath10k_dbg
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_9:
	movl	-64(%rbp), %esi
	movq	%r15, %rdi
	callq	_ath10k_mac_wrdd_get_mcc
	movl	%eax, %ebx
	movl	-64(%rbp), %edi
	callq	_kfree
	testl	%ebx, %ebx
	je	LBB0_11
## %bb.10:
	movb	%bh, -35(%rbp)
	movb	%bl, -34(%rbp)
	movb	$0, -33(%rbp)
	movq	_ATH10K_DBG_BOOT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	leaq	-35(%rbp), %rbx
	movq	%r15, %rdi
	movq	%rbx, %rcx
	callq	_ath10k_dbg
	movq	%rbx, %rdi
	callq	_ath_regd_find_country_by_name
	movl	%eax, (%r14)
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	jne	LBB0_12
LBB0_11:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_12:
	movq	_COUNTRY_ERD_FLAG@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ## @ACPI_ALLOCATE_BUFFER
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_WRD_METHOD,8,3                 ## @WRD_METHOD
	.comm	_ATH10K_DBG_BOOT,4,2            ## @ATH10K_DBG_BOOT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to get wrd method %d\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"failed to call wrdc %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"regulatory hint from WRDD (alpha2-code): %s\n"

	.comm	_COUNTRY_ERD_FLAG,4,2           ## @COUNTRY_ERD_FLAG
	.no_dead_strip	_ath10k_mac_get_wrdd_regulatory
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath10k_mac_get_wrdd_regulatory
_ath10k_mac_get_wrdd_regulatory:        ; @ath10k_mac_get_wrdd_regulatory
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x1
	mov	x20, x0
	stp	xzr, xzr, [sp, #16]
	str	xzr, [sp, #32]
Lloh0:
	adrp	x8, _ACPI_ALLOCATE_BUFFER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ACPI_ALLOCATE_BUFFER@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #16]
	ldr	w0, [x0]
	bl	_ACPI_HANDLE
	cbz	w0, LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _WRD_METHOD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WRD_METHOD@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	sub	x2, x29, #36
	bl	_acpi_get_handle
	mov	x21, x0
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_4
; %bb.2:
Lloh6:
	adrp	x8, _ATH10K_DBG_BOOT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ATH10K_DBG_BOOT@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_6
LBB0_3:
Lloh11:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
	ldur	w0, [x29, #-36]
	add	x3, sp, #16
	mov	x1, #0
	mov	x2, #0
	bl	_acpi_evaluate_object
	mov	x21, x0
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_10
; %bb.5:
Lloh13:
	adrp	x8, _ATH10K_DBG_BOOT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ATH10K_DBG_BOOT@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x2, l_.str.1@PAGE
Lloh17:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_6:
	mov	x0, x20
	mov	x3, x21
	bl	_ath10k_dbg
LBB0_7:
Lloh18:
	adrp	x8, _EIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_10:
	ldr	w1, [sp, #16]
	mov	x0, x20
	bl	_ath10k_mac_wrdd_get_mcc
	mov	x21, x0
	ldr	w0, [sp, #16]
	bl	_kfree
	cbz	w21, LBB0_7
; %bb.11:
	lsr	w8, w21, #8
	strb	w8, [sp, #13]
	strb	w21, [sp, #14]
	strb	wzr, [sp, #15]
Lloh20:
	adrp	x8, _ATH10K_DBG_BOOT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ATH10K_DBG_BOOT@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x2, l_.str.2@PAGE
Lloh24:
	add	x2, x2, l_.str.2@PAGEOFF
	add	x3, sp, #13
	mov	x0, x20
	bl	_ath10k_dbg
	add	x0, sp, #13
	bl	_ath_regd_find_country_by_name
	str	w0, [x19]
	mov	w9, #65535
	cmp	w0, w9
	b.eq	LBB0_7
; %bb.12:
	mov	x8, x0
	mov	w0, #0
Lloh25:
	adrp	x9, _COUNTRY_ERD_FLAG@GOTPAGE
Lloh26:
	ldr	x9, [x9, _COUNTRY_ERD_FLAG@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ; @ACPI_ALLOCATE_BUFFER
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_WRD_METHOD,8,3                 ; @WRD_METHOD
	.comm	_ATH10K_DBG_BOOT,4,2            ; @ATH10K_DBG_BOOT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to get wrd method %d\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"failed to call wrdc %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"regulatory hint from WRDD (alpha2-code): %s\n"

	.comm	_COUNTRY_ERD_FLAG,4,2           ; @COUNTRY_ERD_FLAG
	.no_dead_strip	_ath10k_mac_get_wrdd_regulatory
.subsections_via_symbols
