	.file	"extr_request_manager.c_octeon_prepare_soft_command.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	octeon_prepare_soft_command
	.type	octeon_prepare_soft_command, @function
octeon_prepare_soft_command:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	xor	edi, edi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, r8
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, r9
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, ecx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	cmp	edx, 15
	setg	dil
	call	WARN_ON@PLT
	xor	edi, edi
	cmp	ebp, 127
	setg	dil
	call	WARN_ON@PLT
	mov	rdi, r15
	call	octeon_get_conf@PLT
	mov	rdi, r15
	mov	QWORD PTR 8[rsp], rax
	call	OCTEON_CN23XX_PF@PLT
	test	rax, rax
	je	.L2
.L5:
	mov	rax, QWORD PTR 8[r15]
	mov	rdx, QWORD PTR [rbx]
	mov	rcx, QWORD PTR 80[rsp]
	lea	rax, [rax+rdx*8]
	mov	rdx, QWORD PTR [rax]
	mov	DWORD PTR 68[rbx], 1
	mov	edx, DWORD PTR 4[rdx]
	mov	DWORD PTR 108[rbx], edx
	mov	rdx, QWORD PTR LIO_CONTROL[rip]
	mov	QWORD PTR 100[rbx], rdx
	mov	rdx, QWORD PTR ATOMIC_TAG[rip]
	mov	QWORD PTR 92[rbx], rdx
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR 80[rbx], 8
	mov	DWORD PTR 56[rbx], r12d
	mov	DWORD PTR 84[rbx], eax
	mov	rax, QWORD PTR 48[rbx]
	mov	DWORD PTR 60[rbx], ebp
	mov	QWORD PTR 72[rbx], r14
	mov	QWORD PTR [rax], r13
	mov	rax, QWORD PTR 48[rbx]
	mov	QWORD PTR 8[rax], rcx
	mov	rax, QWORD PTR 8[rbx]
	test	rax, rax
	jne	.L3
	mov	eax, DWORD PTR LIO_PCICMD_O3[rip]
	mov	DWORD PTR 64[rbx], eax
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	edx, DWORD PTR [r15]
	mov	QWORD PTR 40[rbx], rax
	mov	eax, DWORD PTR LIO_SOFTCMDRESP_IH3[rip]
	mov	DWORD PTR 48[rbx], edx
	mov	DWORD PTR 64[rbx], eax
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, r15
	call	OCTEON_CN23XX_VF@PLT
	test	rax, rax
	jne	.L5
	mov	rax, QWORD PTR ATOMIC_TAG[rip]
	mov	DWORD PTR 36[rbx], 1
	mov	rdi, QWORD PTR 8[rsp]
	mov	QWORD PTR 76[rbx], rax
	mov	rax, QWORD PTR LIO_CONTROL[rip]
	mov	QWORD PTR 68[rbx], rax
	call	CFG_GET_CTRL_Q_GRP@PLT
	mov	DWORD PTR 60[rbx], eax
	mov	rax, QWORD PTR 72[rbx]
	test	rax, rax
	je	.L8
	mov	QWORD PTR 52[rbx], rax
.L8:
	mov	rax, QWORD PTR 24[rbx]
	mov	rsi, QWORD PTR 80[rsp]
	mov	DWORD PTR 32[rbx], r12d
	mov	DWORD PTR 36[rbx], ebp
	mov	QWORD PTR 48[rbx], r14
	mov	QWORD PTR [rax], r13
	mov	rax, QWORD PTR 24[rbx]
	mov	QWORD PTR 8[rax], rsi
	mov	rax, QWORD PTR 8[rbx]
	test	rax, rax
	je	.L9
	mov	edx, DWORD PTR [r15]
	mov	QWORD PTR 16[rbx], rax
	mov	eax, DWORD PTR LIO_SOFTCMDRESP_IH2[rip]
	mov	DWORD PTR 40[rbx], 1
	mov	DWORD PTR 24[rbx], edx
	mov	DWORD PTR 44[rbx], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	eax, DWORD PTR LIO_PCICMD_O2[rip]
	mov	DWORD PTR 40[rbx], 0
	mov	DWORD PTR 44[rbx], eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	octeon_prepare_soft_command, .-octeon_prepare_soft_command
	.comm	LIO_SOFTCMDRESP_IH3,4,4
	.comm	LIO_SOFTCMDRESP_IH2,4,4
	.comm	LIO_PCICMD_O3,4,4
	.comm	LIO_PCICMD_O2,4,4
	.comm	LIO_CONTROL,8,8
	.comm	ATOMIC_TAG,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_request_manager.c_octeon_prepare_soft_command.c"
	.text
	.align	2
	.global	octeon_prepare_soft_command
	.syntax unified
	.arm
	.fpu softvfp
	.type	octeon_prepare_soft_command, %function
octeon_prepare_soft_command:
	@ args = 12, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r3
	mov	r5, r0
	cmp	r2, #15
	movle	r0, #0
	movgt	r0, #1
	mov	r8, r2
	mov	r4, r1
	bl	WARN_ON
	cmp	r6, #127
	movle	r0, #0
	movgt	r0, #1
	bl	WARN_ON
	mov	r0, r5
	bl	octeon_get_conf
	mov	r7, r0
	mov	r0, r5
	bl	OCTEON_CN23XX_PF
	cmp	r0, #0
	beq	.L2
.L5:
	mov	lr, #1
	mov	ip, #7
	mov	r0, #8
	ldr	r3, [r5, #4]
	ldr	r1, [r4]
	ldr	r2, .L18
	ldr	r7, [r3, r1, lsl #2]
	ldr	r2, [r2]
	ldr	r7, [r7, #4]
	str	r2, [r4, #68]
	ldr	r2, .L18+4
	str	r7, [r4, #72]
	ldr	r2, [r2]
	str	lr, [r4, #48]
	str	r2, [r4, #64]
	ldr	r3, [r3, r1, lsl #2]
	ldr	r2, [r4, #28]
	ldr	r3, [r3]
	ldr	r1, [sp, #28]
	str	r3, [r4, #60]
	ldr	r3, [sp, #24]
	str	r8, [r4, #32]
	str	r3, [r4, #44]
	str	r6, [r4, #36]
	ldr	r3, [r4, #4]
	str	ip, [r4, #52]
	str	r0, [r4, #56]
	str	r1, [r2]
	ldr	r2, [r4, #28]
	ldr	r1, [sp, #32]
	cmp	r3, #0
	str	r1, [r2, #4]
	beq	.L17
	ldr	r2, .L18+8
	ldr	r1, [r5]
	ldr	r2, [r2]
	str	r1, [r4, #28]
	str	r3, [r4, #24]
	str	r2, [r4, #40]
	pop	{r4, r5, r6, r7, r8, pc}
.L17:
	ldr	r3, .L18+12
	ldr	r3, [r3]
	str	r3, [r4, #40]
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r0, r5
	bl	OCTEON_CN23XX_VF
	cmp	r0, #0
	bne	.L5
	mov	r3, #1
	ldr	r1, .L18+4
	ldr	r2, .L18
	ldr	r1, [r1]
	ldr	r2, [r2]
	str	r1, [r4, #44]
	str	r2, [r4, #40]
	str	r3, [r4, #20]
	mov	r0, r7
	bl	CFG_GET_CTRL_Q_GRP
	ldr	r3, [r4, #44]
	ldr	r2, [r4, #12]
	cmp	r3, #0
	strne	r3, [r4, #32]
	ldr	r1, [sp, #28]
	ldr	r3, [sp, #24]
	str	r0, [r4, #36]
	str	r3, [r4, #28]
	str	r8, [r4, #16]
	ldr	r3, [r4, #4]
	str	r6, [r4, #20]
	str	r1, [r2]
	ldr	r2, [r4, #12]
	ldr	r1, [sp, #32]
	cmp	r3, #0
	str	r1, [r2, #4]
	beq	.L9
	mov	r2, #1
	ldr	r1, .L18+16
	ldr	r0, [r5]
	ldr	r1, [r1]
	str	r0, [r4, #12]
	str	r3, [r4, #8]
	str	r1, [r4, #28]
	str	r2, [r4, #24]
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	ldr	r2, .L18+20
	str	r3, [r4, #24]
	ldr	r3, [r2]
	str	r3, [r4, #28]
	pop	{r4, r5, r6, r7, r8, pc}
.L19:
	.align	2
.L18:
	.word	LIO_CONTROL
	.word	ATOMIC_TAG
	.word	LIO_SOFTCMDRESP_IH3
	.word	LIO_PCICMD_O3
	.word	LIO_SOFTCMDRESP_IH2
	.word	LIO_PCICMD_O2
	.size	octeon_prepare_soft_command, .-octeon_prepare_soft_command
	.comm	LIO_SOFTCMDRESP_IH3,4,4
	.comm	LIO_SOFTCMDRESP_IH2,4,4
	.comm	LIO_PCICMD_O3,4,4
	.comm	LIO_PCICMD_O2,4,4
	.comm	LIO_CONTROL,4,4
	.comm	ATOMIC_TAG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
