	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movl	%esi, %r14d
	movq	%rdi, %r15
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	*24(%rdi)
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
LBB0_12:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r15, 56(%rbx)
	movq	$0, 40(%rbx)
	movq	$0, 16(%rbx)
	movq	%rbx, %rdi
	addq	$64, %rdi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	callq	_atomic_set
	movl	%r14d, (%rbx)
	movq	_IB_DEVICE_LOCAL_DMA_LKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_3
## %bb.2:
	movl	16(%r15), %eax
	movl	%eax, 32(%rbx)
	jmp	LBB0_4
LBB0_3:
	movq	_IB_ACCESS_LOCAL_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_4:
	movq	_IB_PD_UNSAFE_GLOBAL_RKEY@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	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_6:
	testl	%r13d, %r13d
	je	LBB0_12
## %bb.7:
	movq	56(%rbx), %rax
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	*8(%rax)
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.13:
	movq	%rbx, %rdi
	callq	_ib_dealloc_pd
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_CAST                       ## TAILCALL
LBB0_8:
	movq	56(%rbx), %rax
	movq	%rax, 56(%r12)
	movq	%rbx, 48(%r12)
	movq	$0, 40(%r12)
	movl	$0, 4(%r12)
	movq	%r12, 16(%rbx)
	movq	_IB_DEVICE_LOCAL_DMA_LKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	jne	LBB0_10
## %bb.9:
	movl	28(%r12), %eax
	movl	%eax, 32(%rbx)
LBB0_10:
	movq	_IB_PD_UNSAFE_GLOBAL_RKEY@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_12
## %bb.11:
	movl	8(%r12), %eax
	movl	%eax, 24(%rbx)
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.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
.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
	ldr	x8, [x0, #24]
	mov	x1, #0
	mov	x2, #0
	blr	x8
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
LBB0_1:
	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
LBB0_2:
	str	x21, [x19, #56]
	str	xzr, [x19, #40]
	add	x0, x19, #64
	str	xzr, [x19, #16]
	mov	w1, #0
	bl	_atomic_set
	str	w20, [x19]
	ldr	w8, [x21]
Lloh0:
	adrp	x24, _IB_DEVICE_LOCAL_DMA_LKEY@GOTPAGE
Lloh1:
	ldr	x24, [x24, _IB_DEVICE_LOCAL_DMA_LKEY@GOTPAGEOFF]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	mov	w23, #0
	ldr	w8, [x21, #16]
	str	w8, [x19, #32]
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x8, _IB_ACCESS_LOCAL_WRITE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IB_ACCESS_LOCAL_WRITE@GOTPAGEOFF]
Lloh4:
	ldr	w23, [x8]
LBB0_5:
Lloh5:
	adrp	x25, _IB_PD_UNSAFE_GLOBAL_RKEY@GOTPAGE
Lloh6:
	ldr	x25, [x25, _IB_PD_UNSAFE_GLOBAL_RKEY@GOTPAGEOFF]
	ldr	w8, [x25]
	tst	w8, w20
	b.eq	LBB0_7
; %bb.6:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_pr_warn
Lloh9:
	adrp	x8, _IB_ACCESS_REMOTE_READ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IB_ACCESS_REMOTE_READ@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _IB_ACCESS_REMOTE_WRITE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IB_ACCESS_REMOTE_WRITE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w23
	orr	w23, w8, w9
LBB0_7:
	cbz	w23, LBB0_1
; %bb.8:
	ldr	x8, [x19, #56]
	ldr	x8, [x8, #8]
	mov	x0, x19
	mov	x1, x23
	blr	x8
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.9:
	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_10:
	ldr	x8, [x19, #56]
	stp	x19, x8, [x22, #48]
	str	xzr, [x22, #40]
	str	wzr, [x22, #4]
	str	x22, [x19, #16]
	ldr	w8, [x21]
	ldr	w9, [x24]
	tst	w9, w8
	b.ne	LBB0_12
; %bb.11:
	ldr	w8, [x22, #28]
	str	w8, [x19, #32]
LBB0_12:
	ldr	w8, [x25]
	tst	w8, w20
	b.eq	LBB0_1
; %bb.13:
	ldr	w8, [x22, #8]
	str	w8, [x19, #24]
	b	LBB0_1
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.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
.subsections_via_symbols
