	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jz4780_i2c_set_target
_jz4780_i2c_set_target:                 ## @jz4780_i2c_set_target
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_JZ4780_I2C_STA@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_jz4780_i2c_readw
	movq	_JZ4780_I2C_STA_TFE@GOTPCREL(%rip), %r12
	testw	%ax, (%r12)
	je	LBB0_2
## %bb.1:
	movq	_JZ4780_I2C_STA_MSTACT@GOTPCREL(%rip), %rcx
	testw	%ax, (%rcx)
	je	LBB0_11
LBB0_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)
	je	LBB0_4
## %bb.3:
	movq	_JZ4780_I2C_STA_MSTACT@GOTPCREL(%rip), %rcx
	testw	%ax, (%rcx)
	je	LBB0_11
LBB0_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)
	je	LBB0_6
## %bb.5:
	movq	_JZ4780_I2C_STA_MSTACT@GOTPCREL(%rip), %rcx
	testw	%ax, (%rcx)
	je	LBB0_11
LBB0_6:
	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)
	je	LBB0_8
## %bb.7:
	movq	_JZ4780_I2C_STA_MSTACT@GOTPCREL(%rip), %rcx
	testw	%ax, (%rcx)
	je	LBB0_11
LBB0_8:
	movl	$5000, %edi                     ## imm = 0x1388
	movl	$15000, %esi                    ## imm = 0x3A98
	callq	_usleep_range
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_jz4780_i2c_readw
	movl	%eax, %r15d
	testw	%ax, (%r12)
	je	LBB0_10
## %bb.9:
	movq	_JZ4780_I2C_STA_MSTACT@GOTPCREL(%rip), %rax
	testw	%r15w, (%rax)
	je	LBB0_11
LBB0_10:
	movl	$5000, %edi                     ## imm = 0x1388
	movl	$15000, %esi                    ## imm = 0x3A98
	callq	_usleep_range
	movzbl	%r14b, %edx
	movzwl	%r15w, %ecx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_11:
	movq	_JZ4780_I2C_TAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%r14b, %edx
	movq	%rbx, %rdi
	callq	_jz4780_i2c_writew
	xorl	%eax, %eax
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_JZ4780_I2C_STA,4,2             ## @JZ4780_I2C_STA
	.comm	_JZ4780_I2C_STA_TFE,2,1         ## @JZ4780_I2C_STA_TFE
	.comm	_JZ4780_I2C_STA_MSTACT,2,1      ## @JZ4780_I2C_STA_MSTACT
	.comm	_JZ4780_I2C_TAR,4,2             ## @JZ4780_I2C_TAR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set device to address 0x%02x failed, STA=0x%04x\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_jz4780_i2c_set_target
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function jz4780_i2c_set_target
_jz4780_i2c_set_target:                 ; @jz4780_i2c_set_target
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _JZ4780_I2C_STA@GOTPAGE
Lloh1:
	ldr	x21, [x21, _JZ4780_I2C_STA@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_jz4780_i2c_readw
Lloh2:
	adrp	x23, _JZ4780_I2C_STA_TFE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _JZ4780_I2C_STA_TFE@GOTPAGEOFF]
	ldrh	w8, [x23]
Lloh4:
	adrp	x22, _JZ4780_I2C_STA_MSTACT@GOTPAGE
Lloh5:
	ldr	x22, [x22, _JZ4780_I2C_STA_MSTACT@GOTPAGEOFF]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	ldrh	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_11
LBB0_2:
	mov	w0, #5000
	mov	w1, #15000
	bl	_usleep_range
	ldr	w1, [x21]
	mov	x0, x20
	bl	_jz4780_i2c_readw
	ldrh	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:
	ldrh	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_11
LBB0_4:
	mov	w0, #5000
	mov	w1, #15000
	bl	_usleep_range
	ldr	w1, [x21]
	mov	x0, x20
	bl	_jz4780_i2c_readw
	ldrh	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.5:
	ldrh	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_11
LBB0_6:
	mov	w0, #5000
	mov	w1, #15000
	bl	_usleep_range
	ldr	w1, [x21]
	mov	x0, x20
	bl	_jz4780_i2c_readw
	ldrh	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_8
; %bb.7:
	ldrh	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_11
LBB0_8:
	mov	w0, #5000
	mov	w1, #15000
	bl	_usleep_range
	ldr	w1, [x21]
	mov	x0, x20
	bl	_jz4780_i2c_readw
	mov	x21, x0
	ldrh	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_10
; %bb.9:
	ldrh	w8, [x22]
	tst	w8, w21
	b.eq	LBB0_11
LBB0_10:
	mov	w0, #5000
	mov	w1, #15000
	bl	_usleep_range
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	mov	x3, x21
	bl	_dev_err
Lloh8:
	adrp	x8, _ENXIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_11:
Lloh11:
	adrp	x8, _JZ4780_I2C_TAR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _JZ4780_I2C_TAR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x19
	bl	_jz4780_i2c_writew
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_JZ4780_I2C_STA,4,2             ; @JZ4780_I2C_STA
	.comm	_JZ4780_I2C_STA_TFE,2,1         ; @JZ4780_I2C_STA_TFE
	.comm	_JZ4780_I2C_STA_MSTACT,2,1      ; @JZ4780_I2C_STA_MSTACT
	.comm	_JZ4780_I2C_TAR,4,2             ; @JZ4780_I2C_TAR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set device to address 0x%02x failed, STA=0x%04x\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_jz4780_i2c_set_target
.subsections_via_symbols
