	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function thunder_i2c_clock_enable
_thunder_i2c_clock_enable:              ## @thunder_i2c_clock_enable
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	movq	_acpi_disabled@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.1:
	xorl	%esi, %esi
	callq	_clk_get
	movq	%rax, 8(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	$0, 8(%rbx)
	cmpq	$0, (%rbx)
	jne	LBB0_8
	jmp	LBB0_7
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	callq	_device_property_read_u32
	cmpq	$0, (%rbx)
	jne	LBB0_8
	jmp	LBB0_7
LBB0_3:
	movq	8(%rbx), %rdi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_4
## %bb.6:
	cmpq	$0, (%rbx)
	jne	LBB0_8
LBB0_7:
	movq	_SYS_FREQ_DEFAULT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_4:
	movq	8(%rbx), %rdi
	callq	_clk_get_rate
	movq	%rax, (%rbx)
	cmpq	$0, (%rbx)
	jne	LBB0_8
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_acpi_disabled,8,3              ## @acpi_disabled
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sclk"

	.comm	_SYS_FREQ_DEFAULT,8,3           ## @SYS_FREQ_DEFAULT
	.no_dead_strip	_thunder_i2c_clock_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function thunder_i2c_clock_enable
_thunder_i2c_clock_enable:              ; @thunder_i2c_clock_enable
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
Lloh0:
	adrp	x8, _acpi_disabled@GOTPAGE
Lloh1:
	ldr	x8, [x8, _acpi_disabled@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x1, #0
	bl	_clk_get
	str	x0, [x19, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
	str	xzr, [x19, #8]
	ldr	x8, [x19]
	cbnz	x8, LBB0_7
	b	LBB0_6
LBB0_3:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_device_property_read_u32
	ldr	x8, [x19]
	cbnz	x8, LBB0_7
	b	LBB0_6
LBB0_4:
	ldr	x0, [x19, #8]
	bl	_clk_prepare_enable
	cbz	w0, LBB0_8
; %bb.5:
	ldr	x8, [x19]
	cbnz	x8, LBB0_7
LBB0_6:
Lloh5:
	adrp	x8, _SYS_FREQ_DEFAULT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SYS_FREQ_DEFAULT@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldr	x0, [x19, #8]
	bl	_clk_get_rate
	str	x0, [x19]
	ldr	x8, [x19]
	cbnz	x8, LBB0_7
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_acpi_disabled,8,3              ; @acpi_disabled
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sclk"

	.comm	_SYS_FREQ_DEFAULT,8,3           ; @SYS_FREQ_DEFAULT
	.no_dead_strip	_thunder_i2c_clock_enable
.subsections_via_symbols
