	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtw8822c_dac_cal_iq_search
_rtw8822c_dac_cal_iq_search:            ## @rtw8822c_dac_cal_iq_search
	.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	%r8, -96(%rbp)                  ## 8-byte Spill
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movl	$0, -60(%rbp)                   ## 4-byte Folded Spill
	leaq	-52(%rbp), %r15
	movq	%rsi, -104(%rbp)                ## 8-byte Spill
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	$11708, %esi                    ## imm = 0x2DBC
	movl	$4194303, %edx                  ## imm = 0x3FFFFF
	callq	_rtw_read32_mask
	movl	%eax, %ecx
	shrl	$12, %ecx
	andl	$1023, %ecx                     ## imm = 0x3FF
	movl	%ecx, (%r14)
	andl	$1023, %eax                     ## imm = 0x3FF
	movl	%eax, (%r13)
	movq	%rbx, %rdi
	movl	$11708, %esi                    ## imm = 0x2DBC
	movl	$4194303, %edx                  ## imm = 0x3FFFFF
	callq	_rtw_read32_mask
	movl	%eax, %ecx
	shrl	$12, %ecx
	andl	$1023, %ecx                     ## imm = 0x3FF
	movq	_DACK_SN_8822C@GOTPCREL(%rip), %rsi
	movslq	(%rsi), %rdx
	movl	%ecx, -4(%r14,%rdx,4)
	andl	$1023, %eax                     ## imm = 0x3FF
	movslq	(%rsi), %rcx
	movl	%eax, -4(%r13,%rcx,4)
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	cmpl	$101, %eax
	je	LBB0_16
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movl	(%r14), %ecx
	movl	%ecx, -52(%rbp)
	movl	%ecx, -56(%rbp)
	movl	(%r13), %eax
	movl	%eax, -44(%rbp)
	movl	%eax, -48(%rbp)
	movq	_DACK_SN_8822C@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rbx
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	%ecx, %esi
	movq	%rbx, %rdx
	leaq	-56(%rbp), %rcx
	callq	_rtw8822c_rf_minmax_cmp
	movl	(%r13), %esi
	movq	%r15, %rdi
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	callq	_rtw8822c_rf_minmax_cmp
	cmpl	$2, (%r12)
	jl	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdx
	movq	%r12, %rcx
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r14,%rbx,4), %esi
	movq	%r15, %rdi
	movq	%rdx, %r12
	movq	%r14, %r13
	movq	%rcx, %r14
	leaq	-56(%rbp), %rcx
	callq	_rtw8822c_rf_minmax_cmp
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%rbx,4), %esi
	movq	%r15, %rdi
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	callq	_rtw8822c_rf_minmax_cmp
	movq	%r12, %rdx
	movq	%r14, %rcx
	movq	%r13, %r14
	incq	%rbx
	movslq	(%rcx), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	-56(%rbp), %r8d
	movl	-52(%rbp), %ecx
	cmpl	$511, %r8d                      ## imm = 0x1FF
	jle	LBB0_8
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%ecx, %r8d
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	cmpl	$511, %r8d                      ## imm = 0x1FF
	jg	LBB0_9
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%r8d, %r14d
	cmpl	$512, %ecx                      ## imm = 0x200
	jl	LBB0_10
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	leal	1024(%r8), %eax
	cmpl	$512, %ecx                      ## imm = 0x200
	movl	%eax, %r14d
	cmovgel	%r8d, %r14d
	cmpl	$512, %r8d                      ## imm = 0x200
	cmovll	%eax, %r14d
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	subl	%ecx, %r14d
	movl	-48(%rbp), %r12d
	movl	-44(%rbp), %eax
	cmpl	$511, %r12d                     ## imm = 0x1FF
	jg	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$512, %eax                      ## imm = 0x200
	jl	LBB0_13
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	leal	1024(%r12), %edx
	cmpl	$512, %eax                      ## imm = 0x200
	movl	%edx, %esi
	cmovgel	%r12d, %esi
	cmpl	$512, %r12d                     ## imm = 0x200
	cmovll	%edx, %esi
	movl	%esi, %r12d
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	subl	%eax, %r12d
	movq	_RTW_DBG_RFK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	leaq	L_.str(%rip), %rdx
                                        ## kill: def $r8d killed $r8d killed $r8
	movl	%r14d, %r9d
	callq	_rtw_dbg
	movl	(%rbx), %esi
	movl	-44(%rbp), %ecx
	movl	-48(%rbp), %r8d
	movq	%r15, %rdi
	leaq	L_.str.1(%rip), %rdx
	movl	%r12d, %r9d
	callq	_rtw_dbg
	movq	%r15, %rdi
	movq	-104(%rbp), %r15                ## 8-byte Reload
	movq	%r15, %rsi
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdx
	callq	_rtw8822c_dac_iq_sort
	cmpl	$5, %r14d
	movq	%r15, %r14
	leaq	-52(%rbp), %r15
	jg	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$6, %r12d
	jge	LBB0_15
LBB0_16:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	callq	_rtw8822c_dac_iq_offset
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	callq	_rtw8822c_dac_iq_offset
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DACK_SN_8822C,4,2              ## @DACK_SN_8822C
	.comm	_RTW_DBG_RFK,4,2                ## @RTW_DBG_RFK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[DACK] i: min=0x%08x, max=0x%08x, delta=0x%08x\n"

L_.str.1:                               ## @.str.1
	.asciz	"[DACK] q: min=0x%08x, max=0x%08x, delta=0x%08x\n"

	.no_dead_strip	_rtw8822c_dac_cal_iq_search
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtw8822c_dac_cal_iq_search
_rtw8822c_dac_cal_iq_search:            ; @rtw8822c_dac_cal_iq_search
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	stp	x3, x4, [sp]                    ; 16-byte Folded Spill
	mov	x20, x2
	mov	x23, x1
	mov	x21, x0
	mov	w28, #0
Lloh0:
	adrp	x19, _DACK_SN_8822C@GOTPAGE
Lloh1:
	ldr	x19, [x19, _DACK_SN_8822C@GOTPAGEOFF]
Lloh2:
	adrp	x22, _RTW_DBG_RFK@GOTPAGE
Lloh3:
	ldr	x22, [x22, _RTW_DBG_RFK@GOTPAGEOFF]
	mov	w24, #511
Lloh4:
	adrp	x25, l_.str.1@PAGE
Lloh5:
	add	x25, x25, l_.str.1@PAGEOFF
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	mov	w1, #11708
	mov	w2, #4194303
	bl	_rtw_read32_mask
	ubfx	w8, w0, #12, #10
	str	w8, [x23]
	and	w8, w0, #0x3ff
	str	w8, [x20]
	mov	x0, x21
	mov	w1, #11708
	mov	w2, #4194303
	bl	_rtw_read32_mask
	ubfx	w8, w0, #12, #10
	ldrsw	x9, [x19]
	add	x9, x23, x9, lsl #2
	stur	w8, [x9, #-4]
	and	w8, w0, #0x3ff
	ldrsw	x9, [x19]
	add	x9, x20, x9, lsl #2
	stur	w8, [x9, #-4]
	add	w28, w28, #1
	cmp	w28, #101
	b.eq	LBB0_15
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	ldr	w8, [x23]
	ldr	w9, [x20]
	stp	w9, w8, [sp, #16]
	stp	w9, w8, [sp, #24]
	ldr	w9, [x19]
	cmp	w9, #1
	b.lt	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x2, sp, #20
	add	x3, sp, #28
	mov	x0, x21
	mov	x1, x8
	bl	_rtw8822c_rf_minmax_cmp
	ldr	w1, [x20]
	add	x2, sp, #16
	add	x3, sp, #24
	mov	x0, x21
	bl	_rtw8822c_rf_minmax_cmp
	ldr	w8, [x19]
	cmp	w8, #2
	b.lt	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w26, #1
LBB0_5:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x27, x26, #2
	ldr	w1, [x23, x27]
	add	x2, sp, #20
	add	x3, sp, #28
	mov	x0, x21
	bl	_rtw8822c_rf_minmax_cmp
	ldr	w1, [x20, x27]
	add	x2, sp, #16
	add	x3, sp, #24
	mov	x0, x21
	bl	_rtw8822c_rf_minmax_cmp
	add	x26, x26, #1
	ldrsw	x8, [x19]
	cmp	x26, x8
	b.lt	LBB0_5
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w4, [sp, #28]
	ldr	w8, [sp, #20]
	cmp	w4, #511
	b.le	LBB0_8
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x4, x8
	cmp	w4, #511
	b.gt	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x9, x4
	cmp	w8, #512
	b.lt	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	cmp	w8, #511
	ccmp	w4, w24, #4, gt
	add	w9, w4, #1024
	csel	w9, w4, w9, gt
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	w26, w9, w8
	ldr	w9, [sp, #24]
	ldr	w10, [sp, #16]
	cmp	w9, #511
	b.gt	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	cmp	w10, #512
	b.lt	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w10, #511
	ccmp	w9, w24, #4, gt
	add	w11, w9, #1024
	csel	w9, w9, w11, gt
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	w27, w9, w10
	ldr	w1, [x22]
	mov	x0, x21
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x3, x8
	mov	x5, x26
	bl	_rtw_dbg
	ldr	w1, [x22]
	ldr	w3, [sp, #16]
	ldr	w4, [sp, #24]
	mov	x0, x21
	mov	x2, x25
	mov	x5, x27
	bl	_rtw_dbg
	mov	x0, x21
	mov	x1, x23
	mov	x2, x20
	bl	_rtw8822c_dac_iq_sort
	cmp	w26, #5
	b.gt	LBB0_1
; %bb.14:                               ;   in Loop: Header=BB0_2 Depth=1
	cmp	w27, #6
	b.ge	LBB0_1
LBB0_15:
	mov	x0, x21
	mov	x1, x23
	ldr	x2, [sp]                        ; 8-byte Folded Reload
	bl	_rtw8822c_dac_iq_offset
	mov	x0, x21
	mov	x1, x20
	ldr	x2, [sp, #8]                    ; 8-byte Folded Reload
	bl	_rtw8822c_dac_iq_offset
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_DACK_SN_8822C,4,2              ; @DACK_SN_8822C
	.comm	_RTW_DBG_RFK,4,2                ; @RTW_DBG_RFK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[DACK] i: min=0x%08x, max=0x%08x, delta=0x%08x\n"

l_.str.1:                               ; @.str.1
	.asciz	"[DACK] q: min=0x%08x, max=0x%08x, delta=0x%08x\n"

	.no_dead_strip	_rtw8822c_dac_cal_iq_search
.subsections_via_symbols
