	.file	"extr_t3_hw.c_t3_sge_init_ecntxt.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	t3_sge_init_ecntxt
	.type	t3_sge_init_ecntxt, @function
t3_sge_init_ecntxt:
.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
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, r9d
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	cmp	DWORD PTR SGE_CNTXT_OFLD[rip], ecx
	mov	ebx, DWORD PTR FW_WR_NUM[rip]
	mov	eax, DWORD PTR 96[rsp]
	mov	r14d, DWORD PTR 104[rsp]
	mov	DWORD PTR 12[rsp], esi
	mov	r15d, DWORD PTR 112[rsp]
	mov	r11d, DWORD PTR 120[rsp]
	mov	DWORD PTR 16[rsp], r8d
	mov	DWORD PTR 20[rsp], eax
	jne	.L2
	xor	ebx, ebx
.L2:
	test	r12d, 4095
	je	.L3
	mov	eax, DWORD PTR EINVAL[rip]
	add	rsp, 40
	.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
.L3:
	.cfi_restore_state
	mov	esi, DWORD PTR A_SG_CONTEXT_CMD[rip]
	mov	rdi, rbp
	mov	DWORD PTR 28[rsp], r11d
	mov	DWORD PTR 24[rsp], ecx
	call	t3_read_reg@PLT
	test	DWORD PTR F_CONTEXT_CMD_BUSY[rip], eax
	mov	ecx, DWORD PTR 24[rsp]
	mov	r11d, DWORD PTR 28[rsp]
	je	.L5
	mov	eax, DWORD PTR EBUSY[rip]
	add	rsp, 40
	.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
.L5:
	.cfi_restore_state
	mov	edi, r11d
	mov	DWORD PTR 28[rsp], ecx
	call	V_EC_INDEX@PLT
	mov	edi, ebx
	mov	DWORD PTR 24[rsp], eax
	call	V_EC_CREDITS@PLT
	or	eax, DWORD PTR 24[rsp]
	mov	edi, r13d
	mov	ebx, eax
	call	V_EC_GTS@PLT
	mov	esi, DWORD PTR A_SG_CONTEXT_DATA0[rip]
	mov	edx, ebx
	mov	rdi, rbp
	or	edx, eax
	call	t3_write_reg@PLT
	mov	edi, DWORD PTR 20[rsp]
	call	V_EC_SIZE@PLT
	mov	edi, r12d
	sar	edi, 12
	mov	ebx, eax
	movzx	edi, di
	call	V_EC_BASE_LO@PLT
	mov	esi, DWORD PTR A_SG_CONTEXT_DATA1[rip]
	mov	rdi, rbp
	or	ebx, eax
	mov	edx, ebx
	mov	ebx, r12d
	call	t3_write_reg@PLT
	sar	ebx, 28
	mov	esi, DWORD PTR A_SG_CONTEXT_DATA2[rip]
	mov	rdi, rbp
	mov	edx, ebx
	call	t3_write_reg@PLT
	mov	ecx, 32
	sar	ebx, cl
	mov	edi, ebx
	and	edi, 15
	call	V_EC_BASE_HI@PLT
	mov	edi, DWORD PTR 16[rsp]
	mov	ebx, eax
	call	V_EC_RESPQ@PLT
	mov	ecx, DWORD PTR 28[rsp]
	or	ebx, eax
	mov	edi, ecx
	call	V_EC_TYPE@PLT
	mov	edi, r15d
	mov	r12d, eax
	call	V_EC_GEN@PLT
	mov	edi, r14d
	mov	r13d, eax
	call	V_EC_UP_TOKEN@PLT
	or	ebx, DWORD PTR F_EC_VALID[rip]
	mov	esi, DWORD PTR A_SG_CONTEXT_DATA3[rip]
	mov	rdi, rbp
	or	ebx, r12d
	or	ebx, r13d
	mov	edx, ebx
	or	edx, eax
	call	t3_write_reg@PLT
	mov	edx, DWORD PTR F_EGRESS[rip]
	mov	esi, DWORD PTR 12[rsp]
	add	rsp, 40
	.cfi_def_cfa_offset 56
	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
	.cfi_endproc
.LFE0:
	.size	t3_sge_init_ecntxt, .-t3_sge_init_ecntxt
	.comm	SGE_CNTXT_OFLD,4,4
	.comm	F_EGRESS,4,4
	.comm	F_EC_VALID,4,4
	.comm	F_CONTEXT_CMD_BUSY,4,4
	.comm	FW_WR_NUM,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_ecntxt.c"
	.text
	.align	2
	.global	t3_sge_init_ecntxt
	.syntax unified
	.arm
	.fpu softvfp
	.type	t3_sge_init_ecntxt, %function
t3_sge_init_ecntxt:
	@ args = 24, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r3
	ldr	r3, .L9
	sub	sp, sp, #20
	ldr	r3, [r3]
	str	r1, [sp, #4]
	cmp	r3, r5
	ldrne	r1, .L9+4
	ldr	r7, [sp, #60]
	ldrne	fp, [r1]
	lsl	r1, r7, #20
	ldr	r3, [sp, #68]
	lsr	r1, r1, #20
	moveq	fp, #0
	cmp	r1, #0
	mov	r6, r2
	mov	r4, r0
	ldr	r9, [sp, #56]
	ldr	r10, [sp, #64]
	ldr	r8, [sp, #72]
	ldr	r2, [sp, #76]
	str	r3, [sp, #8]
	beq	.L3
	ldr	r3, .L9+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	ldr	r1, .L9+12
	str	r2, [sp, #12]
	ldr	r1, [r1]
	bl	t3_read_reg
	ldr	r1, .L9+16
	ldr	r2, [sp, #12]
	ldr	r1, [r1]
	tst	r0, r1
	beq	.L5
	ldr	r3, .L9+20
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L5:
	ldr	r1, .L9+24
	mov	r0, r2
	ldr	r1, [r1]
	str	r1, [sp, #12]
	bl	V_EC_INDEX
	mov	r2, r0
	mov	r0, fp
	mov	fp, r2
	bl	V_EC_CREDITS
	mov	r2, r0
	mov	r0, r6
	orr	fp, fp, r2
	bl	V_EC_GTS
	ldr	r1, [sp, #12]
	orr	r2, fp, r0
	mov	r0, r4
	bl	t3_write_reg
	ldr	r2, .L9+28
	mov	r0, r10
	ldr	r10, [r2]
	bl	V_EC_SIZE
	ldr	r1, .L9+32
	mov	r6, r0
	and	r0, r1, r7, asr #12
	bl	V_EC_BASE_LO
	mov	r1, r10
	orr	r2, r6, r0
	mov	r0, r4
	bl	t3_write_reg
	ldr	r1, .L9+36
	asr	r6, r7, #28
	mov	r2, r6
	mov	r0, r4
	ldr	r1, [r1]
	bl	t3_write_reg
	mov	r3, #32
	ldr	r1, .L9+40
	asr	r3, r6, r3
	and	r0, r3, #15
	ldr	r10, [r1]
	bl	V_EC_BASE_HI
	mov	r6, r0
	mov	r0, r9
	bl	V_EC_RESPQ
	mov	r3, r0
	mov	r0, r5
	orr	r5, r6, r3
	bl	V_EC_TYPE
	mov	r2, r0
	mov	r0, r8
	mov	r8, r2
	bl	V_EC_GEN
	mov	r6, r0
	ldr	r0, [sp, #8]
	bl	V_EC_UP_TOKEN
	mov	r2, r0
	ldr	r3, .L9+44
	mov	r1, r10
	ldr	r3, [r3]
	mov	r0, r4
	orr	r5, r5, r3
	orr	r5, r5, r8
	orr	r5, r5, r6
	orr	r2, r5, r2
	bl	t3_write_reg
	mov	r0, r4
	ldr	r3, .L9+48
	ldr	r1, [sp, #4]
	ldr	r2, [r3]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	t3_sge_write_context
.L10:
	.align	2
.L9:
	.word	SGE_CNTXT_OFLD
	.word	FW_WR_NUM
	.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	65535
	.word	A_SG_CONTEXT_DATA2
	.word	A_SG_CONTEXT_DATA3
	.word	F_EC_VALID
	.word	F_EGRESS
	.size	t3_sge_init_ecntxt, .-t3_sge_init_ecntxt
	.comm	SGE_CNTXT_OFLD,4,4
	.comm	F_EGRESS,4,4
	.comm	F_EC_VALID,4,4
	.comm	F_CONTEXT_CMD_BUSY,4,4
	.comm	FW_WR_NUM,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
