	.file	"extr_cudbg_lib.c_cudbg_get_mem_region.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	cudbg_get_mem_region, @function
cudbg_get_mem_region:
.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	r13, rcx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xor	ebx, ebx
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	QWORD PTR 8[rsp], r8
	lea	rcx, 16[rsp]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	cudbg_meminfo_get_mem_index@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L3
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rax, QWORD PTR cudbg_region[rip]
	mov	rsi, r13
	mov	edi, DWORD PTR [rax+rbx*4]
	call	strcmp@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L20
	add	rbx, 1
.L3:
	mov	rdi, QWORD PTR cudbg_region[rip]
	call	ARRAY_SIZE@PLT
	cmp	rax, rbx
	ja	.L7
.L6:
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L21
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L20:
	.cfi_restore_state
	xor	r13d, r13d
	xor	r14d, r14d
	cmp	QWORD PTR 0[rbp], 0
	je	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rax, QWORD PTR 8[rbp]
	mov	rdi, QWORD PTR cudbg_region[rip]
	mov	r15, QWORD PTR [rax+r13]
	call	ARRAY_SIZE@PLT
	cmp	r15, rax
	jnb	.L8
	mov	rax, QWORD PTR 8[rbp]
	lea	rsi, [rax+r13]
	cmp	QWORD PTR 8[rsi], 0
	jne	.L9
	mov	rdx, QWORD PTR 0[rbp]
	mov	rdi, -1
	lea	rcx, -1[rdx]
	cmp	rcx, r14
	jbe	.L10
	mov	rdi, QWORD PTR 40[rax+r13]
	sub	rdi, 1
.L10:
	mov	QWORD PTR 8[rsi], rdi
.L9:
	cmp	QWORD PTR [rsi], rbx
	je	.L22
.L8:
	add	r14, 1
	add	r13, 24
	cmp	QWORD PTR 0[rbp], r14
	ja	.L5
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L22:
	mov	rax, QWORD PTR 16[rsp]
	mov	rdx, QWORD PTR 16[rsi]
	sal	rax, 4
	add	rax, QWORD PTR 16[rbp]
	mov	rcx, QWORD PTR [rax]
	cmp	rdx, rcx
	jge	.L11
	cmp	rcx, QWORD PTR 8[rsi]
	jg	.L6
.L11:
	cmp	rdx, QWORD PTR 8[rax]
	jg	.L6
	mov	rdi, QWORD PTR 8[rsp]
	mov	edx, 4
	call	memcpy@PLT
	jmp	.L1
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	cudbg_get_mem_region, .-cudbg_get_mem_region
	.comm	cudbg_region,8,8
	.comm	EINVAL,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_cudbg_lib.c_cudbg_get_mem_region.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cudbg_get_mem_region, %function
cudbg_get_mem_region:
	@ args = 4, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	ip, .L22
	sub	sp, sp, #12
	mov	r8, r3
	mov	r3, sp
	ldr	ip, [ip]
	str	ip, [sp, #4]
	mov	ip,#0
	mov	r7, r1
	ldr	r9, [sp, #48]
	bl	cudbg_meminfo_get_mem_index
	subs	r4, r0, #0
	bne	.L1
	mov	r5, r4
	ldr	r6, .L22+4
	b	.L3
.L7:
	ldr	r3, [r6]
	mov	r1, r8
	ldr	r0, [r3, r5, lsl #2]
	bl	strcmp
	subs	r4, r0, #0
	beq	.L19
	add	r5, r5, #1
.L3:
	ldr	r0, [r6]
	bl	ARRAY_SIZE
	cmp	r0, r5
	bhi	.L7
.L6:
	ldr	r3, .L22+8
	ldr	r0, [r3]
	rsb	r4, r0, #0
.L1:
	ldr	r3, .L22
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L19:
	ldr	r3, [r7]
	cmp	r3, #0
	movne	r8, r4
	movne	r10, r4
	beq	.L6
.L5:
	ldr	r3, [r7, #4]
	ldr	r0, [r6]
	ldr	fp, [r3, r8]
	bl	ARRAY_SIZE
	cmp	fp, r0
	bcs	.L8
	ldr	r1, [r7, #4]
	add	r1, r1, r8
	ldr	r3, [r1, #4]
	cmp	r3, #0
	bne	.L9
	ldr	r3, [r7]
	sub	r3, r3, #1
	cmp	r3, r10
	mvnls	r3, #0
	ldrhi	r3, [r1, #20]
	subhi	r3, r3, #1
	str	r3, [r1, #4]
.L9:
	ldr	r3, [r1]
	cmp	r3, r5
	beq	.L21
.L8:
	ldr	r3, [r7]
	add	r10, r10, #1
	cmp	r3, r10
	add	r8, r8, #12
	bhi	.L5
	b	.L6
.L21:
	ldr	r3, [r7, #8]
	ldr	r2, [sp]
	ldr	r0, [r1, #8]
	ldr	ip, [r3, r2, lsl #3]
	add	r3, r3, r2, lsl #3
	cmp	r0, ip
	bge	.L11
	ldr	r2, [r1, #4]
	cmp	ip, r2
	bgt	.L6
.L11:
	ldr	r3, [r3, #4]
	cmp	r0, r3
	bgt	.L6
	mov	r0, r9
	mov	r2, #4
	bl	memcpy
	b	.L1
.L20:
	bl	__stack_chk_fail
.L23:
	.align	2
.L22:
	.word	.LC0
	.word	cudbg_region
	.word	EINVAL
	.size	cudbg_get_mem_region, .-cudbg_get_mem_region
	.comm	cudbg_region,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
