	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lpphy_calc_rx_iq_comp
_lpphy_calc_rx_iq_comp:                 ## @lpphy_calc_rx_iq_comp
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_B43_LPPHY_RX_COMP_COEFF_S@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_b43_phy_read
	movl	%eax, %ebx
	movl	%eax, %r13d
	sarl	$8, %r13d
	orl	$255, %ebx
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	$65280, %edx                    ## imm = 0xFF00
	movl	$192, %ecx
	callq	_b43_phy_maskset
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	$255, %edx
	callq	_b43_phy_mask
	leaq	-56(%rbp), %rcx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	$32, %edx
	callq	_lpphy_rx_iq_est
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_9
## %bb.1:
	movl	-52(%rbp), %edx
	movl	-48(%rbp), %r12d
	leal	(%r12,%rdx), %ecx
	cmpl	$2, %ecx
	jl	LBB0_9
## %bb.2:
	movq	%rdx, %r13
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	-56(%rbp), %r14d
	movl	%r14d, %edi
	negl	%edi
	cmovsl	%r14d, %edi
	callq	_fls
	movl	%eax, %ebx
	movl	%r12d, %edi
	negl	%edi
	cmovsl	%r12d, %edi
	callq	_fls
	movl	%eax, %r8d
	movb	$30, %cl
	subb	%bl, %cl
	shll	%cl, %r14d
	cmpl	$20, %ebx
	jl	LBB0_4
## %bb.3:
	leal	-19(%rbx), %ecx
	movq	%r13, %rsi
	movl	%esi, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %eax
	leal	-20(%rbx), %ecx
	movl	%esi, %edi
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %edi
	jmp	LBB0_5
LBB0_4:
	movb	$19, %cl
	subb	%bl, %cl
	movq	%r13, %rsi
	movl	%esi, %eax
	shll	%cl, %eax
	movb	$20, %cl
	subb	%bl, %cl
	movl	%esi, %edi
	shll	%cl, %edi
LBB0_5:
	addl	%r14d, %eax
	cltd
	idivl	%edi
	movl	%eax, %r13d
	movb	$31, %cl
	subb	%r8b, %cl
	shll	%cl, %r12d
	cmpl	$11, %r8d
	jl	LBB0_7
## %bb.6:
	leal	-11(%r8), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %esi
	jmp	LBB0_8
LBB0_7:
	movb	$11, %cl
	subb	%r8b, %cl
	shll	%cl, %esi
LBB0_8:
	movl	%r12d, %eax
	cltd
	idivl	%esi
	movl	%r13d, %ecx
	imull	%r13d, %ecx
	subl	%ecx, %eax
	movl	%eax, %edi
	callq	_int_sqrt
	movl	%eax, %ebx
	negl	%ebx
	sarl	$3, %r13d
	sarl	$4, %ebx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
LBB0_9:
	movq	_B43_LPPHY_RX_COMP_COEFF_S@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	$65280, %edx                    ## imm = 0xFF00
	movl	%ebx, %ecx
	callq	_b43_phy_maskset
	movl	(%r12), %esi
	shll	$8, %r13d
	movq	%r15, %rdi
	movl	$255, %edx
	movl	%r13d, %ecx
	callq	_b43_phy_maskset
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_B43_LPPHY_RX_COMP_COEFF_S,4,2  ## @B43_LPPHY_RX_COMP_COEFF_S
	.no_dead_strip	_lpphy_calc_rx_iq_comp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lpphy_calc_rx_iq_comp
_lpphy_calc_rx_iq_comp:                 ; @lpphy_calc_rx_iq_comp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _B43_LPPHY_RX_COMP_COEFF_S@GOTPAGE
Lloh1:
	ldr	x22, [x22, _B43_LPPHY_RX_COMP_COEFF_S@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_b43_phy_read
	asr	w23, w0, #8
	orr	w21, w0, #0xff
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #65280
	mov	w3, #192
	bl	_b43_phy_maskset
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #255
	bl	_b43_phy_mask
	mov	x3, sp
	mov	x0, x19
	mov	x1, x20
	mov	w2, #32
	bl	_lpphy_rx_iq_est
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.1:
	ldp	w24, w25, [sp, #4]
	add	w8, w25, w24
	cmp	w8, #2
	b.ge	LBB0_3
; %bb.2:
	mov	w20, #0
	b	LBB0_7
LBB0_3:
	ldr	w23, [sp]
	cmp	w23, #0
	cneg	w0, w23, mi
	bl	_fls
	mov	x21, x0
	cmp	w25, #0
	cneg	w0, w25, mi
	bl	_fls
	subs	w8, w21, #20
	b.lt	LBB0_5
; %bb.4:
	mov	w9, #30
	sub	w9, w9, w21
	lsl	w9, w23, w9
	sub	w10, w21, #19
	asr	w10, w24, w10
	add	w9, w9, w10
	asr	w8, w24, w8
	sdiv	w21, w9, w8
	b	LBB0_6
LBB0_5:
	mov	w8, #30
	sub	w8, w8, w21
	lsl	w8, w23, w8
	mov	w9, #19
	sub	w9, w9, w21
	lsl	w9, w24, w9
	add	w8, w8, w9
	mov	w9, #20
	sub	w9, w9, w21
	lsl	w9, w24, w9
	sdiv	w21, w8, w9
LBB0_6:
	mvn	w8, w0
	lsl	w8, w25, w8
	mov	w9, #11
	sub	w9, w9, w0
	lsl	w9, w24, w9
	sdiv	w8, w8, w9
	sub	w9, w0, #11
	mvn	w10, w0
	lsl	w10, w25, w10
	asr	w9, w24, w9
	sdiv	w9, w10, w9
	cmp	w0, #11
	csel	w8, w8, w9, lt
	msub	w0, w21, w21, w8
	bl	_int_sqrt
	neg	w8, w0
	asr	w23, w21, #3
	asr	w21, w8, #4
LBB0_7:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #65280
	mov	x3, x21
	bl	_b43_phy_maskset
	ldr	w1, [x22]
	lsl	w3, w23, #8
	mov	x0, x19
	mov	w2, #255
	bl	_b43_phy_maskset
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_B43_LPPHY_RX_COMP_COEFF_S,4,2  ; @B43_LPPHY_RX_COMP_COEFF_S
	.no_dead_strip	_lpphy_calc_rx_iq_comp
.subsections_via_symbols
