	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl_regd_init                  ## -- Begin function rtl_regd_init
	.p2align	4, 0x90
_rtl_regd_init:                         ## @rtl_regd_init
	.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, %r14
	movq	%rdi, %rbx
	callq	_rtl_priv
	movq	(%rbx), %r15
	testq	%r15, %r15
	je	LBB0_2
## %bb.1:
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	16(%r12), %rdi
	callq	_channel_plan_to_country_code
	movq	%rax, (%r12)
	movq	_COMP_REGD@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_DBG_DMESG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	16(%r12), %r8
	leaq	L_.str(%rip), %rcx
	movq	%r12, %rdi
	movq	%rax, %r9
	xorl	%eax, %eax
	callq	_RT_TRACE
	movq	(%r12), %rdi
	movq	_COUNTRY_CODE_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jl	LBB0_5
## %bb.4:
	movl	(%r13), %esi
	movl	(%rbx), %edx
	leaq	L_.str.1(%rip), %rcx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_RT_TRACE
	movq	_COUNTRY_CODE_WORLD_WIDE_13@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rdi, (%r12)
LBB0_5:
	callq	__rtl_regd_find_country
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	(%rax), %rcx
	movq	(%rcx), %r8
	movq	8(%r12), %rax
	movq	%r8, (%rax)
	movq	8(%rcx), %r9
	jmp	LBB0_8
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_7:
	movq	8(%r12), %rax
	movq	$48, (%rax)
	movl	$48, %r9d
	movl	$48, %r8d
LBB0_8:
	movq	%r9, 8(%rax)
	movl	(%r13), %esi
	movq	_DBG_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rcx
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_RT_TRACE
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	__rtl_regd_init_wiphy
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_COMP_REGD,4,2                  ## @COMP_REGD
	.comm	_DBG_DMESG,4,2                  ## @DBG_DMESG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rtl: EEPROM regdomain: 0x%0x country code: %d\n"

	.comm	_COUNTRY_CODE_MAX,8,3           ## @COUNTRY_CODE_MAX
L_.str.1:                               ## @.str.1
	.asciz	"rtl: EEPROM indicates invalid country code, world wide 13 should be used\n"

	.comm	_COUNTRY_CODE_WORLD_WIDE_13,8,3 ## @COUNTRY_CODE_WORLD_WIDE_13
	.comm	_DBG_TRACE,4,2                  ## @DBG_TRACE
L_.str.2:                               ## @.str.2
	.asciz	"rtl: Country alpha2 being used: %c%c\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl_regd_init                  ; -- Begin function rtl_regd_init
	.p2align	2
_rtl_regd_init:                         ; @rtl_regd_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x21, x0
	bl	_rtl_priv
	ldr	x21, [x21]
	cmp	x21, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_2:
	mov	x20, x0
	ldr	x0, [x0, #16]
	bl	_channel_plan_to_country_code
Lloh3:
	adrp	x22, _COMP_REGD@GOTPAGE
Lloh4:
	ldr	x22, [x22, _COMP_REGD@GOTPAGEOFF]
	str	x0, [x20]
	ldr	w1, [x22]
Lloh5:
	adrp	x23, _DBG_DMESG@GOTPAGE
Lloh6:
	ldr	x23, [x23, _DBG_DMESG@GOTPAGEOFF]
	ldr	w2, [x23]
	ldr	x8, [x20, #16]
	stp	x8, x0, [sp]
Lloh7:
	adrp	x3, l_.str@PAGE
Lloh8:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x20
	bl	_RT_TRACE
	ldr	x0, [x20]
Lloh9:
	adrp	x8, _COUNTRY_CODE_MAX@GOTPAGE
Lloh10:
	ldr	x8, [x8, _COUNTRY_CODE_MAX@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.lt	LBB0_4
; %bb.3:
	ldr	w1, [x22]
	ldr	w2, [x23]
Lloh12:
	adrp	x3, l_.str.1@PAGE
Lloh13:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_RT_TRACE
Lloh14:
	adrp	x8, _COUNTRY_CODE_WORLD_WIDE_13@GOTPAGE
Lloh15:
	ldr	x8, [x8, _COUNTRY_CODE_WORLD_WIDE_13@GOTPAGEOFF]
Lloh16:
	ldr	x0, [x8]
	str	x0, [x20]
LBB0_4:
	bl	__rtl_regd_find_country
	cbz	x0, LBB0_6
; %bb.5:
	ldr	x9, [x0]
	ldr	x8, [x9]
	ldr	x10, [x20, #8]
	str	x8, [x10]
	ldr	x9, [x9, #8]
	b	LBB0_7
LBB0_6:
	ldr	x10, [x20, #8]
	mov	w9, #48
	str	x9, [x10]
	mov	w8, #48
LBB0_7:
	str	x9, [x10, #8]
	ldr	w1, [x22]
Lloh17:
	adrp	x10, _DBG_TRACE@GOTPAGE
Lloh18:
	ldr	x10, [x10, _DBG_TRACE@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x10]
	stp	x8, x9, [sp]
Lloh20:
	adrp	x3, l_.str.2@PAGE
Lloh21:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_RT_TRACE
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	__rtl_regd_init_wiphy
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_COMP_REGD,4,2                  ; @COMP_REGD
	.comm	_DBG_DMESG,4,2                  ; @DBG_DMESG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rtl: EEPROM regdomain: 0x%0x country code: %d\n"

	.comm	_COUNTRY_CODE_MAX,8,3           ; @COUNTRY_CODE_MAX
l_.str.1:                               ; @.str.1
	.asciz	"rtl: EEPROM indicates invalid country code, world wide 13 should be used\n"

	.comm	_COUNTRY_CODE_WORLD_WIDE_13,8,3 ; @COUNTRY_CODE_WORLD_WIDE_13
	.comm	_DBG_TRACE,4,2                  ; @DBG_TRACE
l_.str.2:                               ; @.str.2
	.asciz	"rtl: Country alpha2 being used: %c%c\n"

.subsections_via_symbols
