	.file	"extr_t3_hw.c_t3_sge_init_rspcntxt.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	t3_sge_init_rspcntxt
	.type	t3_sge_init_rspcntxt, @function
t3_sge_init_rspcntxt:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r15d, DWORD PTR 80[rsp]
	mov	ebx, DWORD PTR 88[rsp]
	test	ecx, 4095
	je	.L2
	mov	eax, DWORD PTR EINVAL[rip]
	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
	neg	eax
	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	r13d, esi
	mov	esi, DWORD PTR A_SG_CONTEXT_CMD[rip]
	mov	DWORD PTR 8[rsp], ecx
	mov	rbp, rdi
	mov	DWORD PTR 12[rsp], r8d
	mov	r12d, edx
	mov	r14d, r9d
	call	t3_read_reg@PLT
	test	DWORD PTR F_CONTEXT_CMD_BUSY[rip], eax
	mov	ecx, DWORD PTR 8[rsp]
	mov	r8d, DWORD PTR 12[rsp]
	je	.L4
	mov	eax, DWORD PTR EBUSY[rip]
	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
	neg	eax
	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
.L4:
	.cfi_restore_state
	sar	ecx, 12
	mov	edi, r8d
	mov	DWORD PTR 12[rsp], ecx
	call	V_CQ_SIZE@PLT
	mov	edi, ebx
	mov	DWORD PTR 8[rsp], eax
	call	V_CQ_INDEX@PLT
	mov	edx, DWORD PTR 8[rsp]
	mov	esi, DWORD PTR A_SG_CONTEXT_DATA0[rip]
	mov	rdi, rbp
	or	edx, eax
	call	t3_write_reg@PLT
	mov	ebx, DWORD PTR 12[rsp]
	mov	esi, DWORD PTR A_SG_CONTEXT_DATA1[rip]
	mov	rdi, rbp
	mov	edx, ebx
	call	t3_write_reg@PLT
	mov	r8d, ebx
	mov	ecx, 32
	xor	ebx, ebx
	sar	r8d, cl
	test	r12d, r12d
	jns	.L9
.L5:
	mov	edi, r8d
	call	V_CQ_BASE_HI@PLT
	mov	edi, r15d
	or	ebx, eax
	call	V_RQ_GEN@PLT
	mov	esi, DWORD PTR A_SG_CONTEXT_DATA2[rip]
	mov	rdi, rbp
	or	ebx, eax
	mov	edx, ebx
	call	t3_write_reg@PLT
	mov	esi, DWORD PTR A_SG_CONTEXT_DATA3[rip]
	mov	edx, r14d
	mov	rdi, rbp
	call	t3_write_reg@PLT
	mov	edx, DWORD PTR F_RESPONSEQ[rip]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	esi, r13d
	pop	rbx
	.cfi_def_cfa_offset 48
	mov	rdi, rbp
	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
	jmp	t3_sge_write_context@PLT
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	edi, r12d
	mov	DWORD PTR 8[rsp], r8d
	call	V_RQ_MSI_VEC@PLT
	or	eax, DWORD PTR F_RQ_INTR_EN[rip]
	mov	r8d, DWORD PTR 8[rsp]
	mov	ebx, eax
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	t3_sge_init_rspcntxt, .-t3_sge_init_rspcntxt
	.comm	F_RQ_INTR_EN,4,4
	.comm	F_RESPONSEQ,4,4
	.comm	F_CONTEXT_CMD_BUSY,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.comm	A_SG_CONTEXT_DATA3,4,4
	.comm	A_SG_CONTEXT_DATA2,4,4
	.comm	A_SG_CONTEXT_DATA1,4,4
	.comm	A_SG_CONTEXT_DATA0,4,4
	.comm	A_SG_CONTEXT_CMD,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_t3_hw.c_t3_sge_init_rspcntxt.c"
	.text
	.align	2
	.global	t3_sge_init_rspcntxt
	.syntax unified
	.arm
	.fpu softvfp
	.type	t3_sge_init_rspcntxt, %function
t3_sge_init_rspcntxt:
	@ args = 16, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r3
	lsl	r3, r3, #20
	sub	sp, sp, #12
	lsr	r3, r3, #20
	add	r8, sp, #52
	cmp	r3, #0
	ldr	r10, [sp, #48]
	ldm	r8, {r8, r9, fp}
	beq	.L2
	ldr	r3, .L10
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	mov	r6, r2
	ldr	r2, .L10+4
	mov	r7, r1
	ldr	r1, [r2]
	mov	r5, r0
	bl	t3_read_reg
	ldr	r2, .L10+8
	ldr	r2, [r2]
	ands	r3, r0, r2
	str	r3, [sp]
	beq	.L4
	ldr	r3, .L10+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	ldr	r2, .L10+16
	mov	r0, r10
	ldr	r1, [r2]
	asr	r4, r4, #12
	str	r1, [sp, #4]
	bl	V_CQ_SIZE
	mov	r2, r0
	mov	r0, fp
	mov	fp, r2
	bl	V_CQ_INDEX
	ldr	r1, [sp, #4]
	orr	r2, fp, r0
	mov	r0, r5
	bl	t3_write_reg
	ldr	r3, .L10+20
	mov	r2, r4
	mov	r0, r5
	ldr	r1, [r3]
	bl	t3_write_reg
	mov	r2, #32
	cmp	r6, #0
	asr	r4, r4, r2
	bge	.L9
	ldr	r10, [sp]
.L5:
	ldr	r3, .L10+24
	mov	r0, r4
	ldr	r4, [r3]
	bl	V_CQ_BASE_HI
	mov	r2, r0
	mov	r0, r9
	orr	r10, r2, r10
	bl	V_RQ_GEN
	mov	r1, r4
	orr	r2, r10, r0
	mov	r0, r5
	bl	t3_write_reg
	ldr	r3, .L10+28
	mov	r2, r8
	ldr	r1, [r3]
	mov	r0, r5
	bl	t3_write_reg
	mov	r1, r7
	mov	r0, r5
	ldr	r3, .L10+32
	ldr	r2, [r3]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	t3_sge_write_context
.L9:
	mov	r0, r6
	bl	V_RQ_MSI_VEC
	ldr	r3, .L10+36
	ldr	r10, [r3]
	orr	r10, r0, r10
	b	.L5
.L11:
	.align	2
.L10:
	.word	EINVAL
	.word	A_SG_CONTEXT_CMD
	.word	F_CONTEXT_CMD_BUSY
	.word	EBUSY
	.word	A_SG_CONTEXT_DATA0
	.word	A_SG_CONTEXT_DATA1
	.word	A_SG_CONTEXT_DATA2
	.word	A_SG_CONTEXT_DATA3
	.word	F_RESPONSEQ
	.word	F_RQ_INTR_EN
	.size	t3_sge_init_rspcntxt, .-t3_sge_init_rspcntxt
	.comm	F_RQ_INTR_EN,4,4
	.comm	F_RESPONSEQ,4,4
	.comm	F_CONTEXT_CMD_BUSY,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.comm	A_SG_CONTEXT_DATA3,4,4
	.comm	A_SG_CONTEXT_DATA2,4,4
	.comm	A_SG_CONTEXT_DATA1,4,4
	.comm	A_SG_CONTEXT_DATA0,4,4
	.comm	A_SG_CONTEXT_CMD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
