	.file	"extr_t3_hw.c_t3_sge_cqcntxt_op.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	t3_sge_cqcntxt_op
	.type	t3_sge_cqcntxt_op, @function
t3_sge_cqcntxt_op:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14d, esi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, ecx
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	esi, DWORD PTR A_SG_CONTEXT_CMD[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	t3_read_reg@PLT
	and	eax, DWORD PTR F_CONTEXT_CMD_BUSY[rip]
	je	.L2
	mov	r12d, DWORD PTR EBUSY[rip]
	neg	r12d
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L11
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	esi, DWORD PTR A_SG_CONTEXT_DATA0[rip]
	sal	ebx, 16
	mov	rdi, rbp
	mov	r12d, eax
	mov	edx, ebx
	call	t3_write_reg@PLT
	mov	edi, r13d
	call	V_CONTEXT_CMD_OPCODE@PLT
	mov	edi, r14d
	mov	ebx, eax
	call	V_CONTEXT@PLT
	mov	edx, DWORD PTR F_CQ[rip]
	mov	esi, DWORD PTR A_SG_CONTEXT_CMD[rip]
	mov	rdi, rbp
	or	ebx, eax
	or	edx, ebx
	call	t3_write_reg@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 72
	xor	ecx, ecx
	mov	rdi, rbp
	lea	rax, 12[rsp]
	mov	edx, DWORD PTR F_CONTEXT_CMD_BUSY[rip]
	mov	r8d, DWORD PTR SG_CONTEXT_CMD_ATTEMPTS[rip]
	mov	r9d, 1
	push	rax
	.cfi_def_cfa_offset 80
	mov	esi, DWORD PTR A_SG_CONTEXT_CMD[rip]
	call	t3_wait_op_done_val@PLT
	pop	rdx
	.cfi_def_cfa_offset 72
	pop	rcx
	.cfi_def_cfa_offset 64
	test	rax, rax
	jne	.L9
	sub	r13d, 2
	cmp	r13d, 4
	ja	.L1
	cmp	QWORD PTR 0[rbp], 0
	jg	.L12
	xor	edi, edi
	call	V_CONTEXT_CMD_OPCODE@PLT
	mov	edi, r14d
	mov	r12d, DWORD PTR F_CQ[rip]
	mov	ebx, eax
	call	V_CONTEXT@PLT
	mov	esi, DWORD PTR A_SG_CONTEXT_CMD[rip]
	mov	rdi, rbp
	or	ebx, eax
	mov	edx, ebx
	or	edx, r12d
	call	t3_write_reg@PLT
	mov	edx, DWORD PTR F_CONTEXT_CMD_BUSY[rip]
	xor	ecx, ecx
	mov	rdi, rbp
	mov	r8d, DWORD PTR SG_CONTEXT_CMD_ATTEMPTS[rip]
	mov	esi, DWORD PTR A_SG_CONTEXT_CMD[rip]
	mov	r9d, 1
	call	t3_wait_op_done@PLT
	test	rax, rax
	je	.L6
.L9:
	mov	r12d, DWORD PTR EIO[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edi, DWORD PTR 4[rsp]
	call	G_CQ_INDEX@PLT
	mov	r12d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	esi, DWORD PTR A_SG_CONTEXT_DATA0[rip]
	mov	rdi, rbp
	call	t3_read_reg@PLT
	mov	edi, eax
	call	G_CQ_INDEX@PLT
	mov	r12d, eax
	jmp	.L1
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	t3_sge_cqcntxt_op, .-t3_sge_cqcntxt_op
	.comm	SG_CONTEXT_CMD_ATTEMPTS,4,4
	.comm	F_CQ,4,4
	.comm	F_CONTEXT_CMD_BUSY,4,4
	.comm	EIO,4,4
	.comm	EBUSY,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_cqcntxt_op.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	t3_sge_cqcntxt_op
	.syntax unified
	.arm
	.fpu softvfp
	.type	t3_sge_cqcntxt_op, %function
t3_sge_cqcntxt_op:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r7, .L13
	mov	r9, r3
	ldr	r3, .L13+4
	sub	sp, sp, #36
	mov	r6, r1
	ldr	r1, [r7]
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	mov	r5, r2
	mov	r4, r0
	bl	t3_read_reg
	ldr	r8, .L13+8
	ldr	r3, [r8]
	ands	r3, r0, r3
	beq	.L2
	ldr	r3, .L13+12
	ldr	r3, [r3]
	rsb	r3, r3, #0
.L1:
	ldr	r2, .L13+4
	ldr	r1, [r2]
	ldr	r2, [sp, #28]
	eors	r1, r2, r1
	mov	r2, #0
	bne	.L11
	mov	r0, r3
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	str	r3, [sp, #20]
	ldr	r3, .L13+16
	lsl	r2, r9, #16
	ldr	r1, [r3]
	mov	r0, r4
	bl	t3_write_reg
	ldr	r1, [r7]
	mov	r0, r5
	str	r1, [sp, #16]
	bl	V_CONTEXT_CMD_OPCODE
	mov	r10, r0
	mov	r0, r6
	bl	V_CONTEXT
	mov	r9, #1
	ldr	fp, .L13+20
	orr	r0, r10, r0
	ldr	r2, [fp]
	ldr	r10, .L13+24
	orr	r2, r0, r2
	ldr	r1, [sp, #16]
	mov	r0, r4
	bl	t3_write_reg
	ldr	r1, [r10]
	add	r2, sp, #24
	stm	sp, {r1, r9}
	ldr	r3, [sp, #20]
	str	r2, [sp, #8]
	mov	r0, r4
	ldr	r2, [r8]
	ldr	r1, [r7]
	bl	t3_wait_op_done_val
	subs	r3, r0, #0
	bne	.L9
	sub	r5, r5, #2
	cmp	r5, #4
	bhi	.L1
	ldr	r2, [r4]
	cmp	r2, #0
	bgt	.L12
	str	r3, [sp, #16]
	ldr	r5, [r7]
	bl	V_CONTEXT_CMD_OPCODE
	mov	r2, r0
	mov	r0, r6
	ldr	fp, [fp]
	mov	r6, r2
	bl	V_CONTEXT
	orr	r6, r6, r0
	mov	r1, r5
	orr	r2, r6, fp
	mov	r0, r4
	bl	t3_write_reg
	ldr	r2, [r10]
	mov	r0, r4
	stm	sp, {r2, r9}
	ldr	r3, [sp, #16]
	ldr	r2, [r8]
	ldr	r1, [r7]
	bl	t3_wait_op_done
	cmp	r0, #0
	beq	.L6
.L9:
	ldr	r3, .L13+28
	ldr	r3, [r3]
	rsb	r3, r3, #0
	b	.L1
.L12:
	ldr	r0, [sp, #24]
	bl	G_CQ_INDEX
	mov	r3, r0
	b	.L1
.L6:
	ldr	r3, .L13+16
	mov	r0, r4
	ldr	r1, [r3]
	bl	t3_read_reg
	bl	G_CQ_INDEX
	mov	r3, r0
	b	.L1
.L11:
	bl	__stack_chk_fail
.L14:
	.align	2
.L13:
	.word	A_SG_CONTEXT_CMD
	.word	.LC0
	.word	F_CONTEXT_CMD_BUSY
	.word	EBUSY
	.word	A_SG_CONTEXT_DATA0
	.word	F_CQ
	.word	SG_CONTEXT_CMD_ATTEMPTS
	.word	EIO
	.size	t3_sge_cqcntxt_op, .-t3_sge_cqcntxt_op
	.comm	SG_CONTEXT_CMD_ATTEMPTS,4,4
	.comm	F_CQ,4,4
	.comm	F_CONTEXT_CMD_BUSY,4,4
	.comm	EIO,4,4
	.comm	EBUSY,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
