	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_minor_register
_drm_minor_register:                    ## @drm_minor_register
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_drm_minor_get_slot
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.1:
	movl	(%rbx), %esi
	movq	_drm_debugfs_root@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_drm_debugfs_init
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_3
LBB0_4:
	movl	4(%rbx), %edi
	callq	_device_add
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_5
LBB0_3:
	movq	%rbx, %rdi
	callq	_drm_debugfs_cleanup
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_drm_minor_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	(%rbx), %edx
	movq	_drm_minors_idr@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	callq	_idr_replace
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	(%rbx), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	_drm_debugfs_root,4,2           ## @drm_debugfs_root
L_.str.1:                               ## @.str.1
	.asciz	"DRM: Failed to initialize /sys/kernel/debug/dri.\n"

	.comm	_drm_minor_lock,4,2             ## @drm_minor_lock
	.comm	_drm_minors_idr,4,2             ## @drm_minors_idr
L_.str.2:                               ## @.str.2
	.asciz	"new minor registered %d\n"

	.no_dead_strip	_drm_minor_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drm_minor_register
_drm_minor_register:                    ; @drm_minor_register
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	mov	x0, x20
	mov	x1, x19
	bl	_drm_minor_get_slot
	ldr	x19, [x0]
	cbz	x19, LBB0_6
; %bb.1:
	ldr	w1, [x19]
Lloh2:
	adrp	x8, _drm_debugfs_root@GOTPAGE
Lloh3:
	ldr	x8, [x8, _drm_debugfs_root@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_drm_debugfs_init
	cbz	w0, LBB0_3
; %bb.2:
	mov	x20, x0
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_4
LBB0_3:
	ldr	w0, [x19, #4]
	bl	_device_add
	mov	x20, x0
	cbz	w0, LBB0_5
LBB0_4:
	mov	x0, x19
	bl	_drm_debugfs_cleanup
	b	LBB0_7
LBB0_5:
Lloh7:
	adrp	x20, _drm_minor_lock@GOTPAGE
Lloh8:
	ldr	x20, [x20, _drm_minor_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	w2, [x19]
Lloh9:
	adrp	x0, _drm_minors_idr@GOTPAGE
Lloh10:
	ldr	x0, [x0, _drm_minors_idr@GOTPAGEOFF]
	mov	x1, x19
	bl	_idr_replace
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	w8, [x19]
	str	x8, [sp]
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG
LBB0_6:
	mov	w20, #0
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_drm_debugfs_root,4,2           ; @drm_debugfs_root
l_.str.1:                               ; @.str.1
	.asciz	"DRM: Failed to initialize /sys/kernel/debug/dri.\n"

	.comm	_drm_minor_lock,4,2             ; @drm_minor_lock
	.comm	_drm_minors_idr,4,2             ; @drm_minors_idr
l_.str.2:                               ; @.str.2
	.asciz	"new minor registered %d\n"

	.no_dead_strip	_drm_minor_register
.subsections_via_symbols
