	.file	"extr_adv_pci1760.c_pci1760_send_cmd.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	pci1760_send_cmd, @function
pci1760_send_cmd:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	movzx	r12d, r12b
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, edx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	r13, QWORD PTR [rdi]
	xor	edi, edi
	call	PCI1760_OMB_REG@PLT
	movzx	edi, bl
	lea	rsi, 0[r13+rax]
	call	outb@PLT
	mov	r13, QWORD PTR 0[rbp]
	mov	edi, 1
	call	PCI1760_OMB_REG@PLT
	movzx	edi, bh
	lea	rsi, 0[r13+rax]
	call	outb@PLT
	mov	rbx, QWORD PTR 0[rbp]
	mov	edi, 2
	call	PCI1760_OMB_REG@PLT
	mov	edi, r12d
	lea	rsi, [rbx+rax]
	call	outb@PLT
	mov	rbx, QWORD PTR 0[rbp]
	mov	edi, 3
	call	PCI1760_OMB_REG@PLT
	xor	edi, edi
	lea	rsi, [rbx+rax]
	call	outb@PLT
	mov	edi, DWORD PTR PCI1760_CMD_TIMEOUT[rip]
	call	usecs_to_jiffies@PLT
	add	rax, QWORD PTR jiffies[rip]
	mov	r13, rax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	xor	eax, eax
	call	cpu_relax@PLT
	mov	rdi, QWORD PTR jiffies[rip]
	mov	rsi, r13
	call	time_before@PLT
	test	rax, rax
	je	.L8
.L4:
	mov	rbx, QWORD PTR 0[rbp]
	mov	edi, 2
	call	PCI1760_IMB_REG@PLT
	lea	rdi, [rbx+rax]
	call	inb@PLT
	cmp	r12d, eax
	jne	.L2
	mov	rbx, QWORD PTR 0[rbp]
	xor	edi, edi
	call	PCI1760_IMB_REG@PLT
	lea	rdi, [rbx+rax]
	call	inb@PLT
	mov	rbp, QWORD PTR 0[rbp]
	mov	edi, 1
	mov	ebx, eax
	call	PCI1760_IMB_REG@PLT
	lea	rdi, 0[rbp+rax]
	call	inb@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	sal	eax, 8
	or	eax, ebx
	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
.L8:
	.cfi_restore_state
	mov	eax, DWORD PTR EBUSY[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	pci1760_send_cmd, .-pci1760_send_cmd
	.comm	jiffies,8,8
	.comm	PCI1760_CMD_TIMEOUT,4,4
	.comm	EBUSY,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_adv_pci1760.c_pci1760_send_cmd.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pci1760_send_cmd, %function
pci1760_send_cmd:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	mov	r0, #0
	mov	r4, r2
	mov	r6, r1
	ldr	r7, [r5]
	bl	PCI1760_OMB_REG
	add	r1, r7, r0
	and	r0, r4, #255
	bl	outb
	mov	r0, #1
	ldr	r7, [r5]
	bl	PCI1760_OMB_REG
	mov	r1, r0
	lsr	r0, r4, #8
	add	r1, r7, r1
	bl	outb
	mov	r0, #2
	ldr	r4, [r5]
	bl	PCI1760_OMB_REG
	mov	r1, r0
	mov	r0, r6
	add	r1, r4, r1
	bl	outb
	mov	r0, #3
	ldr	r4, [r5]
	bl	PCI1760_OMB_REG
	mov	r1, r0
	mov	r0, #0
	add	r1, r4, r1
	bl	outb
	ldr	r3, .L9
	ldr	r8, .L9+4
	ldr	r0, [r3]
	bl	usecs_to_jiffies
	ldr	r7, [r8]
	add	r7, r0, r7
	b	.L4
.L2:
	bl	cpu_relax
	mov	r1, r7
	ldr	r0, [r8]
	bl	time_before
	cmp	r0, #0
	beq	.L8
.L4:
	mov	r0, #2
	ldr	r4, [r5]
	bl	PCI1760_IMB_REG
	add	r0, r4, r0
	bl	inb
	cmp	r0, r6
	bne	.L2
	mov	r0, #0
	ldr	r4, [r5]
	bl	PCI1760_IMB_REG
	add	r0, r4, r0
	bl	inb
	mov	r4, r0
	mov	r0, #1
	ldr	r5, [r5]
	bl	PCI1760_IMB_REG
	add	r0, r5, r0
	bl	inb
	orr	r0, r4, r0, lsl #8
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	ldr	r3, .L9+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	.align	2
.L9:
	.word	PCI1760_CMD_TIMEOUT
	.word	jiffies
	.word	EBUSY
	.size	pci1760_send_cmd, .-pci1760_send_cmd
	.comm	jiffies,4,4
	.comm	PCI1760_CMD_TIMEOUT,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
