	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtw8822b_do_iqk
_rtw8822b_do_iqk:                       ## @rtw8822b_do_iqk
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	$0, -48(%rbp)
	leaq	-48(%rbp), %rsi
	callq	_rtw_fw_do_iqk
	xorl	%ebx, %ebx
	movq	_RF_PATH_A@GOTPCREL(%rip), %r15
	movq	_RF_DTXLOK@GOTPCREL(%rip), %r12
	movq	_RFREG_MASK@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movl	(%r12), %edx
	movl	(%r13), %ecx
	movq	%r14, %rdi
	callq	_rtw_read_rf
	cmpl	$703710, %eax                   ## imm = 0xABCDE
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$20, %edi
	callq	_msleep
	incl	%ebx
	cmpl	$300, %ebx                      ## imm = 0x12C
	jne	LBB0_1
## %bb.3:
	movl	$300, %ebx                      ## imm = 0x12C
LBB0_4:
	movl	(%r15), %esi
	movl	(%r12), %edx
	movl	(%r13), %ecx
	movq	%r14, %rdi
	xorl	%r8d, %r8d
	callq	_rtw_write_rf
	movq	_REG_IQKFAILMSK@GOTPCREL(%rip), %r12
	movl	(%r12), %r15d
	movl	$16, %edi
	callq	_BIT
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_rtw_read32_mask
	xorl	%r15d, %r15d
	testl	%eax, %eax
	setne	%r15b
	movl	(%r12), %r12d
	movl	$7, %edi
	xorl	%esi, %esi
	callq	_GENMASK
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_rtw_read32_mask
	movq	_RTW_DBG_PHY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	_rtw8822b_do_iqk.do_iqk_cnt(%rip), %r9d
	incl	%r9d
	movl	%r9d, _rtw8822b_do_iqk.do_iqk_cnt(%rip)
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%ebx, %ecx
	movl	%r15d, %r8d
	callq	_rtw_dbg
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_rtw8822b_do_iqk.do_iqk_cnt,4,2 ## @rtw8822b_do_iqk.do_iqk_cnt
	.comm	_RF_PATH_A,4,2                  ## @RF_PATH_A
	.comm	_RF_DTXLOK,4,2                  ## @RF_DTXLOK
	.comm	_RFREG_MASK,4,2                 ## @RFREG_MASK
	.comm	_REG_IQKFAILMSK,4,2             ## @REG_IQKFAILMSK
	.comm	_RTW_DBG_PHY,4,2                ## @RTW_DBG_PHY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"iqk counter=%d reload=%d do_iqk_cnt=%d n_iqk_fail(mask)=0x%02x\n"

	.no_dead_strip	_rtw8822b_do_iqk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtw8822b_do_iqk
_rtw8822b_do_iqk:                       ; @rtw8822b_do_iqk
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x0
	str	xzr, [sp, #8]
	add	x1, sp, #8
	bl	_rtw_fw_do_iqk
	mov	w20, #0
Lloh0:
	adrp	x21, _RF_PATH_A@GOTPAGE
Lloh1:
	ldr	x21, [x21, _RF_PATH_A@GOTPAGEOFF]
Lloh2:
	adrp	x22, _RF_DTXLOK@GOTPAGE
Lloh3:
	ldr	x22, [x22, _RF_DTXLOK@GOTPAGEOFF]
	mov	w24, #48350
	movk	w24, #10, lsl #16
Lloh4:
	adrp	x23, _RFREG_MASK@GOTPAGE
Lloh5:
	ldr	x23, [x23, _RFREG_MASK@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	ldr	w2, [x22]
	ldr	w3, [x23]
	mov	x0, x19
	bl	_rtw_read_rf
	cmp	w0, w24
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #20
	bl	_msleep
	add	w20, w20, #1
	cmp	w20, #300
	b.ne	LBB0_1
LBB0_3:
	ldr	w1, [x21]
	ldr	w2, [x22]
	ldr	w3, [x23]
	mov	x0, x19
	mov	w4, #0
	bl	_rtw_write_rf
Lloh6:
	adrp	x22, _REG_IQKFAILMSK@GOTPAGE
Lloh7:
	ldr	x22, [x22, _REG_IQKFAILMSK@GOTPAGEOFF]
	ldr	w21, [x22]
	mov	w0, #16
	bl	_BIT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_rtw_read32_mask
	cmp	w0, #0
	cset	w21, ne
	ldr	w22, [x22]
	mov	w0, #7
	mov	w1, #0
	bl	_GENMASK
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_rtw_read32_mask
	mov	x6, x0
Lloh8:
	adrp	x8, _RTW_DBG_PHY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RTW_DBG_PHY@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	adrp	x8, _rtw8822b_do_iqk.do_iqk_cnt@PAGE
	ldr	w9, [x8, _rtw8822b_do_iqk.do_iqk_cnt@PAGEOFF]
	add	w5, w9, #1
	str	w5, [x8, _rtw8822b_do_iqk.do_iqk_cnt@PAGEOFF]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x20
	mov	x4, x21
	bl	_rtw_dbg
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_rtw8822b_do_iqk.do_iqk_cnt,4,2 ; @rtw8822b_do_iqk.do_iqk_cnt
	.comm	_RF_PATH_A,4,2                  ; @RF_PATH_A
	.comm	_RF_DTXLOK,4,2                  ; @RF_DTXLOK
	.comm	_RFREG_MASK,4,2                 ; @RFREG_MASK
	.comm	_REG_IQKFAILMSK,4,2             ; @REG_IQKFAILMSK
	.comm	_RTW_DBG_PHY,4,2                ; @RTW_DBG_PHY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"iqk counter=%d reload=%d do_iqk_cnt=%d n_iqk_fail(mask)=0x%02x\n"

	.no_dead_strip	_rtw8822b_do_iqk
.subsections_via_symbols
