	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jz4780_i2c_enable
_jz4780_i2c_enable:                     ## @jz4780_i2c_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	%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	_JZ4780_I2C_ENB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	callq	_jz4780_i2c_writew
	movq	_JZ4780_I2C_ENSTA@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_jz4780_i2c_readw
	movq	_JZ4780_I2C_ENB_I2C@GOTPCREL(%rip), %r12
	xorl	%r14d, %r14d
	testw	%ax, (%r12)
	jne	LBB0_6
## %bb.1:
	movl	$5000, %edi                     ## imm = 0x1388
	movl	$15000, %esi                    ## imm = 0x3A98
	callq	_usleep_range
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_jz4780_i2c_readw
	testw	%ax, (%r12)
	jne	LBB0_6
## %bb.2:
	movl	$5000, %edi                     ## imm = 0x1388
	movl	$15000, %esi                    ## imm = 0x3A98
	callq	_usleep_range
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_jz4780_i2c_readw
	testw	%ax, (%r12)
	jne	LBB0_6
## %bb.3:
	movl	$5000, %edi                     ## imm = 0x1388
	movl	$15000, %esi                    ## imm = 0x3A98
	callq	_usleep_range
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_jz4780_i2c_readw
	testw	%ax, (%r12)
	jne	LBB0_6
## %bb.4:
	movl	$5000, %edi                     ## imm = 0x1388
	movl	$15000, %esi                    ## imm = 0x3A98
	callq	_usleep_range
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_jz4780_i2c_readw
	testw	%ax, (%r12)
	jne	LBB0_6
## %bb.5:
	movl	%eax, %r15d
	movl	$5000, %edi                     ## imm = 0x1388
	movl	$15000, %esi                    ## imm = 0x3A98
	callq	_usleep_range
	movzwl	%r15w, %edx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_6:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_JZ4780_I2C_ENB,4,2             ## @JZ4780_I2C_ENB
	.comm	_JZ4780_I2C_ENSTA,4,2           ## @JZ4780_I2C_ENSTA
	.comm	_JZ4780_I2C_ENB_I2C,2,1         ## @JZ4780_I2C_ENB_I2C
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"enable failed: ENSTA=0x%04x\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_jz4780_i2c_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function jz4780_i2c_enable
_jz4780_i2c_enable:                     ; @jz4780_i2c_enable
	.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
Lloh0:
	adrp	x8, _JZ4780_I2C_ENB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _JZ4780_I2C_ENB@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_jz4780_i2c_writew
Lloh3:
	adrp	x20, _JZ4780_I2C_ENSTA@GOTPAGE
Lloh4:
	ldr	x20, [x20, _JZ4780_I2C_ENSTA@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_jz4780_i2c_readw
Lloh5:
	adrp	x21, _JZ4780_I2C_ENB_I2C@GOTPAGE
Lloh6:
	ldr	x21, [x21, _JZ4780_I2C_ENB_I2C@GOTPAGEOFF]
	ldrh	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_5
; %bb.1:
	mov	w0, #5000
	mov	w1, #15000
	bl	_usleep_range
	ldr	w1, [x20]
	mov	x0, x19
	bl	_jz4780_i2c_readw
	ldrh	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_5
; %bb.2:
	mov	w0, #5000
	mov	w1, #15000
	bl	_usleep_range
	ldr	w1, [x20]
	mov	x0, x19
	bl	_jz4780_i2c_readw
	ldrh	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_5
; %bb.3:
	mov	w0, #5000
	mov	w1, #15000
	bl	_usleep_range
	ldr	w1, [x20]
	mov	x0, x19
	bl	_jz4780_i2c_readw
	ldrh	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_5
; %bb.4:
	mov	w0, #5000
	mov	w1, #15000
	bl	_usleep_range
	ldr	w1, [x20]
	mov	x0, x19
	bl	_jz4780_i2c_readw
	ldrh	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_7
LBB0_5:
	mov	w0, #0
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
LBB0_7:
	mov	x20, x0
	mov	w0, #5000
	mov	w1, #15000
	bl	_usleep_range
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_dev_err
Lloh9:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_JZ4780_I2C_ENB,4,2             ; @JZ4780_I2C_ENB
	.comm	_JZ4780_I2C_ENSTA,4,2           ; @JZ4780_I2C_ENSTA
	.comm	_JZ4780_I2C_ENB_I2C,2,1         ; @JZ4780_I2C_ENB_I2C
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"enable failed: ENSTA=0x%04x\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_jz4780_i2c_enable
.subsections_via_symbols
