	.file	"extr_i2c-sirf.c_i2c_sirfsoc_xfer_msg.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Transfer timeout\n"
	.text
	.p2align 4
	.type	i2c_sirfsoc_xfer_msg, @function
i2c_sirfsoc_xfer_msg:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rdi, QWORD PTR SIRFSOC_I2C_CTRL[rip]
	add	rdi, QWORD PTR 8[rbx]
	call	readl@PLT
	mov	ebp, eax
	mov	eax, DWORD PTR [r12]
	lea	edi, 1[rax]
	imul	edi, edi, 50
	call	msecs_to_jiffies@PLT
	mov	rsi, r12
	mov	rdi, rbx
	mov	r13d, eax
	call	i2c_sirfsoc_set_address@PLT
	mov	edi, DWORD PTR SIRFSOC_I2C_CMD_DONE_EN[rip]
	or	edi, DWORD PTR SIRFSOC_I2C_ERR_INT_EN[rip]
	or	edi, ebp
	mov	rsi, QWORD PTR SIRFSOC_I2C_CTRL[rip]
	add	rsi, QWORD PTR 8[rbx]
	call	writel@PLT
	mov	rdi, rbx
	call	i2c_sirfsoc_queue_cmd@PLT
	lea	rdi, 20[rbx]
	mov	esi, r13d
	call	wait_for_completion_timeout@PLT
	test	rax, rax
	je	.L11
.L2:
	mov	edi, DWORD PTR SIRFSOC_I2C_CMD_DONE_EN[rip]
	or	edi, DWORD PTR SIRFSOC_I2C_ERR_INT_EN[rip]
	not	edi
	mov	rsi, QWORD PTR SIRFSOC_I2C_CTRL[rip]
	add	rsi, QWORD PTR 8[rbx]
	and	edi, ebp
	call	writel@PLT
	mov	rsi, QWORD PTR SIRFSOC_I2C_CMD_START[rip]
	xor	edi, edi
	add	rsi, QWORD PTR 8[rbx]
	call	writel@PLT
	mov	rdx, QWORD PTR [rbx]
	cmp	rdx, QWORD PTR SIRFSOC_I2C_ERR_TIMEOUT[rip]
	je	.L12
.L3:
	xor	eax, eax
	test	rdx, rdx
	je	.L1
	mov	eax, DWORD PTR EAGAIN[rip]
	neg	eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	rax, QWORD PTR SIRFSOC_I2C_ERR_TIMEOUT[rip]
	lea	rdi, 16[rbx]
	lea	rsi, .LC0[rip]
	mov	QWORD PTR [rbx], rax
	call	dev_err@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rbp, QWORD PTR SIRFSOC_I2C_CTRL[rip]
	add	rbp, QWORD PTR 8[rbx]
	mov	rdi, rbp
	call	readl@PLT
	or	eax, DWORD PTR SIRFSOC_I2C_RESET[rip]
	mov	rsi, rbp
	mov	edi, eax
	call	writel@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	xor	eax, eax
	call	cpu_relax@PLT
.L4:
	mov	rdi, QWORD PTR SIRFSOC_I2C_CTRL[rip]
	add	rdi, QWORD PTR 8[rbx]
	call	readl@PLT
	test	DWORD PTR SIRFSOC_I2C_RESET[rip], eax
	jne	.L5
	mov	rdx, QWORD PTR [rbx]
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	i2c_sirfsoc_xfer_msg, .-i2c_sirfsoc_xfer_msg
	.comm	SIRFSOC_I2C_RESET,4,4
	.comm	SIRFSOC_I2C_ERR_TIMEOUT,8,8
	.comm	SIRFSOC_I2C_ERR_INT_EN,4,4
	.comm	SIRFSOC_I2C_CTRL,8,8
	.comm	SIRFSOC_I2C_CMD_START,8,8
	.comm	SIRFSOC_I2C_CMD_DONE_EN,4,4
	.comm	EAGAIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_i2c-sirf.c_i2c_sirfsoc_xfer_msg.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Transfer timeout\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	i2c_sirfsoc_xfer_msg, %function
i2c_sirfsoc_xfer_msg:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r8, r1
	ldr	r5, .L15
	mov	r4, r0
	ldr	r3, [r5]
	ldr	r0, [r0, #4]
	ldr	r7, .L15+4
	add	r0, r0, r3
	bl	readl
	ldr	r3, [r8]
	mov	r6, r0
	add	r3, r3, #1
	add	r3, r3, r3, lsl #2
	add	r3, r3, r3, lsl #2
	lsl	r0, r3, #1
	bl	msecs_to_jiffies
	mov	r3, r0
	mov	r1, r8
	mov	r8, r3
	ldr	r9, .L15+8
	mov	r0, r4
	bl	i2c_sirfsoc_set_address
	ldr	r2, [r9]
	ldr	r0, [r7]
	ldr	r3, [r5]
	ldr	r1, [r4, #4]
	orr	r0, r0, r2
	add	r1, r1, r3
	orr	r0, r0, r6
	bl	writel
	mov	r0, r4
	bl	i2c_sirfsoc_queue_cmd
	mov	r1, r8
	add	r0, r4, #12
	bl	wait_for_completion_timeout
	cmp	r0, #0
	beq	.L11
	ldr	r8, .L15+12
.L2:
	ldr	r3, [r9]
	ldr	r0, [r7]
	ldr	r1, [r4, #4]
	orr	r0, r0, r3
	ldr	r3, [r5]
	bic	r0, r6, r0
	add	r1, r1, r3
	bl	writel
	ldr	r3, .L15+16
	ldr	r1, [r4, #4]
	ldr	r3, [r3]
	mov	r0, #0
	add	r1, r1, r3
	bl	writel
	ldr	r3, [r8]
	ldr	r0, [r4]
	cmp	r0, r3
	beq	.L14
.L3:
	cmp	r0, #0
	ldrne	r3, .L15+20
	ldrne	r0, [r3]
	rsbne	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L11:
	mov	r0, r4
	ldr	r8, .L15+12
	ldr	r1, .L15+24
	ldr	r3, [r8]
	str	r3, [r0], #8
	bl	dev_err
	b	.L2
.L14:
	ldr	r3, [r5]
	ldr	r0, [r4, #4]
	ldr	r6, .L15+28
	add	r0, r0, r3
	bl	readl
	ldr	r2, [r6]
	ldr	r1, [r4, #4]
	ldr	r3, [r5]
	orr	r0, r0, r2
	add	r1, r1, r3
	bl	writel
	b	.L4
.L5:
	bl	cpu_relax
.L4:
	ldr	r3, [r5]
	ldr	r0, [r4, #4]
	add	r0, r0, r3
	bl	readl
	ldr	r3, [r6]
	tst	r0, r3
	bne	.L5
	ldr	r0, [r4]
	b	.L3
.L16:
	.align	2
.L15:
	.word	SIRFSOC_I2C_CTRL
	.word	SIRFSOC_I2C_CMD_DONE_EN
	.word	SIRFSOC_I2C_ERR_INT_EN
	.word	SIRFSOC_I2C_ERR_TIMEOUT
	.word	SIRFSOC_I2C_CMD_START
	.word	EAGAIN
	.word	.LC0
	.word	SIRFSOC_I2C_RESET
	.size	i2c_sirfsoc_xfer_msg, .-i2c_sirfsoc_xfer_msg
	.comm	SIRFSOC_I2C_RESET,4,4
	.comm	SIRFSOC_I2C_ERR_TIMEOUT,4,4
	.comm	SIRFSOC_I2C_ERR_INT_EN,4,4
	.comm	SIRFSOC_I2C_CTRL,4,4
	.comm	SIRFSOC_I2C_CMD_START,4,4
	.comm	SIRFSOC_I2C_CMD_DONE_EN,4,4
	.comm	EAGAIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
