	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar9003_paprd_setup_gain_table  ## -- Begin function ar9003_paprd_setup_gain_table
	.p2align	4, 0x90
_ar9003_paprd_setup_gain_table:         ## @ar9003_paprd_setup_gain_table
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	(%rdi), %edx
	callq	_ar9003_get_desired_gain
	movq	_PAPRD_GAIN_TABLE_ENTRIES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testq	%rcx, %rcx
	je	LBB0_1
## %bb.2:
	movq	8(%rbx), %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%eax, (%rdx,%rsi,4)
	jae	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rsi
	cmpq	%rsi, %rcx
	jne	LBB0_3
## %bb.5:
	movl	%ecx, %esi
	jmp	LBB0_6
LBB0_1:
	xorl	%esi, %esi
LBB0_6:
	movq	%rbx, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_ar9003_tx_force_gain
	movq	_AR_PHY_PAPRD_TRAINER_STAT1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_REG_CLR_BIT                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PAPRD_GAIN_TABLE_ENTRIES,4,2   ## @PAPRD_GAIN_TABLE_ENTRIES
	.comm	_AR_PHY_PAPRD_TRAINER_STAT1,4,2 ## @AR_PHY_PAPRD_TRAINER_STAT1
	.comm	_AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE,4,2 ## @AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar9003_paprd_setup_gain_table  ; -- Begin function ar9003_paprd_setup_gain_table
	.p2align	2
_ar9003_paprd_setup_gain_table:         ; @ar9003_paprd_setup_gain_table
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w2, [x0]
	bl	_ar9003_get_desired_gain
Lloh0:
	adrp	x8, _PAPRD_GAIN_TABLE_ENTRIES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAPRD_GAIN_TABLE_ENTRIES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x1, #0
	ldr	x9, [x19, #8]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9, x1, lsl #2]
	cmp	w10, w0
	b.hs	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x1, x1, #1
	cmp	x8, x1
	b.ne	LBB0_2
; %bb.4:
	mov	x1, x8
	b	LBB0_6
LBB0_5:
	mov	w1, #0
LBB0_6:
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_ar9003_tx_force_gain
Lloh3:
	adrp	x8, _AR_PHY_PAPRD_TRAINER_STAT1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AR_PHY_PAPRD_TRAINER_STAT1@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_REG_CLR_BIT
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PAPRD_GAIN_TABLE_ENTRIES,4,2   ; @PAPRD_GAIN_TABLE_ENTRIES
	.comm	_AR_PHY_PAPRD_TRAINER_STAT1,4,2 ; @AR_PHY_PAPRD_TRAINER_STAT1
	.comm	_AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE,4,2 ; @AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE
.subsections_via_symbols
