	.file	"extr_i2c-sis5595.c_sis5595_transaction.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"SMBus busy (%04x). Resetting...\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"Failed! (%02x)\n"
.LC2:
	.string	"Successful!\n"
.LC3:
	.string	"SMBus Timeout!\n"
	.section	.rodata.str1.8
	.align 8
.LC4:
	.string	"Error: Failed bus transaction\n"
	.align 8
.LC5:
	.string	"Bus collision! SMBus may be locked until next hard reset (or not...)\n"
	.align 8
.LC6:
	.string	"Failed reset at end of transaction (%02x)\n"
	.text
	.p2align 4
	.type	sis5595_transaction, @function
sis5595_transaction:
.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, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR SMB_STS_LO[rip]
	call	sis5595_read@PLT
	mov	edi, DWORD PTR SMB_STS_HI[rip]
	mov	ebx, eax
	call	sis5595_read@PLT
	sal	eax, 8
	add	ebx, eax
	je	.L2
	mov	edx, ebx
	lea	rsi, .LC0[rip]
	mov	rdi, r12
	xor	eax, eax
	call	dev_dbg@PLT
	mov	edi, DWORD PTR SMB_STS_LO[rip]
	movzx	esi, bl
	call	sis5595_write@PLT
	mov	edi, DWORD PTR SMB_STS_HI[rip]
	mov	esi, ebx
	sar	esi, 8
	call	sis5595_write@PLT
	mov	edi, DWORD PTR SMB_STS_LO[rip]
	call	sis5595_read@PLT
	mov	edi, DWORD PTR SMB_STS_HI[rip]
	mov	ebx, eax
	call	sis5595_read@PLT
	sal	eax, 8
	add	eax, ebx
	mov	edx, eax
	jne	.L31
	lea	rsi, .LC2[rip]
	mov	rdi, r12
	xor	eax, eax
	call	dev_dbg@PLT
.L2:
	mov	edi, DWORD PTR SMB_CTL_LO[rip]
	xor	ebp, ebp
	call	sis5595_read@PLT
	mov	edi, DWORD PTR SMB_CTL_LO[rip]
	or	eax, 16
	mov	esi, eax
	call	sis5595_write@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L32:
	mov	eax, DWORD PTR MAX_TIMEOUT[rip]
	lea	edx, 1[rbp]
	cmp	eax, ebp
	jle	.L7
	mov	ebp, edx
.L6:
	mov	edi, 1
	call	msleep@PLT
	mov	edi, DWORD PTR SMB_STS_LO[rip]
	call	sis5595_read@PLT
	mov	ebx, eax
	test	al, 64
	je	.L32
	mov	eax, DWORD PTR MAX_TIMEOUT[rip]
	mov	edx, ebp
.L7:
	xor	r13d, r13d
	cmp	edx, eax
	jg	.L33
.L8:
	test	bl, 16
	jne	.L34
.L9:
	and	ebx, 32
	jne	.L35
.L10:
	mov	edi, DWORD PTR SMB_STS_LO[rip]
	call	sis5595_read@PLT
	mov	edi, DWORD PTR SMB_STS_HI[rip]
	mov	ebx, eax
	call	sis5595_read@PLT
	sal	eax, 8
	add	ebx, eax
	jne	.L36
.L11:
	mov	edi, DWORD PTR SMB_STS_LO[rip]
	call	sis5595_read@PLT
	mov	edi, DWORD PTR SMB_STS_HI[rip]
	mov	ebx, eax
	call	sis5595_read@PLT
	sal	eax, 8
	add	eax, ebx
	mov	edx, eax
	jne	.L37
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	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
.L37:
	.cfi_restore_state
	mov	rdi, r12
	lea	rsi, .LC6[rip]
	xor	eax, eax
	call	dev_dbg@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	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
.L36:
	.cfi_restore_state
	mov	edi, DWORD PTR SMB_STS_LO[rip]
	movzx	esi, bl
	call	sis5595_write@PLT
	mov	esi, ebx
	mov	edi, DWORD PTR SMB_STS_HI[rip]
	sar	esi, 8
	call	sis5595_write@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L35:
	lea	rsi, .LC5[rip]
	mov	rdi, r12
	call	dev_err@PLT
	mov	r13d, DWORD PTR EIO[rip]
	neg	r13d
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L34:
	lea	rsi, .LC4[rip]
	mov	rdi, r12
	xor	eax, eax
	call	dev_dbg@PLT
	mov	r13d, DWORD PTR ENXIO[rip]
	neg	r13d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L33:
	lea	rsi, .LC3[rip]
	mov	rdi, r12
	xor	eax, eax
	call	dev_dbg@PLT
	mov	r13d, DWORD PTR ETIMEDOUT[rip]
	neg	r13d
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L31:
	mov	rdi, r12
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	dev_dbg@PLT
	mov	r13d, DWORD PTR EBUSY[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	r13d
	pop	r12
	.cfi_def_cfa_offset 16
	mov	eax, r13d
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	sis5595_transaction, .-sis5595_transaction
	.comm	SMB_STS_LO,4,4
	.comm	SMB_STS_HI,4,4
	.comm	SMB_CTL_LO,4,4
	.comm	MAX_TIMEOUT,4,4
	.comm	ETIMEDOUT,4,4
	.comm	ENXIO,4,4
	.comm	EIO,4,4
	.comm	EBUSY,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-sis5595.c_sis5595_transaction.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"SMBus busy (%04x). Resetting...\012\000"
	.align	2
.LC1:
	.ascii	"Failed! (%02x)\012\000"
	.align	2
.LC2:
	.ascii	"Successful!\012\000"
	.align	2
.LC3:
	.ascii	"SMBus Timeout!\012\000"
	.align	2
.LC4:
	.ascii	"Error: Failed bus transaction\012\000"
	.align	2
.LC5:
	.ascii	"Bus collision! SMBus may be locked until next hard "
	.ascii	"reset (or not...)\012\000"
	.align	2
.LC6:
	.ascii	"Failed reset at end of transaction (%02x)\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sis5595_transaction, %function
sis5595_transaction:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r5, .L38
	mov	r7, r0
	ldr	r0, [r5]
	bl	sis5595_read
	ldr	r8, .L38+4
	mov	r4, r0
	ldr	r0, [r8]
	bl	sis5595_read
	adds	r4, r4, r0, lsl #8
	beq	.L2
	mov	r2, r4
	ldr	r1, .L38+8
	mov	r0, r7
	bl	dev_dbg
	and	r1, r4, #255
	ldr	r0, [r5]
	bl	sis5595_write
	asr	r1, r4, #8
	ldr	r0, [r8]
	bl	sis5595_write
	ldr	r0, [r5]
	bl	sis5595_read
	mov	r4, r0
	ldr	r0, [r8]
	bl	sis5595_read
	adds	r2, r4, r0, lsl #8
	bne	.L31
	mov	r0, r7
	ldr	r1, .L38+12
	bl	dev_dbg
.L2:
	ldr	r3, .L38+16
	mov	r9, #0
	ldr	r4, [r3]
	ldr	r6, .L38+20
	mov	r0, r4
	bl	sis5595_read
	mov	r1, r0
	mov	r0, r4
	orr	r1, r1, #16
	bl	sis5595_write
	b	.L6
.L32:
	ldr	r3, [r6]
	add	r2, r9, #1
	cmp	r3, r9
	ble	.L7
	mov	r9, r2
.L6:
	mov	r0, #1
	bl	msleep
	ldr	r0, [r5]
	bl	sis5595_read
	tst	r0, #64
	mov	r4, r0
	beq	.L32
	mov	r2, r9
	ldr	r3, [r6]
.L7:
	cmp	r2, r3
	movle	r6, #0
	bgt	.L33
.L8:
	tst	r4, #16
	bne	.L34
.L9:
	tst	r4, #32
	bne	.L35
.L10:
	ldr	r0, [r5]
	bl	sis5595_read
	mov	r4, r0
	ldr	r0, [r8]
	bl	sis5595_read
	adds	r4, r4, r0, lsl #8
	bne	.L36
.L11:
	ldr	r0, [r5]
	bl	sis5595_read
	mov	r4, r0
	ldr	r0, [r8]
	bl	sis5595_read
	adds	r2, r4, r0, lsl #8
	bne	.L37
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L37:
	mov	r0, r7
	ldr	r1, .L38+24
	bl	dev_dbg
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L36:
	and	r1, r4, #255
	ldr	r0, [r5]
	bl	sis5595_write
	ldr	r0, [r8]
	asr	r1, r4, #8
	bl	sis5595_write
	b	.L11
.L35:
	mov	r0, r7
	ldr	r1, .L38+28
	bl	dev_err
	ldr	r3, .L38+32
	ldr	r6, [r3]
	rsb	r6, r6, #0
	b	.L10
.L34:
	mov	r0, r7
	ldr	r1, .L38+36
	bl	dev_dbg
	ldr	r3, .L38+40
	ldr	r6, [r3]
	rsb	r6, r6, #0
	b	.L9
.L33:
	mov	r0, r7
	ldr	r1, .L38+44
	bl	dev_dbg
	ldr	r3, .L38+48
	ldr	r6, [r3]
	rsb	r6, r6, #0
	b	.L8
.L31:
	mov	r0, r7
	ldr	r1, .L38+52
	bl	dev_dbg
	ldr	r3, .L38+56
	ldr	r6, [r3]
	rsb	r6, r6, #0
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L39:
	.align	2
.L38:
	.word	SMB_STS_LO
	.word	SMB_STS_HI
	.word	.LC0
	.word	.LC2
	.word	SMB_CTL_LO
	.word	MAX_TIMEOUT
	.word	.LC6
	.word	.LC5
	.word	EIO
	.word	.LC4
	.word	ENXIO
	.word	.LC3
	.word	ETIMEDOUT
	.word	.LC1
	.word	EBUSY
	.size	sis5595_transaction, .-sis5595_transaction
	.comm	SMB_STS_LO,4,4
	.comm	SMB_STS_HI,4,4
	.comm	SMB_CTL_LO,4,4
	.comm	MAX_TIMEOUT,4,4
	.comm	ETIMEDOUT,4,4
	.comm	ENXIO,4,4
	.comm	EIO,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
