	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar9003_hw_solve_iq_cal
_ar9003_hw_solve_iq_cal:                ## @ar9003_hw_solve_iq_cal
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r15d
	movl	%esi, %r12d
	movl	%edx, %r13d
	subl	%r8d, %r13d
	movl	%esi, %r14d
	subl	%ecx, %r14d
	callq	_ath9k_hw_common
	movl	%r13d, %ecx
	sarl	$3, %ecx
	imull	%ecx, %ecx
	movl	%r14d, %ebx
	sarl	$3, %ebx
	imull	%ebx, %ebx
	addl	%ecx, %ebx
	cmpl	$511, %ebx                      ## imm = 0x1FF
	ja	LBB0_2
## %bb.1:
	movq	_CALIBRATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rax, %rdi
	callq	_ath_dbg
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_2:
	movl	24(%rbp), %ecx
	movl	16(%rbp), %r8d
	shrl	$9, %ebx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%edi, %edx
	subl	%ecx, %edx
	imull	%r13d, %edx
	movl	%r8d, %esi
	subl	32(%rbp), %esi
	movl	%esi, %eax
	imull	%r14d, %eax
	addl	%edx, %eax
	subl	%edi, %ecx
	imull	%r14d, %ecx
	imull	%r13d, %esi
	addl	%ecx, %esi
	cltd
	idivl	%ebx
	movl	%eax, %ecx
	movl	%esi, %eax
	cltd
	idivl	%ebx
	movl	%ecx, %edx
	imull	%r15d, %edx
	movl	%eax, %esi
	imull	%r12d, %esi
	leal	(%rsi,%rdx), %ebx
	addl	$32767, %ebx                    ## imm = 0x7FFF
                                        ## kill: def $esi killed $esi killed $rsi
	addl	%edx, %esi
	cmovnsl	%esi, %ebx
	sarl	$15, %ebx
	subl	%ebx, %edi
	imull	%ecx, %r12d
	imull	%eax, %r15d
	subl	%r15d, %r12d
	leal	32767(%r12), %edx
	testl	%r12d, %r12d
	cmovnsl	%r12d, %edx
	movq	40(%rbp), %rsi
	sarl	$15, %edx
	addl	%r8d, %edx
	movl	%ecx, (%rsi)
	movl	%eax, 4(%rsi)
	movl	%edi, 8(%rsi)
	movl	%edx, 12(%rsi)
	movl	$1, %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CALIBRATE,4,2                  ## @CALIBRATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Divide by 0\n"

	.no_dead_strip	_ar9003_hw_solve_iq_cal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar9003_hw_solve_iq_cal
_ar9003_hw_solve_iq_cal:                ; @ar9003_hw_solve_iq_cal
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x7
	mov	x19, x6
	mov	x20, x5
	mov	x22, x2
	mov	x21, x1
	sub	w24, w2, w4
	sub	w25, w1, w3
	bl	_ath9k_hw_common
	asr	w8, w24, #3
	asr	w9, w25, #3
	mul	w9, w9, w9
	madd	w8, w8, w8, w9
	cmp	w8, #511
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _CALIBRATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CALIBRATE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	bl	_ath_dbg
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	ldr	x9, [x29, #24]
	ldr	w10, [x29, #16]
	lsr	w8, w8, #9
	sub	w11, w20, w23
	mul	w11, w11, w24
	sub	w10, w19, w10
	madd	w11, w10, w25, w11
	sub	w12, w23, w20
	mul	w12, w12, w25
	madd	w10, w10, w24, w12
	sdiv	w11, w11, w8
	sdiv	w8, w10, w8
	mul	w10, w11, w22
	madd	w10, w8, w21, w10
	mov	w12, #32767
	add	w13, w10, w12
	cmp	w10, #0
	csel	w10, w13, w10, lt
	sub	w10, w20, w10, asr #15
	mul	w13, w8, w22
	neg	w13, w13
	madd	w13, w11, w21, w13
	add	w12, w13, w12
	cmp	w13, #0
	csel	w12, w12, w13, lt
	stp	w11, w8, [x9]
	add	w8, w19, w12, asr #15
	stp	w10, w8, [x9, #8]
	mov	w0, #1
LBB0_3:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CALIBRATE,4,2                  ; @CALIBRATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Divide by 0\n"

	.no_dead_strip	_ar9003_hw_solve_iq_cal
.subsections_via_symbols
