	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ReadIFAgc
_ReadIFAgc:                             ## @ReadIFAgc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	$0, (%rsi)
	movq	(%rdi), %rax
	movq	_AGC_CTRL_OFF@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	cmpq	(%rdx), %rax
	je	LBB0_7
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_FE_AG_REG_GC1_AGC_DAT__A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	xorl	%ecx, %ecx
	callq	_Read16
	movl	%eax, %ecx
	testl	%eax, %eax
	js	LBB0_7
## %bb.2:
	movq	_FE_AG_REG_GC1_AGC_DAT__M@GOTPCREL(%rip), %rax
	movl	-20(%rbp), %r8d
	andl	(%rax), %r8d
	movl	8(%rbx), %r9d
	movl	12(%rbx), %edi
	movl	16(%rbx), %ebx
	testl	%edi, %edi
	jne	LBB0_5
## %bb.3:
	testl	%r9d, %r9d
	je	LBB0_6
## %bb.4:
	testl	%ebx, %ebx
	je	LBB0_6
LBB0_5:
	imull	$3300, %edi, %eax               ## imm = 0xCE4
	leal	(%rdi,%r9), %esi
	cltd
	idivl	%esi
	movl	%eax, %esi
	movl	%ebx, %eax
	imull	%edi, %eax
	addl	%edi, %ebx
	cltd
	idivl	%ebx
	movl	%eax, %edi
	imull	$3300, %eax, %eax               ## imm = 0xCE4
	addl	%r9d, %edi
	cltd
	idivl	%edi
	subl	%eax, %esi
	imull	%r8d, %esi
	leal	1023(%rsi), %edx
	testl	%esi, %esi
	cmovnsl	%esi, %edx
	sarl	$10, %edx
	addl	%eax, %edx
	movl	%edx, (%r14)
LBB0_7:
	movl	%ecx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	xorl	%ecx, %ecx
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_AGC_CTRL_OFF,8,3               ## @AGC_CTRL_OFF
	.comm	_FE_AG_REG_GC1_AGC_DAT__A,4,2   ## @FE_AG_REG_GC1_AGC_DAT__A
	.comm	_FE_AG_REG_GC1_AGC_DAT__M,4,2   ## @FE_AG_REG_GC1_AGC_DAT__M
	.no_dead_strip	_ReadIFAgc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ReadIFAgc
_ReadIFAgc:                             ; @ReadIFAgc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x0
	mov	w0, #0
	str	wzr, [x1]
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _AGC_CTRL_OFF@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AGC_CTRL_OFF@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.1:
	mov	x19, x1
Lloh3:
	adrp	x8, _FE_AG_REG_GC1_AGC_DAT__A@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FE_AG_REG_GC1_AGC_DAT__A@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x20
	mov	w3, #0
	bl	_Read16
	tbnz	w0, #31, LBB0_6
; %bb.2:
Lloh6:
	adrp	x8, _FE_AG_REG_GC1_AGC_DAT__M@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FE_AG_REG_GC1_AGC_DAT__M@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x8]
	ldr	w12, [sp, #12]
	ldp	w8, w9, [x20, #8]
	ldr	w10, [x20, #16]
	cbnz	w9, LBB0_5
; %bb.3:
	cbz	w8, LBB0_7
; %bb.4:
	cbz	w10, LBB0_7
LBB0_5:
	and	w11, w12, w11
	mov	w12, #3300
	mul	w13, w9, w12
	add	w14, w9, w8
	sdiv	w13, w13, w14
	mul	w14, w10, w9
	add	w9, w10, w9
	sdiv	w9, w14, w9
	mul	w10, w9, w12
	add	w8, w9, w8
	sdiv	w8, w10, w8
	sub	w9, w13, w8
	mul	w9, w9, w11
	add	w10, w9, #1023
	cmp	w9, #0
	csel	w9, w10, w9, lt
	add	w8, w8, w9, asr #10
	str	w8, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_7:
	mov	w0, #0
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AGC_CTRL_OFF,8,3               ; @AGC_CTRL_OFF
	.comm	_FE_AG_REG_GC1_AGC_DAT__A,4,2   ; @FE_AG_REG_GC1_AGC_DAT__A
	.comm	_FE_AG_REG_GC1_AGC_DAT__M,4,2   ; @FE_AG_REG_GC1_AGC_DAT__M
	.no_dead_strip	_ReadIFAgc
.subsections_via_symbols
