	.file	"extr_twimaster.c_i2c_start.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	i2c_start
	.type	i2c_start, @function
i2c_start:
.LFB0:
	.cfi_startproc
	endbr64
	mov	r8d, DWORD PTR TWINT[rip]
	mov	eax, 1
	mov	esi, eax
	mov	ecx, r8d
	sal	esi, cl
	mov	ecx, DWORD PTR TWEN[rip]
	sal	eax, cl
	mov	ecx, esi
	mov	edx, eax
	mov	eax, DWORD PTR TWSTA[rip]
	bts	ecx, eax
	or	ecx, edx
	bt	ecx, r8d
	mov	DWORD PTR TWCR[rip], ecx
	jc	.L12
.L10:
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L12:
	mov	eax, DWORD PTR TW_STATUS[rip]
	and	eax, 248
	cmp	DWORD PTR TW_START[rip], eax
	je	.L3
	cmp	DWORD PTR TW_REP_START[rip], eax
	mov	r9d, 1
	je	.L3
.L1:
	mov	eax, r9d
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	or	edx, esi
	mov	BYTE PTR TWDR[rip], dil
	bt	edx, r8d
	mov	DWORD PTR TWCR[rip], edx
	jc	.L13
.L11:
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L13:
	xor	r9d, r9d
	cmp	DWORD PTR TW_MT_SLA_ACK[rip], eax
	je	.L1
	cmp	DWORD PTR TW_MR_SLA_ACK[rip], eax
	setne	r9b
	mov	eax, r9d
	ret
	.cfi_endproc
.LFE0:
	.size	i2c_start, .-i2c_start
	.comm	TW_STATUS,4,4
	.comm	TW_START,4,4
	.comm	TW_REP_START,4,4
	.comm	TW_MT_SLA_ACK,4,4
	.comm	TW_MR_SLA_ACK,4,4
	.comm	TWSTA,4,4
	.comm	TWINT,4,4
	.comm	TWEN,4,4
	.comm	TWDR,1,1
	.comm	TWCR,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_twimaster.c_i2c_start.c"
	.text
	.align	2
	.global	i2c_start
	.syntax unified
	.arm
	.fpu softvfp
	.type	i2c_start, %function
i2c_start:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #1
	ldr	ip, .L16
	ldr	r2, .L16+4
	ldr	r1, .L16+8
	push	{r4, r5, lr}
	ldr	lr, [ip]
	ldr	r2, [r2]
	ldr	r1, [r1]
	lsl	r4, r3, lr
	orr	r2, r4, r3, lsl r2
	lsl	r1, r3, r1
	orr	r2, r2, r1
	ldr	r5, .L16+12
	asr	ip, r2, lr
	tst	ip, #1
	str	r2, [r5]
	bne	.L12
.L10:
	b	.L10
.L12:
	ldr	r2, .L16+16
	ldr	ip, .L16+20
	ldr	r2, [r2]
	ldr	ip, [ip]
	and	r2, r2, #248
	cmp	ip, r2
	beq	.L3
	ldr	ip, .L16+24
	ldr	ip, [ip]
	cmp	ip, r2
	beq	.L3
	mov	r0, r3
	pop	{r4, r5, pc}
.L3:
	orr	r1, r4, r1
	ldr	ip, .L16+28
	asr	r3, r1, lr
	tst	r3, #1
	str	r1, [r5]
	strb	r0, [ip]
	bne	.L13
.L11:
	b	.L11
.L13:
	ldr	r3, .L16+32
	ldr	r3, [r3]
	cmp	r3, r2
	beq	.L7
	ldr	r3, .L16+36
	ldr	r3, [r3]
	subs	r0, r3, r2
	movne	r0, #1
	pop	{r4, r5, pc}
.L7:
	mov	r0, #0
	pop	{r4, r5, pc}
.L17:
	.align	2
.L16:
	.word	TWINT
	.word	TWSTA
	.word	TWEN
	.word	TWCR
	.word	TW_STATUS
	.word	TW_START
	.word	TW_REP_START
	.word	TWDR
	.word	TW_MT_SLA_ACK
	.word	TW_MR_SLA_ACK
	.size	i2c_start, .-i2c_start
	.comm	TW_STATUS,4,4
	.comm	TW_START,4,4
	.comm	TW_REP_START,4,4
	.comm	TW_MT_SLA_ACK,4,4
	.comm	TW_MR_SLA_ACK,4,4
	.comm	TWSTA,4,4
	.comm	TWINT,4,4
	.comm	TWEN,4,4
	.comm	TWDR,1,1
	.comm	TWCR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
