	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_sensitivity_calibration    ## -- Begin function iwl_sensitivity_calibration
	.p2align	4, 0x90
_iwl_sensitivity_calibration:           ## @iwl_sensitivity_calibration
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_IWL_SENSITIVITY_CALIB_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_1
LBB0_10:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %rbx
	callq	_iwl_is_any_associated
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	leaq	16(%rbx), %r13
	movq	%r13, %rdi
	callq	_spin_lock_bh
	movq	40(%rbx), %rax
	movq	_INTERFERENCE_DATA_AVAILABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.5:
	movl	72(%rbx), %edi
	callq	_le32_to_cpu
	movq	%rax, %r14
	movl	24(%rbx), %edi
	callq	_le32_to_cpu
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	32(%rbx), %edi
	callq	_le32_to_cpu
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	20(%rbx), %edi
	callq	_le32_to_cpu
	movq	%rax, %r15
	movl	28(%rbx), %edi
	callq	_le32_to_cpu
	movq	%rax, %r12
	movl	68(%rbx), %edi
	callq	_le32_to_cpu
	movq	%rax, -64(%rbp)
	movl	64(%rbx), %edi
	callq	_le32_to_cpu
	movq	%rax, -72(%rbp)
	movl	60(%rbx), %edi
	callq	_le32_to_cpu
	movq	%rax, -80(%rbp)
	movl	56(%rbx), %edi
	callq	_le32_to_cpu
	movq	%rax, -88(%rbp)
	movl	52(%rbx), %edi
	callq	_le32_to_cpu
	movq	%rax, -96(%rbp)
	movl	48(%rbx), %edi
	callq	_le32_to_cpu
	movq	%rax, -104(%rbp)
	movq	%r13, %rdi
	callq	_spin_unlock_bh
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_IWL_DEBUG_CALIB
	testq	%r14, %r14
	je	LBB0_6
## %bb.7:
	movq	80(%rbx), %rax
	movq	88(%rbx), %rdx
	xorl	%esi, %esi
	cmpq	%r15, %rax
	cmovgq	%rsi, %rax
	movq	%r15, %rcx
	subq	%rax, %rcx
	movq	%r15, 80(%rbx)
	cmpq	%r12, %rdx
	cmovgq	%rsi, %rdx
	movq	%r12, %r9
	subq	%rdx, %r9
	movq	%r12, 88(%rbx)
	movq	96(%rbx), %rax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	cmpq	%rdx, %rax
	cmovgq	%rsi, %rax
	movq	%rdx, %r8
	subq	%rax, %r8
	movq	%rdx, 96(%rbx)
	movq	104(%rbx), %rax
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	cmpq	%rdi, %rax
	cmovgq	%rsi, %rax
	movq	%rdi, %rdx
	subq	%rax, %rdx
	movq	%rdi, 104(%rbx)
	leaq	(%r8,%r9), %r15
	leaq	(%rdx,%rcx), %r12
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_IWL_DEBUG_CALIB
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_iwl_sens_auto_corr_ofdm
	leaq	-104(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_iwl_sens_energy_cck
	movq	8(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	_iwl_enhance_sensitivity_write
	jmp	LBB0_10
LBB0_2:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_3
LBB0_11:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_IWL_DEBUG_CALIB
	movq	%r13, %rdi
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_bh                 ## TAILCALL
LBB0_6:
	leaq	L_.str.3(%rip), %rsi
LBB0_3:
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_IWL_DEBUG_CALIB                ## TAILCALL
LBB0_9:
	movq	%rbx, %rdi
	callq	_iwl_sensitivity_write
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_IWL_SENSITIVITY_CALIB_DISABLED,4,2 ## @IWL_SENSITIVITY_CALIB_DISABLED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"<< - not associated\n"

	.comm	_INTERFERENCE_DATA_AVAILABLE,8,3 ## @INTERFERENCE_DATA_AVAILABLE
L_.str.1:                               ## @.str.1
	.asciz	"<< invalid data.\n"

L_.str.2:                               ## @.str.2
	.asciz	"rx_enable_time = %u usecs\n"

L_.str.3:                               ## @.str.3
	.asciz	"<< RX Enable Time == 0!\n"

L_.str.4:                               ## @.str.4
	.asciz	"cck: fa %u badp %u  ofdm: fa %u badp %u\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_sensitivity_calibration    ; -- Begin function iwl_sensitivity_calibration
	.p2align	2
_iwl_sensitivity_calibration:           ; @iwl_sensitivity_calibration
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _IWL_SENSITIVITY_CALIB_DISABLED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IWL_SENSITIVITY_CALIB_DISABLED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_2:
	mov	x19, x0
	bl	_iwl_is_any_associated
	cbz	w0, LBB0_7
; %bb.3:
	add	x23, x19, #16
	mov	x0, x23
	bl	_spin_lock_bh
	ldr	x8, [x19, #40]
Lloh3:
	adrp	x9, _INTERFERENCE_DATA_AVAILABLE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _INTERFERENCE_DATA_AVAILABLE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.4:
	ldr	w0, [x19, #72]
	bl	_le32_to_cpu
	mov	x20, x0
	ldr	w0, [x19, #24]
	bl	_le32_to_cpu
	mov	x21, x0
	ldr	w0, [x19, #32]
	bl	_le32_to_cpu
	mov	x22, x0
	ldr	w0, [x19, #20]
	bl	_le32_to_cpu
	mov	x24, x0
	ldr	w0, [x19, #28]
	bl	_le32_to_cpu
	mov	x25, x0
	ldr	w0, [x19, #68]
	bl	_le32_to_cpu
	str	x0, [sp, #72]
	ldr	w0, [x19, #64]
	bl	_le32_to_cpu
	str	x0, [sp, #64]
	ldr	w0, [x19, #60]
	bl	_le32_to_cpu
	str	x0, [sp, #56]
	ldr	w0, [x19, #56]
	bl	_le32_to_cpu
	str	x0, [sp, #48]
	ldr	w0, [x19, #52]
	bl	_le32_to_cpu
	str	x0, [sp, #40]
	ldr	w0, [x19, #48]
	bl	_le32_to_cpu
	str	x0, [sp, #32]
	mov	x0, x23
	bl	_spin_unlock_bh
	str	x20, [sp]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_IWL_DEBUG_CALIB
	cbz	x20, LBB0_9
; %bb.5:
	ldp	x8, x9, [x19, #80]
	cmp	x8, x24
	csel	x8, xzr, x8, gt
	sub	x8, x24, x8
	cmp	x9, x25
	csel	x9, xzr, x9, gt
	sub	x9, x25, x9
	stp	x24, x25, [x19, #80]
	ldp	x10, x11, [x19, #96]
	cmp	x10, x22
	csel	x10, xzr, x10, gt
	cmp	x11, x21
	csel	x11, xzr, x11, gt
	stp	x22, x21, [x19, #96]
	sub	x10, x22, x10
	add	x22, x10, x9
	sub	x11, x21, x11
	add	x21, x11, x8
	stp	x10, x9, [sp, #16]
	stp	x11, x8, [sp]
Lloh8:
	adrp	x1, l_.str.4@PAGE
Lloh9:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_IWL_DEBUG_CALIB
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	bl	_iwl_sens_auto_corr_ofdm
	add	x3, sp, #32
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_iwl_sens_energy_cck
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.6:
	mov	x0, x19
	bl	_iwl_enhance_sensitivity_write
	b	LBB0_1
LBB0_7:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_10
LBB0_8:
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_IWL_DEBUG_CALIB
	mov	x0, x23
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #160
	b	_spin_unlock_bh
LBB0_9:
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #160
	b	_IWL_DEBUG_CALIB
LBB0_11:
	mov	x0, x19
	bl	_iwl_sensitivity_write
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_IWL_SENSITIVITY_CALIB_DISABLED,4,2 ; @IWL_SENSITIVITY_CALIB_DISABLED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"<< - not associated\n"

	.comm	_INTERFERENCE_DATA_AVAILABLE,8,3 ; @INTERFERENCE_DATA_AVAILABLE
l_.str.1:                               ; @.str.1
	.asciz	"<< invalid data.\n"

l_.str.2:                               ; @.str.2
	.asciz	"rx_enable_time = %u usecs\n"

l_.str.3:                               ; @.str.3
	.asciz	"<< RX Enable Time == 0!\n"

l_.str.4:                               ; @.str.4
	.asciz	"cck: fa %u badp %u  ofdm: fa %u badp %u\n"

.subsections_via_symbols
