	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function rtw8822c_dac_iq_offset
LCPI0_0:
	.long	512                             ## 0x200
	.long	512                             ## 0x200
	.long	512                             ## 0x200
	.long	512                             ## 0x200
LCPI0_1:
	.long	1024                            ## 0x400
	.long	1024                            ## 0x400
	.long	1024                            ## 0x400
	.long	1024                            ## 0x400
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_rtw8822c_dac_iq_offset:                ## @rtw8822c_dac_iq_offset
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r8
	movq	_DACK_SN_8822C@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	xorl	%eax, %eax
	movl	$0, %ebx
	cmpl	$21, %r9d
	jl	LBB0_8
## %bb.1:
	leal	-10(%r9), %r14d
	leaq	-10(%r14), %r10
	xorl	%r11d, %r11d
	movl	$10, %edi
	movl	$0, %eax
	movl	$0, %ebx
	cmpq	$8, %r10
	jb	LBB0_5
## %bb.2:
	movq	%r10, %rcx
	andq	$-8, %rcx
	leaq	10(%rcx), %rdi
	pxor	%xmm10, %xmm10
	xorl	%eax, %eax
	movdqa	LCPI0_0(%rip), %xmm8            ## xmm8 = [512,512,512,512]
	movdqa	LCPI0_1(%rip), %xmm9            ## xmm9 = [1024,1024,1024,1024]
	pxor	%xmm11, %xmm11
	pxor	%xmm5, %xmm5
	pxor	%xmm3, %xmm3
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	40(%rsi,%rax,4), %xmm2
	movdqu	56(%rsi,%rax,4), %xmm4
	movdqa	%xmm2, %xmm6
	pcmpgtd	%xmm8, %xmm6
	movdqa	%xmm4, %xmm7
	pcmpgtd	%xmm8, %xmm7
	movdqa	%xmm9, %xmm0
	psubd	%xmm2, %xmm0
	movdqa	%xmm9, %xmm1
	psubd	%xmm4, %xmm1
	pand	%xmm6, %xmm0
	pandn	%xmm2, %xmm6
	paddd	%xmm6, %xmm5
	pand	%xmm7, %xmm1
	pandn	%xmm4, %xmm7
	paddd	%xmm7, %xmm3
	paddd	%xmm0, %xmm10
	paddd	%xmm1, %xmm11
	addq	$8, %rax
	cmpq	%rax, %rcx
	jne	LBB0_3
## %bb.4:
	paddd	%xmm5, %xmm3
	pshufd	$238, %xmm3, %xmm0              ## xmm0 = xmm3[2,3,2,3]
	paddd	%xmm3, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ebx
	paddd	%xmm10, %xmm11
	pshufd	$238, %xmm11, %xmm0             ## xmm0 = xmm11[2,3,2,3]
	paddd	%xmm11, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	cmpq	%rcx, %r10
	je	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rsi,%rdi,4), %ecx
	movl	$1024, %edx                     ## imm = 0x400
	subl	%ecx, %edx
	cmpl	$513, %ecx                      ## imm = 0x201
	cmovgel	%r11d, %ecx
	cmovll	%r11d, %edx
	addl	%ecx, %ebx
	addl	%edx, %eax
	incq	%rdi
	cmpq	%rdi, %r14
	jne	LBB0_5
LBB0_6:
	movl	%ebx, %edx
	subl	%eax, %edx
	jle	LBB0_8
## %bb.7:
	addl	$-20, %r9d
	movl	%edx, %eax
	cltd
	idivl	%r9d
	jmp	LBB0_9
LBB0_8:
	subl	%ebx, %eax
	addl	$-20, %r9d
	cltd
	idivl	%r9d
	movl	%eax, %edx
	movl	$1024, %eax                     ## imm = 0x400
	subl	%edx, %eax
	testl	%edx, %edx
	cmovel	%edx, %eax
LBB0_9:
	movl	%eax, (%r8)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DACK_SN_8822C,4,2              ## @DACK_SN_8822C
	.no_dead_strip	_rtw8822c_dac_iq_offset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtw8822c_dac_iq_offset
_rtw8822c_dac_iq_offset:                ; @rtw8822c_dac_iq_offset
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _DACK_SN_8822C@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DACK_SN_8822C@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #21
	b.lt	LBB0_3
; %bb.1:
	sub	w9, w8, #10
	sub	x11, x9, #10
	cmp	x11, #16
	b.hs	LBB0_4
; %bb.2:
	mov	w14, #0
	mov	w13, #0
	mov	w10, #10
	b	LBB0_7
LBB0_3:
	mov	w14, #0
	mov	w13, #0
	b	LBB0_11
LBB0_4:
	movi.2d	v0, #0000000000000000
	and	x12, x11, #0xfffffffffffffff0
	movi.4s	v4, #2, lsl #8
	mov	w10, #10
	movi.4s	v5, #4, lsl #8
	orr	x10, x12, x10
	movi.2d	v1, #0000000000000000
	add	x13, x1, #88
	mov	x14, x12
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
	movi.2d	v6, #0000000000000000
	movi.2d	v7, #0000000000000000
	movi.2d	v16, #0000000000000000
	movi.2d	v17, #0000000000000000
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q18, q19, [x13, #-48]
	ldp	q20, q24, [x13, #-16]
	cmgt.4s	v21, v18, v4
	cmgt.4s	v22, v19, v4
	cmgt.4s	v23, v20, v4
	cmgt.4s	v25, v24, v4
	sub.4s	v26, v5, v18
	sub.4s	v27, v5, v19
	sub.4s	v28, v5, v20
	sub.4s	v29, v5, v24
	bic.16b	v18, v18, v21
	bic.16b	v19, v19, v22
	bic.16b	v20, v20, v23
	bic.16b	v24, v24, v25
	add.4s	v6, v18, v6
	add.4s	v7, v19, v7
	add.4s	v16, v20, v16
	add.4s	v17, v24, v17
	and.16b	v18, v26, v21
	and.16b	v19, v27, v22
	and.16b	v20, v28, v23
	and.16b	v21, v29, v25
	add.4s	v0, v18, v0
	add.4s	v1, v19, v1
	add.4s	v2, v20, v2
	add.4s	v3, v21, v3
	add	x13, x13, #64
	subs	x14, x14, #16
	b.ne	LBB0_5
; %bb.6:
	add.4s	v4, v7, v6
	add.4s	v4, v16, v4
	add.4s	v4, v17, v4
	addv.4s	s4, v4
	fmov	w13, s4
	add.4s	v0, v1, v0
	add.4s	v0, v2, v0
	add.4s	v0, v3, v0
	addv.4s	s0, v0
	fmov	w14, s0
	cmp	x11, x12
	b.eq	LBB0_9
LBB0_7:
	add	x11, x1, x10, lsl #2
	sub	x9, x9, x10
	mov	w10, #1024
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x11], #4
	sub	w15, w10, w12
	cmp	w12, #512
	csel	w12, wzr, w12, gt
	add	w13, w12, w13
	csel	w12, w15, wzr, gt
	add	w14, w12, w14
	subs	x9, x9, #1
	b.ne	LBB0_8
LBB0_9:
	subs	w9, w13, w14
	b.le	LBB0_11
; %bb.10:
	sub	w8, w8, #20
	sdiv	w8, w9, w8
	str	w8, [x2]
	ret
LBB0_11:
	sub	w9, w14, w13
	sub	w8, w8, #20
	sdiv	w8, w9, w8
	mov	w9, #1024
	sub	w9, w9, w8
	cmp	w8, #0
	csel	w8, wzr, w9, eq
	str	w8, [x2]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DACK_SN_8822C,4,2              ; @DACK_SN_8822C
	.no_dead_strip	_rtw8822c_dac_iq_offset
.subsections_via_symbols
