	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_channel_custom
_handle_channel_custom:                 ## @handle_channel_custom
	.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	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	(%rsi), %edi
	callq	_MHZ_TO_KHZ
	movq	%rbx, %rdi
	movl	%eax, %esi
	movq	%r15, %rdx
	callq	_freq_reg_info_regd
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%r14), %esi
	leaq	L_.str(%rip), %rdi
	callq	_REG_DBG_PRINT
	movq	_IEEE80211_CHAN_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	jmp	LBB0_9
LBB0_2:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_chan_reg_rule_print_dbg
	movl	4(%rbx), %r12d
	movl	$40, %edi
	callq	_MHZ_TO_KHZ
	movl	$0, %r13d
	cmpl	%eax, %r12d
	jge	LBB0_4
## %bb.3:
	movq	_IEEE80211_CHAN_NO_HT40@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_4:
	movl	4(%rbx), %r15d
	movl	$80, %edi
	callq	_MHZ_TO_KHZ
	movl	$0, %r12d
	cmpl	%eax, %r15d
	jge	LBB0_6
## %bb.5:
	movq	_IEEE80211_CHAN_NO_80MHZ@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_6:
	orl	%r13d, %r12d
	movl	4(%rbx), %r15d
	movl	$160, %edi
	callq	_MHZ_TO_KHZ
	cmpl	%eax, %r15d
	movl	$0, %r15d
	jge	LBB0_8
## %bb.7:
	movq	_IEEE80211_CHAN_NO_160MHZ@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_8:
	movl	(%rbx), %edi
	callq	_map_regdom_flags
	orl	%r15d, %eax
	orl	%eax, %r12d
	orl	%r12d, 4(%r14)
	movl	12(%rbx), %edi
	callq	_MBI_TO_DBI
	movl	%eax, 8(%r14)
	movl	8(%rbx), %edi
	callq	_MBM_TO_DBM
	movl	%eax, 16(%r14)
	movl	%eax, 12(%r14)
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Disabling freq %d MHz as custom regd has no rule that fits it\n"

	.comm	_IEEE80211_CHAN_DISABLED,4,2    ## @IEEE80211_CHAN_DISABLED
	.comm	_IEEE80211_CHAN_NO_HT40,4,2     ## @IEEE80211_CHAN_NO_HT40
	.comm	_IEEE80211_CHAN_NO_80MHZ,4,2    ## @IEEE80211_CHAN_NO_80MHZ
	.comm	_IEEE80211_CHAN_NO_160MHZ,4,2   ## @IEEE80211_CHAN_NO_160MHZ
	.no_dead_strip	_handle_channel_custom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_channel_custom
_handle_channel_custom:                 ; @handle_channel_custom
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	w0, [x1]
	bl	_MHZ_TO_KHZ
	mov	x1, x0
	mov	x0, x21
	mov	x2, x20
	bl	_freq_reg_info_regd
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w1, [x19]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_REG_DBG_PRINT
Lloh2:
	adrp	x8, _IEEE80211_CHAN_DISABLED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IEEE80211_CHAN_DISABLED@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	mov	x1, x20
	bl	_chan_reg_rule_print_dbg
	ldr	w21, [x20, #4]
	mov	w0, #40
	bl	_MHZ_TO_KHZ
Lloh5:
	adrp	x8, _IEEE80211_CHAN_NO_HT40@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IEEE80211_CHAN_NO_HT40@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w21, w0
	csel	w21, w8, wzr, lt
	ldr	w22, [x20, #4]
	mov	w0, #80
	bl	_MHZ_TO_KHZ
Lloh8:
	adrp	x8, _IEEE80211_CHAN_NO_80MHZ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IEEE80211_CHAN_NO_80MHZ@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w22, w0
	csel	w8, w8, wzr, lt
	orr	w21, w8, w21
	ldr	w22, [x20, #4]
	mov	w0, #160
	bl	_MHZ_TO_KHZ
Lloh11:
	adrp	x8, _IEEE80211_CHAN_NO_160MHZ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IEEE80211_CHAN_NO_160MHZ@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w22, w0
	csel	w8, w8, wzr, lt
	orr	w21, w21, w8
	ldr	w0, [x20]
	bl	_map_regdom_flags
	orr	w8, w21, w0
	ldr	w9, [x19, #4]
	orr	w8, w8, w9
	str	w8, [x19, #4]
	ldr	w0, [x20, #12]
	bl	_MBI_TO_DBI
	str	w0, [x19, #8]
	ldr	w0, [x20, #8]
	bl	_MBM_TO_DBM
	stp	w0, w0, [x19, #12]
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Disabling freq %d MHz as custom regd has no rule that fits it\n"

	.comm	_IEEE80211_CHAN_DISABLED,4,2    ; @IEEE80211_CHAN_DISABLED
	.comm	_IEEE80211_CHAN_NO_HT40,4,2     ; @IEEE80211_CHAN_NO_HT40
	.comm	_IEEE80211_CHAN_NO_80MHZ,4,2    ; @IEEE80211_CHAN_NO_80MHZ
	.comm	_IEEE80211_CHAN_NO_160MHZ,4,2   ; @IEEE80211_CHAN_NO_160MHZ
	.no_dead_strip	_handle_channel_custom
.subsections_via_symbols
