	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _ocrdma_alloc_pd
__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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.1:
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.2:
	cmpq	$0, 16(%r14)
	je	LBB0_6
## %bb.3:
	movq	%r14, %rdi
	callq	_ocrdma_get_asic_type
	movq	%rax, %rcx
	movq	_OCRDMA_ASIC_GEN_SKH_R@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	xorl	%esi, %esi
	cmpq	(%rdx), %rcx
	sete	%sil
	movl	%esi, (%rbx)
	jne	LBB0_5
## %bb.4:
	movl	24(%r14), %eax
	cltd
	idivl	8(%r14)
LBB0_5:
	movl	%eax, 4(%rbx)
LBB0_6:
	movq	(%r14), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ocrdma_get_pd_num              ## TAILCALL
LBB0_8:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_ocrdma_mbx_alloc_pd
	xorl	%r15d, %r15d
	testl	%eax, %eax
	je	LBB0_14
## %bb.9:
	cmpl	$0, (%rbx)
	je	LBB0_13
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	$0, (%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_ocrdma_mbx_alloc_pd
	testl	%eax, %eax
	je	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpl	$0, (%rbx)
	jne	LBB0_10
LBB0_13:
	movl	%eax, %r15d
LBB0_14:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OCRDMA_ASIC_GEN_SKH_R,8,3      ## @OCRDMA_ASIC_GEN_SKH_R
	.no_dead_strip	__ocrdma_alloc_pd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _ocrdma_alloc_pd
__ocrdma_alloc_pd:                      ; @_ocrdma_alloc_pd
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	cbz	x2, LBB0_7
; %bb.1:
	cbz	x3, LBB0_7
; %bb.2:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_7
; %bb.3:
	mov	x0, x20
	bl	_ocrdma_get_asic_type
Lloh0:
	adrp	x8, _OCRDMA_ASIC_GEN_SKH_R@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OCRDMA_ASIC_GEN_SKH_R@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w8, eq
	str	w8, [x19]
	b.ne	LBB0_5
; %bb.4:
	ldr	w8, [x20, #24]
	ldr	w9, [x20, #8]
	sdiv	w8, w8, w9
	b	LBB0_6
LBB0_5:
	mov	w8, #0
LBB0_6:
	str	w8, [x19, #4]
LBB0_7:
	ldr	x8, [x20]
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.8:
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ocrdma_get_pd_num
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x19]
	cbz	w8, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_11 Depth=1
	str	xzr, [x19]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	_ocrdma_mbx_alloc_pd
	cbnz	w0, LBB0_9
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_OCRDMA_ASIC_GEN_SKH_R,8,3      ; @OCRDMA_ASIC_GEN_SKH_R
	.no_dead_strip	__ocrdma_alloc_pd
.subsections_via_symbols
