	.file	"extr_cma.c_ucma_init.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ucma_init
	.type	ucma_init, @function
ucma_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	r12d, DWORD PTR cma_dev_cnt[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	test	r12d, r12d
	je	.L21
	xor	r12d, r12d
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L22
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	lea	rdi, mut[rip]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR cma_dev_cnt[rip]
	test	eax, eax
	jne	.L19
	lea	rdi, idm_lock[rip]
	call	fastlock_init@PLT
	xor	eax, eax
	call	check_abi_version@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L23
.L4:
	lea	rdi, idm_lock[rip]
	call	fastlock_destroy@PLT
.L19:
	lea	rdi, mut[rip]
	call	pthread_mutex_unlock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	lea	rdi, 4[rsp]
	call	ibv_get_device_list@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L24
	mov	edi, DWORD PTR 4[rsp]
	test	edi, edi
	je	.L25
	mov	esi, 4
	call	calloc@PLT
	mov	QWORD PTR cma_dev_array[rip], rax
	test	rax, rax
	je	.L8
	mov	rdi, QWORD PTR 0[rbp]
	xor	r13d, r13d
	test	rdi, rdi
	jne	.L9
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L26:
	mov	rax, QWORD PTR cma_dev_array[rip]
.L9:
	lea	rbx, [rax+r13]
	add	r13, 4
	call	ibv_get_device_guid@PLT
	mov	rdi, QWORD PTR 0[rbp+r13*2]
	mov	DWORD PTR [rbx], eax
	test	rdi, rdi
	jne	.L26
.L10:
	mov	eax, DWORD PTR 4[rsp]
	mov	DWORD PTR cma_dev_cnt[rip], eax
	xor	eax, eax
	call	ucma_set_af_ib_support@PLT
	lea	rdi, mut[rip]
	call	pthread_mutex_unlock@PLT
	mov	rdi, rbp
	call	ibv_free_device_list@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L25:
	mov	edi, DWORD PTR ENODEV[rip]
	call	ERR@PLT
	mov	r12d, eax
.L7:
	mov	rdi, rbp
	call	ibv_free_device_list@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L24:
	mov	edi, DWORD PTR ENODEV[rip]
	call	ERR@PLT
	mov	r12d, eax
	jmp	.L4
.L8:
	mov	edi, DWORD PTR ENOMEM[rip]
	call	ERR@PLT
	mov	r12d, eax
	jmp	.L7
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ucma_init, .-ucma_init
	.comm	mut,4,4
	.comm	idm_lock,4,4
	.comm	cma_dev_cnt,4,4
	.comm	cma_dev_array,8,8
	.comm	ENOMEM,4,4
	.comm	ENODEV,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_cma.c_ucma_init.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ucma_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	ucma_init, %function
ucma_init:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r5, .L28
	ldr	r3, .L28+4
	ldr	r4, [r5]
	sub	sp, sp, #8
	cmp	r4, #0
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	movne	r4, #0
	beq	.L22
.L1:
	ldr	r3, .L28+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L23
	mov	r0, r4
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L22:
	ldr	r0, .L28+8
	bl	pthread_mutex_lock
	ldr	r3, [r5]
	cmp	r3, #0
	bne	.L20
	ldr	r0, .L28+12
	bl	fastlock_init
	bl	check_abi_version
	subs	r4, r0, #0
	beq	.L24
.L4:
	ldr	r0, .L28+12
	bl	fastlock_destroy
.L20:
	ldr	r0, .L28+8
	bl	pthread_mutex_unlock
	b	.L1
.L24:
	mov	r0, sp
	bl	ibv_get_device_list
	subs	r8, r0, #0
	beq	.L25
	ldr	r0, [sp]
	cmp	r0, #0
	beq	.L26
	mov	r1, #4
	bl	calloc
	ldr	r10, .L28+16
	cmp	r0, #0
	mov	r7, r0
	str	r0, [r10]
	beq	.L8
	ldr	r3, [r8]
	cmp	r3, #0
	beq	.L9
	mvn	r9, #3
	add	r6, r8, #4
	sub	r9, r9, r8
	b	.L10
.L27:
	ldr	r7, [r10]
.L10:
	mov	r0, r3
	bl	ibv_get_device_guid
	add	r2, r9, r6
	ldr	r3, [r6], #4
	str	r0, [r7, r2]
	cmp	r3, #0
	bne	.L27
.L9:
	ldr	r3, [sp]
	str	r3, [r5]
	bl	ucma_set_af_ib_support
	ldr	r0, .L28+8
	bl	pthread_mutex_unlock
	mov	r0, r8
	bl	ibv_free_device_list
	b	.L1
.L26:
	ldr	r3, .L28+20
	ldr	r0, [r3]
	bl	ERR
	mov	r4, r0
.L7:
	mov	r0, r8
	bl	ibv_free_device_list
	b	.L4
.L25:
	ldr	r3, .L28+20
	ldr	r0, [r3]
	bl	ERR
	mov	r4, r0
	b	.L4
.L23:
	bl	__stack_chk_fail
.L8:
	ldr	r3, .L28+24
	ldr	r0, [r3]
	bl	ERR
	mov	r4, r0
	b	.L7
.L29:
	.align	2
.L28:
	.word	cma_dev_cnt
	.word	.LC0
	.word	mut
	.word	idm_lock
	.word	cma_dev_array
	.word	ENODEV
	.word	ENOMEM
	.size	ucma_init, .-ucma_init
	.comm	mut,4,4
	.comm	idm_lock,4,4
	.comm	cma_dev_cnt,4,4
	.comm	cma_dev_array,4,4
	.comm	ENOMEM,4,4
	.comm	ENODEV,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
