	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_xo2_ci
_init_xo2_ci:                           ## @init_xo2_ci
	.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	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	16(%rdi), %r12
	movq	24(%rdi), %r14
	leaq	-48(%rbp), %rcx
	movq	%r14, %rdi
	movl	$16, %esi
	movl	$4, %edx
	movl	$2, %r8d
	callq	_i2c_read_regs
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	-48(%rbp), %ecx
	movl	(%r12), %edi
	movl	8(%r15), %edx
	cmpl	$2, %ecx
	jl	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_info
	movl	$-1, %ebx
	jmp	LBB0_9
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_9
LBB0_4:
	movl	-44(%rbp), %r8d
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_info
	leaq	-52(%rbp), %rcx
	movq	%r14, %rdi
	movl	$16, %esi
	movl	$8, %edx
	callq	_i2c_read_reg
	cmpl	$0, -52(%rbp)
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	movl	$16, %esi
	movl	$8, %edx
	xorl	%ecx, %ecx
	callq	_i2c_write_reg
	movl	$100, %edi
	callq	_msleep
LBB0_6:
	movq	%r14, %rdi
	movl	$16, %esi
	movl	$8, %edx
	movl	$3, %ecx
	callq	_i2c_write_reg
	movl	$2000, %edi                     ## imm = 0x7D0
	movl	$3000, %esi                     ## imm = 0xBB8
	callq	_usleep_range
	movq	%r14, %rdi
	movl	$16, %esi
	movl	$9, %edx
	movl	$1, %ecx
	callq	_i2c_write_reg
	movq	%r14, %rdi
	movl	$16, %esi
	movl	$8, %edx
	movl	$131, %ecx
	callq	_i2c_write_reg
	movl	$2000, %edi                     ## imm = 0x7D0
	movl	$3000, %esi                     ## imm = 0xBB8
	callq	_usleep_range
	movq	8(%r12), %rax
	movq	(%r15), %rcx
	movq	(%rax,%rcx,8), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.7:
	movl	(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_info
	movq	%r14, %rdi
	movl	$16, %esi
	movl	$10, %edx
	movl	$3, %ecx
	callq	_i2c_write_reg
	movq	%r14, %rdi
	movl	$16, %esi
	movl	$11, %edx
	movl	$3, %ecx
	callq	_i2c_write_reg
	jmp	LBB0_9
LBB0_8:
	movq	%r14, %rdi
	movl	$16, %esi
	movl	$10, %edx
	movl	$1, %ecx
	callq	_i2c_write_reg
	movq	%r14, %rdi
	movl	$16, %esi
	movl	$11, %edx
	movl	$1, %ecx
	callq	_i2c_write_reg
	xorl	%ebx, %ebx
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Port %d: invalid XO2 CI %02x\n"

L_.str.1:                               ## @.str.1
	.asciz	"Port %d: DuoFlex CI %u.%u\n"

L_.str.2:                               ## @.str.2
	.asciz	"Setting continuous clock for DuoFlex CI\n"

	.no_dead_strip	_init_xo2_ci
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_xo2_ci
_init_xo2_ci:                           ; @init_xo2_ci
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldp	x21, x19, [x0, #16]
	add	x3, sp, #32
	mov	x0, x19
	mov	w1, #16
	mov	w2, #4
	mov	w4, #2
	bl	_i2c_read_regs
	tbnz	w0, #31, LBB0_9
; %bb.1:
	ldr	w9, [sp, #32]
	ldr	w0, [x21]
	ldr	w8, [x20, #8]
	cmp	w9, #2
	b.lt	LBB0_3
; %bb.2:
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	stp	x8, x9, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	mov	w0, #-1
	b	LBB0_9
LBB0_3:
	ldr	w10, [sp, #36]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_info
	add	x3, sp, #28
	mov	x0, x19
	mov	w1, #16
	mov	w2, #8
	bl	_i2c_read_reg
	ldr	w8, [sp, #28]
	cbz	w8, LBB0_5
; %bb.4:
	mov	x0, x19
	mov	w1, #16
	mov	w2, #8
	mov	w3, #0
	bl	_i2c_write_reg
	mov	w0, #100
	bl	_msleep
LBB0_5:
	mov	x0, x19
	mov	w1, #16
	mov	w2, #8
	mov	w3, #3
	bl	_i2c_write_reg
	mov	w0, #2000
	mov	w1, #3000
	bl	_usleep_range
	mov	x0, x19
	mov	w1, #16
	mov	w2, #9
	mov	w3, #1
	bl	_i2c_write_reg
	mov	x0, x19
	mov	w1, #16
	mov	w2, #8
	mov	w3, #131
	bl	_i2c_write_reg
	mov	w0, #2000
	mov	w1, #3000
	bl	_usleep_range
	ldr	x8, [x21, #8]
	ldr	x9, [x20]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.6:
	ldr	w0, [x21]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_info
	mov	x0, x19
	mov	w1, #16
	mov	w2, #10
	mov	w3, #3
	bl	_i2c_write_reg
	mov	x0, x19
	mov	w1, #16
	mov	w2, #11
	mov	w3, #3
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	mov	w1, #16
	mov	w2, #10
	mov	w3, #1
	bl	_i2c_write_reg
	mov	x0, x19
	mov	w1, #16
	mov	w2, #11
	mov	w3, #1
LBB0_8:
	bl	_i2c_write_reg
	mov	w0, #0
LBB0_9:
	ldr	x8, [sp, #40]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Port %d: invalid XO2 CI %02x\n"

l_.str.1:                               ; @.str.1
	.asciz	"Port %d: DuoFlex CI %u.%u\n"

l_.str.2:                               ; @.str.2
	.asciz	"Setting continuous clock for DuoFlex CI\n"

	.no_dead_strip	_init_xo2_ci
.subsections_via_symbols
