	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rcar_i2c_prepare_msg
_rcar_i2c_prepare_msg:                  ## @rcar_i2c_prepare_msg
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_rcar_i2c_is_recv
	movl	%eax, %r14d
	movq	$0, 16(%rbx)
	cmpl	$1, (%rbx)
	jne	LBB0_2
## %bb.1:
	movq	_ID_LAST_MSG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
LBB0_2:
	movq	_ICMAR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	8(%rbx), %edi
	callq	_i2c_8bit_addr_from_msg
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_rcar_i2c_write
	movl	4(%rbx), %eax
	movq	_ID_FIRST_MSG@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	movq	_ICMSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_rcar_i2c_write
	movq	_RCAR_BUS_PHASE_START@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ICMCR@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_4:
	movq	_ID_P_REP_AFTER_RD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_6
## %bb.5:
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, 4(%rbx)
	jmp	LBB0_7
LBB0_6:
	movq	_ICMCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RCAR_BUS_PHASE_START@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_rcar_i2c_write
LBB0_7:
	movq	_ICMSR@GOTPCREL(%rip), %rax
	xorl	%edx, %edx
LBB0_8:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rcar_i2c_write
	movq	_ICMIER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%r14d, %r14d
	jne	LBB0_9
## %bb.10:
	movq	_RCAR_IRQ_SEND@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_9:
	movq	_RCAR_IRQ_RECV@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %edx
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rcar_i2c_write                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ID_LAST_MSG,4,2                ## @ID_LAST_MSG
	.comm	_ICMAR,4,2                      ## @ICMAR
	.comm	_ID_FIRST_MSG,4,2               ## @ID_FIRST_MSG
	.comm	_ICMSR,4,2                      ## @ICMSR
	.comm	_ICMCR,4,2                      ## @ICMCR
	.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	_ICMIER,4,2                     ## @ICMIER
	.comm	_RCAR_IRQ_RECV,4,2              ## @RCAR_IRQ_RECV
	.comm	_RCAR_IRQ_SEND,4,2              ## @RCAR_IRQ_SEND
	.no_dead_strip	_rcar_i2c_prepare_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rcar_i2c_prepare_msg
_rcar_i2c_prepare_msg:                  ; @rcar_i2c_prepare_msg
	.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
	mov	x19, x0
	bl	_rcar_i2c_is_recv
	mov	x20, x0
	str	xzr, [x19, #16]
	ldr	w8, [x19]
	cmp	w8, #1
	b.ne	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ID_LAST_MSG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ID_LAST_MSG@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_2:
Lloh3:
	adrp	x8, _ICMAR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ICMAR@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	ldr	w0, [x19, #8]
	bl	_i2c_8bit_addr_from_msg
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_rcar_i2c_write
	ldr	w8, [x19, #4]
Lloh6:
	adrp	x9, _ID_FIRST_MSG@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ID_FIRST_MSG@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _ICMSR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ICMSR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_rcar_i2c_write
Lloh12:
	adrp	x8, _RCAR_BUS_PHASE_START@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RCAR_BUS_PHASE_START@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
Lloh15:
	adrp	x8, _ICMCR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ICMCR@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
Lloh17:
	adrp	x9, _ID_P_REP_AFTER_RD@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ID_P_REP_AFTER_RD@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	mov	w2, #0
	bic	w8, w8, w9
	str	w8, [x19, #4]
	b	LBB0_7
LBB0_6:
Lloh20:
	adrp	x8, _ICMCR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ICMCR@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x8, _RCAR_BUS_PHASE_START@GOTPAGE
Lloh24:
	ldr	x8, [x8, _RCAR_BUS_PHASE_START@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_rcar_i2c_write
	mov	w2, #0
LBB0_7:
Lloh26:
	adrp	x8, _ICMSR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ICMSR@GOTPAGEOFF]
LBB0_8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rcar_i2c_write
Lloh28:
	adrp	x8, _ICMIER@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ICMIER@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
Lloh31:
	adrp	x8, _RCAR_IRQ_RECV@GOTPAGE
Lloh32:
	ldr	x8, [x8, _RCAR_IRQ_RECV@GOTPAGEOFF]
Lloh33:
	adrp	x9, _RCAR_IRQ_SEND@GOTPAGE
Lloh34:
	ldr	x9, [x9, _RCAR_IRQ_SEND@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x9, x8, eq
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_ID_LAST_MSG,4,2                ; @ID_LAST_MSG
	.comm	_ICMAR,4,2                      ; @ICMAR
	.comm	_ID_FIRST_MSG,4,2               ; @ID_FIRST_MSG
	.comm	_ICMSR,4,2                      ; @ICMSR
	.comm	_ICMCR,4,2                      ; @ICMCR
	.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	_ICMIER,4,2                     ; @ICMIER
	.comm	_RCAR_IRQ_RECV,4,2              ; @RCAR_IRQ_RECV
	.comm	_RCAR_IRQ_SEND,4,2              ; @RCAR_IRQ_SEND
	.no_dead_strip	_rcar_i2c_prepare_msg
.subsections_via_symbols
