	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jz4780_i2c_cleanup
_jz4780_i2c_cleanup:                    ## @jz4780_i2c_cleanup
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	_JZ4780_I2C_CTRL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_jz4780_i2c_readw
                                        ## kill: def $ax killed $ax def $eax
	movq	_JZ4780_I2C_CTRL_STPHLD@GOTPCREL(%rip), %rcx
	movzwl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	(%r13), %esi
	movzwl	%cx, %edx
	movq	%r15, %rdi
	callq	_jz4780_i2c_writew
	movq	_JZ4780_I2C_INTM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_jz4780_i2c_writew
	movq	_JZ4780_I2C_CTXABRT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_jz4780_i2c_readw
	movq	_JZ4780_I2C_CINTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_jz4780_i2c_readw
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_jz4780_i2c_readw
                                        ## kill: def $ax killed $ax def $eax
	movq	_JZ4780_I2C_ENB_I2C@GOTPCREL(%rip), %r12
	movzwl	(%r12), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	(%r13), %esi
	movzwl	%cx, %ebx
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_jz4780_i2c_writew
	movl	$10, %edi
	callq	_udelay
	orw	(%r12), %bx
	movl	(%r13), %esi
	movzwl	%bx, %edx
	movq	%r15, %rdi
	callq	_jz4780_i2c_writew
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r15, %rdi
	callq	_jz4780_i2c_disable
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
LBB0_2:
	movq	_JZ4780_I2C_INTM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_jz4780_i2c_readw
	movl	%eax, %ebx
	movq	_JZ4780_I2C_INTST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_jz4780_i2c_readw
                                        ## kill: def $ax killed $ax def $eax
	andl	%ebx, %eax
	movzwl	%ax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
LBB0_4:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_JZ4780_I2C_CTRL,4,2            ## @JZ4780_I2C_CTRL
	.comm	_JZ4780_I2C_CTRL_STPHLD,2,1     ## @JZ4780_I2C_CTRL_STPHLD
	.comm	_JZ4780_I2C_INTM,4,2            ## @JZ4780_I2C_INTM
	.comm	_JZ4780_I2C_CTXABRT,4,2         ## @JZ4780_I2C_CTXABRT
	.comm	_JZ4780_I2C_CINTR,4,2           ## @JZ4780_I2C_CINTR
	.comm	_JZ4780_I2C_ENB_I2C,2,1         ## @JZ4780_I2C_ENB_I2C
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to disable device during cleanup!\n"

	.comm	_JZ4780_I2C_INTST,4,2           ## @JZ4780_I2C_INTST
L_.str.1:                               ## @.str.1
	.asciz	"device has interrupts after a complete cleanup!\n"

	.no_dead_strip	_jz4780_i2c_cleanup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function jz4780_i2c_cleanup
_jz4780_i2c_cleanup:                    ; @jz4780_i2c_cleanup
	.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, x0
	add	x20, x0, #4
	mov	x0, x20
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x23, _JZ4780_I2C_CTRL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _JZ4780_I2C_CTRL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_jz4780_i2c_readw
Lloh2:
	adrp	x8, _JZ4780_I2C_CTRL_STPHLD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _JZ4780_I2C_CTRL_STPHLD@GOTPAGEOFF]
	ldrh	w8, [x8]
	eor	w8, w8, #0xffff
	and	w2, w0, w8
	ldr	w1, [x23]
	mov	x0, x19
	bl	_jz4780_i2c_writew
Lloh4:
	adrp	x22, _JZ4780_I2C_INTM@GOTPAGE
Lloh5:
	ldr	x22, [x22, _JZ4780_I2C_INTM@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #0
	bl	_jz4780_i2c_writew
Lloh6:
	adrp	x8, _JZ4780_I2C_CTXABRT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _JZ4780_I2C_CTXABRT@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_jz4780_i2c_readw
Lloh9:
	adrp	x8, _JZ4780_I2C_CINTR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _JZ4780_I2C_CINTR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_jz4780_i2c_readw
	ldr	w1, [x23]
	mov	x0, x19
	bl	_jz4780_i2c_readw
Lloh12:
	adrp	x24, _JZ4780_I2C_ENB_I2C@GOTPAGE
Lloh13:
	ldr	x24, [x24, _JZ4780_I2C_ENB_I2C@GOTPAGEOFF]
	ldrh	w8, [x24]
	bic	w21, w0, w8
	ldr	w1, [x23]
	mov	x0, x19
	mov	x2, x21
	bl	_jz4780_i2c_writew
	mov	w0, #10
	bl	_udelay
	ldrh	w8, [x24]
	orr	w8, w8, w21
	ldr	w1, [x23]
	and	w2, w8, #0xffff
	mov	x0, x19
	bl	_jz4780_i2c_writew
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_jz4780_i2c_disable
	mov	x20, x0
	cbz	w0, LBB0_2
; %bb.1:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_2:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_jz4780_i2c_readw
	mov	x21, x0
Lloh16:
	adrp	x8, _JZ4780_I2C_INTST@GOTPAGE
Lloh17:
	ldr	x8, [x8, _JZ4780_I2C_INTST@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_jz4780_i2c_readw
	and	w0, w0, w21
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.3:
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_4:
	mov	x0, x20
	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	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_JZ4780_I2C_CTRL,4,2            ; @JZ4780_I2C_CTRL
	.comm	_JZ4780_I2C_CTRL_STPHLD,2,1     ; @JZ4780_I2C_CTRL_STPHLD
	.comm	_JZ4780_I2C_INTM,4,2            ; @JZ4780_I2C_INTM
	.comm	_JZ4780_I2C_CTXABRT,4,2         ; @JZ4780_I2C_CTXABRT
	.comm	_JZ4780_I2C_CINTR,4,2           ; @JZ4780_I2C_CINTR
	.comm	_JZ4780_I2C_ENB_I2C,2,1         ; @JZ4780_I2C_ENB_I2C
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to disable device during cleanup!\n"

	.comm	_JZ4780_I2C_INTST,4,2           ; @JZ4780_I2C_INTST
l_.str.1:                               ; @.str.1
	.asciz	"device has interrupts after a complete cleanup!\n"

	.no_dead_strip	_jz4780_i2c_cleanup
.subsections_via_symbols
