	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b43_nphy_iq_cal_gain_params
_b43_nphy_iq_cal_gain_params:           ## @b43_nphy_iq_cal_gain_params
	.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
	movq	%rdx, %r13
	leaq	16(%rbp), %rbx
	movl	4(%rdi), %ecx
	cmpl	$3, %ecx
	jl	LBB0_7
## %bb.1:
	movq	(%rbx), %rax
	movl	(%rax,%rsi,4), %r8d
	movl	%r8d, (%r13)
	movq	8(%rbx), %rax
	movl	(%rax,%rsi,4), %eax
	movl	%eax, 4(%r13)
	movq	16(%rbx), %rdx
	movl	(%rdx,%rsi,4), %edx
	movl	%edx, 8(%r13)
	movq	24(%rbx), %rdi
	movl	(%rdi,%rsi,4), %edi
	movl	%edi, 12(%r13)
	movq	32(%rbx), %rbx
	movl	(%rbx,%rsi,4), %esi
	movl	%esi, 16(%r13)
	cmpl	$18, %ecx
	ja	LBB0_6
## %bb.2:
	shll	$12, %eax
	shll	$8, %edx
	cmpl	$7, %ecx
	jb	LBB0_4
## %bb.3:
	shll	$3, %edi
	shll	$15, %r8d
	orl	%r8d, %eax
	orl	%edx, %eax
	orl	%edi, %eax
	jmp	LBB0_5
LBB0_7:
	movq	24(%rbx), %rax
	movq	8(%rbx), %rcx
	movq	16(%rbx), %rdx
	movl	(%rdx,%rsi,4), %edx
	shll	$4, %edx
	orl	(%rax,%rsi,4), %edx
	movl	(%rcx,%rsi,4), %eax
	shll	$8, %eax
	orl	%edx, %eax
	movslq	%eax, %r12
	movl	(%rdi), %edi
	callq	_b43_current_band
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	sete	%r14b
	movq	_tbl_iqcal_gainparams@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	(%rax,%r14,8), %rax
	movq	(%rax), %rcx
	xorl	%edi, %edi
	cmpq	%r12, (%rcx)
	je	LBB0_16
## %bb.8:
	movq	8(%rax), %rcx
	movl	$1, %edi
	cmpq	%r12, (%rcx)
	je	LBB0_16
## %bb.9:
	movq	16(%rax), %rcx
	movl	$2, %edi
	cmpq	%r12, (%rcx)
	je	LBB0_16
## %bb.10:
	movq	24(%rax), %rcx
	movl	$3, %edi
	cmpq	%r12, (%rcx)
	je	LBB0_16
## %bb.11:
	movq	32(%rax), %rcx
	movl	$4, %edi
	cmpq	%r12, (%rcx)
	je	LBB0_16
## %bb.12:
	movq	40(%rax), %rcx
	movl	$5, %edi
	cmpq	%r12, (%rcx)
	je	LBB0_16
## %bb.13:
	movq	48(%rax), %rcx
	movl	$6, %edi
	cmpq	%r12, (%rcx)
	je	LBB0_16
## %bb.14:
	movq	56(%rax), %rcx
	movl	$7, %edi
	cmpq	%r12, (%rcx)
	je	LBB0_16
## %bb.15:
	movq	64(%rax), %rax
	xorl	%edi, %edi
	cmpq	%r12, (%rax)
	sete	%dil
	xorl	$9, %edi
LBB0_16:
	movl	$8, %esi
	callq	_min
	movq	(%r15), %rcx
	movq	(%rcx,%r14,8), %rcx
	cltq
	movq	(%rcx,%rax,8), %rax
	movl	8(%rax), %ecx
	movl	%ecx, 4(%r13)
	movl	16(%rax), %edx
	movl	%edx, 8(%r13)
	movl	24(%rax), %esi
	movl	%esi, 12(%r13)
	shll	$7, %ecx
	shll	$4, %edx
	orl	%ecx, %edx
	shll	$2, %esi
	orl	%edx, %esi
	movl	%esi, 20(%r13)
	movq	24(%r13), %rcx
	movdqu	32(%rax), %xmm0
	pshufd	$232, %xmm0, %xmm0              ## xmm0 = xmm0[0,2,2,3]
	movq	%xmm0, (%rcx)
	movdqu	48(%rax), %xmm0
	pshufd	$232, %xmm0, %xmm0              ## xmm0 = xmm0[0,2,2,3]
	movq	%xmm0, 8(%rcx)
	jmp	LBB0_17
LBB0_4:
	orl	%eax, %edx
	shll	$4, %edi
	orl	%edx, %edi
	movl	%edi, %eax
LBB0_5:
	orl	%esi, %eax
	movl	%eax, 20(%r13)
LBB0_6:
	movq	24(%r13), %rdi
	leaq	L_.memset_pattern(%rip), %rsi
	movl	$20, %edx
	callq	_memset_pattern16
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NL80211_BAND_5GHZ,8,3          ## @NL80211_BAND_5GHZ
	.comm	_tbl_iqcal_gainparams,8,3       ## @tbl_iqcal_gainparams
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## @.memset_pattern
L_.memset_pattern:
	.long	121                             ## 0x79
	.long	121                             ## 0x79
	.long	121                             ## 0x79
	.long	121                             ## 0x79

	.no_dead_strip	_b43_nphy_iq_cal_gain_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function b43_nphy_iq_cal_gain_params
_b43_nphy_iq_cal_gain_params:           ; @b43_nphy_iq_cal_gain_params
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x3
	ldr	w8, [x0, #4]
	cmp	w8, #3
	b.lt	LBB0_4
; %bb.1:
	lsl	x12, x1, #2
	ldp	x9, x10, [x2]
	ldr	w9, [x9, x12]
	str	w9, [x19]
	ldr	w11, [x10, x12]
	str	w11, [x19, #4]
	ldp	x10, x14, [x2, #16]
	ldr	w13, [x10, x12]
	str	w13, [x19, #8]
	ldr	w10, [x14, x12]
	str	w10, [x19, #12]
	ldr	x14, [x2, #32]
	ldr	w12, [x14, x12]
	str	w12, [x19, #16]
	cmp	w8, #18
	b.hi	LBB0_3
; %bb.2:
	lsl	w11, w11, #12
	lsl	w13, w13, #8
	orr	w14, w13, w11
	orr	w14, w14, w10, lsl #4
	orr	w9, w11, w9, lsl #15
	orr	w9, w9, w13
	orr	w9, w9, w10, lsl #3
	cmp	w8, #7
	csel	w8, w14, w9, lo
	orr	w8, w8, w12
	str	w8, [x19, #20]
LBB0_3:
	ldr	x0, [x19, #24]
Lloh0:
	adrp	x1, l_.memset_pattern@PAGE
Lloh1:
	add	x1, x1, l_.memset_pattern@PAGEOFF
	mov	w2, #20
	bl	_memset_pattern16
	b	LBB0_22
LBB0_4:
	ldp	x10, x8, [x2, #16]
	lsl	x9, x1, #2
	ldr	w8, [x8, x9]
	ldr	x11, [x2, #8]
	ldr	w10, [x10, x9]
	orr	w8, w8, w10, lsl #4
	ldr	w9, [x11, x9]
	orr	w8, w8, w9, lsl #8
	sxtw	x22, w8
	ldr	w0, [x0]
	bl	_b43_current_band
Lloh2:
	adrp	x8, _NL80211_BAND_5GHZ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NL80211_BAND_5GHZ@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w20, eq
Lloh5:
	adrp	x21, _tbl_iqcal_gainparams@GOTPAGE
Lloh6:
	ldr	x21, [x21, _tbl_iqcal_gainparams@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x8, [x8, w20, uxtw #3]
	ldr	x9, [x8]
	ldr	x9, [x9]
	cmp	x9, x22
	b.ne	LBB0_6
; %bb.5:
	mov	w0, #0
	b	LBB0_21
LBB0_6:
	ldr	x9, [x8, #8]
	ldr	x9, [x9]
	cmp	x9, x22
	b.ne	LBB0_8
; %bb.7:
	mov	w0, #1
	b	LBB0_21
LBB0_8:
	ldr	x9, [x8, #16]
	ldr	x9, [x9]
	cmp	x9, x22
	b.ne	LBB0_10
; %bb.9:
	mov	w0, #2
	b	LBB0_21
LBB0_10:
	ldr	x9, [x8, #24]
	ldr	x9, [x9]
	cmp	x9, x22
	b.ne	LBB0_12
; %bb.11:
	mov	w0, #3
	b	LBB0_21
LBB0_12:
	ldr	x9, [x8, #32]
	ldr	x9, [x9]
	cmp	x9, x22
	b.ne	LBB0_14
; %bb.13:
	mov	w0, #4
	b	LBB0_21
LBB0_14:
	ldr	x9, [x8, #40]
	ldr	x9, [x9]
	cmp	x9, x22
	b.ne	LBB0_16
; %bb.15:
	mov	w0, #5
	b	LBB0_21
LBB0_16:
	ldr	x9, [x8, #48]
	ldr	x9, [x9]
	cmp	x9, x22
	b.ne	LBB0_18
; %bb.17:
	mov	w0, #6
	b	LBB0_21
LBB0_18:
	ldr	x9, [x8, #56]
	ldr	x9, [x9]
	cmp	x9, x22
	b.ne	LBB0_20
; %bb.19:
	mov	w0, #7
	b	LBB0_21
LBB0_20:
	ldr	x8, [x8, #64]
	ldr	x8, [x8]
	cmp	x8, x22
	mov	w8, #8
	cinc	w0, w8, ne
LBB0_21:
	mov	w1, #8
	bl	_min
	ldr	x8, [x21]
	ldr	x8, [x8, x20, lsl #3]
	ldr	x8, [x8, w0, sxtw #3]
	ldr	w9, [x8, #8]
	ldr	w10, [x8, #16]
	stp	w9, w10, [x19, #4]
	ldr	w11, [x8, #24]
	str	w11, [x19, #12]
	lsl	w10, w10, #4
	orr	w9, w10, w9, lsl #7
	orr	w9, w9, w11, lsl #2
	str	w9, [x19, #20]
	ldr	x9, [x19, #24]
	ldp	q0, q1, [x8, #32]
	xtn.2s	v0, v0
	xtn.2s	v1, v1
	stp	d0, d1, [x9]
LBB0_22:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_NL80211_BAND_5GHZ,8,3          ; @NL80211_BAND_5GHZ
	.comm	_tbl_iqcal_gainparams,8,3       ; @tbl_iqcal_gainparams
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; @.memset_pattern
l_.memset_pattern:
	.long	121                             ; 0x79
	.long	121                             ; 0x79
	.long	121                             ; 0x79
	.long	121                             ; 0x79

	.no_dead_strip	_b43_nphy_iq_cal_gain_params
.subsections_via_symbols
