	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_get_channel_for_reset_scan
_iwl_get_channel_for_reset_scan:        ## @iwl_get_channel_for_reset_scan
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movl	%edx, %r14d
	movq	%rdi, %rbx
	movl	%edx, %esi
	callq	_iwl_get_hw_mode
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_iwl_get_single_channel_number
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	%rax, %rdi
	callq	_cpu_to_le16
	movq	%rax, 32(%r15)
	movq	_SCAN_CHANNEL_TYPE_PASSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r15)
	movq	_IWL_RADIO_RESET_DWELL_TIME@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_cpu_to_le16
	movq	%rax, 16(%r15)
	movq	(%rbx), %rdi
	callq	_cpu_to_le16
	movq	%rax, 8(%r15)
	movl	$110, (%r15)
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_7
## %bb.3:
	movl	$59, 4(%r15)
	jmp	LBB0_8
LBB0_4:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
LBB0_6:
	movq	%rbx, %rdi
	callq	_IWL_ERR
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_7:
	movl	$40, 4(%r15)
LBB0_8:
	movl	$1, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid band\n"

	.comm	_SCAN_CHANNEL_TYPE_PASSIVE,4,2  ## @SCAN_CHANNEL_TYPE_PASSIVE
	.comm	_IWL_RADIO_RESET_DWELL_TIME,8,3 ## @IWL_RADIO_RESET_DWELL_TIME
	.comm	_NL80211_BAND_5GHZ,4,2          ## @NL80211_BAND_5GHZ
L_.str.1:                               ## @.str.1
	.asciz	"no valid channel found\n"

	.no_dead_strip	_iwl_get_channel_for_reset_scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwl_get_channel_for_reset_scan
_iwl_get_channel_for_reset_scan:        ; @iwl_get_channel_for_reset_scan
	.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	x19, x3
	mov	x20, x2
	mov	x21, x0
	mov	x1, x2
	bl	_iwl_get_hw_mode
	cbz	x0, LBB0_4
; %bb.1:
	mov	x0, x21
	mov	x1, x20
	bl	_iwl_get_single_channel_number
	cbz	x0, LBB0_5
; %bb.2:
	bl	_cpu_to_le16
Lloh0:
	adrp	x8, _SCAN_CHANNEL_TYPE_PASSIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCAN_CHANNEL_TYPE_PASSIVE@GOTPAGEOFF]
	str	x0, [x19, #32]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #24]
Lloh3:
	adrp	x21, _IWL_RADIO_RESET_DWELL_TIME@GOTPAGE
Lloh4:
	ldr	x21, [x21, _IWL_RADIO_RESET_DWELL_TIME@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_cpu_to_le16
	str	x0, [x19, #16]
	ldr	x0, [x21]
	bl	_cpu_to_le16
	str	x0, [x19, #8]
	mov	w8, #110
	str	w8, [x19]
Lloh5:
	adrp	x8, _NL80211_BAND_5GHZ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NL80211_BAND_5GHZ@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_7
; %bb.3:
	mov	w8, #59
	b	LBB0_8
LBB0_4:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	mov	x0, x21
	bl	_IWL_ERR
	mov	w0, #0
	b	LBB0_9
LBB0_7:
	mov	w8, #40
LBB0_8:
	str	w8, [x19, #4]
	mov	w0, #1
LBB0_9:
	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	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid band\n"

	.comm	_SCAN_CHANNEL_TYPE_PASSIVE,4,2  ; @SCAN_CHANNEL_TYPE_PASSIVE
	.comm	_IWL_RADIO_RESET_DWELL_TIME,8,3 ; @IWL_RADIO_RESET_DWELL_TIME
	.comm	_NL80211_BAND_5GHZ,4,2          ; @NL80211_BAND_5GHZ
l_.str.1:                               ; @.str.1
	.asciz	"no valid channel found\n"

	.no_dead_strip	_iwl_get_channel_for_reset_scan
.subsections_via_symbols
