	.file	"extr_iicoc.c_iicoc_wr_cmd.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"write: Timeout waiting for TIP clear.\n"
	.text
	.p2align 4
	.type	iicoc_wr_cmd, @function
iicoc_wr_cmd:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, edx
	mov	edx, esi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, edi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	esi, DWORD PTR OC_I2C_DATA_REG[rip]
	call	iicoc_dev_write@PLT
	mov	esi, DWORD PTR OC_I2C_CMD_REG[rip]
	mov	edi, ebp
	mov	edx, r12d
	call	iicoc_dev_write@PLT
	mov	esi, DWORD PTR OC_STATUS_TIP[rip]
	mov	edi, ebp
	call	iicoc_wait_on_status@PLT
	test	rax, rax
	js	.L6
	xor	eax, eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	lea	rsi, .LC0[rip]
	mov	edi, ebp
	call	device_printf@PLT
	mov	eax, -1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	iicoc_wr_cmd, .-iicoc_wr_cmd
	.comm	OC_STATUS_TIP,4,4
	.comm	OC_I2C_DATA_REG,4,4
	.comm	OC_I2C_CMD_REG,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_iicoc.c_iicoc_wr_cmd.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"write: Timeout waiting for TIP clear.\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	iicoc_wr_cmd, %function
iicoc_wr_cmd:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	mov	r5, r2
	ldr	r3, .L7
	mov	r2, r1
	ldr	r1, [r3]
	bl	iicoc_dev_write
	ldr	r3, .L7+4
	mov	r2, r5
	ldr	r1, [r3]
	mov	r0, r4
	bl	iicoc_dev_write
	ldr	r3, .L7+8
	mov	r0, r4
	ldr	r1, [r3]
	bl	iicoc_wait_on_status
	cmp	r0, #0
	blt	.L6
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L6:
	mov	r0, r4
	ldr	r1, .L7+12
	bl	device_printf
	mvn	r0, #0
	pop	{r4, r5, r6, pc}
.L8:
	.align	2
.L7:
	.word	OC_I2C_DATA_REG
	.word	OC_I2C_CMD_REG
	.word	OC_STATUS_TIP
	.word	.LC0
	.size	iicoc_wr_cmd, .-iicoc_wr_cmd
	.comm	OC_STATUS_TIP,4,4
	.comm	OC_I2C_DATA_REG,4,4
	.comm	OC_I2C_CMD_REG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
