	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_minor_alloc
_drm_minor_alloc:                       ## @drm_minor_alloc
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movl	%r14d, (%rax)
	movq	%r15, 16(%rax)
	movl	(%rbx), %edi
	callq	_idr_preload
	movq	_drm_minor_lock@GOTPCREL(%rip), %r13
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	movl	%r14d, %edx
	shll	$6, %edx
	leal	64(%rdx), %ecx
	movq	_GFP_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_drm_minors_idr@GOTPCREL(%rip), %rdi
	xorl	%esi, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_idr_alloc
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	callq	_idr_preload_end
	testl	%ebx, %ebx
	js	LBB0_5
## %bb.3:
	movl	%ebx, 4(%r12)
	movq	%r12, %rdi
	callq	_drm_sysfs_minor_alloc
	movl	%eax, 8(%r12)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movl	8(%r12), %edi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	_drm_minor_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	4(%r12), %esi
	movq	_drm_minors_idr@GOTPCREL(%rip), %rdi
	callq	_idr_remove
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
LBB0_5:
	movq	%r12, %rdi
	callq	_kfree
	jmp	LBB0_6
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_7:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_drm_minor_get_slot
	movq	%r12, (%rax)
	xorl	%ebx, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_drm_minor_lock,4,2             ## @drm_minor_lock
	.comm	_drm_minors_idr,4,2             ## @drm_minors_idr
	.comm	_GFP_NOWAIT,4,2                 ## @GFP_NOWAIT
	.no_dead_strip	_drm_minor_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drm_minor_alloc
_drm_minor_alloc:                       ; @drm_minor_alloc
	.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, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	str	w20, [x0]
	str	x21, [x0, #16]
	ldr	w0, [x22]
	bl	_idr_preload
Lloh2:
	adrp	x23, _drm_minor_lock@GOTPAGE
Lloh3:
	ldr	x23, [x23, _drm_minor_lock@GOTPAGEOFF]
	mov	x0, x23
	bl	_spin_lock_irqsave
	lsl	w2, w20, #6
	add	w3, w2, #64
Lloh4:
	adrp	x8, _GFP_NOWAIT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GFP_NOWAIT@GOTPAGEOFF]
Lloh6:
	ldr	w4, [x8]
Lloh7:
	adrp	x0, _drm_minors_idr@GOTPAGE
Lloh8:
	ldr	x0, [x0, _drm_minors_idr@GOTPAGEOFF]
	mov	x1, #0
	bl	_idr_alloc
	mov	x22, x0
	mov	x0, x23
	bl	_spin_unlock_irqrestore
	bl	_idr_preload_end
	tbnz	w22, #31, LBB0_4
; %bb.2:
	str	w22, [x19, #4]
	mov	x0, x19
	bl	_drm_sysfs_minor_alloc
	str	w0, [x19, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.3:
	ldr	w0, [x19, #8]
	bl	_PTR_ERR
	mov	x22, x0
Lloh9:
	adrp	x20, _drm_minor_lock@GOTPAGE
Lloh10:
	ldr	x20, [x20, _drm_minor_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	w1, [x19, #4]
Lloh11:
	adrp	x0, _drm_minors_idr@GOTPAGE
Lloh12:
	ldr	x0, [x0, _drm_minors_idr@GOTPAGEOFF]
	bl	_idr_remove
	mov	x0, x20
	bl	_spin_unlock_irqrestore
LBB0_4:
	mov	x0, x19
	bl	_kfree
	b	LBB0_7
LBB0_5:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_7
LBB0_6:
	mov	x0, x21
	mov	x1, x20
	bl	_drm_minor_get_slot
	mov	w22, #0
	str	x19, [x0]
LBB0_7:
	mov	x0, x22
	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	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_drm_minor_lock,4,2             ; @drm_minor_lock
	.comm	_drm_minors_idr,4,2             ; @drm_minors_idr
	.comm	_GFP_NOWAIT,4,2                 ; @GFP_NOWAIT
	.no_dead_strip	_drm_minor_alloc
.subsections_via_symbols
