	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_mm_pre_get                 ## -- Begin function drm_mm_pre_get
	.p2align	4, 0x90
_drm_mm_pre_get:                        ## @drm_mm_pre_get
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	leaq	4(%rdi), %r15
	movq	%r15, %rdi
	callq	_spin_lock
	movl	(%r13), %eax
	movq	_MM_UNUSED_TARGET@GOTPCREL(%rip), %r14
	xorl	%ebx, %ebx
	cmpl	(%r14), %eax
	jge	LBB0_6
## %bb.1:
	leaq	8(%r13), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_spin_unlock
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kzalloc
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_spin_lock
	xorl	%edi, %edi
	testq	%rbx, %rbx
	sete	%dil
	callq	_unlikely
	movl	(%r13), %ecx
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%ecx
	movl	%ecx, (%r13)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_list_add_tail
	movl	(%r13), %eax
	cmpl	(%r14), %eax
	jl	LBB0_2
## %bb.5:
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	xorl	%eax, %eax
	cmpl	$2, %ecx
	cmovgel	%eax, %ebx
LBB0_6:
	movq	%r15, %rdi
	callq	_spin_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MM_UNUSED_TARGET,4,2           ## @MM_UNUSED_TARGET
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_mm_pre_get                 ; -- Begin function drm_mm_pre_get
	.p2align	2
_drm_mm_pre_get:                        ; @drm_mm_pre_get
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_spin_lock
	ldr	w8, [x20]
Lloh0:
	adrp	x23, _MM_UNUSED_TARGET@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MM_UNUSED_TARGET@GOTPAGEOFF]
	ldr	w9, [x23]
	cmp	w8, w9
	b.ge	LBB0_4
; %bb.1:
	add	x21, x20, #8
Lloh2:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_spin_unlock
	ldr	w1, [x24]
	mov	w0, #4
	bl	_kzalloc
	mov	x22, x0
	mov	x0, x19
	bl	_spin_lock
	cmp	x22, #0
	cset	w0, eq
	bl	_unlikely
	ldr	w8, [x20]
	cbnz	x0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w8, w8, #1
	str	w8, [x20]
	mov	x0, x22
	mov	x1, x21
	bl	_list_add_tail
	ldr	w8, [x20]
	ldr	w9, [x23]
	cmp	w8, w9
	b.lt	LBB0_2
LBB0_4:
	mov	w20, #0
	b	LBB0_6
LBB0_5:
Lloh4:
	adrp	x9, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x9, [x9, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	cmp	w8, #2
	csneg	w20, wzr, w9, ge
LBB0_6:
	mov	x0, x19
	bl	_spin_unlock
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_MM_UNUSED_TARGET,4,2           ; @MM_UNUSED_TARGET
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
