	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwlagn_chain_noise_reset
_iwlagn_chain_noise_reset:              ## @iwlagn_chain_noise_reset
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_IWL_CHAIN_NOISE_CALIB_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	jne	LBB0_6
## %bb.1:
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	_IWL_CHAIN_NOISE_ALIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.2:
	movq	%rbx, %rdi
	callq	_iwl_is_any_associated
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 48(%rbx)
	movups	%xmm0, 32(%rbx)
	movups	%xmm0, 16(%rbx)
	movq	$0, 64(%rbx)
	leaq	-24(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	4(%rbx), %esi
	movq	%r14, %rdi
	callq	_iwl_set_calib_hdr
	movq	_REPLY_PHY_CALIBRATION_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$4, %ecx
	movq	%r14, %r8
	callq	_iwl_dvm_send_cmd_pdu
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_IWL_ERR
LBB0_5:
	movq	_IWL_CHAIN_NOISE_ACCUMULATE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_IWL_DEBUG_CALIB
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IWL_CHAIN_NOISE_CALIB_DISABLED,4,2 ## @IWL_CHAIN_NOISE_CALIB_DISABLED
	.comm	_IWL_CHAIN_NOISE_ALIVE,8,3      ## @IWL_CHAIN_NOISE_ALIVE
	.comm	_REPLY_PHY_CALIBRATION_CMD,4,2  ## @REPLY_PHY_CALIBRATION_CMD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not send REPLY_PHY_CALIBRATION_CMD\n"

	.comm	_IWL_CHAIN_NOISE_ACCUMULATE,8,3 ## @IWL_CHAIN_NOISE_ACCUMULATE
L_.str.1:                               ## @.str.1
	.asciz	"Run chain_noise_calibrate\n"

	.no_dead_strip	_iwlagn_chain_noise_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwlagn_chain_noise_reset
_iwlagn_chain_noise_reset:              ; @iwlagn_chain_noise_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _IWL_CHAIN_NOISE_CALIB_DISABLED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IWL_CHAIN_NOISE_CALIB_DISABLED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #8]
Lloh3:
	adrp	x9, _IWL_CHAIN_NOISE_ALIVE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IWL_CHAIN_NOISE_ALIVE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_iwl_is_any_associated
	cbz	x0, LBB0_6
; %bb.3:
	str	xzr, [x19, #64]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x19, #32]
	str	q0, [x19, #16]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	w1, [x19, #4]
	add	x0, sp, #8
	bl	_iwl_set_calib_hdr
Lloh6:
	adrp	x8, _REPLY_PHY_CALIBRATION_CMD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REPLY_PHY_CALIBRATION_CMD@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x4, sp, #8
	mov	x0, x19
	mov	w2, #0
	mov	w3, #4
	bl	_iwl_dvm_send_cmd_pdu
	cbz	w0, LBB0_5
; %bb.4:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_IWL_ERR
LBB0_5:
Lloh11:
	adrp	x8, _IWL_CHAIN_NOISE_ACCUMULATE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IWL_CHAIN_NOISE_ACCUMULATE@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	str	x8, [x19, #8]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_IWL_DEBUG_CALIB
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_IWL_CHAIN_NOISE_CALIB_DISABLED,4,2 ; @IWL_CHAIN_NOISE_CALIB_DISABLED
	.comm	_IWL_CHAIN_NOISE_ALIVE,8,3      ; @IWL_CHAIN_NOISE_ALIVE
	.comm	_REPLY_PHY_CALIBRATION_CMD,4,2  ; @REPLY_PHY_CALIBRATION_CMD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not send REPLY_PHY_CALIBRATION_CMD\n"

	.comm	_IWL_CHAIN_NOISE_ACCUMULATE,8,3 ; @IWL_CHAIN_NOISE_ACCUMULATE
l_.str.1:                               ; @.str.1
	.asciz	"Run chain_noise_calibrate\n"

	.no_dead_strip	_iwlagn_chain_noise_reset
.subsections_via_symbols
