	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rcar_i2c_irq_recv
_rcar_i2c_irq_recv:                     ## @rcar_i2c_irq_recv
	.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
	movq	_MDR@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_12
## %bb.1:
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movq	_MAT@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_rcar_i2c_dma
	movl	(%rbx), %eax
	jmp	LBB0_5
LBB0_12:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	movl	(%rbx), %eax
	cmpl	(%r14), %eax
	jge	LBB0_5
## %bb.4:
	movq	_ICRXTX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rcar_i2c_read
	movq	8(%r14), %rcx
	movslq	(%rbx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movl	(%rbx), %eax
	incl	%eax
	movl	%eax, (%rbx)
LBB0_5:
	incl	%eax
	cmpl	(%r14), %eax
	jne	LBB0_9
## %bb.6:
	movq	_ID_LAST_MSG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_ICMCR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	testl	%eax, 4(%rbx)
	je	LBB0_8
## %bb.7:
	movq	_RCAR_BUS_PHASE_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_rcar_i2c_write
	jmp	LBB0_9
LBB0_8:
	movq	_RCAR_BUS_PHASE_START@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_rcar_i2c_write
	movq	_ID_P_REP_AFTER_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
LBB0_9:
	movl	(%rbx), %eax
	cmpl	(%r14), %eax
	jne	LBB0_11
## %bb.10:
	movq	_ID_LAST_MSG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	je	LBB0_13
LBB0_11:
	movq	_ICMSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RCAR_IRQ_ACK_RECV@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_rcar_i2c_write                 ## TAILCALL
LBB0_13:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_rcar_i2c_next_msg              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MDR,4,2                        ## @MDR
	.comm	_MAT,4,2                        ## @MAT
	.comm	_ICRXTX,4,2                     ## @ICRXTX
	.comm	_ID_LAST_MSG,4,2                ## @ID_LAST_MSG
	.comm	_ICMCR,4,2                      ## @ICMCR
	.comm	_RCAR_BUS_PHASE_STOP,4,2        ## @RCAR_BUS_PHASE_STOP
	.comm	_RCAR_BUS_PHASE_START,4,2       ## @RCAR_BUS_PHASE_START
	.comm	_ID_P_REP_AFTER_RD,4,2          ## @ID_P_REP_AFTER_RD
	.comm	_ICMSR,4,2                      ## @ICMSR
	.comm	_RCAR_IRQ_ACK_RECV,4,2          ## @RCAR_IRQ_ACK_RECV
	.no_dead_strip	_rcar_i2c_irq_recv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rcar_i2c_irq_recv
_rcar_i2c_irq_recv:                     ; @rcar_i2c_irq_recv
	.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
Lloh0:
	adrp	x8, _MDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MDR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x20, [x0, #8]
Lloh3:
	adrp	x8, _MAT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_rcar_i2c_dma
	ldr	w8, [x19]
	b	LBB0_6
LBB0_3:
	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_4:
	ldr	w8, [x19]
	ldr	w9, [x20]
	cmp	w8, w9
	b.ge	LBB0_6
; %bb.5:
Lloh6:
	adrp	x8, _ICRXTX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ICRXTX@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rcar_i2c_read
	ldr	x8, [x20, #8]
	ldrsw	x9, [x19]
	str	w0, [x8, x9, lsl #2]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
LBB0_6:
	add	w8, w8, #1
	ldr	w9, [x20]
Lloh9:
	adrp	x21, _ID_LAST_MSG@GOTPAGE
Lloh10:
	ldr	x21, [x21, _ID_LAST_MSG@GOTPAGEOFF]
	cmp	w8, w9
	b.ne	LBB0_10
; %bb.7:
	ldr	w8, [x19, #4]
	ldr	w9, [x21]
Lloh11:
	adrp	x10, _ICMCR@GOTPAGE
Lloh12:
	ldr	x10, [x10, _ICMCR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x10]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
Lloh14:
	adrp	x8, _RCAR_BUS_PHASE_STOP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RCAR_BUS_PHASE_STOP@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_rcar_i2c_write
	b	LBB0_10
LBB0_9:
Lloh17:
	adrp	x8, _RCAR_BUS_PHASE_START@GOTPAGE
Lloh18:
	ldr	x8, [x8, _RCAR_BUS_PHASE_START@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_rcar_i2c_write
Lloh20:
	adrp	x8, _ID_P_REP_AFTER_RD@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ID_P_REP_AFTER_RD@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_10:
	ldr	w8, [x19]
	ldr	w9, [x20]
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.11:
	ldr	w8, [x19, #4]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_13
LBB0_12:
Lloh23:
	adrp	x8, _ICMSR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ICMSR@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x8, _RCAR_IRQ_ACK_RECV@GOTPAGE
Lloh27:
	ldr	x8, [x8, _RCAR_IRQ_ACK_RECV@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	mov	x0, x19
	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
	b	_rcar_i2c_write
LBB0_13:
	mov	x0, x19
	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
	b	_rcar_i2c_next_msg
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_MDR,4,2                        ; @MDR
	.comm	_MAT,4,2                        ; @MAT
	.comm	_ICRXTX,4,2                     ; @ICRXTX
	.comm	_ID_LAST_MSG,4,2                ; @ID_LAST_MSG
	.comm	_ICMCR,4,2                      ; @ICMCR
	.comm	_RCAR_BUS_PHASE_STOP,4,2        ; @RCAR_BUS_PHASE_STOP
	.comm	_RCAR_BUS_PHASE_START,4,2       ; @RCAR_BUS_PHASE_START
	.comm	_ID_P_REP_AFTER_RD,4,2          ; @ID_P_REP_AFTER_RD
	.comm	_ICMSR,4,2                      ; @ICMSR
	.comm	_RCAR_IRQ_ACK_RECV,4,2          ; @RCAR_IRQ_ACK_RECV
	.no_dead_strip	_rcar_i2c_irq_recv
.subsections_via_symbols
