	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath5k_hw_rf_check_gainf_readback
_ath5k_hw_rf_check_gainf_readback:      ## @ath5k_hw_rf_check_gainf_readback
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	cmpq	$0, 32(%rdi)
	je	LBB0_14
## %bb.1:
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_AR5K_RF5111@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.2:
	movq	_rf_regs_5111@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	%r14, %rdi
	callq	_ARRAY_SIZE
	movq	%rax, 24(%rbx)
	movq	_AR5K_RF_RFGAIN_STEP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_ath5k_hw_rfb_op
                                        ## kill: def $eax killed $eax def $rax
	xorl	%r15d, %r15d
	movl	$-5, %ecx
	cmpl	$63, %eax
	setne	%dl
	jne	LBB0_4
## %bb.3:
	movq	_AR5K_GAIN_DYN_ADJUST_HI_MARGIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_4:
	movb	%dl, %r15b
	shll	$6, %r15d
	negl	%ecx
	addl	%r15d, %ecx
	addl	$50, %ecx
	movl	%ecx, 8(%rbx)
	cmpl	$63, %eax
	jne	LBB0_6
## %bb.5:
	movq	_AR5K_GAIN_DYN_ADJUST_LO_MARGIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
LBB0_6:
	leal	4(%rax), %ecx
	cmpl	$63, %eax
	movl	$50, %edx
	cmovnel	%ecx, %edx
	leal	50(%r15), %ecx
	movl	%r12d, 12(%rbx)
	jmp	LBB0_10
LBB0_7:
	movq	_rf_regs_5112@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	%r14, %rdi
	callq	_ARRAY_SIZE
	movq	%rax, 24(%rbx)
	movq	_AR5K_RF_MIXVGA_OVR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_ath5k_hw_rfb_op
	movl	$83, %ecx
	cmpl	$1, %eax
	jne	LBB0_9
## %bb.8:
	movl	$83, %edx
	jmp	LBB0_10
LBB0_9:
	movl	$55, 8(%rbx)
	movl	$107, %ecx
	movl	$107, %edx
LBB0_10:
	movl	16(%rbx), %esi
	testl	%esi, %esi
	js	LBB0_12
## %bb.11:
	movl	$1, %eax
	cmpl	%edx, %esi
	jle	LBB0_14
LBB0_12:
	movl	$0, %eax
	cmpl	%r15d, %esi
	jl	LBB0_14
## %bb.13:
	xorl	%eax, %eax
	cmpl	%ecx, %esi
	setle	%al
LBB0_14:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR5K_RF5111,8,3                ## @AR5K_RF5111
	.comm	_rf_regs_5111,8,3               ## @rf_regs_5111
	.comm	_AR5K_RF_RFGAIN_STEP,4,2        ## @AR5K_RF_RFGAIN_STEP
	.comm	_AR5K_GAIN_DYN_ADJUST_HI_MARGIN,4,2 ## @AR5K_GAIN_DYN_ADJUST_HI_MARGIN
	.comm	_AR5K_GAIN_DYN_ADJUST_LO_MARGIN,4,2 ## @AR5K_GAIN_DYN_ADJUST_LO_MARGIN
	.comm	_rf_regs_5112,8,3               ## @rf_regs_5112
	.comm	_AR5K_RF_MIXVGA_OVR,4,2         ## @AR5K_RF_MIXVGA_OVR
	.no_dead_strip	_ath5k_hw_rf_check_gainf_readback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath5k_hw_rf_check_gainf_readback
_ath5k_hw_rf_check_gainf_readback:      ; @ath5k_hw_rf_check_gainf_readback
	.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
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _AR5K_RF5111@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AR5K_RF5111@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _rf_regs_5111@GOTPAGE
Lloh4:
	ldr	x8, [x8, _rf_regs_5111@GOTPAGEOFF]
Lloh5:
	ldr	x20, [x8]
	mov	x0, x20
	bl	_ARRAY_SIZE
	str	x0, [x19, #24]
Lloh6:
	adrp	x8, _AR5K_RF_RFGAIN_STEP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AR5K_RF_RFGAIN_STEP@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	mov	w4, #0
	bl	_ath5k_hw_rfb_op
	add	w9, w0, #4
	mov	w8, #50
	cmp	w0, #63
	csel	w10, w8, w9, eq
	cset	w9, ne
Lloh9:
	adrp	x11, _AR5K_GAIN_DYN_ADJUST_HI_MARGIN@GOTPAGE
Lloh10:
	ldr	x11, [x11, _AR5K_GAIN_DYN_ADJUST_HI_MARGIN@GOTPAGEOFF]
	bfi	w8, w9, #6, #1
Lloh11:
	ldr	w11, [x11]
	mov	w12, #-5
	csel	w11, w11, w12, eq
Lloh12:
	adrp	x12, _AR5K_GAIN_DYN_ADJUST_LO_MARGIN@GOTPAGE
Lloh13:
	ldr	x12, [x12, _AR5K_GAIN_DYN_ADJUST_LO_MARGIN@GOTPAGEOFF]
	lsl	w9, w9, #6
Lloh14:
	ldr	w12, [x12]
	csel	w12, w12, wzr, eq
	sub	w11, w8, w11
	stp	w11, w12, [x19, #8]
	ldr	w11, [x19, #16]
	tbz	w11, #31, LBB0_7
	b	LBB0_9
LBB0_3:
	mov	w0, #0
	b	LBB0_10
LBB0_4:
Lloh15:
	adrp	x8, _rf_regs_5112@GOTPAGE
Lloh16:
	ldr	x8, [x8, _rf_regs_5112@GOTPAGEOFF]
Lloh17:
	ldr	x20, [x8]
	mov	x0, x20
	bl	_ARRAY_SIZE
	str	x0, [x19, #24]
Lloh18:
	adrp	x8, _AR5K_RF_MIXVGA_OVR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AR5K_RF_MIXVGA_OVR@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	mov	w4, #0
	bl	_ath5k_hw_rfb_op
	cmp	w0, #1
	b.ne	LBB0_6
; %bb.5:
	mov	w9, #0
	mov	w8, #83
	mov	w10, #83
	ldr	w11, [x19, #16]
	tbz	w11, #31, LBB0_7
	b	LBB0_9
LBB0_6:
	mov	w9, #0
	mov	w8, #55
	str	w8, [x19, #8]
	mov	w8, #107
	mov	w10, #107
	ldr	w11, [x19, #16]
	tbnz	w11, #31, LBB0_9
LBB0_7:
	cmp	w11, w10
	b.gt	LBB0_9
; %bb.8:
	mov	w0, #1
	b	LBB0_10
LBB0_9:
	cmp	w11, w8
	cset	w8, le
	cmp	w11, w9
	csel	w0, wzr, w8, lt
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_AR5K_RF5111,8,3                ; @AR5K_RF5111
	.comm	_rf_regs_5111,8,3               ; @rf_regs_5111
	.comm	_AR5K_RF_RFGAIN_STEP,4,2        ; @AR5K_RF_RFGAIN_STEP
	.comm	_AR5K_GAIN_DYN_ADJUST_HI_MARGIN,4,2 ; @AR5K_GAIN_DYN_ADJUST_HI_MARGIN
	.comm	_AR5K_GAIN_DYN_ADJUST_LO_MARGIN,4,2 ; @AR5K_GAIN_DYN_ADJUST_LO_MARGIN
	.comm	_rf_regs_5112,8,3               ; @rf_regs_5112
	.comm	_AR5K_RF_MIXVGA_OVR,4,2         ; @AR5K_RF_MIXVGA_OVR
	.no_dead_strip	_ath5k_hw_rf_check_gainf_readback
.subsections_via_symbols
