	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lgdt3305_set_if
_lgdt3305_set_if:                       ## @lgdt3305_set_if
	.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
	movq	%rdi, %r15
	movl	(%rsi), %eax
	leal	-129(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_1
## %bb.4:
	movq	(%r15), %rax
	addq	$4, %rax
	movl	$28, %ecx
	jmp	LBB0_5
LBB0_1:
	cmpl	$128, %eax
	jne	LBB0_3
## %bb.2:
	movq	(%r15), %rax
	movl	$24, %ecx
LBB0_5:
	movslq	(%rax), %r14
	imulq	$1717986919, %r14, %rbx         ## imm = 0x66666667
	movq	%rbx, %rax
	shrq	$63, %rax
	sarq	$34, %rbx
	addl	%eax, %ebx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	movl	%ebx, %edi
	movl	$625, %esi                      ## imm = 0x271
	callq	_do_div
	shrl	$24, %ebx
	andl	$63, %ebx
	orl	$64, %ebx
	movq	_LGDT3305_CR_CTR_FREQ_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_lgdt3305_write_reg
	movq	_LGDT3305_CR_CTR_FREQ_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_lgdt3305_write_reg
	movq	_LGDT3305_CR_CTR_FREQ_3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_lgdt3305_write_reg
	movq	_LGDT3305_CR_CTR_FREQ_4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_lgdt3305_write_reg
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_lg_dbg
	jmp	LBB0_6
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_6:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_LGDT3305_CR_CTR_FREQ_1,4,2     ## @LGDT3305_CR_CTR_FREQ_1
	.comm	_LGDT3305_CR_CTR_FREQ_2,4,2     ## @LGDT3305_CR_CTR_FREQ_2
	.comm	_LGDT3305_CR_CTR_FREQ_3,4,2     ## @LGDT3305_CR_CTR_FREQ_3
	.comm	_LGDT3305_CR_CTR_FREQ_4,4,2     ## @LGDT3305_CR_CTR_FREQ_4
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d KHz -> [%02x%02x%02x%02x]\n"

	.no_dead_strip	_lgdt3305_set_if
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lgdt3305_set_if
_lgdt3305_set_if:                       ; @lgdt3305_set_if
	.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
	mov	x19, x0
	ldr	w8, [x1]
	sub	w9, w8, #129
	cmp	w9, #2
	b.hs	LBB0_2
; %bb.1:
	ldr	x8, [x19]
	add	x9, x8, #4
	mov	w8, #28
	b	LBB0_4
LBB0_2:
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.3:
	ldr	x9, [x19]
	mov	w8, #24
LBB0_4:
	ldrsw	x20, [x9]
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	mul	x9, x20, x9
	lsr	x10, x9, #63
	asr	x9, x9, #34
	add	w9, w9, w10
	lsl	w21, w9, w8
	mov	x0, x21
	mov	w1, #625
	bl	_do_div
	mov	w22, #64
	bfxil	w22, w21, #24, #6
Lloh0:
	adrp	x8, _LGDT3305_CR_CTR_FREQ_1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LGDT3305_CR_CTR_FREQ_1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	bl	_lgdt3305_write_reg
Lloh3:
	adrp	x8, _LGDT3305_CR_CTR_FREQ_2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LGDT3305_CR_CTR_FREQ_2@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_lgdt3305_write_reg
Lloh6:
	adrp	x8, _LGDT3305_CR_CTR_FREQ_3@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LGDT3305_CR_CTR_FREQ_3@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_lgdt3305_write_reg
Lloh9:
	adrp	x8, _LGDT3305_CR_CTR_FREQ_4@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LGDT3305_CR_CTR_FREQ_4@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_lgdt3305_write_reg
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x22
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_lg_dbg
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_LGDT3305_CR_CTR_FREQ_1,4,2     ; @LGDT3305_CR_CTR_FREQ_1
	.comm	_LGDT3305_CR_CTR_FREQ_2,4,2     ; @LGDT3305_CR_CTR_FREQ_2
	.comm	_LGDT3305_CR_CTR_FREQ_3,4,2     ; @LGDT3305_CR_CTR_FREQ_3
	.comm	_LGDT3305_CR_CTR_FREQ_4,4,2     ; @LGDT3305_CR_CTR_FREQ_4
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d KHz -> [%02x%02x%02x%02x]\n"

	.no_dead_strip	_lgdt3305_set_if
.subsections_via_symbols
