	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_mm_insert_node_in_range    ## -- Begin function drm_mm_insert_node_in_range
	.p2align	4, 0x90
_drm_mm_insert_node_in_range:           ## @drm_mm_insert_node_in_range
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r15
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	16(%rbp), %rbx
	xorl	%edi, %edi
	subq	%r9, %rbx
	setl	%dil
	callq	_DRM_MM_BUG_ON
	testq	%r13, %r13
	sete	%al
	cmpq	%r13, %rbx
	setl	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_32
## %bb.1:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	leaq	8(%r12), %rdi
	callq	_rb_first_cached
	movl	%eax, %edi
	callq	_rb_to_hole_size_or_zero
	cmpq	%r13, %rax
	jl	LBB0_32
## %bb.2:
	movq	%r12, %rbx
	movq	%r14, -104(%rbp)                ## 8-byte Spill
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	cmpq	$2, %r14
	movl	$0, %r15d
	cmovgeq	%r14, %r15
	movq	_DRM_MM_INSERT_ONCE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r12d, -92(%rbp)                ## 4-byte Spill
	notl	%r12d
	andl	24(%rbp), %r12d
	movq	%r15, %rdi
	callq	_is_power_of_2
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	leaq	-1(%r15), %rcx
	testq	%rax, %rax
	cmoveq	%rax, %rcx
	movq	%rcx, -128(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	16(%rbp), %r15
	movq	%r15, %rdx
	movq	%r13, %rcx
	movl	%r12d, %r8d
	callq	_first_hole
	testq	%rax, %rax
	je	LBB0_32
## %bb.3:
	movq	%rax, %r14
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	___drm_mm_hole_node_start
	movq	(%r14), %rcx
	addq	%rax, %rcx
	movq	_DRM_MM_INSERT_LOW@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %r12d
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%r15, %rax
	jge	LBB0_32
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_DRM_MM_INSERT_HIGH@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %r12d
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	-56(%rbp), %rcx                 ## 8-byte Folded Reload
	jle	LBB0_32
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, -88(%rbp)
	movq	%rcx, -144(%rbp)                ## 8-byte Spill
	movq	%rcx, -80(%rbp)
	movq	(%rbx), %rbx
	movq	%rax, -136(%rbp)                ## 8-byte Spill
	movq	%rax, %rdi
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	leaq	-88(%rbp), %rdx
	leaq	-80(%rbp), %rcx
	callq	*%rbx
	movq	-88(%rbp), %rdi
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_max
	movq	%rax, %rbx
	movq	-80(%rbp), %rdi
	movq	%r15, %rsi
	callq	_min
	movq	%rax, %r15
	subq	%rbx, %rax
	jle	LBB0_30
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%r13, %rax
	jl	LBB0_30
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rax
	subq	%r13, %rax
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movq	_DRM_MM_INSERT_HIGH@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	cmoveq	%rax, %rbx
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-128(%rbp), %r12                ## 8-byte Reload
	movq	%r12, %rdi
	callq	_likely
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rax
	andq	%r12, %rax
	movq	%rax, -120(%rbp)
	jmp	LBB0_17
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	leaq	-120(%rbp), %rdx
	callq	_div64_u64_rem
	movq	-120(%rbp), %rax
LBB0_17:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movq	%r13, %r12
	testq	%rax, %rax
	je	LBB0_18
## %bb.25:                              ##   in Loop: Header=BB0_4 Depth=1
	subq	%rax, %rbx
	movq	_DRM_MM_INSERT_HIGH@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movl	$0, %eax
	cmoveq	%rax, %r13
	addq	%rbx, %r13
	movq	-88(%rbp), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_max
	cmpq	%rax, %r13
	jl	LBB0_29
## %bb.26:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-80(%rbp), %rdi
	movq	16(%rbp), %rsi
	callq	_min
	subq	%r13, %rax
	cmpq	%r12, %rax
	jl	LBB0_29
## %bb.27:                              ##   in Loop: Header=BB0_4 Depth=1
	subq	%r13, %r15
	jle	LBB0_29
## %bb.28:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%r12, %r15
	jge	LBB0_19
	.p2align	4, 0x90
LBB0_29:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %r13
LBB0_30:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	-92(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, 24(%rbp)
	movq	-112(%rbp), %rbx                ## 8-byte Reload
	movq	16(%rbp), %r15
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	jne	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r12d, %edx
	callq	_next_hole
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_4
LBB0_32:
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_33:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	-104(%rbp), %r15                ## 8-byte Reload
	jmp	LBB0_20
LBB0_18:
	movq	%rbx, %r13
LBB0_19:
	movq	%r13, %rbx
	movq	-104(%rbp), %r15                ## 8-byte Reload
	movq	%r12, %r13
LBB0_20:
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movq	%rax, 40(%r15)
	movq	%r13, 32(%r15)
	movq	%rbx, 24(%r15)
	movq	%rcx, 8(%r15)
	movq	$0, (%r15)
	leaq	20(%r15), %rdi
	leaq	20(%r14), %rsi
	callq	_list_add
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_drm_mm_interval_tree_add_node
	movl	$1, 16(%r15)
	movq	%r14, %rdi
	callq	_rm_hole
	cmpq	-136(%rbp), %rbx                ## 8-byte Folded Reload
	jle	LBB0_22
## %bb.21:
	movq	%r14, %rdi
	callq	_add_hole
LBB0_22:
	addq	%r13, %rbx
	cmpq	-144(%rbp), %rbx                ## 8-byte Folded Reload
	jge	LBB0_24
## %bb.23:
	movq	%r15, %rdi
	callq	_add_hole
LBB0_24:
	movq	%r15, %rdi
	callq	_save_stack
	xorl	%eax, %eax
	jmp	LBB0_33
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_DRM_MM_INSERT_ONCE,4,2         ## @DRM_MM_INSERT_ONCE
	.comm	_DRM_MM_INSERT_LOW,4,2          ## @DRM_MM_INSERT_LOW
	.comm	_DRM_MM_INSERT_HIGH,4,2         ## @DRM_MM_INSERT_HIGH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_mm_insert_node_in_range    ; -- Begin function drm_mm_insert_node_in_range
	.p2align	2
_drm_mm_insert_node_in_range:           ; @drm_mm_insert_node_in_range
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x7
	mov	x23, x6
	mov	x24, x5
	mov	x27, x4
	mov	x21, x3
	mov	x20, x2
	mov	x26, x1
	mov	x22, x0
	subs	x25, x6, x5
	cset	w0, lt
	bl	_DRM_MM_BUG_ON
	cmp	x20, #0
	ccmp	x25, x20, #8, ne
	cset	w0, lt
	bl	_unlikely
	cbnz	x0, LBB0_20
; %bb.1:
	add	x0, x22, #8
	bl	_rb_first_cached
	bl	_rb_to_hole_size_or_zero
	cmp	x0, x20
	b.lt	LBB0_20
; %bb.2:
	str	x27, [sp, #32]                  ; 8-byte Folded Spill
	str	x26, [sp, #8]                   ; 8-byte Folded Spill
	cmp	x21, #2
	csel	x25, xzr, x21, lt
Lloh0:
	adrp	x8, _DRM_MM_INSERT_ONCE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_MM_INSERT_ONCE@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	bic	w27, w19, w21
	mov	x0, x25
	bl	_is_power_of_2
	str	x25, [sp, #48]                  ; 8-byte Folded Spill
	sub	x8, x25, #1
	cmp	x0, #0
	csel	x8, xzr, x8, eq
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
	mov	x0, x22
	mov	x1, x24
	mov	x2, x23
	mov	x3, x20
	mov	x4, x27
	bl	_first_hole
	cbz	x0, LBB0_20
; %bb.3:
	mov	x25, x0
	and	w8, w21, w19
	str	w8, [sp, #44]                   ; 4-byte Folded Spill
	str	x22, [sp, #16]                  ; 8-byte Folded Spill
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x25
	bl	___drm_mm_hole_node_start
Lloh3:
	adrp	x8, _DRM_MM_INSERT_LOW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRM_MM_INSERT_LOW@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w27, w8
	ccmp	x0, x23, #8, eq
	b.ge	LBB0_20
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x28, x0
	ldr	x8, [x25]
	add	x26, x8, x0
Lloh6:
	adrp	x8, _DRM_MM_INSERT_HIGH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DRM_MM_INSERT_HIGH@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w27, w8
	ccmp	x26, x24, #0, eq
	b.le	LBB0_20
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	stp	x26, x28, [sp, #64]
	mov	x0, x28
	ldr	x8, [x22]
	cbz	x8, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x2, sp, #72
	add	x3, sp, #64
	mov	x0, x25
	ldr	x1, [sp, #32]                   ; 8-byte Folded Reload
	blr	x8
	ldr	x0, [sp, #72]
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x1, x24
	bl	_max
	mov	x19, x0
	ldr	x0, [sp, #64]
	mov	x1, x23
	bl	_min
	subs	x8, x0, x19
	b.le	LBB0_18
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	x8, x20
	b.lt	LBB0_18
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x21, x0
Lloh9:
	adrp	x8, _DRM_MM_INSERT_HIGH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DRM_MM_INSERT_HIGH@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	sub	x9, x0, x20
	cmp	w27, w8
	csel	x19, x9, x19, eq
	ldr	x8, [sp, #48]                   ; 8-byte Folded Reload
	cbz	x8, LBB0_22
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x22, [sp, #24]                  ; 8-byte Folded Reload
	mov	x0, x22
	bl	_likely
	cbz	x0, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	and	x8, x19, x22
	str	x8, [sp, #56]
	ldr	x22, [sp, #16]                  ; 8-byte Folded Reload
	cbnz	x8, LBB0_14
	b	LBB0_22
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x2, sp, #56
	mov	x0, x19
	ldr	x1, [sp, #48]                   ; 8-byte Folded Reload
	bl	_div64_u64_rem
	ldr	x8, [sp, #56]
	ldr	x22, [sp, #16]                  ; 8-byte Folded Reload
	cbz	x8, LBB0_22
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh12:
	adrp	x9, _DRM_MM_INSERT_HIGH@GOTPAGE
Lloh13:
	ldr	x9, [x9, _DRM_MM_INSERT_HIGH@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	cmp	w27, w9
	ldr	x9, [sp, #48]                   ; 8-byte Folded Reload
	csel	x9, xzr, x9, eq
	sub	x8, x19, x8
	add	x19, x9, x8
	ldr	x0, [sp, #72]
	mov	x1, x24
	bl	_max
	cmp	x19, x0
	b.lt	LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [sp, #64]
	mov	x1, x23
	bl	_min
	sub	x8, x0, x19
	cmp	x8, x20
	b.lt	LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=1
	subs	x8, x21, x19
	b.le	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_4 Depth=1
	cmp	x8, x20
	b.ge	LBB0_22
LBB0_18:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [sp, #44]                   ; 4-byte Folded Reload
	cbnz	w8, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	mov	x1, x25
	mov	x2, x27
	bl	_next_hole
	mov	x25, x0
	cbnz	x0, LBB0_4
LBB0_20:
Lloh15:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_21:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_22:
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
	stp	x20, x22, [x21, #32]
	str	x19, [x21, #24]
	add	x0, x21, #20
	add	x1, x25, #20
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	stp	xzr, x8, [x21]
	bl	_list_add
	mov	x0, x25
	mov	x1, x21
	bl	_drm_mm_interval_tree_add_node
	mov	w8, #1
	str	w8, [x21, #16]
	mov	x0, x25
	bl	_rm_hole
	cmp	x19, x28
	b.le	LBB0_24
; %bb.23:
	mov	x0, x25
	bl	_add_hole
LBB0_24:
	add	x8, x19, x20
	cmp	x8, x26
	b.ge	LBB0_26
; %bb.25:
	mov	x0, x21
	bl	_add_hole
LBB0_26:
	mov	x0, x21
	bl	_save_stack
	mov	w0, #0
	b	LBB0_21
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_DRM_MM_INSERT_ONCE,4,2         ; @DRM_MM_INSERT_ONCE
	.comm	_DRM_MM_INSERT_LOW,4,2          ; @DRM_MM_INSERT_LOW
	.comm	_DRM_MM_INSERT_HIGH,4,2         ; @DRM_MM_INSERT_HIGH
.subsections_via_symbols
