	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_stolen_insert_node_in_range ## -- Begin function i915_gem_stolen_insert_node_in_range
	.p2align	4, 0x90
_i915_gem_stolen_insert_node_in_range:  ## @i915_gem_stolen_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r12d
	movl	%r8d, %r15d
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %rbx
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_drm_mm_initialized
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	%rbx, %rdi
	callq	_INTEL_GEN
	cmpl	$8, %eax
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	$4096, %r12d                    ## imm = 0x1000
	cmovll	%r15d, %r12d
	cmpl	$4096, %r15d                    ## imm = 0x1000
	cmovgel	%r15d, %r12d
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	_DRM_MM_INSERT_BEST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	xorl	%r8d, %r8d
	movl	%r12d, %r9d
	pushq	%rax
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	callq	_drm_mm_insert_node_in_range
	addq	$16, %rsp
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	%r14d, %eax
	jmp	LBB0_2
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_2:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_DRM_MM_INSERT_BEST,4,2         ## @DRM_MM_INSERT_BEST
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_stolen_insert_node_in_range ; -- Begin function i915_gem_stolen_insert_node_in_range
	.p2align	2
_i915_gem_stolen_insert_node_in_range:  ; @i915_gem_stolen_insert_node_in_range
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x5
	mov	x25, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	add	x24, x0, #4
	mov	x0, x24
	bl	_drm_mm_initialized
	cbz	w0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_INTEL_GEN
	cmp	w0, #7
	mov	w8, #4096
	ccmp	w25, w8, #0, gt
	csel	w25, w8, w25, lt
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x8, _DRM_MM_INSERT_BEST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_MM_INSERT_BEST@GOTPAGEOFF]
Lloh2:
	ldr	w7, [x8]
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	mov	w4, #0
	mov	x5, x25
	mov	x6, x20
	bl	_drm_mm_insert_node_in_range
	mov	x20, x0
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	b	LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _ENODEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_DRM_MM_INSERT_BEST,4,2         ; @DRM_MM_INSERT_BEST
.subsections_via_symbols
