	.file	"extr_adb-iop.c_adb_iop_write.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	adb_iop_write, @function
adb_iop_write:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	cmp	DWORD PTR [rdi], 1
	jle	.L2
	mov	rax, QWORD PTR 8[rdi]
	mov	rdx, QWORD PTR ADB_PACKET[rip]
	cmp	QWORD PTR [rax], rdx
	je	.L3
.L2:
	mov	r12d, DWORD PTR EINVAL[rip]
	mov	DWORD PTR 16[rbx], 1
	neg	r12d
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	xor	edi, edi
	call	local_irq_save@PLT
	cmp	QWORD PTR current_req[rip], 0
	mov	QWORD PTR 24[rbx], 0
	mov	QWORD PTR 40[rbx], 0
	mov	DWORD PTR 16[rbx], 0
	mov	QWORD PTR 32[rbx], 0
	je	.L5
	mov	rax, QWORD PTR last_req[rip]
	mov	QWORD PTR last_req[rip], rbx
	mov	QWORD PTR 24[rax], rbx
.L6:
	xor	edi, edi
	xor	r12d, r12d
	call	local_irq_restore@PLT
	mov	rax, QWORD PTR idle[rip]
	cmp	QWORD PTR adb_iop_state[rip], rax
	jne	.L1
	xor	eax, eax
	call	adb_iop_start@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	QWORD PTR current_req[rip], rbx
	mov	QWORD PTR last_req[rip], rbx
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	adb_iop_write, .-adb_iop_write
	.comm	last_req,8,8
	.comm	idle,8,8
	.comm	current_req,8,8
	.comm	adb_iop_state,8,8
	.comm	EINVAL,4,4
	.comm	ADB_PACKET,8,8
	.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_adb-iop.c_adb_iop_write.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	adb_iop_write, %function
adb_iop_write:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0]
	push	{r4, lr}
	cmp	r3, #1
	mov	r4, r0
	ble	.L2
	ldr	r2, [r0, #4]
	ldr	r3, .L11
	ldr	r2, [r2]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L3
.L2:
	mov	r2, #1
	ldr	r3, .L11+4
	str	r2, [r4, #8]
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, pc}
.L3:
	mov	r0, #0
	bl	local_irq_save
	mov	r3, #0
	ldr	r2, .L11+8
	str	r3, [r4, #12]
	ldr	r1, [r2]
	str	r3, [r4, #20]
	cmp	r1, r3
	str	r3, [r4, #8]
	str	r3, [r4, #16]
	ldr	r3, .L11+12
	mov	r0, #0
	ldrne	r2, [r3]
	streq	r4, [r2]
	strne	r4, [r2, #12]
	strne	r4, [r3]
	streq	r4, [r3]
	bl	local_irq_restore
	ldr	r2, .L11+16
	ldr	r3, .L11+20
	ldr	r2, [r2]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L10
	mov	r0, #0
	pop	{r4, pc}
.L10:
	bl	adb_iop_start
	mov	r0, #0
	pop	{r4, pc}
.L12:
	.align	2
.L11:
	.word	ADB_PACKET
	.word	EINVAL
	.word	current_req
	.word	last_req
	.word	adb_iop_state
	.word	idle
	.size	adb_iop_write, .-adb_iop_write
	.comm	last_req,4,4
	.comm	idle,4,4
	.comm	current_req,4,4
	.comm	adb_iop_state,4,4
	.comm	EINVAL,4,4
	.comm	ADB_PACKET,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
