	.file	"extr_as3722.c_as3722_write_buf.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Error when writing reg 0x%02X, rv: %d\n"
	.text
	.p2align 4
	.globl	as3722_write_buf
	.type	as3722_write_buf, @function
as3722_write_buf:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pxor	xmm0, xmm0
	mov	r12d, esi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 104
	.cfi_def_cfa_offset 128
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 88[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR IIC_M_WR[rip]
	mov	DWORD PTR 12[rsp], esi
	lea	rcx, 12[rsp]
	movaps	XMMWORD PTR 16[rsp], xmm0
	lea	rsi, 16[rsp]
	mov	DWORD PTR 20[rsp], eax
	or	eax, DWORD PTR IIC_M_NOSTART[rip]
	movaps	XMMWORD PTR 48[rsp], xmm0
	mov	DWORD PTR 52[rsp], eax
	mov	eax, DWORD PTR 4[rdi]
	mov	edi, DWORD PTR [rdi]
	movaps	XMMWORD PTR 64[rsp], xmm0
	mov	QWORD PTR 64[rsp], rdx
	mov	edx, 2
	movaps	XMMWORD PTR 32[rsp], xmm0
	mov	DWORD PTR 24[rsp], eax
	mov	QWORD PTR 32[rsp], rcx
	mov	DWORD PTR 56[rsp], eax
	call	iicbus_transfer@PLT
	test	eax, eax
	jne	.L9
.L1:
	mov	rcx, QWORD PTR 88[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L10
	add	rsp, 104
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	edi, DWORD PTR [rbx]
	mov	ecx, eax
	mov	edx, r12d
	lea	rsi, .LC0[rip]
	call	device_printf@PLT
	mov	eax, DWORD PTR EIO[rip]
	jmp	.L1
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	as3722_write_buf, .-as3722_write_buf
	.comm	IIC_M_WR,4,4
	.comm	IIC_M_NOSTART,4,4
	.comm	EIO,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_as3722.c_as3722_write_buf.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Error when writing reg 0x%02X, rv: %d\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	as3722_write_buf
	.syntax unified
	.arm
	.fpu softvfp
	.type	as3722_write_buf, %function
as3722_write_buf:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	mov	r5, r1
	mov	r6, r2
	sub	sp, sp, #48
	ldr	r3, .L11
	mov	r2, #40
	mov	r1, #0
	add	r0, sp, #4
	ldr	r3, [r3]
	str	r3, [sp, #44]
	mov	r3,#0
	bl	memset
	ldr	r2, .L11+4
	ldr	r3, .L11+8
	ldr	ip, [r2]
	ldr	r3, [r3]
	ldr	r2, [r4, #4]
	orr	r3, r3, ip
	str	r2, [sp, #12]
	str	r2, [sp, #32]
	ldr	r0, [r4]
	mov	r2, #2
	add	r1, sp, #4
	str	r6, [sp, #36]
	str	r5, [sp]
	str	ip, [sp, #8]
	str	r3, [sp, #28]
	str	sp, [sp, #16]
	bl	iicbus_transfer
	cmp	r0, #0
	bne	.L9
.L1:
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	add	sp, sp, #48
	@ sp needed
	pop	{r4, r5, r6, pc}
.L9:
	mov	r3, r0
	mov	r2, r5
	ldr	r0, [r4]
	ldr	r1, .L11+12
	bl	device_printf
	ldr	r3, .L11+16
	ldr	r0, [r3]
	b	.L1
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	.LC1
	.word	IIC_M_WR
	.word	IIC_M_NOSTART
	.word	.LC0
	.word	EIO
	.size	as3722_write_buf, .-as3722_write_buf
	.comm	IIC_M_WR,4,4
	.comm	IIC_M_NOSTART,4,4
	.comm	EIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
