	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_mvm_ftm_target_chandef
_iwl_mvm_ftm_target_chandef:            ## @iwl_mvm_ftm_target_chandef
	.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	%r8, %r14
	movq	%rcx, %r15
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	8(%rsi), %rax
	movl	(%rax), %edi
	callq	_ieee80211_frequency_to_channel
	movl	%eax, (%r13)
	movl	(%rbx), %edx
	leal	-128(%rdx), %eax
	cmpl	$4, %eax
	jae	LBB0_1
## %bb.2:
	cltq
	leaq	l_switch.table.iwl_mvm_ftm_target_chandef(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	xorl	%r15d, %r15d
	cmpl	$132, (%rbx)
	movl	$0, %eax
	jl	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_iwl_mvm_get_ctrl_pos
LBB0_4:
	movl	%eax, (%r14)
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_IWL_ERR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_5:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IWL_TOF_BW_20_LEGACY,4,2       ## @IWL_TOF_BW_20_LEGACY
	.comm	_IWL_TOF_BW_20_HT,4,2           ## @IWL_TOF_BW_20_HT
	.comm	_IWL_TOF_BW_40,4,2              ## @IWL_TOF_BW_40
	.comm	_IWL_TOF_BW_80,4,2              ## @IWL_TOF_BW_80
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported BW in FTM request (%d)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_iwl_mvm_ftm_target_chandef
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.iwl_mvm_ftm_target_chandef
l_switch.table.iwl_mvm_ftm_target_chandef:
	.quad	_IWL_TOF_BW_80
	.quad	_IWL_TOF_BW_40
	.quad	_IWL_TOF_BW_20_LEGACY
	.quad	_IWL_TOF_BW_20_HT

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwl_mvm_ftm_target_chandef
_iwl_mvm_ftm_target_chandef:            ; @iwl_mvm_ftm_target_chandef
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x4
	mov	x21, x3
	mov	x23, x2
	mov	x20, x1
	mov	x22, x0
	ldr	x8, [x1, #8]
	ldr	w0, [x8]
	bl	_ieee80211_frequency_to_channel
	str	w0, [x23]
	ldr	w2, [x20]
	sub	w8, w2, #128
	cmp	w8, #4
	b.hs	LBB0_3
; %bb.1:
Lloh0:
	adrp	x9, l_switch.table.iwl_mvm_ftm_target_chandef@PAGE
Lloh1:
	add	x9, x9, l_switch.table.iwl_mvm_ftm_target_chandef@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w8, [x8]
	str	w8, [x21]
	ldr	w8, [x20]
	cmp	w8, #132
	b.lt	LBB0_4
; %bb.2:
	mov	x0, x20
	bl	_iwl_mvm_get_ctrl_pos
	mov	x8, x0
	b	LBB0_5
LBB0_3:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_IWL_ERR
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_4:
	mov	w8, #0
LBB0_5:
	mov	w0, #0
	str	w8, [x19]
LBB0_6:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_IWL_TOF_BW_20_LEGACY,4,2       ; @IWL_TOF_BW_20_LEGACY
	.comm	_IWL_TOF_BW_20_HT,4,2           ; @IWL_TOF_BW_20_HT
	.comm	_IWL_TOF_BW_40,4,2              ; @IWL_TOF_BW_40
	.comm	_IWL_TOF_BW_80,4,2              ; @IWL_TOF_BW_80
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported BW in FTM request (%d)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_iwl_mvm_ftm_target_chandef
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.iwl_mvm_ftm_target_chandef
l_switch.table.iwl_mvm_ftm_target_chandef:
	.quad	_IWL_TOF_BW_80
	.quad	_IWL_TOF_BW_40
	.quad	_IWL_TOF_BW_20_LEGACY
	.quad	_IWL_TOF_BW_20_HT

.subsections_via_symbols
