	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ucma_init_device
_ucma_init_device:                      ## @ucma_init_device
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r14d, %r14d
	cmpq	$0, 8(%rdi)
	jne	LBB0_12
## %bb.1:
	movq	%rdi, %r12
	movl	48(%rdi), %edi
	callq	_ucma_open_device
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_13
## %bb.2:
	leaq	-80(%rbp), %rsi
	movq	%rax, %rdi
	callq	_ibv_query_device
	testl	%eax, %eax
	je	LBB0_3
LBB0_11:
	movl	%eax, %edi
	callq	_ERR
	movl	%eax, %r14d
	movq	8(%r12), %rdi
	callq	_ibv_close_device
	movq	$0, 8(%r12)
	jmp	LBB0_12
LBB0_13:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR                            ## TAILCALL
LBB0_3:
	movl	-80(%rbp), %edi
	shll	$2, %edi
	callq	_malloc
	movq	%rax, 40(%r12)
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	movl	-80(%rbp), %eax
	testl	%eax, %eax
	jle	LBB0_9
## %bb.5:
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %r15
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	(%rcx), %eax
	movq	40(%r12), %rcx
	movl	%eax, (%rcx,%rbx,4)
	movslq	-80(%rbp), %rax
	movq	%r13, %rbx
	cmpq	%rax, %r13
	jge	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rdi
	leaq	1(%rbx), %r13
	movl	%r13d, %esi
	movq	%r15, %rdx
	callq	_ibv_query_port
	movq	%r15, %rcx
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_IBV_LINK_LAYER_UNSPECIFIED@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_9:
	movl	%eax, (%r12)
	movl	-56(%rbp), %eax
	movl	%eax, 32(%r12)
	movups	-72(%rbp), %xmm0
	movups	%xmm0, 16(%r12)
	movq	_cma_init_cnt@GOTPCREL(%rip), %rax
	incl	(%rax)
LBB0_12:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IBV_LINK_LAYER_UNSPECIFIED,4,2 ## @IBV_LINK_LAYER_UNSPECIFIED
	.comm	_cma_init_cnt,4,2               ## @cma_init_cnt
	.no_dead_strip	_ucma_init_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ucma_init_device
_ucma_init_device:                      ; @ucma_init_device
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_11
LBB0_2:
	mov	x19, x0
	ldr	w0, [x0, #48]
	bl	_ucma_open_device
	str	x0, [x19, #8]
	cbz	x0, LBB0_5
; %bb.3:
	add	x1, sp, #8
	bl	_ibv_query_device
	cbz	w0, LBB0_6
LBB0_4:
	bl	_ERR
	mov	x20, x0
	ldr	x0, [x19, #8]
	bl	_ibv_close_device
	str	xzr, [x19, #8]
	b	LBB0_11
LBB0_5:
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_ERR
LBB0_6:
	ldr	w8, [sp, #8]
	lsl	w0, w8, #2
	bl	_malloc
	str	x0, [x19, #40]
	cbz	x0, LBB0_12
; %bb.7:
	ldr	w8, [sp, #8]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x23, #0
	add	x21, sp, #40
Lloh3:
	adrp	x22, _IBV_LINK_LAYER_UNSPECIFIED@GOTPAGE
Lloh4:
	ldr	x22, [x22, _IBV_LINK_LAYER_UNSPECIFIED@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, #8]
	add	x20, x23, #1
	add	x2, sp, #40
	mov	x1, x20
	bl	_ibv_query_port
	cmp	x0, #0
	csel	x8, x21, x22, eq
	ldr	w8, [x8]
	ldr	x9, [x19, #40]
	str	w8, [x9, x23, lsl #2]
	ldrsw	x8, [sp, #8]
	mov	x23, x20
	cmp	x20, x8
	b.lt	LBB0_9
LBB0_10:
	mov	w20, #0
	str	w8, [x19]
	ldr	w8, [sp, #32]
	str	w8, [x19, #32]
	ldp	x9, x8, [sp, #16]
	stp	x9, x8, [x19, #16]
Lloh5:
	adrp	x8, _cma_init_cnt@GOTPAGE
Lloh6:
	ldr	x8, [x8, _cma_init_cnt@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_11:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_12:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IBV_LINK_LAYER_UNSPECIFIED,4,2 ; @IBV_LINK_LAYER_UNSPECIFIED
	.comm	_cma_init_cnt,4,2               ; @cma_init_cnt
	.no_dead_strip	_ucma_init_device
.subsections_via_symbols
