	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lgdt3305_rfagc_loop
_lgdt3305_rfagc_loop:                   ## @lgdt3305_rfagc_loop
	.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	%rdi, %r15
	movl	(%rsi), %eax
	leal	-129(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_1
## %bb.4:
	movq	(%r15), %rax
	movl	8(%rax), %ecx
	movq	_LGDT3304@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	movl	$26214, %ecx                    ## imm = 0x6666
	movl	$34952, %ebx                    ## imm = 0x8888
	cmovel	%ecx, %ebx
	movl	$1131, %r13d                    ## imm = 0x46B
	movl	$34953, %r12d                   ## imm = 0x8889
	cmpq	$0, (%rax)
	je	LBB0_7
LBB0_6:
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%r13d, %esi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_lg_dbg
	movq	_LGDT3305_AGC_DELAY_PT_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$4, %edx
	callq	_lgdt3305_write_reg
	movq	_LGDT3305_AGC_DELAY_PT_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	$235, %r13d
	movq	%r15, %rdi
	movl	%r13d, %edx
	callq	_lgdt3305_write_reg
	movq	_LGDT3305_RFAGC_LOOP_FLTR_BW_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edx
	shrl	$8, %edx
	movq	%r15, %rdi
	callq	_lgdt3305_write_reg
	movq	_LGDT3305_RFAGC_LOOP_FLTR_BW_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	$137, %r12d
	movq	%r15, %rdi
	movl	%r12d, %edx
	jmp	LBB0_8
LBB0_1:
	cmpl	$128, %eax
	jne	LBB0_3
## %bb.2:
	movq	(%r15), %rax
	movl	$1216, %r13d                    ## imm = 0x4C0
	movl	$32768, %ebx                    ## imm = 0x8000
	movl	$32768, %r12d                   ## imm = 0x8000
	cmpq	$0, (%rax)
	jne	LBB0_6
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_lg_dbg
	movq	_LGDT3305_IFBW_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	shrl	$8, %edx
	movq	%r15, %rdi
	callq	_lgdt3305_write_reg
	movq	_LGDT3305_IFBW_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	$238, %ebx
	movq	%r15, %rdi
	movl	%ebx, %edx
LBB0_8:
	callq	_lgdt3305_write_reg
	jmp	LBB0_9
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LGDT3304,4,2                   ## @LGDT3304
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"agcdelay: 0x%04x, rfbw: 0x%04x\n"

	.comm	_LGDT3305_AGC_DELAY_PT_1,4,2    ## @LGDT3305_AGC_DELAY_PT_1
	.comm	_LGDT3305_AGC_DELAY_PT_2,4,2    ## @LGDT3305_AGC_DELAY_PT_2
	.comm	_LGDT3305_RFAGC_LOOP_FLTR_BW_1,4,2 ## @LGDT3305_RFAGC_LOOP_FLTR_BW_1
	.comm	_LGDT3305_RFAGC_LOOP_FLTR_BW_2,4,2 ## @LGDT3305_RFAGC_LOOP_FLTR_BW_2
L_.str.1:                               ## @.str.1
	.asciz	"ifbw: 0x%04x\n"

	.comm	_LGDT3305_IFBW_1,4,2            ## @LGDT3305_IFBW_1
	.comm	_LGDT3305_IFBW_2,4,2            ## @LGDT3305_IFBW_2
	.no_dead_strip	_lgdt3305_rfagc_loop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lgdt3305_rfagc_loop
_lgdt3305_rfagc_loop:                   ; @lgdt3305_rfagc_loop
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x0
	ldr	w8, [x1]
	sub	w9, w8, #129
	cmp	w9, #2
	b.hs	LBB0_3
; %bb.1:
	ldr	x8, [x19]
	ldr	w9, [x8, #8]
Lloh0:
	adrp	x10, _LGDT3304@GOTPAGE
Lloh1:
	ldr	x10, [x10, _LGDT3304@GOTPAGEOFF]
	mov	w11, #34952
	mov	w12, #26214
Lloh2:
	ldr	w10, [x10]
	cmp	w9, w10
	csel	w21, w12, w11, eq
	mov	w20, #1131
	mov	w22, #34953
	ldr	x8, [x8]
	cbz	x8, LBB0_5
LBB0_2:
	str	x22, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_lg_dbg
Lloh5:
	adrp	x8, _LGDT3305_AGC_DELAY_PT_1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LGDT3305_AGC_DELAY_PT_1@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #4
	bl	_lgdt3305_write_reg
Lloh8:
	adrp	x8, _LGDT3305_AGC_DELAY_PT_2@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LGDT3305_AGC_DELAY_PT_2@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w8, #235
	and	w2, w20, w8
	mov	x0, x19
	bl	_lgdt3305_write_reg
Lloh11:
	adrp	x8, _LGDT3305_RFAGC_LOOP_FLTR_BW_1@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LGDT3305_RFAGC_LOOP_FLTR_BW_1@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	lsr	w2, w22, #8
	mov	x0, x19
	bl	_lgdt3305_write_reg
Lloh14:
	adrp	x8, _LGDT3305_RFAGC_LOOP_FLTR_BW_2@GOTPAGE
Lloh15:
	ldr	x8, [x8, _LGDT3305_RFAGC_LOOP_FLTR_BW_2@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	w8, #137
	and	w2, w22, w8
	b	LBB0_6
LBB0_3:
	cmp	w8, #128
	b.ne	LBB0_7
; %bb.4:
	ldr	x8, [x19]
	mov	w20, #1216
	mov	w21, #32768
	mov	w22, #32768
	ldr	x8, [x8]
	cbnz	x8, LBB0_2
LBB0_5:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_lg_dbg
Lloh19:
	adrp	x8, _LGDT3305_IFBW_1@GOTPAGE
Lloh20:
	ldr	x8, [x8, _LGDT3305_IFBW_1@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	lsr	w2, w21, #8
	mov	x0, x19
	bl	_lgdt3305_write_reg
Lloh22:
	adrp	x8, _LGDT3305_IFBW_2@GOTPAGE
Lloh23:
	ldr	x8, [x8, _LGDT3305_IFBW_2@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	w8, #238
	and	w2, w21, w8
LBB0_6:
	mov	x0, x19
	bl	_lgdt3305_write_reg
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_LGDT3304,4,2                   ; @LGDT3304
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"agcdelay: 0x%04x, rfbw: 0x%04x\n"

	.comm	_LGDT3305_AGC_DELAY_PT_1,4,2    ; @LGDT3305_AGC_DELAY_PT_1
	.comm	_LGDT3305_AGC_DELAY_PT_2,4,2    ; @LGDT3305_AGC_DELAY_PT_2
	.comm	_LGDT3305_RFAGC_LOOP_FLTR_BW_1,4,2 ; @LGDT3305_RFAGC_LOOP_FLTR_BW_1
	.comm	_LGDT3305_RFAGC_LOOP_FLTR_BW_2,4,2 ; @LGDT3305_RFAGC_LOOP_FLTR_BW_2
l_.str.1:                               ; @.str.1
	.asciz	"ifbw: 0x%04x\n"

	.comm	_LGDT3305_IFBW_1,4,2            ; @LGDT3305_IFBW_1
	.comm	_LGDT3305_IFBW_2,4,2            ; @LGDT3305_IFBW_2
	.no_dead_strip	_lgdt3305_rfagc_loop
.subsections_via_symbols
