	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _dpu_rm_reserve_intf
__dpu_rm_reserve_intf:                  ## @_dpu_rm_reserve_intf
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %rbx
	leaq	-56(%rbp), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	%ecx, %edx
	callq	_dpu_rm_init_hw_iter
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	__dpu_rm_get_hw_locked
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rdi
	cmpq	%r12, (%rdi)
	jne	LBB0_1
## %bb.3:
	movq	%r15, %rsi
	callq	_RESERVED_BY_OTHER
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_ENAVAIL@GOTPCREL(%rip), %rbx
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_8
LBB0_5:
	movq	-48(%rbp), %rax
	movq	%r15, 8(%rax)
	movq	(%rax), %rdi
	movq	%r15, %rsi
	callq	_trace_dpu_rm_reserve_intf
LBB0_6:
	xorl	%eax, %eax
	cmpl	$0, -56(%rbp)
	jne	LBB0_9
## %bb.7:
	movq	_EINVAL@GOTPCREL(%rip), %rbx
	leaq	L_.str.1(%rip), %rdi
LBB0_8:
	movl	%r14d, %esi
	movq	%r12, %rdx
	callq	_DPU_ERROR
	xorl	%eax, %eax
	subl	(%rbx), %eax
LBB0_9:
	addq	$24, %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	"type %d id %d already reserved\n"

	.comm	_ENAVAIL,4,2                    ## @ENAVAIL
L_.str.1:                               ## @.str.1
	.asciz	"couldn't find type %d id %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	__dpu_rm_reserve_intf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _dpu_rm_reserve_intf
__dpu_rm_reserve_intf:                  ; @_dpu_rm_reserve_intf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x3
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
	mov	x0, sp
	mov	w1, #0
	mov	x2, x3
	bl	_dpu_rm_init_hw_iter
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x1, sp
	mov	x0, x22
	bl	__dpu_rm_get_hw_locked
	cbz	x0, LBB0_6
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x0, [sp, #8]
	ldr	x8, [x0]
	cmp	x8, x19
	b.ne	LBB0_1
; %bb.3:
	mov	x1, x21
	bl	_RESERVED_BY_OTHER
	cbz	x0, LBB0_5
; %bb.4:
Lloh0:
	adrp	x21, _ENAVAIL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ENAVAIL@GOTPAGEOFF]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_9
LBB0_5:
	ldr	x8, [sp, #8]
	str	x21, [x8, #8]
	ldr	x0, [x8]
	mov	x1, x21
	bl	_trace_dpu_rm_reserve_intf
LBB0_6:
	ldr	w8, [sp]
	cbz	w8, LBB0_8
; %bb.7:
	mov	w0, #0
	b	LBB0_10
LBB0_8:
Lloh4:
	adrp	x21, _EINVAL@GOTPAGE
Lloh5:
	ldr	x21, [x21, _EINVAL@GOTPAGEOFF]
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_9:
	mov	x1, x20
	mov	x2, x19
	bl	_DPU_ERROR
	ldr	w8, [x21]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"type %d id %d already reserved\n"

	.comm	_ENAVAIL,4,2                    ; @ENAVAIL
l_.str.1:                               ; @.str.1
	.asciz	"couldn't find type %d id %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	__dpu_rm_reserve_intf
.subsections_via_symbols
