	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rk3x_i2c_irq
_rk3x_i2c_irq:                          ## @rk3x_i2c_irq
	.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	%rsi, %rbx
	leaq	4(%rsi), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movq	_REG_IPD@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_i2c_readl
	movl	%eax, %r15d
	movl	(%rbx), %edx
	movl	16(%rbx), %edi
	cmpl	$132, %edx
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_warn
	movq	%rbx, %rdi
	callq	_rk3x_i2c_clean_ipd
	jmp	LBB0_12
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %ecx
	callq	_dev_dbg
	movq	_REG_INT_BRF@GOTPCREL(%rip), %rax
	movq	_REG_INT_BTF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	notl	%ecx
	andl	%ecx, %r15d
	movq	_REG_INT_NAKRCV@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	testl	%esi, %r15d
	je	LBB0_5
## %bb.3:
	movl	(%r12), %edx
	movq	%rbx, %rdi
	callq	_i2c_writel
	movl	(%r13), %eax
	notl	%eax
	andl	%eax, %r15d
	movq	8(%rbx), %rax
	movq	_I2C_M_IGNORE_NAK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_5
## %bb.4:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	subl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rk3x_i2c_stop
LBB0_5:
	movq	_REG_INT_ALL@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_12
## %bb.6:
	movl	(%rbx), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_12
## %bb.7:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_9:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_rk3x_i2c_handle_write
	jmp	LBB0_12
LBB0_11:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_rk3x_i2c_handle_stop
	jmp	LBB0_12
LBB0_8:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_rk3x_i2c_handle_start
	jmp	LBB0_12
LBB0_10:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_rk3x_i2c_handle_read
LBB0_12:
	movq	%r14, %rdi
	callq	_spin_unlock
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_11
	.long	L0_0_set_8
	.long	L0_0_set_10
	.end_data_region
                                        ## -- End function
	.comm	_REG_IPD,4,2                    ## @REG_IPD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"irq in STATE_IDLE, ipd = 0x%x\n"

L_.str.1:                               ## @.str.1
	.asciz	"IRQ: state %d, ipd: %x\n"

	.comm	_REG_INT_BRF,4,2                ## @REG_INT_BRF
	.comm	_REG_INT_BTF,4,2                ## @REG_INT_BTF
	.comm	_REG_INT_NAKRCV,4,2             ## @REG_INT_NAKRCV
	.comm	_I2C_M_IGNORE_NAK,4,2           ## @I2C_M_IGNORE_NAK
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_REG_INT_ALL,4,2                ## @REG_INT_ALL
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_rk3x_i2c_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rk3x_i2c_irq
_rk3x_i2c_irq:                          ; @rk3x_i2c_irq
	.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	x20, x1
	add	x19, x1, #4
	mov	x0, x19
	bl	_spin_lock
Lloh0:
	adrp	x22, _REG_IPD@GOTPAGE
Lloh1:
	ldr	x22, [x22, _REG_IPD@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_i2c_readl
	mov	x21, x0
	ldr	w2, [x20]
	ldr	w0, [x20, #16]
	cmp	w2, #132
	b.ne	LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_warn
	mov	x0, x20
	bl	_rk3x_i2c_clean_ipd
	b	LBB0_12
LBB0_2:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, x21
	bl	_dev_dbg
Lloh6:
	adrp	x8, _REG_INT_BRF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG_INT_BRF@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _REG_INT_BTF@GOTPAGE
Lloh10:
	ldr	x9, [x9, _REG_INT_BTF@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w21, w21, w8
Lloh12:
	adrp	x23, _REG_INT_NAKRCV@GOTPAGE
Lloh13:
	ldr	x23, [x23, _REG_INT_NAKRCV@GOTPAGEOFF]
	ldr	w1, [x23]
	tst	w21, w1
	b.eq	LBB0_5
; %bb.3:
	ldr	w2, [x22]
	mov	x0, x20
	bl	_i2c_writel
	ldr	w8, [x23]
	bic	w21, w21, w8
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _I2C_M_IGNORE_NAK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _I2C_M_IGNORE_NAK@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.4:
Lloh17:
	adrp	x8, _ENXIO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w1, w8
	mov	x0, x20
	bl	_rk3x_i2c_stop
LBB0_5:
Lloh20:
	adrp	x8, _REG_INT_ALL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _REG_INT_ALL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_12
; %bb.6:
	ldr	w8, [x20]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_12
; %bb.7:
Lloh23:
	adrp	x9, lJTI0_0@PAGE
Lloh24:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_8
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_8:
	mov	x0, x20
	mov	x1, x21
	bl	_rk3x_i2c_handle_write
	b	LBB0_12
LBB0_9:
	mov	x0, x20
	mov	x1, x21
	bl	_rk3x_i2c_handle_stop
	b	LBB0_12
LBB0_10:
	mov	x0, x20
	mov	x1, x21
	bl	_rk3x_i2c_handle_start
	b	LBB0_12
LBB0_11:
	mov	x0, x20
	mov	x1, x21
	bl	_rk3x_i2c_handle_read
LBB0_12:
	mov	x0, x19
	bl	_spin_unlock
Lloh25:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh26:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	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	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_8)>>2
	.byte	(LBB0_9-LBB0_8)>>2
	.byte	(LBB0_10-LBB0_8)>>2
	.byte	(LBB0_11-LBB0_8)>>2
                                        ; -- End function
	.comm	_REG_IPD,4,2                    ; @REG_IPD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"irq in STATE_IDLE, ipd = 0x%x\n"

l_.str.1:                               ; @.str.1
	.asciz	"IRQ: state %d, ipd: %x\n"

	.comm	_REG_INT_BRF,4,2                ; @REG_INT_BRF
	.comm	_REG_INT_BTF,4,2                ; @REG_INT_BTF
	.comm	_REG_INT_NAKRCV,4,2             ; @REG_INT_NAKRCV
	.comm	_I2C_M_IGNORE_NAK,4,2           ; @I2C_M_IGNORE_NAK
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_REG_INT_ALL,4,2                ; @REG_INT_ALL
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_rk3x_i2c_irq
.subsections_via_symbols
