	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stu300_init_hw
_stu300_init_hw:                        ## @stu300_init_hw
	.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, %rbx
	movq	_I2C_CR@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	addq	(%rdi), %rsi
	xorl	%edi, %edi
	callq	_stu300_wr8
	movq	_I2C_OAR1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	xorl	%edi, %edi
	callq	_stu300_wr8
	movl	8(%rbx), %edi
	callq	_clk_get_rate
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_stu300_set_clk
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_I2C_CR_PERIPHERAL_ENABLE@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	(%r15), %rsi
	addq	(%rbx), %rsi
	callq	_stu300_wr8
	movl	(%r12), %edi
	movq	(%r15), %rsi
	addq	(%rbx), %rsi
	callq	_stu300_wr8
	movq	_I2C_SR2@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	callq	_stu300_r8
	movq	_I2C_SR1@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	callq	_stu300_r8
LBB0_2:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_CR,8,3                     ## @I2C_CR
	.comm	_I2C_OAR1,8,3                   ## @I2C_OAR1
	.comm	_I2C_CR_PERIPHERAL_ENABLE,4,2   ## @I2C_CR_PERIPHERAL_ENABLE
	.comm	_I2C_SR2,8,3                    ## @I2C_SR2
	.comm	_I2C_SR1,8,3                    ## @I2C_SR1
	.no_dead_strip	_stu300_init_hw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stu300_init_hw
_stu300_init_hw:                        ; @stu300_init_hw
	.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	x8, [x0]
Lloh0:
	adrp	x21, _I2C_CR@GOTPAGE
Lloh1:
	ldr	x21, [x21, _I2C_CR@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	w0, #0
	bl	_stu300_wr8
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _I2C_OAR1@GOTPAGE
Lloh3:
	ldr	x9, [x9, _I2C_OAR1@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_stu300_wr8
	ldr	w0, [x19, #8]
	bl	_clk_get_rate
	mov	x1, x0
	mov	x0, x19
	bl	_stu300_set_clk
	mov	x20, x0
	cbnz	w0, LBB0_2
; %bb.1:
Lloh5:
	adrp	x22, _I2C_CR_PERIPHERAL_ENABLE@GOTPAGE
Lloh6:
	ldr	x22, [x22, _I2C_CR_PERIPHERAL_ENABLE@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_stu300_wr8
	ldr	w0, [x22]
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_stu300_wr8
	ldr	x8, [x19]
Lloh7:
	adrp	x9, _I2C_SR2@GOTPAGE
Lloh8:
	ldr	x9, [x9, _I2C_SR2@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_stu300_r8
	ldr	x8, [x19]
Lloh10:
	adrp	x9, _I2C_SR1@GOTPAGE
Lloh11:
	ldr	x9, [x9, _I2C_SR1@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_stu300_r8
LBB0_2:
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_CR,8,3                     ; @I2C_CR
	.comm	_I2C_OAR1,8,3                   ; @I2C_OAR1
	.comm	_I2C_CR_PERIPHERAL_ENABLE,4,2   ; @I2C_CR_PERIPHERAL_ENABLE
	.comm	_I2C_SR2,8,3                    ; @I2C_SR2
	.comm	_I2C_SR1,8,3                    ; @I2C_SR1
	.no_dead_strip	_stu300_init_hw
.subsections_via_symbols
