	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uniphier_fi2c_master_xfer_one
_uniphier_fi2c_master_xfer_one:         ## @uniphier_fi2c_master_xfer_one
	.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	%ecx, %r13d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r14
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_i2c_get_adapdata
	movq	%rax, %rbx
	movq	%rax, %r15
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	andl	(%r14), %r12d
	movl	12(%r14), %eax
	movl	%eax, 40(%rbx)
	movl	8(%r14), %eax
	movl	%eax, 36(%rbx)
	movq	_UNIPHIER_FI2C_INT_FAULTS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
	movq	$0, (%rbx)
	testl	%r13d, %r13d
	je	LBB0_2
## %bb.1:
	movq	_UNIPHIER_FI2C_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
LBB0_2:
	leaq	32(%rbx), %r13
	movq	%r13, %rdi
	callq	_reinit_completion
	movq	_U32_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_uniphier_fi2c_clear_irqs
	movq	_UNIPHIER_FI2C_RST_TBRST@GOTPCREL(%rip), %rax
	movq	_UNIPHIER_FI2C_RST_RBRST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_UNIPHIER_FI2C_RST@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r15), %rsi
	callq	_writel
	addq	$16, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movl	4(%r14), %esi
	movq	%r15, %rdi
	testl	%r12d, %r12d
	je	LBB0_4
## %bb.3:
	callq	_uniphier_fi2c_rx_init
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	testl	%r14d, %r14d
	jne	LBB0_7
LBB0_6:
	movq	_UNIPHIER_FI2C_CR_MST@GOTPCREL(%rip), %rax
	movq	_UNIPHIER_FI2C_CR_STA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_UNIPHIER_FI2C_CR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r15), %rsi
	callq	_writel
LBB0_7:
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movl	4(%r12), %esi
	movq	%r13, %rdi
	callq	_wait_for_completion_timeout
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	$0, 24(%r15)
	movq	%r15, %rdi
	callq	_uniphier_fi2c_set_irqs
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	testq	%r14, %r14
	je	LBB0_8
## %bb.9:
	movq	_UNIPHIER_FI2C_DEFER_STOP_COMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	4(%r15), %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movq	_UNIPHIER_FI2C_SR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r15), %rdi
	xorl	%edx, %edx
	movl	$1, %ecx
	movl	$20, %r8d
	callq	_readl_poll_timeout
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movq	%r15, %rdi
	callq	_uniphier_fi2c_recover
	jmp	LBB0_13
LBB0_4:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edx
	callq	_uniphier_fi2c_tx_init
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	testl	%r14d, %r14d
	jne	LBB0_7
	jmp	LBB0_6
LBB0_8:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movq	%r15, %rdi
	callq	_uniphier_fi2c_recover
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_12:
	movl	(%r15), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_UNIPHIER_FI2C_INT_FAULTS,8,3   ## @UNIPHIER_FI2C_INT_FAULTS
	.comm	_UNIPHIER_FI2C_STOP,4,2         ## @UNIPHIER_FI2C_STOP
	.comm	_U32_MAX,4,2                    ## @U32_MAX
	.comm	_UNIPHIER_FI2C_RST_TBRST,4,2    ## @UNIPHIER_FI2C_RST_TBRST
	.comm	_UNIPHIER_FI2C_RST_RBRST,4,2    ## @UNIPHIER_FI2C_RST_RBRST
	.comm	_UNIPHIER_FI2C_RST,8,3          ## @UNIPHIER_FI2C_RST
	.comm	_UNIPHIER_FI2C_CR_MST,4,2       ## @UNIPHIER_FI2C_CR_MST
	.comm	_UNIPHIER_FI2C_CR_STA,4,2       ## @UNIPHIER_FI2C_CR_STA
	.comm	_UNIPHIER_FI2C_CR,8,3           ## @UNIPHIER_FI2C_CR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"transaction timeout.\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_UNIPHIER_FI2C_DEFER_STOP_COMP,4,2 ## @UNIPHIER_FI2C_DEFER_STOP_COMP
	.comm	_UNIPHIER_FI2C_SR,8,3           ## @UNIPHIER_FI2C_SR
	.comm	_UNIPHIER_FI2C_SR_STS,4,2       ## @UNIPHIER_FI2C_SR_STS
	.comm	_UNIPHIER_FI2C_SR_BB,4,2        ## @UNIPHIER_FI2C_SR_BB
L_.str.1:                               ## @.str.1
	.asciz	"stop condition was not completed.\n"

	.no_dead_strip	_uniphier_fi2c_master_xfer_one
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uniphier_fi2c_master_xfer_one
_uniphier_fi2c_master_xfer_one:         ; @uniphier_fi2c_master_xfer_one
	.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	x22, x3
	mov	x21, x2
	mov	x24, x1
	mov	x20, x0
	bl	_i2c_get_adapdata
	mov	x19, x0
	ldr	w8, [x24]
Lloh0:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w25, w9, w8
	ldr	d0, [x24, #8]
	stur	d0, [x0, #36]
Lloh3:
	adrp	x8, _UNIPHIER_FI2C_INT_FAULTS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UNIPHIER_FI2C_INT_FAULTS@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x0, #24]
	str	xzr, [x0]
	cbz	w22, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _UNIPHIER_FI2C_STOP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _UNIPHIER_FI2C_STOP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #4]
LBB0_2:
	add	x22, x19, #32
	mov	x0, x22
	bl	_reinit_completion
Lloh9:
	adrp	x8, _U32_MAX@GOTPAGE
Lloh10:
	ldr	x8, [x8, _U32_MAX@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_uniphier_fi2c_clear_irqs
Lloh12:
	adrp	x8, _UNIPHIER_FI2C_RST_TBRST@GOTPAGE
Lloh13:
	ldr	x8, [x8, _UNIPHIER_FI2C_RST_TBRST@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _UNIPHIER_FI2C_RST_RBRST@GOTPAGE
Lloh16:
	ldr	x9, [x9, _UNIPHIER_FI2C_RST_RBRST@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w0, w9, w8
	ldr	x8, [x19, #8]
Lloh18:
	adrp	x9, _UNIPHIER_FI2C_RST@GOTPAGE
Lloh19:
	ldr	x9, [x9, _UNIPHIER_FI2C_RST@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	add	x23, x19, #16
	mov	x0, x23
	bl	_spin_lock_irqsave
	ldr	w1, [x24, #4]
	mov	x0, x19
	cbz	w25, LBB0_9
; %bb.3:
	bl	_uniphier_fi2c_rx_init
	cbnz	w21, LBB0_5
LBB0_4:
Lloh21:
	adrp	x8, _UNIPHIER_FI2C_CR_MST@GOTPAGE
Lloh22:
	ldr	x8, [x8, _UNIPHIER_FI2C_CR_MST@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _UNIPHIER_FI2C_CR_STA@GOTPAGE
Lloh25:
	ldr	x9, [x9, _UNIPHIER_FI2C_CR_STA@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w0, w9, w8
	ldr	x8, [x19, #8]
Lloh27:
	adrp	x9, _UNIPHIER_FI2C_CR@GOTPAGE
Lloh28:
	ldr	x9, [x9, _UNIPHIER_FI2C_CR@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
LBB0_5:
	mov	x0, x23
	bl	_spin_unlock_irqrestore
	ldr	w1, [x20, #4]
	mov	x0, x22
	bl	_wait_for_completion_timeout
	mov	x21, x0
	mov	x0, x23
	bl	_spin_lock_irqsave
	str	xzr, [x19, #24]
	mov	x0, x19
	bl	_uniphier_fi2c_set_irqs
	mov	x0, x23
	bl	_spin_unlock_irqrestore
	cbz	x21, LBB0_10
; %bb.6:
	ldr	w8, [x19, #4]
Lloh30:
	adrp	x9, _UNIPHIER_FI2C_DEFER_STOP_COMP@GOTPAGE
Lloh31:
	ldr	x9, [x9, _UNIPHIER_FI2C_DEFER_STOP_COMP@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	and	w0, w9, w8
	bl	_unlikely
	cbz	x0, LBB0_11
; %bb.7:
	ldr	x8, [x19, #8]
Lloh33:
	adrp	x9, _UNIPHIER_FI2C_SR@GOTPAGE
Lloh34:
	ldr	x9, [x9, _UNIPHIER_FI2C_SR@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	add	x0, x9, x8
	mov	w2, #0
	mov	w3, #1
	mov	w4, #20
	bl	_readl_poll_timeout
	cbz	w0, LBB0_11
; %bb.8:
	mov	x21, x0
Lloh36:
	adrp	x1, l_.str.1@PAGE
Lloh37:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	mov	x0, x19
	bl	_uniphier_fi2c_recover
	b	LBB0_12
LBB0_9:
	mov	x2, x21
	bl	_uniphier_fi2c_tx_init
	cbnz	w21, LBB0_5
	b	LBB0_4
LBB0_10:
Lloh38:
	adrp	x1, l_.str@PAGE
Lloh39:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	mov	x0, x19
	bl	_uniphier_fi2c_recover
Lloh40:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh41:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_12
LBB0_11:
	ldr	w21, [x19]
LBB0_12:
	mov	x0, x21
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_UNIPHIER_FI2C_INT_FAULTS,8,3   ; @UNIPHIER_FI2C_INT_FAULTS
	.comm	_UNIPHIER_FI2C_STOP,4,2         ; @UNIPHIER_FI2C_STOP
	.comm	_U32_MAX,4,2                    ; @U32_MAX
	.comm	_UNIPHIER_FI2C_RST_TBRST,4,2    ; @UNIPHIER_FI2C_RST_TBRST
	.comm	_UNIPHIER_FI2C_RST_RBRST,4,2    ; @UNIPHIER_FI2C_RST_RBRST
	.comm	_UNIPHIER_FI2C_RST,8,3          ; @UNIPHIER_FI2C_RST
	.comm	_UNIPHIER_FI2C_CR_MST,4,2       ; @UNIPHIER_FI2C_CR_MST
	.comm	_UNIPHIER_FI2C_CR_STA,4,2       ; @UNIPHIER_FI2C_CR_STA
	.comm	_UNIPHIER_FI2C_CR,8,3           ; @UNIPHIER_FI2C_CR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"transaction timeout.\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_UNIPHIER_FI2C_DEFER_STOP_COMP,4,2 ; @UNIPHIER_FI2C_DEFER_STOP_COMP
	.comm	_UNIPHIER_FI2C_SR,8,3           ; @UNIPHIER_FI2C_SR
	.comm	_UNIPHIER_FI2C_SR_STS,4,2       ; @UNIPHIER_FI2C_SR_STS
	.comm	_UNIPHIER_FI2C_SR_BB,4,2        ; @UNIPHIER_FI2C_SR_BB
l_.str.1:                               ; @.str.1
	.asciz	"stop condition was not completed.\n"

	.no_dead_strip	_uniphier_fi2c_master_xfer_one
.subsections_via_symbols
