	.file	"extr_cudbg_lib.c_cudbg_collect_sge_indirect.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	cudbg_collect_sge_indirect
	.type	cudbg_collect_sge_indirect, @function
cudbg_collect_sge_indirect:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pxor	xmm0, xmm0
	mov	edx, 104
	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
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rbx, QWORD PTR [rdi]
	mov	QWORD PTR [rsp], rsi
	lea	rcx, 16[rsp]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	QWORD PTR 8[rsp], rcx
	movaps	XMMWORD PTR 16[rsp], xmm0
	call	cudbg_get_buff@PLT
	mov	r14d, eax
	test	eax, eax
	jne	.L1
	mov	r13, QWORD PTR 16[rsp]
	xor	r15d, r15d
	mov	rbp, r13
.L3:
	mov	rax, QWORD PTR t5_sge_dbg_index_array[rip]
	mov	rcx, QWORD PTR 0[rbp]
	add	rbp, 40
	add	rax, r15
	add	r15, 8
	mov	rdx, QWORD PTR [rax]
	mov	rsi, QWORD PTR [rdx]
	mov	QWORD PTR -8[rbp], rsi
	mov	rdx, QWORD PTR [rax]
	mov	rdx, QWORD PTR 8[rdx]
	mov	QWORD PTR -16[rbp], rdx
	mov	rdi, QWORD PTR [rax]
	mov	r9, QWORD PTR 16[rdi]
	mov	rdi, rbx
	mov	QWORD PTR -32[rbp], r9
	mov	rax, QWORD PTR [rax]
	mov	r8, QWORD PTR 24[rax]
	mov	QWORD PTR -24[rbp], r8
	call	t4_read_indirect@PLT
	cmp	r15, 16
	jne	.L3
	mov	edi, DWORD PTR 4[rbx]
	lea	rbp, 80[r13]
	call	CHELSIO_CHIP_VERSION@PLT
	cmp	rax, QWORD PTR CHELSIO_T5[rip]
	jle	.L4
	mov	rdx, QWORD PTR t6_sge_qbase_index_array[rip]
	mov	rax, QWORD PTR [rdx]
	mov	QWORD PTR 96[r13], rax
	mov	eax, DWORD PTR SGE_QBASE_DATA_REG_NUM[rip]
	test	eax, eax
	jle	.L5
	lea	edi, -1[rax]
	xor	eax, eax
	sal	rdi, 3
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rdx, QWORD PTR t6_sge_qbase_index_array[rip]
	mov	rax, rsi
.L6:
	mov	rcx, QWORD PTR 8[rdx+rax]
	mov	rdx, QWORD PTR 88[r13]
	lea	rsi, 8[rax]
	mov	QWORD PTR [rdx+rax], rcx
	cmp	rdi, rax
	jne	.L20
.L5:
	mov	eax, DWORD PTR PCIE_FW_MASTER_M[rip]
	xor	r15d, r15d
	test	eax, eax
	js	.L10
	.p2align 4,,10
	.p2align 3
.L7:
	mov	edx, r15d
	mov	ecx, 1
	mov	rsi, rbp
	mov	rdi, rbx
	call	cudbg_read_sge_qbase_indirect_reg@PLT
	add	r15d, 1
	cmp	DWORD PTR PCIE_FW_MASTER_M[rip], r15d
	jge	.L7
.L10:
	mov	eax, DWORD PTR [rbx]
	test	eax, eax
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	mov	edx, r14d
	xor	ecx, ecx
	mov	rsi, rbp
	mov	rdi, rbx
	call	cudbg_read_sge_qbase_indirect_reg@PLT
	mov	eax, DWORD PTR [rbx]
	add	r14d, 1
	cmp	eax, r14d
	jg	.L8
.L9:
	mov	DWORD PTR 80[r13], eax
.L4:
	mov	rdx, QWORD PTR [rsp]
	mov	rsi, QWORD PTR 8[rsp]
	mov	rdi, r12
	call	cudbg_write_and_release_buff@PLT
	mov	r14d, eax
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L21
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	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
.L21:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	cudbg_collect_sge_indirect, .-cudbg_collect_sge_indirect
	.comm	t6_sge_qbase_index_array,8,8
	.comm	t5_sge_dbg_index_array,8,8
	.comm	SGE_QBASE_DATA_REG_NUM,4,4
	.comm	PCIE_FW_MASTER_M,4,4
	.comm	CHELSIO_T5,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_cudbg_lib.c_cudbg_collect_sge_indirect.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	cudbg_collect_sge_indirect
	.syntax unified
	.arm
	.fpu softvfp
	.type	cudbg_collect_sge_indirect, %function
cudbg_collect_sge_indirect:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, #0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	lr, .L22
	sub	sp, sp, #28
	mov	r2, #52
	add	r3, sp, #12
	ldr	lr, [lr]
	str	lr, [sp, #20]
	mov	lr,#0
	mov	r8, r0
	mov	r9, r1
	ldr	r5, [r0]
	str	ip, [sp, #12]
	str	ip, [sp, #16]
	bl	cudbg_get_buff
	subs	r4, r0, #0
	bne	.L1
	ldr	r7, [sp, #12]
	mov	r10, r4
	mov	r6, r7
	ldr	fp, .L22+4
.L3:
	ldr	ip, [fp]
	ldr	r3, [r6]
	ldr	r2, [ip, r10]
	mov	r0, r5
	ldr	r1, [r2]
	add	r6, r6, #20
	str	r1, [r6, #-4]
	ldr	r2, [ip, r10]
	ldr	r2, [r2, #4]
	str	r2, [r6, #-8]
	ldr	lr, [ip, r10]
	ldr	lr, [lr, #8]
	str	lr, [r6, #-16]
	ldr	ip, [ip, r10]
	add	r10, r10, #4
	ldr	ip, [ip, #12]
	str	ip, [r6, #-12]
	stm	sp, {ip, lr}
	bl	t4_read_indirect
	cmp	r10, #8
	bne	.L3
	ldr	r0, [r5, #4]
	bl	CHELSIO_CHIP_VERSION
	ldr	r3, .L22+8
	add	r10, r7, #40
	ldr	r3, [r3]
	cmp	r0, r3
	ble	.L4
	ldr	lr, .L22+12
	ldr	r3, .L22+16
	ldr	r1, [lr]
	ldr	ip, [r3]
	ldr	r3, [r1]
	cmp	ip, #0
	str	r3, [r7, #48]
	ble	.L5
	mov	r3, #0
	mov	r2, #4
	b	.L6
.L20:
	ldr	r1, [lr]
.L6:
	ldr	r0, [r1, r2]
	ldr	r1, [r7, #44]
	add	r2, r2, #4
	str	r0, [r1, r3, lsl #2]
	add	r3, r3, #1
	cmp	r3, ip
	bne	.L20
.L5:
	ldr	fp, .L22+20
	ldr	r3, [fp]
	cmp	r3, #0
	movge	r6, #0
	blt	.L10
.L7:
	mov	r3, #1
	mov	r2, r6
	mov	r1, r10
	mov	r0, r5
	bl	cudbg_read_sge_qbase_indirect_reg
	ldr	r3, [fp]
	add	r6, r6, #1
	cmp	r3, r6
	bge	.L7
.L10:
	ldr	r3, [r5]
	cmp	r3, #0
	ble	.L9
.L8:
	mov	r3, #0
	mov	r2, r4
	mov	r1, r10
	mov	r0, r5
	bl	cudbg_read_sge_qbase_indirect_reg
	ldr	r3, [r5]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L8
.L9:
	str	r3, [r7, #40]
.L4:
	mov	r2, r9
	mov	r0, r8
	add	r1, sp, #12
	bl	cudbg_write_and_release_buff
	mov	r4, r0
.L1:
	ldr	r3, .L22
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L21
	mov	r0, r4
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L21:
	bl	__stack_chk_fail
.L23:
	.align	2
.L22:
	.word	.LC0
	.word	t5_sge_dbg_index_array
	.word	CHELSIO_T5
	.word	t6_sge_qbase_index_array
	.word	SGE_QBASE_DATA_REG_NUM
	.word	PCIE_FW_MASTER_M
	.size	cudbg_collect_sge_indirect, .-cudbg_collect_sge_indirect
	.comm	t6_sge_qbase_index_array,4,4
	.comm	t5_sge_dbg_index_array,4,4
	.comm	SGE_QBASE_DATA_REG_NUM,4,4
	.comm	PCIE_FW_MASTER_M,4,4
	.comm	CHELSIO_T5,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
