	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lo_measure_txctl_values
_lo_measure_txctl_values:               ## @lo_measure_txctl_values
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r14
	movq	8(%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	callq	_has_loopback_gain
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	(%r14), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	cmpl	$22, %eax
	jl	LBB0_4
## %bb.3:
	movl	$10, %eax
	subl	%ecx, %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovsl	%eax, %ecx
	movl	$2863311531, %edi               ## imm = 0xAAAAAAAB
	imulq	%rcx, %rdi
	shrq	$34, %rdi
	xorl	%r12d, %r12d
                                        ## kill: def $edi killed $edi killed $rdi
	xorl	%esi, %esi
	movl	$15, %edx
	callq	_clamp_val
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	jmp	LBB0_8
LBB0_1:
	movl	$2, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	movl	$6, %r12d
	jmp	LBB0_9
LBB0_4:
	movl	$36, %eax
	cmpl	$2, (%rbx)
	jl	LBB0_7
## %bb.5:
	cmpl	$8272, 4(%rbx)                  ## imm = 0x2050
	jne	LBB0_7
## %bb.6:
	cmpl	$8, 8(%rbx)
	movl	$60, %edx
	movl	$36, %eax
	cmovel	%edx, %eax
LBB0_7:
	movl	$10, %edx
	subl	%ecx, %edx
	cmpl	%eax, %edx
	cmovgel	%ecx, %edx
	movl	%edx, %ecx
	shrl	$31, %ecx
	leal	(%rcx,%rcx,2), %ecx
	leal	(%rdx,%rcx), %esi
	addl	$3, %esi
	shrl	$2, %eax
	leal	(%rdx,%rcx), %r12d
	addl	$6, %r12d
	testl	%esi, %esi
	cmovnsl	%esi, %r12d
	sarl	$2, %r12d
	cmpl	%eax, %r12d
	cmovgel	%eax, %r12d
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
LBB0_8:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_9:
	movq	%rbx, %rdi
	movl	$67, %esi
	movl	$65520, %edx                    ## imm = 0xFFF0
	movl	%r12d, %ecx
	callq	_b43_radio_maskset
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_b43_gphy_set_baseband_attenuation
	leaq	-60(%rbp), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_lo_txctl_register_table
	movl	-60(%rbp), %edx
	notl	%edx
	movl	%edx, -60(%rbp)
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_b43_radio_mask
	movq	%rbx, %rdi
	callq	_has_tx_magnification
	testq	%rax, %rax
	je	LBB0_21
## %bb.10:
	movq	%rbx, %r14
	leaq	_lo_measure_txctl_values.tx_magn_values(%rip), %rbx
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_22
## %bb.11:
	movl	$65535, %r15d                   ## imm = 0xFFFF
	xorl	%r12d, %r12d
	leaq	_lo_measure_txctl_values.tx_bias_values(%rip), %r13
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_12 Depth=1
	leaq	_lo_measure_txctl_values.tx_bias_values(%rip), %r13
LBB0_20:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	$82, %esi
	callq	_b43_radio_read16
	andl	$65280, %eax                    ## imm = 0xFF00
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	orl	(%rcx), %eax
	orl	4(%rcx), %eax
	movq	%r14, %rdi
	movl	$82, %esi
	movl	%eax, %edx
	callq	_b43_radio_write16
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	incq	%r12
	leaq	_lo_measure_txctl_values.tx_magn_values(%rip), %rbx
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %r12
	jge	LBB0_22
LBB0_12:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	movl	(%rbx,%r12,4), %ecx
	movq	%r14, %rdi
	movl	$82, %esi
	movl	$65295, %edx                    ## imm = 0xFF0F
	movl	%ecx, -64(%rbp)                 ## 4-byte Spill
	callq	_b43_radio_maskset
	movq	%r13, %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	jle	LBB0_20
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%r13, %r14
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r14), %r13d
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	$82, %esi
	movl	$65520, %edx                    ## imm = 0xFFF0
	movl	%r13d, %ecx
	callq	_b43_radio_maskset
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_lo_measure_feedthrough
	cmpl	%r15d, %eax
	jge	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=2
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%r13d, (%rcx)
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, 4(%rcx)
	movl	%eax, %r15d
	testl	%r13d, %r13d
	jne	LBB0_14
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_15 Depth=2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r13d
	testl	%r13d, %r13d
	je	LBB0_19
LBB0_14:                                ##   in Loop: Header=BB0_15 Depth=2
	incq	%r12
	leaq	_lo_measure_txctl_values.tx_bias_values(%rip), %r13
	movq	%r13, %rdi
	callq	_ARRAY_SIZE
	cltq
	addq	$4, %r14
	cmpq	%rax, %r12
	jl	LBB0_15
	jmp	LBB0_20
LBB0_21:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
	movq	%rbx, %rdi
	movl	$82, %esi
	movl	$65520, %edx                    ## imm = 0xFFF0
	callq	_b43_radio_mask
LBB0_22:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 8(%rcx)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @lo_measure_txctl_values.tx_bias_values
_lo_measure_txctl_values.tx_bias_values:
	.long	9                               ## 0x9
	.long	8                               ## 0x8
	.long	10                              ## 0xa
	.long	1                               ## 0x1
	.long	0                               ## 0x0
	.long	2                               ## 0x2
	.long	5                               ## 0x5
	.long	4                               ## 0x4
	.long	6                               ## 0x6

	.p2align	2                               ## @lo_measure_txctl_values.tx_magn_values
_lo_measure_txctl_values.tx_magn_values:
	.long	112                             ## 0x70
	.long	64                              ## 0x40

	.comm	_jiffies,4,2                    ## @jiffies
	.no_dead_strip	_lo_measure_txctl_values
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lo_measure_txctl_values
_lo_measure_txctl_values:               ; @lo_measure_txctl_values
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x0
	ldr	x20, [x0, #16]
	ldr	x26, [x20, #8]
	bl	_has_loopback_gain
	cbz	w0, LBB0_3
; %bb.1:
	ldr	w9, [x20]
	cmp	w9, #0
	cinc	w8, w9, lt
	asr	w8, w8, #1
	cmp	w9, #22
	b.lt	LBB0_4
; %bb.2:
	mov	w9, #10
	subs	w8, w9, w8
	cneg	w8, w8, mi
	mov	w9, #43691
	movk	w9, #43690, lsl #16
	umull	x8, w8, w9
	lsr	x0, x8, #34
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	w1, #0
	mov	w2, #15
	bl	_clamp_val
	mov	x20, x0
	mov	w3, #0
	mov	w21, #0
	b	LBB0_9
LBB0_3:
	mov	w20, #0
	mov	w21, #2
	mov	w3, #6
	b	LBB0_9
LBB0_4:
	ldr	w9, [x19]
	cmp	w9, #2
	b.lt	LBB0_7
; %bb.5:
	ldr	w10, [x19, #4]
	mov	w9, #36
	mov	w11, #8272
	cmp	w10, w11
	b.ne	LBB0_8
; %bb.6:
	ldr	w10, [x19, #8]
	mov	w11, #60
	cmp	w10, #8
	csel	w9, w11, w9, eq
	b	LBB0_8
LBB0_7:
	mov	w9, #36
LBB0_8:
	mov	w20, #0
	mov	w21, #0
	mov	w10, #10
	sub	w10, w10, w8
	cmp	w10, w9
	csel	w8, w10, w8, lt
	mov	w10, #3
	mov	w11, #6
	cmp	w8, #0
	csel	w10, w11, w10, lt
	add	w8, w10, w8
	add	w10, w8, #3
	cmp	w8, #0
	csel	w8, w10, w8, lt
	lsr	w9, w9, #2
	asr	w8, w8, #2
	cmp	w8, w9
	csel	w3, w8, w9, lt
LBB0_9:
	mov	x0, x19
	mov	w1, #67
	mov	w2, #65520
	bl	_b43_radio_maskset
	mov	x0, x19
	mov	w1, #2
	bl	_b43_gphy_set_baseband_attenuation
	add	x1, sp, #12
	mov	x0, x19
	mov	x2, #0
	bl	_lo_txctl_register_table
	mov	x1, x0
	ldr	w8, [sp, #12]
	mvn	w2, w8
	str	w2, [sp, #12]
	mov	x0, x19
	bl	_b43_radio_mask
	mov	x0, x19
	bl	_has_tx_magnification
	cbz	x0, LBB0_19
; %bb.10:
Lloh0:
	adrp	x22, _lo_measure_txctl_values.tx_magn_values@PAGE
Lloh1:
	add	x22, x22, _lo_measure_txctl_values.tx_magn_values@PAGEOFF
	mov	x0, x22
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_20
; %bb.11:
	mov	x27, #0
	mov	w28, #65535
Lloh2:
	adrp	x23, _lo_measure_txctl_values.tx_bias_values@PAGE
Lloh3:
	add	x23, x23, _lo_measure_txctl_values.tx_bias_values@PAGEOFF
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x19
	mov	w1, #82
	bl	_b43_radio_read16
	and	w8, w0, #0xff00
	ldp	w9, w10, [x26]
	orr	w8, w8, w9
	orr	w2, w8, w10
	mov	x0, x19
	mov	w1, #82
	bl	_b43_radio_write16
	add	x27, x27, #1
Lloh4:
	adrp	x22, _lo_measure_txctl_values.tx_magn_values@PAGE
Lloh5:
	add	x22, x22, _lo_measure_txctl_values.tx_magn_values@PAGEOFF
	mov	x0, x22
	bl	_ARRAY_SIZE
	cmp	x27, w0, sxtw
	b.ge	LBB0_20
LBB0_13:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_15 Depth 2
	ldr	w24, [x22, x27, lsl #2]
	mov	x0, x19
	mov	w1, #82
	mov	w2, #65295
	mov	x3, x24
	bl	_b43_radio_maskset
	mov	x0, x23
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x22, #0
LBB0_15:                                ;   Parent Loop BB0_13 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w25, [x23, x22, lsl #2]
	mov	x0, x19
	mov	w1, #82
	mov	w2, #65520
	mov	x3, x25
	bl	_b43_radio_maskset
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	mov	x3, x21
	bl	_lo_measure_feedthrough
	cmp	w0, w28
	b.ge	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=2
	stp	w25, w24, [x26]
	mov	x28, x0
	cbnz	w25, LBB0_18
	b	LBB0_12
LBB0_17:                                ;   in Loop: Header=BB0_15 Depth=2
	ldr	w25, [x26]
	cbz	w25, LBB0_12
LBB0_18:                                ;   in Loop: Header=BB0_15 Depth=2
	add	x22, x22, #1
	mov	x0, x23
	bl	_ARRAY_SIZE
	cmp	x22, w0, sxtw
	b.lt	LBB0_15
	b	LBB0_12
LBB0_19:
	str	xzr, [x26]
	mov	x0, x19
	mov	w1, #82
	mov	w2, #65520
	bl	_b43_radio_mask
LBB0_20:
Lloh6:
	adrp	x8, _jiffies@GOTPAGE
Lloh7:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x26, #8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @lo_measure_txctl_values.tx_bias_values
_lo_measure_txctl_values.tx_bias_values:
	.long	9                               ; 0x9
	.long	8                               ; 0x8
	.long	10                              ; 0xa
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.long	2                               ; 0x2
	.long	5                               ; 0x5
	.long	4                               ; 0x4
	.long	6                               ; 0x6

	.p2align	2                               ; @lo_measure_txctl_values.tx_magn_values
_lo_measure_txctl_values.tx_magn_values:
	.long	112                             ; 0x70
	.long	64                              ; 0x40

	.comm	_jiffies,4,2                    ; @jiffies
	.no_dead_strip	_lo_measure_txctl_values
.subsections_via_symbols
