	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rk3x_i2c_handle_start
_rk3x_i2c_handle_start:                 ## @rk3x_i2c_handle_start
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_REG_INT_START@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%r14d, %esi
	je	LBB0_3
## %bb.1:
	movq	_REG_IPD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_i2c_writel
	movq	_REG_CON@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_i2c_readl
	movq	_REG_CON_START@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%r14), %edx
	movq	%rbx, %rdi
	callq	_i2c_writel
	movq	(%rbx), %rax
	movq	_REG_CON_MOD_TX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.4:
	movq	_REG_INT_MBTF@GOTPCREL(%rip), %rax
	movq	_REG_INT_NAKRCV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_REG_IEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_i2c_writel
	movq	_STATE_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_rk3x_i2c_fill_transmit_buf     ## TAILCALL
LBB0_3:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	subl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rk3x_i2c_stop
	movl	12(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_warn
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_rk3x_i2c_clean_ipd             ## TAILCALL
LBB0_2:
	movq	_REG_INT_MBRF@GOTPCREL(%rip), %rax
	movq	_REG_INT_NAKRCV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_REG_IEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_i2c_writel
	movq	_STATE_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_rk3x_i2c_prepare_read          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_INT_START,4,2              ## @REG_INT_START
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unexpected irq in START: 0x%x\n"

	.comm	_REG_IPD,4,2                    ## @REG_IPD
	.comm	_REG_CON,4,2                    ## @REG_CON
	.comm	_REG_CON_START,4,2              ## @REG_CON_START
	.comm	_REG_CON_MOD_TX,8,3             ## @REG_CON_MOD_TX
	.comm	_REG_INT_MBTF,4,2               ## @REG_INT_MBTF
	.comm	_REG_INT_NAKRCV,4,2             ## @REG_INT_NAKRCV
	.comm	_REG_IEN,4,2                    ## @REG_IEN
	.comm	_STATE_WRITE,4,2                ## @STATE_WRITE
	.comm	_REG_INT_MBRF,4,2               ## @REG_INT_MBRF
	.comm	_STATE_READ,4,2                 ## @STATE_READ
	.no_dead_strip	_rk3x_i2c_handle_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rk3x_i2c_handle_start
_rk3x_i2c_handle_start:                 ; @rk3x_i2c_handle_start
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _REG_INT_START@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_INT_START@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	tst	w1, w20
	b.eq	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _REG_IPD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_IPD@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_i2c_writel
Lloh6:
	adrp	x20, _REG_CON@GOTPAGE
Lloh7:
	ldr	x20, [x20, _REG_CON@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_i2c_readl
Lloh8:
	adrp	x8, _REG_CON_START@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REG_CON_START@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	bic	w1, w0, w8
	ldr	w2, [x20]
	mov	x0, x19
	bl	_i2c_writel
	ldr	x8, [x19]
Lloh11:
	adrp	x9, _REG_CON_MOD_TX@GOTPAGE
Lloh12:
	ldr	x9, [x9, _REG_CON_MOD_TX@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
Lloh14:
	adrp	x8, _REG_INT_MBTF@GOTPAGE
Lloh15:
	ldr	x8, [x8, _REG_INT_MBTF@GOTPAGEOFF]
Lloh16:
	adrp	x9, _REG_INT_NAKRCV@GOTPAGE
Lloh17:
	ldr	x9, [x9, _REG_INT_NAKRCV@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh20:
	adrp	x8, _REG_IEN@GOTPAGE
Lloh21:
	ldr	x8, [x8, _REG_IEN@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_i2c_writel
Lloh23:
	adrp	x8, _STATE_WRITE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _STATE_WRITE@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_rk3x_i2c_fill_transmit_buf
LBB0_3:
Lloh26:
	adrp	x8, _EIO@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w1, w8
	mov	x0, x19
	bl	_rk3x_i2c_stop
	ldr	w0, [x19, #12]
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_warn
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_rk3x_i2c_clean_ipd
LBB0_4:
Lloh31:
	adrp	x8, _REG_INT_MBRF@GOTPAGE
Lloh32:
	ldr	x8, [x8, _REG_INT_MBRF@GOTPAGEOFF]
Lloh33:
	adrp	x9, _REG_INT_NAKRCV@GOTPAGE
Lloh34:
	ldr	x9, [x9, _REG_INT_NAKRCV@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
Lloh36:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh37:
	adrp	x8, _REG_IEN@GOTPAGE
Lloh38:
	ldr	x8, [x8, _REG_IEN@GOTPAGEOFF]
Lloh39:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_i2c_writel
Lloh40:
	adrp	x8, _STATE_READ@GOTPAGE
Lloh41:
	ldr	x8, [x8, _STATE_READ@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_rk3x_i2c_prepare_read
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh18
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_INT_START,4,2              ; @REG_INT_START
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unexpected irq in START: 0x%x\n"

	.comm	_REG_IPD,4,2                    ; @REG_IPD
	.comm	_REG_CON,4,2                    ; @REG_CON
	.comm	_REG_CON_START,4,2              ; @REG_CON_START
	.comm	_REG_CON_MOD_TX,8,3             ; @REG_CON_MOD_TX
	.comm	_REG_INT_MBTF,4,2               ; @REG_INT_MBTF
	.comm	_REG_INT_NAKRCV,4,2             ; @REG_INT_NAKRCV
	.comm	_REG_IEN,4,2                    ; @REG_IEN
	.comm	_STATE_WRITE,4,2                ; @STATE_WRITE
	.comm	_REG_INT_MBRF,4,2               ; @REG_INT_MBRF
	.comm	_STATE_READ,4,2                 ; @STATE_READ
	.no_dead_strip	_rk3x_i2c_handle_start
.subsections_via_symbols
