	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efa_alloc_pd                   ## -- Begin function efa_alloc_pd
	.p2align	4, 0x90
_efa_alloc_pd:                          ## @efa_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_to_edev
	movq	%rax, %r14
	movl	$0, -48(%rbp)
	movq	%rbx, %rdi
	callq	_to_epd
	movq	%rax, %r12
	movq	8(%r15), %rdx
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_ib_is_udata_cleared
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	leaq	8(%r14), %rdi
	leaq	-40(%rbp), %rsi
	callq	_efa_com_alloc_pd
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:
	movl	-40(%rbp), %edx
	movl	%edx, (%r12)
	movl	%edx, -48(%rbp)
	movq	(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.5:
	movl	$4, %edi
	callq	_min
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_ib_copy_to_udata
	testl	%eax, %eax
	je	LBB0_6
## %bb.8:
	movl	%eax, %ebx
	movq	%r14, %rdi
	addq	$4, %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_ibdev_dbg
	movl	-40(%rbp), %esi
	movq	%r14, %rdi
	callq	_efa_pd_dealloc
	jmp	LBB0_9
LBB0_2:
	movq	%r14, %rdi
	addq	$4, %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_ibdev_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_9:
	movq	%r14, %rdi
	callq	_atomic64_inc
LBB0_10:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%r12), %edx
LBB0_7:
	addq	$4, %r14
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_ibdev_dbg
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Incompatible ABI params, udata not cleared\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Failed to copy udata for alloc_pd\n"

L_.str.2:                               ## @.str.2
	.asciz	"Allocated pd[%d]\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efa_alloc_pd                   ; -- Begin function efa_alloc_pd
	.p2align	2
_efa_alloc_pd:                          ; @efa_alloc_pd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x1
	mov	x21, x0
	ldr	w0, [x0]
	bl	_to_edev
	mov	x19, x0
	str	wzr, [sp, #24]
	mov	x0, x21
	bl	_to_epd
	mov	x21, x0
	ldr	x2, [x20, #8]
	cbz	x2, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	w1, #0
	bl	_ib_is_udata_cleared
	cbz	w0, LBB0_6
LBB0_2:
	add	x0, x19, #8
	add	x1, sp, #16
	bl	_efa_com_alloc_pd
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.3:
	ldr	w8, [sp, #16]
	str	w8, [x21]
	str	w8, [sp, #24]
	ldr	x1, [x20]
	cbz	x1, LBB0_10
; %bb.4:
	mov	w0, #4
	bl	_min
	mov	x2, x0
	add	x1, sp, #24
	mov	x0, x20
	bl	_ib_copy_to_udata
	cbz	w0, LBB0_9
; %bb.5:
	mov	x22, x0
	add	x0, x19, #4
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_ibdev_dbg
	ldr	w1, [sp, #16]
	mov	x0, x19
	bl	_efa_pd_dealloc
	b	LBB0_7
LBB0_6:
	add	x0, x19, #4
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ibdev_dbg
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_7:
	mov	x0, x19
	bl	_atomic64_inc
LBB0_8:
	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
	add	sp, sp, #80
	ret
LBB0_9:
	ldr	w8, [x21]
LBB0_10:
	add	x0, x19, #4
	str	x8, [sp]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_ibdev_dbg
	mov	w22, #0
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Incompatible ABI params, udata not cleared\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Failed to copy udata for alloc_pd\n"

l_.str.2:                               ; @.str.2
	.asciz	"Allocated pd[%d]\n"

.subsections_via_symbols
