	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cma_ib_acquire_dev
_cma_ib_acquire_dev:                    ## @cma_ib_acquire_dev
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	32(%rdi), %rax
	movq	_ARPHRD_INFINIBAND@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.1:
	movq	8(%r12), %rax
	movq	_RDMA_PS_IPOIB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_3:
	movl	(%r15), %esi
	movl	4(%r15), %edi
	callq	_rdma_protocol_roce
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	24(%r12), %rdi
	leaq	-40(%rbp), %rsi
	callq	_rdma_ip2gid
	jmp	LBB0_6
LBB0_5:
	leaq	32(%r12), %rdi
	movq	40(%r12), %rbx
	callq	_rdma_addr_gid_offset
	addq	%rax, %rbx
	leaq	-40(%rbp), %rdi
	movq	%rbx, %rsi
	movl	$4, %edx
	callq	_memcpy
LBB0_6:
	movq	(%r14), %rax
	movq	(%rax), %rax
	movslq	(%r15), %rsi
	movl	-4(%rax,%rsi,4), %edx
	movl	4(%r15), %edi
	leaq	-40(%rbp), %rcx
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%r12, %r8
	callq	_cma_validate_port
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	jmp	LBB0_9
LBB0_8:
	movl	(%r15), %eax
	movl	%eax, 16(%r12)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_cma_bind_sgid_attr
	movq	_lock@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	(%r14), %rsi
	movq	%r12, %rdi
	callq	_cma_attach_to_dev
	movq	%rbx, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ARPHRD_INFINIBAND,8,3          ## @ARPHRD_INFINIBAND
	.comm	_RDMA_PS_IPOIB,8,3              ## @RDMA_PS_IPOIB
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_lock,4,2                       ## @lock
	.no_dead_strip	_cma_ib_acquire_dev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cma_ib_acquire_dev
_cma_ib_acquire_dev:                    ; @cma_ib_acquire_dev
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	mov	x22, x0
	ldr	x8, [x22, #32]!
Lloh0:
	adrp	x9, _ARPHRD_INFINIBAND@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ARPHRD_INFINIBAND@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.1:
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _RDMA_PS_IPOIB@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RDMA_PS_IPOIB@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_3:
	ldp	w1, w0, [x21]
	bl	_rdma_protocol_roce
	cbz	x0, LBB0_5
; %bb.4:
	add	x0, x19, #24
	add	x1, sp, #8
	bl	_rdma_ip2gid
	b	LBB0_6
LBB0_5:
	ldr	x23, [x19, #40]
	mov	x0, x22
	bl	_rdma_addr_gid_offset
	add	x1, x0, x23
	add	x0, sp, #8
	mov	w2, #4
	bl	_memcpy
LBB0_6:
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldp	w1, w0, [x21]
	sub	w9, w1, #1
	ldr	w2, [x8, w9, sxtw #2]
	add	x3, sp, #8
	mov	x4, x19
	bl	_cma_validate_port
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.7:
	mov	x0, x22
	bl	_PTR_ERR
	b	LBB0_9
LBB0_8:
	ldr	w8, [x21]
	str	w8, [x19, #16]
	mov	x0, x19
	mov	x1, x22
	bl	_cma_bind_sgid_attr
Lloh9:
	adrp	x21, _lock@GOTPAGE
Lloh10:
	ldr	x21, [x21, _lock@GOTPAGEOFF]
	mov	x0, x21
	bl	_mutex_lock
	ldr	x1, [x20]
	mov	x0, x19
	bl	_cma_attach_to_dev
	mov	x0, x21
	bl	_mutex_unlock
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ARPHRD_INFINIBAND,8,3          ; @ARPHRD_INFINIBAND
	.comm	_RDMA_PS_IPOIB,8,3              ; @RDMA_PS_IPOIB
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_lock,4,2                       ; @lock
	.no_dead_strip	_cma_ib_acquire_dev
.subsections_via_symbols
