	.file	"extr_cm.c_ucm_get_dev_index.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"/sys/class/infiniband_cm/ucm%d"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"ibdev"
	.text
	.p2align 4
	.type	ucm_get_dev_index, @function
ucm_get_dev_index:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 40
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	QWORD PTR -72[rbp], rdi
	mov	rcx, rsp
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR IBV_SYSFS_NAME_MAX[rip]
	mov	r13, rax
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L19:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L19
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L20
.L4:
	mov	eax, DWORD PTR IB_UCM_MAX_DEVICES[rip]
	mov	rbx, rsp
	xor	r12d, r12d
	lea	r15, -64[rbp]
	lea	r14, .LC0[rip]
	test	eax, eax
	jg	.L5
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L22:
	mov	rdi, QWORD PTR -64[rbp]
	mov	ecx, r13d
	mov	rdx, rbx
	lea	rsi, .LC1[rip]
	call	ibv_read_sysfs_file@PLT
	test	eax, eax
	js	.L8
	mov	rdi, QWORD PTR -72[rbp]
	mov	rsi, rbx
	call	strcmp@PLT
	mov	rdi, QWORD PTR -64[rbp]
	test	eax, eax
	je	.L21
	call	free@PLT
.L8:
	add	r12d, 1
	cmp	DWORD PTR IB_UCM_MAX_DEVICES[rip], r12d
	jle	.L7
.L5:
	mov	edx, r12d
	mov	rsi, r14
	mov	rdi, r15
	call	asprintf@PLT
	test	eax, eax
	jns	.L22
.L7:
	mov	r12d, -1
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L23
	lea	rsp, -40[rbp]
	mov	eax, r12d
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	call	free@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L20:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ucm_get_dev_index, .-ucm_get_dev_index
	.comm	IB_UCM_MAX_DEVICES,4,4
	.comm	IBV_SYSFS_NAME_MAX,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_cm.c_ucm_get_dev_index.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"/sys/class/infiniband_cm/ucm%d\000"
	.align	2
.LC1:
	.ascii	"ibdev\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ucm_get_dev_index, %function
ucm_get_dev_index:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #12
	ldr	r3, .L15
	ldr	r7, .L15+4
	ldr	r6, [r3]
	ldr	r2, [r7]
	add	r3, r6, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r3, .L15+8
	cmp	r2, #0
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	ble	.L4
	mov	r10, r0
	mov	r5, sp
	mov	r4, #0
	ldr	r8, .L15+12
	ldr	r9, .L15+16
	b	.L2
.L13:
	mov	r3, r6
	mov	r2, r5
	mov	r1, r9
	ldr	r0, [fp, #-44]
	bl	ibv_read_sysfs_file
	cmp	r0, #0
	blt	.L5
	mov	r1, r5
	mov	r0, r10
	bl	strcmp
	cmp	r0, #0
	ldr	r0, [fp, #-44]
	beq	.L12
	bl	free
.L5:
	ldr	r3, [r7]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L4
.L2:
	mov	r2, r4
	mov	r1, r8
	sub	r0, fp, #44
	bl	asprintf
	cmp	r0, #0
	bge	.L13
.L4:
	mvn	r4, #0
.L1:
	ldr	r3, .L15+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	mov	r0, r4
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	bl	free
	b	.L1
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	IBV_SYSFS_NAME_MAX
	.word	IB_UCM_MAX_DEVICES
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	ucm_get_dev_index, .-ucm_get_dev_index
	.comm	IB_UCM_MAX_DEVICES,4,4
	.comm	IBV_SYSFS_NAME_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
