	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocrdma_mbx_alloc_pd            ## -- Begin function ocrdma_mbx_alloc_pd
	.p2align	4, 0x90
_ocrdma_mbx_alloc_pd:                   ## @ocrdma_mbx_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	%rsi, %r14
	movq	%rdi, %r12
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_OCRDMA_CMD_ALLOC_PD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$4, %esi
	callq	_ocrdma_init_emb_mqe
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	cmpl	$0, (%r14)
	je	LBB0_4
## %bb.3:
	movq	_OCRDMA_ALLOC_PD_ENABLE_DPP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
LBB0_4:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ocrdma_mbx_cmd
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	movl	(%rbx), %eax
	movq	_OCRDMA_ALLOC_PD_RSP_PDID_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	movl	%ecx, 4(%r14)
	movq	_OCRDMA_ALLOC_PD_RSP_DPP@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.6:
	movl	$1, (%r14)
	movq	_OCRDMA_ALLOC_PD_RSP_DPP_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movl	%eax, 8(%r14)
	jmp	LBB0_8
LBB0_1:
	negl	%r15d
	jmp	LBB0_9
LBB0_7:
	movl	$0, (%r14)
	movq	$0, 16(%r14)
LBB0_8:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_9:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_OCRDMA_CMD_ALLOC_PD,4,2        ## @OCRDMA_CMD_ALLOC_PD
	.comm	_OCRDMA_ALLOC_PD_ENABLE_DPP,4,2 ## @OCRDMA_ALLOC_PD_ENABLE_DPP
	.comm	_OCRDMA_ALLOC_PD_RSP_PDID_MASK,4,2 ## @OCRDMA_ALLOC_PD_RSP_PDID_MASK
	.comm	_OCRDMA_ALLOC_PD_RSP_DPP,4,2    ## @OCRDMA_ALLOC_PD_RSP_DPP
	.comm	_OCRDMA_ALLOC_PD_RSP_DPP_PAGE_SHIFT,4,2 ## @OCRDMA_ALLOC_PD_RSP_DPP_PAGE_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocrdma_mbx_alloc_pd            ; -- Begin function ocrdma_mbx_alloc_pd
	.p2align	2
_ocrdma_mbx_alloc_pd:                   ; @ocrdma_mbx_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	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE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w9
	str	w8, [x19, #8]
	b	LBB0_8
LBB0_6:
	neg	w21, w22
	b	LBB0_9
LBB0_7:
	str	wzr, [x19]
	str	xzr, [x19, #16]
LBB0_8:
	mov	x0, x20
	bl	_kfree
LBB0_9:
	mov	x0, x21
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_OCRDMA_CMD_ALLOC_PD,4,2        ; @OCRDMA_CMD_ALLOC_PD
	.comm	_OCRDMA_ALLOC_PD_ENABLE_DPP,4,2 ; @OCRDMA_ALLOC_PD_ENABLE_DPP
	.comm	_OCRDMA_ALLOC_PD_RSP_PDID_MASK,4,2 ; @OCRDMA_ALLOC_PD_RSP_PDID_MASK
	.comm	_OCRDMA_ALLOC_PD_RSP_DPP,4,2    ; @OCRDMA_ALLOC_PD_RSP_DPP
	.comm	_OCRDMA_ALLOC_PD_RSP_DPP_PAGE_SHIFT,4,2 ; @OCRDMA_ALLOC_PD_RSP_DPP_PAGE_SHIFT
.subsections_via_symbols
