	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wlan_config_set_country
_wlan_config_set_country:               ## @wlan_config_set_country
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movl	$0, -60(%rbp)
	movq	$0, -56(%rbp)
	callq	_wlan_get_channel_list
	movl	$-1, %r14d
	testq	%rax, %rax
	js	LBB0_26
## %bb.1:
	cmpl	$0, (%rbx)
	je	LBB0_7
## %bb.2:
	movl	24(%rbx), %edi
	movq	_IEEE80211_IOC_TXPOWMAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	leaq	-56(%rbp), %r8
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	callq	_wlan_ioctl
	testq	%rax, %rax
	js	LBB0_26
## %bb.3:
	movl	(%rbx), %edi
	callq	_IEEE80211_REGDOMAIN_SIZE
	movq	%rax, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_26
## %bb.4:
	movq	%rax, %r15
	movl	(%rbx), %edi
	callq	_IEEE80211_REGDOMAIN_SIZE
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%rax, %rdx
	callq	_memset
	movl	(%rbx), %edi
	callq	_IEEE80211_REGDOMAIN_SIZE
	movq	%rax, -56(%rbp)
	movl	%r12d, %edi
	callq	_wlan_snmp_to_regdomain
	movl	%eax, 12(%r15)
	movb	(%r13), %al
	movq	(%r15), %rcx
	movb	%al, (%rcx)
	movb	1(%r13), %al
	movq	(%r15), %rcx
	movb	%al, 1(%rcx)
	movb	2(%r13), %al
	movb	%al, 8(%r15)
	movl	(%rbx), %edx
	movl	%edx, 16(%r15)
	movq	24(%r15), %rdi
	movl	28(%rbx), %esi
	shll	$2, %edx
	callq	_memcpy
	movslq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_22
## %bb.5:
	movq	24(%r15), %rcx
	cmpl	$8, %eax
	jb	LBB0_6
## %bb.8:
	leaq	-44(%rbp), %rsi
	leaq	(%rcx,%rax,4), %rdx
	leaq	-48(%rbp), %rdi
	cmpq	%rdx, %rdi
	setb	%dl
	cmpq	%rsi, %rcx
	jae	LBB0_11
## %bb.9:
	testb	%dl, %dl
	je	LBB0_11
LBB0_6:
	xorl	%edx, %edx
LBB0_18:
	movq	%rdx, %r8
	notq	%r8
	addq	%rax, %r8
	movq	%rax, %rdi
	andq	$3, %rdi
	je	LBB0_20
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movl	-48(%rbp), %esi
	movl	%esi, (%rcx,%rdx,4)
	incq	%rdx
	decq	%rdi
	jne	LBB0_19
LBB0_20:
	cmpq	$3, %r8
	jb	LBB0_22
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movl	-48(%rbp), %esi
	movl	%esi, (%rcx,%rdx,4)
	movl	-48(%rbp), %esi
	movl	%esi, 4(%rcx,%rdx,4)
	movl	-48(%rbp), %esi
	movl	%esi, 8(%rcx,%rdx,4)
	movl	-48(%rbp), %esi
	movl	%esi, 12(%rcx,%rdx,4)
	addq	$4, %rdx
	cmpq	%rdx, %rax
	jne	LBB0_21
	jmp	LBB0_22
LBB0_7:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	24(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	callq	_syslog
	jmp	LBB0_26
LBB0_11:
	movq	%rax, %rdx
	andq	$-8, %rdx
	leaq	-8(%rdx), %rsi
	movq	%rsi, %r8
	shrq	$3, %r8
	incq	%r8
	testq	%rsi, %rsi
	je	LBB0_14
## %bb.12:
	movq	%r8, %rsi
	andq	$-2, %rsi
	pshufd	$0, -48(%rbp), %xmm0            ## xmm0 = mem[0,0,0,0]
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movdqu	%xmm0, (%rcx,%rdi,4)
	movdqu	%xmm0, 16(%rcx,%rdi,4)
	movdqu	%xmm0, 32(%rcx,%rdi,4)
	movdqu	%xmm0, 48(%rcx,%rdi,4)
	addq	$16, %rdi
	addq	$-2, %rsi
	jne	LBB0_13
	jmp	LBB0_15
LBB0_14:
	xorl	%edi, %edi
LBB0_15:
	testb	$1, %r8b
	je	LBB0_17
## %bb.16:
	movd	-48(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	movdqu	%xmm0, (%rcx,%rdi,4)
	movdqu	%xmm0, 16(%rcx,%rdi,4)
LBB0_17:
	cmpq	%rax, %rdx
	jne	LBB0_18
LBB0_22:
	movq	_wlanIfaceState_down@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_wlan_config_state
	testq	%rax, %rax
	js	LBB0_25
## %bb.23:
	movl	24(%rbx), %edi
	movq	_IEEE80211_IOC_REGDOMAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-60(%rbp), %rdx
	leaq	-56(%rbp), %r8
	movq	%r15, %rcx
	movl	$1, %r9d
	callq	_wlan_ioctl
	testq	%rax, %rax
	js	LBB0_25
## %bb.24:
	movq	_wlanIfaceState_up@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_wlan_config_state
	movl	12(%r15), %edi
	callq	_wlan_regdomain_to_snmp
	movl	%eax, 16(%rbx)
	movq	(%r15), %rax
	movb	(%rax), %al
	movq	8(%rbx), %rcx
	movb	%al, (%rcx)
	movq	(%r15), %rax
	movb	1(%rax), %al
	movq	8(%rbx), %rcx
	movb	%al, 1(%rcx)
	movb	8(%r15), %al
	movq	8(%rbx), %rcx
	movb	%al, 2(%rcx)
	movq	%r15, %rdi
	callq	_free
	xorl	%r14d, %r14d
	jmp	LBB0_26
LBB0_25:
	movq	%r15, %rdi
	callq	_free
LBB0_26:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"iface %s - set regdomain failed"

	.comm	_IEEE80211_IOC_TXPOWMAX,4,2     ## @IEEE80211_IOC_TXPOWMAX
	.comm	_wlanIfaceState_down,4,2        ## @wlanIfaceState_down
	.comm	_IEEE80211_IOC_REGDOMAIN,4,2    ## @IEEE80211_IOC_REGDOMAIN
	.comm	_wlanIfaceState_up,4,2          ## @wlanIfaceState_up
	.no_dead_strip	_wlan_config_set_country
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wlan_config_set_country
_wlan_config_set_country:               ; @wlan_config_set_country
	.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	x22, x2
	mov	x21, x1
	mov	x19, x0
	str	wzr, [sp, #12]
	str	xzr, [sp]
	bl	_wlan_get_channel_list
	tbnz	x0, #63, LBB0_16
; %bb.1:
	ldr	w8, [x19]
	cbz	w8, LBB0_14
; %bb.2:
	ldr	w0, [x19, #24]
Lloh0:
	adrp	x8, _IEEE80211_IOC_TXPOWMAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_IOC_TXPOWMAX@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x4, sp
	mov	x3, #0
	mov	w5, #0
	bl	_wlan_ioctl
	tbnz	x0, #63, LBB0_16
; %bb.3:
	ldr	w0, [x19]
	bl	_IEEE80211_REGDOMAIN_SIZE
	bl	_malloc
	cbz	x0, LBB0_16
; %bb.4:
	mov	x20, x0
	ldr	w0, [x19]
	bl	_IEEE80211_REGDOMAIN_SIZE
	mov	x2, x0
	mov	x0, x20
	mov	w1, #0
	bl	_memset
	ldr	w0, [x19]
	bl	_IEEE80211_REGDOMAIN_SIZE
	str	x0, [sp]
	mov	x0, x22
	bl	_wlan_snmp_to_regdomain
	str	w0, [x20, #12]
	ldrb	w8, [x21]
	ldr	x9, [x20]
	strb	w8, [x9]
	ldrb	w8, [x21, #1]
	ldr	x9, [x20]
	strb	w8, [x9, #1]
	ldrb	w8, [x21, #2]
	strb	w8, [x20, #8]
	ldr	w8, [x19]
	str	w8, [x20, #16]
	ldr	x0, [x20, #24]
	ldr	w1, [x19, #28]
	lsl	w2, w8, #2
	bl	_memcpy
	ldrsw	x8, [x19]
	cbz	w8, LBB0_11
; %bb.5:
	ldr	x9, [x20, #24]
	cmp	w8, #16
	b.lo	LBB0_8
; %bb.6:
	add	x11, sp, #8
	add	x12, x11, #4
	add	x10, x9, x8, lsl #2
	cmp	x11, x10
	cset	w10, lo
	cmp	x9, x12
	b.hs	LBB0_18
; %bb.7:
	tbz	w10, #0, LBB0_18
LBB0_8:
	mov	x10, #0
LBB0_9:
	sub	x8, x8, x10
	add	x9, x9, x10, lsl #2
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [sp, #8]
	str	w10, [x9], #4
	subs	x8, x8, #1
	b.ne	LBB0_10
LBB0_11:
Lloh3:
	adrp	x8, _wlanIfaceState_down@GOTPAGE
Lloh4:
	ldr	x8, [x8, _wlanIfaceState_down@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #20]
	mov	x0, x19
	mov	w1, #1
	bl	_wlan_config_state
	tbnz	x0, #63, LBB0_15
; %bb.12:
	ldr	w0, [x19, #24]
Lloh6:
	adrp	x8, _IEEE80211_IOC_REGDOMAIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IEEE80211_IOC_REGDOMAIN@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x4, sp
	mov	x3, x20
	mov	w5, #1
	bl	_wlan_ioctl
	tbnz	x0, #63, LBB0_15
; %bb.13:
Lloh9:
	adrp	x8, _wlanIfaceState_up@GOTPAGE
Lloh10:
	ldr	x8, [x8, _wlanIfaceState_up@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x19, #20]
	mov	x0, x19
	mov	w1, #1
	bl	_wlan_config_state
	ldr	w0, [x20, #12]
	bl	_wlan_regdomain_to_snmp
	str	w0, [x19, #16]
	ldr	x8, [x20]
	ldrb	w8, [x8]
	ldr	x9, [x19, #8]
	strb	w8, [x9]
	ldr	x8, [x20]
	ldrb	w8, [x8, #1]
	ldr	x9, [x19, #8]
	strb	w8, [x9, #1]
	ldrb	w8, [x20, #8]
	ldr	x9, [x19, #8]
	strb	w8, [x9, #2]
	mov	x0, x20
	bl	_free
	mov	w0, #0
	b	LBB0_17
LBB0_14:
Lloh12:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	w2, [x19, #24]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_syslog
	b	LBB0_16
LBB0_15:
	mov	x0, x20
	bl	_free
LBB0_16:
	mov	w0, #-1
LBB0_17:
	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_18:
	and	x10, x8, #0xfffffffffffffff0
	ld1r.4s	{ v0 }, [x11]
	add	x11, x9, #32
	mov	x12, x10
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	stp	q0, q0, [x11, #-32]
	stp	q0, q0, [x11], #64
	subs	x12, x12, #16
	b.ne	LBB0_19
; %bb.20:
	cmp	x10, x8
	b.eq	LBB0_11
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"iface %s - set regdomain failed"

	.comm	_IEEE80211_IOC_TXPOWMAX,4,2     ; @IEEE80211_IOC_TXPOWMAX
	.comm	_wlanIfaceState_down,4,2        ; @wlanIfaceState_down
	.comm	_IEEE80211_IOC_REGDOMAIN,4,2    ; @IEEE80211_IOC_REGDOMAIN
	.comm	_wlanIfaceState_up,4,2          ; @wlanIfaceState_up
	.no_dead_strip	_wlan_config_set_country
.subsections_via_symbols
