	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lgdt3305_set_modulation
_lgdt3305_set_modulation:               ## @lgdt3305_set_modulation
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rdi
	callq	_lg_dbg
	movq	_LGDT3305_GEN_CTRL_1@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	movq	%r15, %rdi
	callq	_lgdt3305_read_reg
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_lg_fail
	testq	%rax, %rax
	jne	LBB0_9
## %bb.1:
	movl	-36(%rbp), %eax
	movl	%eax, %edx
	andl	$-4, %edx
	movl	(%r14), %ecx
	cmpl	$130, %ecx
	je	LBB0_6
## %bb.2:
	cmpl	$129, %ecx
	je	LBB0_7
## %bb.3:
	cmpl	$128, %ecx
	jne	LBB0_5
## %bb.4:
	orl	$3, %eax
	movl	%eax, -36(%rbp)
	movl	%eax, %edx
	jmp	LBB0_8
LBB0_6:
	orl	$1, %edx
LBB0_7:
	movl	%edx, -36(%rbp)
LBB0_8:
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_lgdt3305_write_reg
	movl	%eax, %ebx
	jmp	LBB0_9
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	_LGDT3305_GEN_CTRL_1,4,2        ## @LGDT3305_GEN_CTRL_1
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_lgdt3305_set_modulation
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lgdt3305_set_modulation
_lgdt3305_set_modulation:               ; @lgdt3305_set_modulation
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_lg_dbg
Lloh2:
	adrp	x22, _LGDT3305_GEN_CTRL_1@GOTPAGE
Lloh3:
	ldr	x22, [x22, _LGDT3305_GEN_CTRL_1@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #12
	mov	x0, x19
	bl	_lgdt3305_read_reg
	mov	x21, x0
	bl	_lg_fail
	cbnz	x0, LBB0_8
; %bb.1:
	ldr	w8, [sp, #12]
	and	w2, w8, #0xfffffffc
	ldr	w9, [x20]
	cmp	w9, #130
	b.eq	LBB0_5
; %bb.2:
	cmp	w9, #129
	b.eq	LBB0_6
; %bb.3:
	cmp	w9, #128
	b.ne	LBB0_7
; %bb.4:
	orr	w2, w8, #0x3
	b	LBB0_6
LBB0_5:
	orr	w2, w2, #0x1
LBB0_6:
	str	w2, [sp, #12]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_lgdt3305_write_reg
	mov	x21, x0
	b	LBB0_8
LBB0_7:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	mov	x0, x21
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_LGDT3305_GEN_CTRL_1,4,2        ; @LGDT3305_GEN_CTRL_1
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_lgdt3305_set_modulation
.subsections_via_symbols
