	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_mm_reserve_node            ## -- Begin function drm_mm_reserve_node
	.p2align	4, 0x90
_drm_mm_reserve_node:                   ## @drm_mm_reserve_node
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rsi), %rax
	movq	(%rsi), %r13
	addq	%rax, %r13
	xorl	%edi, %edi
	testq	%rax, %rax
	setle	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_find_hole
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	___drm_mm_hole_node_start
	movq	%rax, -56(%rbp)
	movq	16(%r15), %r12
	addq	%rax, %r12
	movq	%r12, -48(%rbp)
	movq	(%r14), %r8
	testq	%r8, %r8
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.5:
	movl	40(%rbx), %esi
	leaq	-56(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	movq	%r15, %rdi
	callq	*%r8
	movq	-56(%rbp), %rcx
	movq	-48(%rbp), %rdx
	cmpq	(%rbx), %rcx
	jle	LBB0_7
	jmp	LBB0_1
LBB0_4:
	movq	%r12, %rdx
	movq	%rax, %rcx
	cmpq	(%rbx), %rcx
	jg	LBB0_1
LBB0_7:
	cmpq	%r13, %rdx
	jl	LBB0_1
## %bb.8:
	movq	%r14, 32(%rbx)
	leaq	28(%rbx), %rdi
	movq	%r15, %rsi
	addq	$28, %rsi
	callq	_list_add
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_drm_mm_interval_tree_add_node
	movl	$1, 24(%rbx)
	movq	$0, 16(%rbx)
	movq	%r15, %rdi
	callq	_rm_hole
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, (%rbx)
	jle	LBB0_10
## %bb.9:
	movq	%r15, %rdi
	callq	_add_hole
LBB0_10:
	cmpq	%r12, %r13
	jge	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	callq	_add_hole
LBB0_12:
	movq	%rbx, %rdi
	callq	_save_stack
	xorl	%eax, %eax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSPC,4,2                     ## @ENOSPC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_mm_reserve_node            ; -- Begin function drm_mm_reserve_node
	.p2align	2
_drm_mm_reserve_node:                   ; @drm_mm_reserve_node
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x21, x0
	ldp	x22, x23, [x1]
	cmp	x23, #1
	cset	w0, lt
	bl	_unlikely
	cbz	x0, LBB0_3
LBB0_1:
Lloh0:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_2:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_3:
	ldr	x1, [x19]
	mov	x0, x21
	bl	_find_hole
	cbz	x0, LBB0_1
; %bb.4:
	mov	x20, x0
	add	x23, x23, x22
	bl	___drm_mm_hole_node_start
	mov	x22, x0
	ldr	x8, [x20, #16]
	add	x24, x8, x0
	stp	x24, x0, [sp]
	ldr	x8, [x21]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	w1, [x19, #40]
	add	x2, sp, #8
	mov	x3, sp
	mov	x0, x20
	blr	x8
	ldp	x8, x9, [sp]
	b	LBB0_7
LBB0_6:
	mov	x8, x24
	mov	x9, x22
LBB0_7:
	ldr	x10, [x19]
	cmp	x9, x10
	ccmp	x8, x23, #8, le
	b.lt	LBB0_1
; %bb.8:
	str	x21, [x19, #32]
	add	x0, x19, #28
	add	x1, x20, #28
	bl	_list_add
	mov	x0, x20
	mov	x1, x19
	bl	_drm_mm_interval_tree_add_node
	mov	w8, #1
	str	w8, [x19, #24]
	str	xzr, [x19, #16]
	mov	x0, x20
	bl	_rm_hole
	ldr	x8, [x19]
	cmp	x8, x22
	b.le	LBB0_10
; %bb.9:
	mov	x0, x20
	bl	_add_hole
LBB0_10:
	cmp	x23, x24
	b.ge	LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_add_hole
LBB0_12:
	mov	x0, x19
	bl	_save_stack
	mov	w0, #0
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSPC,4,2                     ; @ENOSPC
.subsections_via_symbols
