	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocrdma_alloc_pd                ## -- Begin function ocrdma_alloc_pd
	.p2align	4, 0x90
_ocrdma_alloc_pd:                       ## @ocrdma_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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	callq	_get_ocrdma_dev
	movq	%rax, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	%r12, 16(%rax)
	testq	%r15, %r15
	je	LBB0_10
## %bb.4:
	testq	%r14, %r14
	je	LBB0_10
## %bb.5:
	movq	(%r12), %rcx
	movq	_OCRDMA_GEN2_FAMILY@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	xorl	%esi, %esi
	cmpq	(%rdx), %rcx
	sete	%sil
	movl	%esi, (%rbx)
	jne	LBB0_7
## %bb.6:
	movq	_OCRDMA_PD_MAX_DPP_ENABLED_QP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_7:
	movl	%eax, 8(%rbx)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ocrdma_mbx_alloc_pd
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_ocrdma_copy_pd_uresp
	testl	%eax, %eax
	je	LBB0_9
## %bb.12:
	movl	%eax, %r14d
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_ocrdma_dealloc_pd
	movl	%r14d, %edi
	jmp	LBB0_2
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	jmp	LBB0_2
LBB0_10:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ocrdma_mbx_alloc_pd
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_9
LBB0_11:
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r12d, %edi
LBB0_2:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_9:
	addq	$4, %rbx
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_OCRDMA_GEN2_FAMILY,8,3         ## @OCRDMA_GEN2_FAMILY
	.comm	_OCRDMA_PD_MAX_DPP_ENABLED_QP,4,2 ## @OCRDMA_PD_MAX_DPP_ENABLED_QP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocrdma_alloc_pd                ; -- Begin function ocrdma_alloc_pd
	.p2align	2
_ocrdma_alloc_pd:                       ; @ocrdma_alloc_pd
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x2
	mov	x21, x1
	bl	_get_ocrdma_dev
	mov	x22, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	str	x22, [x0, #16]
	cbz	x21, LBB0_7
; %bb.2:
	cbz	x20, LBB0_7
; %bb.3:
	ldr	x8, [x22]
Lloh3:
	adrp	x9, _OCRDMA_GEN2_FAMILY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _OCRDMA_GEN2_FAMILY@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w8, eq
	str	w8, [x19]
Lloh6:
	adrp	x8, _OCRDMA_PD_MAX_DPP_ENABLED_QP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OCRDMA_PD_MAX_DPP_ENABLED_QP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	csel	w8, w8, wzr, eq
	str	w8, [x19, #8]
	mov	x0, x22
	mov	x1, x19
	bl	_ocrdma_mbx_alloc_pd
	mov	x22, x0
	cbnz	w0, LBB0_8
; %bb.4:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_ocrdma_copy_pd_uresp
	cbz	w0, LBB0_10
; %bb.5:
	mov	x20, x0
	add	x0, x19, #4
	bl	_ocrdma_dealloc_pd
	mov	x0, x20
	b	LBB0_9
LBB0_6:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_7:
	mov	x0, x22
	mov	x1, x19
	bl	_ocrdma_mbx_alloc_pd
	mov	x22, x0
	cbz	w0, LBB0_10
LBB0_8:
	mov	x0, x19
	bl	_kfree
	mov	x0, x22
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_10:
	add	x0, x19, #4
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_OCRDMA_GEN2_FAMILY,8,3         ; @OCRDMA_GEN2_FAMILY
	.comm	_OCRDMA_PD_MAX_DPP_ENABLED_QP,4,2 ; @OCRDMA_PD_MAX_DPP_ENABLED_QP
.subsections_via_symbols
