	.file	"extr_tps6524x-regulator.c___write_reg.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"wrote reg %d, data %x, status %x\n"
	.text
	.p2align 4
	.type	__write_reg, @function
__write_reg:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	mov	edi, esi
	sub	rsp, 104
	.cfi_def_cfa_offset 144
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 88[rsp], rax
	xor	eax, eax
	lea	rbp, 16[rsp]
	call	CMD_WRITE@PLT
	mov	DWORD PTR 4[rsp], r12d
	lea	r12, 12[rsp]
	mov	rdi, r12
	mov	DWORD PTR [rsp], eax
	call	spi_message_init@PLT
	mov	edx, 72
	xor	esi, esi
	mov	rdi, rbp
	call	memset@PLT
	mov	rax, rsp
	mov	rsi, r12
	mov	rdi, rbp
	mov	QWORD PTR 16[rsp], rax
	movabs	rax, 51539607554
	mov	QWORD PTR 24[rsp], rax
	call	spi_message_add_tail@PLT
	lea	rax, 4[rsp]
	mov	rsi, r12
	lea	rdi, 40[rsp]
	mov	QWORD PTR 40[rsp], rax
	movabs	rax, 68719476738
	mov	QWORD PTR 48[rsp], rax
	call	spi_message_add_tail@PLT
	lea	rax, 8[rsp]
	mov	rsi, r12
	lea	rdi, 64[rsp]
	mov	QWORD PTR 80[rsp], rax
	movabs	rax, 17179869185
	mov	QWORD PTR 72[rsp], rax
	call	spi_message_add_tail@PLT
	mov	edi, DWORD PTR 4[rbx]
	mov	rsi, r12
	call	spi_sync@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L1
	mov	ecx, DWORD PTR 4[rsp]
	mov	edi, DWORD PTR [rbx]
	mov	edx, r13d
	lea	rsi, .LC0[rip]
	mov	r8d, DWORD PTR 8[rsp]
	call	dev_dbg@PLT
	mov	eax, DWORD PTR 8[rsp]
	test	DWORD PTR STAT_CLK[rip], eax
	je	.L3
	test	DWORD PTR STAT_WRITE[rip], eax
	je	.L3
	mov	edx, DWORD PTR STAT_INVALID[rip]
	or	edx, DWORD PTR STAT_WP[rip]
	test	edx, eax
	jne	.L14
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 88[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L15
	add	rsp, 104
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L3:
	.cfi_restore_state
	mov	r12d, DWORD PTR EIO[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L1
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	__write_reg, .-__write_reg
	.comm	STAT_WRITE,4,4
	.comm	STAT_WP,4,4
	.comm	STAT_INVALID,4,4
	.comm	STAT_CLK,4,4
	.comm	EIO,4,4
	.comm	EINVAL,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_tps6524x-regulator.c___write_reg.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"wrote reg %d, data %x, status %x\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	__write_reg, %function
__write_reg:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L15
	sub	sp, sp, #80
	mov	r5, r0
	mov	r0, r1
	mov	r4, r2
	mov	r6, r1
	ldr	r3, [r3]
	str	r3, [sp, #76]
	mov	r3,#0
	bl	CMD_WRITE
	mov	r3, r0
	add	r0, sp, #24
	str	r3, [sp, #12]
	str	r4, [sp, #16]
	bl	spi_message_init
	mov	r2, #36
	mov	r1, #0
	add	r0, sp, #40
	bl	memset
	mov	r2, #12
	mov	r4, #2
	add	r3, sp, r2
	add	r1, sp, #24
	add	r0, sp, #28
	str	r4, [sp, #32]
	str	r2, [sp, #36]
	str	r3, [sp, #28]
	bl	spi_message_add_tail
	mov	r2, #16
	add	r1, sp, #24
	add	r3, sp, r2
	add	r0, sp, #44
	str	r4, [sp, #48]
	str	r2, [sp, #52]
	str	r3, [sp, #44]
	bl	spi_message_add_tail
	mov	ip, #1
	mov	r2, #4
	add	r3, sp, #20
	add	r1, sp, #24
	add	r0, sp, #60
	str	ip, [sp, #64]
	str	r2, [sp, #68]
	str	r3, [sp, #72]
	bl	spi_message_add_tail
	ldr	r0, [r5, #4]
	add	r1, sp, #24
	bl	spi_sync
	subs	r4, r0, #0
	blt	.L1
	ldr	r3, [sp, #20]
	mov	r2, r6
	ldr	r0, [r5]
	ldr	r1, .L15+4
	str	r3, [sp]
	ldr	r3, [sp, #16]
	bl	dev_dbg
	ldr	r2, .L15+8
	ldr	r3, [sp, #20]
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L3
	ldr	r2, .L15+12
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L3
	ldr	r2, .L15+16
	ldr	r1, .L15+20
	ldr	r2, [r2]
	ldr	r1, [r1]
	orr	r2, r2, r1
	tst	r2, r3
	ldrne	r3, .L15+24
	ldrne	r0, [r3]
	rsbne	r4, r0, #0
.L1:
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [sp, #76]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	mov	r0, r4
	add	sp, sp, #80
	@ sp needed
	pop	{r4, r5, r6, pc}
.L3:
	ldr	r3, .L15+28
	ldr	r0, [r3]
	rsb	r4, r0, #0
	b	.L1
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	.LC1
	.word	.LC0
	.word	STAT_CLK
	.word	STAT_WRITE
	.word	STAT_INVALID
	.word	STAT_WP
	.word	EINVAL
	.word	EIO
	.size	__write_reg, .-__write_reg
	.comm	STAT_WRITE,4,4
	.comm	STAT_WP,4,4
	.comm	STAT_INVALID,4,4
	.comm	STAT_CLK,4,4
	.comm	EIO,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
