	.file	"extr_twsi.c_twsi_reset.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Using IIC_FAST mode with speed param=%x\n"
	.align 8
.LC1:
	.string	"Using IIC_FASTEST/UNKNOWN mode with speed param=%x\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"Using clock param=%x\n"
	.text
	.p2align 4
	.type	twsi_reset, @function
twsi_reset:
.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	r12d, edi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	device_get_softc@PLT
	mov	rbp, rax
	mov	rax, rbx
	and	rax, -3
	cmp	rax, 129
	mov	rax, QWORD PTR 16[rbp]
	je	.L6
	mov	r13d, DWORD PTR 524[rax]
	lea	rsi, .LC1[rip]
	mov	edi, r12d
	mov	edx, r13d
	call	debugf@PLT
.L3:
	mov	edx, r13d
	lea	rsi, .LC2[rip]
	mov	edi, r12d
	call	debugf@PLT
	mov	rdi, rbp
	call	mtx_lock@PLT
	mov	esi, DWORD PTR 12[rbp]
	mov	rdi, rbp
	xor	edx, edx
	call	TWSI_WRITE@PLT
	mov	esi, DWORD PTR 8[rbp]
	mov	edx, r13d
	mov	rdi, rbp
	call	TWSI_WRITE@PLT
	mov	esi, DWORD PTR 4[rbp]
	mov	edx, DWORD PTR TWSI_CONTROL_TWSIEN[rip]
	mov	rdi, rbp
	call	TWSI_WRITE@PLT
	mov	edi, 1000
	call	DELAY@PLT
	mov	rdi, rbp
	call	mtx_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
.L6:
	.cfi_restore_state
	mov	r13d, DWORD PTR [rax+rbx*4]
	lea	rsi, .LC0[rip]
	mov	edi, r12d
	mov	edx, r13d
	call	debugf@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	twsi_reset, .-twsi_reset
	.comm	TWSI_CONTROL_TWSIEN,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_twsi.c_twsi_reset.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Using IIC_FAST mode with speed param=%x\012\000"
	.align	2
.LC1:
	.ascii	"Using IIC_FASTEST/UNKNOWN mode with speed param=%x\012"
	.ascii	"\000"
	.align	2
.LC2:
	.ascii	"Using clock param=%x\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	twsi_reset, %function
twsi_reset:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r6, r1
	mov	r5, r0
	bl	device_get_softc
	mov	r4, r0
	bic	r3, r6, #2
	cmp	r3, #129
	ldr	r3, [r0, #16]
	ldreq	r1, .L6
	ldreq	r6, [r3, r6, lsl #2]
	ldrne	r6, [r3, #524]
	ldrne	r1, .L6+4
	mov	r2, r6
	mov	r0, r5
	bl	debugf
	mov	r2, r6
	ldr	r1, .L6+8
	mov	r0, r5
	bl	debugf
	mov	r0, r4
	bl	mtx_lock
	ldr	r1, [r4, #12]
	mov	r2, #0
	mov	r0, r4
	bl	TWSI_WRITE
	mov	r2, r6
	ldr	r1, [r4, #8]
	mov	r0, r4
	bl	TWSI_WRITE
	ldr	r3, .L6+12
	ldr	r1, [r4, #4]
	ldr	r2, [r3]
	mov	r0, r4
	bl	TWSI_WRITE
	mov	r0, #1000
	bl	DELAY
	mov	r0, r4
	bl	mtx_unlock
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L7:
	.align	2
.L6:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	TWSI_CONTROL_TWSIEN
	.size	twsi_reset, .-twsi_reset
	.comm	TWSI_CONTROL_TWSIEN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
