	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lgdt3305_agc_setup
_lgdt3305_agc_setup:                    ## @lgdt3305_agc_setup
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rsi), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	jae	LBB0_6
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %r15
	cltq
	leaq	l_switch.table.lgdt3305_agc_setup(%rip), %rcx
	movl	(%rcx,%rax,4), %ebx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%ebx, %edx
	callq	_lg_dbg
	movq	(%r15), %rax
	movl	(%rax), %eax
	cmpl	$131, %eax
	je	LBB0_4
## %bb.2:
	cmpl	$132, %eax
	jne	LBB0_6
## %bb.3:
	leal	(%rbx,%rbx), %edx
	orl	$225, %edx
	movq	%r15, %rdi
	movl	$788, %esi                      ## imm = 0x314
	callq	_lgdt3305_write_reg
	movl	$782, %esi                      ## imm = 0x30E
	jmp	LBB0_5
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_LGDT3305_AGC_CTRL_4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	(%rbx,%rbx), %edx
	orl	$225, %edx
	movq	%r15, %rdi
	callq	_lgdt3305_write_reg
	movq	_LGDT3305_AGC_CTRL_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_5:
	movq	%r15, %rdi
	movl	$2, %edx
	movl	%ebx, %ecx
	callq	_lgdt3305_set_reg_bit
	movq	%r15, %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_lgdt3305_rfagc_loop            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"lockdten = %d, acqen = %d\n"

	.comm	_LGDT3305_AGC_CTRL_4,4,2        ## @LGDT3305_AGC_CTRL_4
	.comm	_LGDT3305_AGC_CTRL_1,4,2        ## @LGDT3305_AGC_CTRL_1
	.no_dead_strip	_lgdt3305_agc_setup
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.lgdt3305_agc_setup
l_switch.table.lgdt3305_agc_setup:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	1                               ## 0x1

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lgdt3305_agc_setup
_lgdt3305_agc_setup:                    ; @lgdt3305_agc_setup
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	ldr	w8, [x1]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hs	LBB0_4
; %bb.1:
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x9, l_switch.table.lgdt3305_agc_setup@PAGE
Lloh1:
	add	x9, x9, l_switch.table.lgdt3305_agc_setup@PAGEOFF
	ldr	w21, [x9, w8, sxtw #2]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x21
	bl	_lg_dbg
	ldr	x8, [x20]
	ldr	w8, [x8]
	cmp	w8, #131
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #132
	b.ne	LBB0_4
; %bb.3:
	mov	w8, #225
	orr	w2, w8, w21, lsl #1
	mov	x0, x20
	mov	w1, #788
	bl	_lgdt3305_write_reg
	mov	w1, #782
	b	LBB0_6
LBB0_4:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh7:
	adrp	x8, _LGDT3305_AGC_CTRL_4@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LGDT3305_AGC_CTRL_4@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	w8, #225
	orr	w2, w8, w21, lsl #1
	mov	x0, x20
	bl	_lgdt3305_write_reg
Lloh10:
	adrp	x8, _LGDT3305_AGC_CTRL_1@GOTPAGE
Lloh11:
	ldr	x8, [x8, _LGDT3305_AGC_CTRL_1@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
LBB0_6:
	mov	x0, x20
	mov	w2, #2
	mov	x3, x21
	bl	_lgdt3305_set_reg_bit
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_lgdt3305_rfagc_loop
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"lockdten = %d, acqen = %d\n"

	.comm	_LGDT3305_AGC_CTRL_4,4,2        ; @LGDT3305_AGC_CTRL_4
	.comm	_LGDT3305_AGC_CTRL_1,4,2        ; @LGDT3305_AGC_CTRL_1
	.no_dead_strip	_lgdt3305_agc_setup
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.lgdt3305_agc_setup
l_switch.table.lgdt3305_agc_setup:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	1                               ; 0x1

.subsections_via_symbols
