	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_roce_alloc_pd              ## -- Begin function hns_roce_alloc_pd
	.p2align	4, 0x90
_hns_roce_alloc_pd:                     ## @hns_roce_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	%rsi, %r13
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	movq	%r15, %rdi
	callq	_to_hr_dev
	movq	(%rax), %r14
	movq	%rbx, %rdi
	callq	_to_hr_pd
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_to_hr_dev
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_hns_roce_pd_alloc
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_5
LBB0_2:
	xorl	%ebx, %ebx
	testq	%r13, %r13
	je	LBB0_5
## %bb.3:
	movl	(%r12), %eax
	movl	%eax, -48(%rbp)
	leaq	-48(%rbp), %rsi
	movq	%r13, %rdi
	movl	$4, %edx
	callq	_ib_copy_to_udata
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_to_hr_dev
	movl	(%r12), %esi
	movq	%rax, %rdi
	callq	_hns_roce_pd_free
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[alloc_pd]hns_roce_pd_alloc failed!\n"

L_.str.1:                               ## @.str.1
	.asciz	"[alloc_pd]ib_copy_to_udata failed!\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_roce_alloc_pd              ; -- Begin function hns_roce_alloc_pd
	.p2align	2
_hns_roce_alloc_pd:                     ; @hns_roce_alloc_pd
	.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, x1
	mov	x22, x0
	ldr	x20, [x0]
	mov	x0, x20
	bl	_to_hr_dev
	ldr	x19, [x0]
	mov	x0, x22
	bl	_to_hr_pd
	mov	x22, x0
	mov	x0, x20
	bl	_to_hr_dev
	mov	x1, x22
	bl	_hns_roce_pd_alloc
	cbz	w0, LBB0_2
; %bb.1:
	mov	x23, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_6
LBB0_2:
	cbz	x21, LBB0_5
; %bb.3:
	ldr	w8, [x22]
	str	w8, [sp, #8]
	add	x1, sp, #8
	mov	x0, x21
	mov	w2, #4
	bl	_ib_copy_to_udata
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_to_hr_dev
	ldr	w1, [x22]
	bl	_hns_roce_pd_free
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh4:
	adrp	x8, _EFAULT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_6
LBB0_5:
	mov	w23, #0
LBB0_6:
	mov	x0, x23
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[alloc_pd]hns_roce_pd_alloc failed!\n"

l_.str.1:                               ; @.str.1
	.asciz	"[alloc_pd]ib_copy_to_udata failed!\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
.subsections_via_symbols
