	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rcar_i2c_master_xfer
_rcar_i2c_master_xfer:                  ## @rcar_i2c_master_xfer
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	callq	_i2c_get_adapdata
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_rcar_i2c_priv_to_dev
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_pm_runtime_get_sync
	movq	%rbx, %rdi
	callq	_rcar_i2c_bus_barrier
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rax
	movq	_I2C_RCAR_GEN3@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.3:
	movq	_ID_P_NO_RXDMA@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	orl	%eax, 8(%rbx)
	movl	40(%rbx), %edi
	callq	_IS_ERR
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movq	%rbx, %rdi
	callq	_rcar_i2c_do_reset
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movl	(%r13), %eax
	notl	%eax
	andl	%eax, 8(%rbx)
LBB0_6:
	movq	%rbx, %rdi
	callq	_rcar_i2c_init
	testl	%r14d, %r14d
	jle	LBB0_9
## %bb.7:
	movl	%r14d, %r15d
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_rcar_i2c_request_dma
	addq	$4, %r13
	decq	%r15
	jne	LBB0_8
LBB0_9:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 32(%rbx)
	movl	%r14d, 12(%rbx)
	movq	_ID_P_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	8(%rbx), %eax
	movq	_ID_FIRST_MSG@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_rcar_i2c_prepare_msg
	movl	24(%rbx), %edi
	movq	_ID_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	8(%rbx), %esi
	movl	(%r12), %edx
	imull	%r14d, %edx
	callq	_wait_event_timeout
	movq	%rax, %r15
	movq	16(%rbx), %rax
	movq	_DMA_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	callq	_rcar_i2c_cleanup_dma
LBB0_11:
	testq	%r15, %r15
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_12
## %bb.13:
	movl	8(%rbx), %eax
	movq	_ID_NACK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_15
## %bb.14:
	xorl	%r14d, %r14d
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_1:
	movl	%eax, %r13d
	movq	%r15, %rdi
	callq	_pm_runtime_put
	movl	%r13d, %r14d
	movq	%r15, %r12
	jmp	LBB0_19
LBB0_12:
	movq	%rbx, %rdi
	callq	_rcar_i2c_init
	xorl	%r14d, %r14d
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_15:
	movq	_ID_ARBLOST@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_16
## %bb.17:
	xorl	%r14d, %r14d
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_16:
	movq	%rbx, %rax
	addq	$12, %rax
LBB0_18:
	movl	(%rax), %r15d
	movq	%r12, %rdi
	callq	_pm_runtime_put
	subl	%r15d, %r14d
	jns	LBB0_21
LBB0_19:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r14d, %eax
	je	LBB0_21
## %bb.20:
	movl	8(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_dev_err
LBB0_21:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_RCAR_GEN3,8,3              ## @I2C_RCAR_GEN3
	.comm	_ID_P_NO_RXDMA,4,2              ## @ID_P_NO_RXDMA
	.comm	_ID_P_MASK,4,2                  ## @ID_P_MASK
	.comm	_ID_FIRST_MSG,4,2               ## @ID_FIRST_MSG
	.comm	_ID_DONE,4,2                    ## @ID_DONE
	.comm	_DMA_NONE,8,3                   ## @DMA_NONE
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_ID_NACK,4,2                    ## @ID_NACK
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_ID_ARBLOST,4,2                 ## @ID_ARBLOST
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error %d : %x\n"

	.no_dead_strip	_rcar_i2c_master_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rcar_i2c_master_xfer
_rcar_i2c_master_xfer:                  ; @rcar_i2c_master_xfer
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x2
	mov	x23, x1
	mov	x22, x0
	bl	_i2c_get_adapdata
	mov	x19, x0
	bl	_rcar_i2c_priv_to_dev
	mov	x20, x0
	bl	_pm_runtime_get_sync
	mov	x0, x19
	bl	_rcar_i2c_bus_barrier
	tbnz	w0, #31, LBB0_13
; %bb.1:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _I2C_RCAR_GEN3@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I2C_RCAR_GEN3@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
Lloh3:
	adrp	x24, _ID_P_NO_RXDMA@GOTPAGE
Lloh4:
	ldr	x24, [x24, _ID_P_NO_RXDMA@GOTPAGEOFF]
	ldr	w8, [x24]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	ldr	w0, [x19, #40]
	bl	_IS_ERR
	cbnz	w0, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_rcar_i2c_do_reset
	cbnz	w0, LBB0_5
; %bb.4:
	ldr	w8, [x24]
	ldr	w9, [x19, #8]
	bic	w8, w9, w8
	str	w8, [x19, #8]
LBB0_5:
	mov	x0, x19
	bl	_rcar_i2c_init
	cmp	w21, #1
	b.lt	LBB0_8
; %bb.6:
	mov	w25, w21
	mov	x24, x23
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x24
	bl	_rcar_i2c_request_dma
	add	x24, x24, #4
	subs	x25, x25, #1
	b.ne	LBB0_7
LBB0_8:
	str	x23, [x19, #32]
	mov	x23, x19
	str	w21, [x23, #12]!
	ldr	w8, [x19, #8]
Lloh5:
	adrp	x9, _ID_P_MASK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ID_P_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh8:
	adrp	x9, _ID_FIRST_MSG@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ID_FIRST_MSG@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #8]
	mov	x0, x19
	bl	_rcar_i2c_prepare_msg
	ldr	w0, [x19, #24]
	ldr	w8, [x19, #8]
Lloh11:
	adrp	x9, _ID_DONE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ID_DONE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	and	w1, w9, w8
	ldr	w8, [x22]
	mul	w2, w8, w21
	bl	_wait_event_timeout
	mov	x22, x0
	ldr	x8, [x19, #16]
Lloh14:
	adrp	x9, _DMA_NONE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DMA_NONE@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_rcar_i2c_cleanup_dma
LBB0_10:
	cbz	x22, LBB0_14
; %bb.11:
	ldr	w8, [x19, #8]
Lloh17:
	adrp	x9, _ID_NACK@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ID_NACK@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.12:
	mov	w8, #0
Lloh20:
	adrp	x9, _ENXIO@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ENXIO@GOTPAGEOFF]
	b	LBB0_16
LBB0_13:
	mov	x24, x0
	mov	x0, x20
	bl	_pm_runtime_put
	b	LBB0_17
LBB0_14:
	mov	x0, x19
	bl	_rcar_i2c_init
	mov	w8, #0
Lloh22:
	adrp	x9, _ETIMEDOUT@GOTPAGE
Lloh23:
	ldr	x9, [x9, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
Lloh24:
	adrp	x9, _ID_ARBLOST@GOTPAGE
Lloh25:
	ldr	x9, [x9, _ID_ARBLOST@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
Lloh27:
	adrp	x10, _EAGAIN@GOTPAGE
Lloh28:
	ldr	x10, [x10, _EAGAIN@GOTPAGEOFF]
	tst	w9, w8
	csel	x9, x23, x10, eq
	csel	w8, w21, wzr, eq
LBB0_16:
	ldr	w9, [x9]
	sub	w24, w8, w9
	mov	x0, x20
	bl	_pm_runtime_put
	tbz	w24, #31, LBB0_19
LBB0_17:
Lloh29:
	adrp	x8, _ENXIO@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	cmn	w24, w8
	b.eq	LBB0_19
; %bb.18:
	ldr	w3, [x19, #8]
Lloh32:
	adrp	x1, l_.str@PAGE
Lloh33:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x24
	bl	_dev_err
LBB0_19:
	mov	x0, x24
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_RCAR_GEN3,8,3              ; @I2C_RCAR_GEN3
	.comm	_ID_P_NO_RXDMA,4,2              ; @ID_P_NO_RXDMA
	.comm	_ID_P_MASK,4,2                  ; @ID_P_MASK
	.comm	_ID_FIRST_MSG,4,2               ; @ID_FIRST_MSG
	.comm	_ID_DONE,4,2                    ; @ID_DONE
	.comm	_DMA_NONE,8,3                   ; @DMA_NONE
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_ID_NACK,4,2                    ; @ID_NACK
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_ID_ARBLOST,4,2                 ; @ID_ARBLOST
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error %d : %x\n"

	.no_dead_strip	_rcar_i2c_master_xfer
.subsections_via_symbols
