	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___ib_alloc_pd                  ## -- Begin function __ib_alloc_pd
	.p2align	4, 0x90
___ib_alloc_pd:                         ## @__ib_alloc_pd
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	_ib_pd@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_rdma_zalloc_drv_obj
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	movq	%r15, 24(%rax)
	movq	$0, 40(%rax)
	movq	$0, 8(%rax)
	leaq	36(%rax), %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	movl	%r12d, (%r14)
	movq	_RDMA_RESTRACK_PD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r14, %rbx
	addq	$32, %rbx
	movl	%eax, 32(%r14)
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_rdma_restrack_set_task
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	*8(%r15)
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r13d
	movq	%r14, %rdi
	callq	_kfree
	movl	%r13d, %edi
	jmp	LBB0_2
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_2:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_5:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_rdma_restrack_kadd
	movq	_IB_DEVICE_LOCAL_DMA_LKEY@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, (%r15)
	je	LBB0_7
## %bb.6:
	movl	24(%r15), %eax
	movl	%eax, 20(%r14)
	xorl	%r13d, %r13d
	jmp	LBB0_8
LBB0_7:
	movq	_IB_ACCESS_LOCAL_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_8:
	movq	_IB_PD_UNSAFE_GLOBAL_RKEY@GOTPCREL(%rip), %rcx
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.9:
	leaq	L_.str(%rip), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_pr_warn
	movq	_IB_ACCESS_REMOTE_READ@GOTPCREL(%rip), %rax
	movq	_IB_ACCESS_REMOTE_WRITE@GOTPCREL(%rip), %rcx
	orl	(%rax), %r13d
	orl	(%rcx), %r13d
LBB0_10:
	testl	%r13d, %r13d
	je	LBB0_16
## %bb.11:
	movq	24(%r14), %rax
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	*16(%rax)
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_12
## %bb.17:
	movq	%r14, %rdi
	callq	_ib_dealloc_pd
	movq	%r12, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_CAST                       ## TAILCALL
LBB0_12:
	movq	24(%r14), %rax
	movq	%rax, 40(%r12)
	movq	%r14, 32(%r12)
	movq	_IB_MR_TYPE_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r12)
	movq	$0, 16(%r12)
	movl	$0, (%r12)
	movq	%r12, 8(%r14)
	movl	(%rbx), %eax
	testl	%eax, (%r15)
	jne	LBB0_14
## %bb.13:
	movl	8(%r12), %eax
	movl	%eax, 20(%r14)
LBB0_14:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movq	_IB_PD_UNSAFE_GLOBAL_RKEY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_16
## %bb.15:
	movl	4(%r12), %eax
	movl	%eax, 16(%r14)
LBB0_16:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ib_pd,4,2                      ## @ib_pd
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_RDMA_RESTRACK_PD,4,2           ## @RDMA_RESTRACK_PD
	.comm	_IB_DEVICE_LOCAL_DMA_LKEY,4,2   ## @IB_DEVICE_LOCAL_DMA_LKEY
	.comm	_IB_ACCESS_LOCAL_WRITE,4,2      ## @IB_ACCESS_LOCAL_WRITE
	.comm	_IB_PD_UNSAFE_GLOBAL_RKEY,4,2   ## @IB_PD_UNSAFE_GLOBAL_RKEY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: enabling unsafe global rkey\n"

	.comm	_IB_ACCESS_REMOTE_READ,4,2      ## @IB_ACCESS_REMOTE_READ
	.comm	_IB_ACCESS_REMOTE_WRITE,4,2     ## @IB_ACCESS_REMOTE_WRITE
	.comm	_IB_MR_TYPE_DMA,4,2             ## @IB_MR_TYPE_DMA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___ib_alloc_pd                  ; -- Begin function __ib_alloc_pd
	.p2align	2
___ib_alloc_pd:                         ; @__ib_alloc_pd
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _ib_pd@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ib_pd@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_rdma_zalloc_drv_obj
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	str	x21, [x0, #24]
	str	xzr, [x0, #40]
	add	x0, x0, #36
	str	xzr, [x19, #8]
	mov	w1, #0
	bl	_atomic_set
	str	w20, [x19]
Lloh3:
	adrp	x8, _RDMA_RESTRACK_PD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RDMA_RESTRACK_PD@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x23, x19
	str	w8, [x23, #32]!
	mov	x0, x23
	mov	x1, x22
	bl	_rdma_restrack_set_task
	ldr	x8, [x21, #8]
	mov	x0, x19
	mov	x1, #0
	blr	x8
	cbz	w0, LBB0_5
; %bb.2:
	mov	x24, x0
	mov	x0, x19
	bl	_kfree
	mov	x0, x24
	b	LBB0_4
LBB0_3:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_5:
	mov	x0, x23
	bl	_rdma_restrack_kadd
	ldr	w8, [x21]
Lloh9:
	adrp	x24, _IB_DEVICE_LOCAL_DMA_LKEY@GOTPAGE
Lloh10:
	ldr	x24, [x24, _IB_DEVICE_LOCAL_DMA_LKEY@GOTPAGEOFF]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
	mov	w23, #0
	ldr	w8, [x21, #24]
	str	w8, [x19, #20]
	b	LBB0_8
LBB0_7:
Lloh11:
	adrp	x8, _IB_ACCESS_LOCAL_WRITE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IB_ACCESS_LOCAL_WRITE@GOTPAGEOFF]
Lloh13:
	ldr	w23, [x8]
LBB0_8:
Lloh14:
	adrp	x25, _IB_PD_UNSAFE_GLOBAL_RKEY@GOTPAGE
Lloh15:
	ldr	x25, [x25, _IB_PD_UNSAFE_GLOBAL_RKEY@GOTPAGEOFF]
	ldr	w8, [x25]
	tst	w8, w20
	b.eq	LBB0_10
; %bb.9:
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_pr_warn
Lloh18:
	adrp	x8, _IB_ACCESS_REMOTE_READ@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IB_ACCESS_REMOTE_READ@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _IB_ACCESS_REMOTE_WRITE@GOTPAGE
Lloh22:
	ldr	x9, [x9, _IB_ACCESS_REMOTE_WRITE@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w8, w23
	orr	w23, w8, w9
LBB0_10:
	cbz	w23, LBB0_17
; %bb.11:
	ldr	x8, [x19, #24]
	ldr	x8, [x8, #16]
	mov	x0, x19
	mov	x1, x23
	blr	x8
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_ib_dealloc_pd
	mov	x0, x22
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_ERR_CAST
LBB0_13:
	ldr	x8, [x19, #24]
	stp	x19, x8, [x22, #32]
Lloh24:
	adrp	x8, _IB_MR_TYPE_DMA@GOTPAGE
Lloh25:
	ldr	x8, [x8, _IB_MR_TYPE_DMA@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	str	w8, [x22, #24]
	str	xzr, [x22, #16]
	str	wzr, [x22]
	str	x22, [x19, #8]
	ldr	w8, [x21]
	ldr	w9, [x24]
	tst	w9, w8
	b.ne	LBB0_15
; %bb.14:
	ldr	w8, [x22, #8]
	str	w8, [x19, #20]
LBB0_15:
	ldr	w8, [x25]
	tst	w8, w20
	b.eq	LBB0_17
; %bb.16:
	ldr	w8, [x22, #4]
	str	w8, [x19, #16]
LBB0_17:
	mov	x0, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_ib_pd,4,2                      ; @ib_pd
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_RDMA_RESTRACK_PD,4,2           ; @RDMA_RESTRACK_PD
	.comm	_IB_DEVICE_LOCAL_DMA_LKEY,4,2   ; @IB_DEVICE_LOCAL_DMA_LKEY
	.comm	_IB_ACCESS_LOCAL_WRITE,4,2      ; @IB_ACCESS_LOCAL_WRITE
	.comm	_IB_PD_UNSAFE_GLOBAL_RKEY,4,2   ; @IB_PD_UNSAFE_GLOBAL_RKEY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: enabling unsafe global rkey\n"

	.comm	_IB_ACCESS_REMOTE_READ,4,2      ; @IB_ACCESS_REMOTE_READ
	.comm	_IB_ACCESS_REMOTE_WRITE,4,2     ; @IB_ACCESS_REMOTE_WRITE
	.comm	_IB_MR_TYPE_DMA,4,2             ; @IB_MR_TYPE_DMA
.subsections_via_symbols
