	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_sched_main
_drm_sched_main:                        ## @drm_sched_main
	.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
	movq	%rdi, %r14
	movl	$1, -48(%rbp)
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SCHED_FIFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	callq	_sched_setscheduler
	xorl	%eax, %eax
	callq	_kthread_should_stop
	testq	%rax, %rax
	je	LBB0_1
LBB0_15:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	16(%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_kthread_should_stop
	xorl	%esi, %esi
	testq	%rax, %rax
	setne	%sil
	movl	%ebx, %edi
	callq	_wait_event_interruptible
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_kthread_should_stop
	testq	%rax, %rax
	jne	LBB0_15
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	20(%r14), %ebx
	movq	%r14, %rdi
	callq	_drm_sched_cleanup_jobs
	movq	%r14, %rdi
	callq	_drm_sched_blocked
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_drm_sched_select_entity
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r15
	movl	%ebx, %edi
	movl	$1, %esi
	callq	_wait_event_interruptible
	movq	%r15, %rdi
	callq	_drm_sched_entity_pop_job
	testq	%rax, %rax
	je	LBB0_14
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r13
	movq	8(%rax), %r15
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_atomic_inc
	movq	%r13, %rdi
	callq	_drm_sched_job_begin
	movq	8(%r14), %rax
	movq	%r13, %rdi
	callq	*(%rax)
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_drm_sched_fence_scheduled
	movq	%r12, %rdi
	callq	_IS_ERR_OR_NULL
	testl	%eax, %eax
	je	LBB0_7
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_PTR_ERR
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_dma_fence_set_error
	xorl	%edi, %edi
	movq	%r13, %rsi
	callq	_drm_sched_process_job
	jmp	LBB0_13
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_dma_fence_get
	movl	%eax, 4(%r15)
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	_drm_sched_process_job@GOTPCREL(%rip), %rdx
	callq	_dma_fence_add_callback
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_drm_sched_process_job
	jmp	LBB0_11
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_ERROR
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_dma_fence_put
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_wake_up
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_current,4,2                    ## @current
	.comm	_SCHED_FIFO,4,2                 ## @SCHED_FIFO
	.comm	_ENOENT,4,2                     ## @ENOENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fence add callback failed (%d)\n"

	.no_dead_strip	_drm_sched_main
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drm_sched_main
_drm_sched_main:                        ; @drm_sched_main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x0
	mov	w8, #1
	str	w8, [sp, #8]
Lloh0:
	adrp	x8, _current@GOTPAGE
Lloh1:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _SCHED_FIFO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SCHED_FIFO@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_sched_setscheduler
	bl	_kthread_should_stop
	cbz	x0, LBB0_2
LBB0_1:
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_2:
	add	x20, x19, #16
Lloh6:
	adrp	x21, _drm_sched_process_job@GOTPAGE
Lloh7:
	ldr	x21, [x21, _drm_sched_process_job@GOTPAGEOFF]
Lloh8:
	adrp	x26, _ENOENT@GOTPAGE
Lloh9:
	ldr	x26, [x26, _ENOENT@GOTPAGEOFF]
Lloh10:
	adrp	x22, l_.str@PAGE
Lloh11:
	add	x22, x22, l_.str@PAGEOFF
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	bl	_kthread_should_stop
	cmp	x0, #0
	cset	w1, ne
	mov	x0, x23
	bl	_wait_event_interruptible
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	bl	_kthread_should_stop
	cbnz	x0, LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w23, [x19, #20]
	mov	x0, x19
	bl	_drm_sched_cleanup_jobs
	mov	x0, x19
	bl	_drm_sched_blocked
	cbnz	w0, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_drm_sched_select_entity
	cbz	x0, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x24, x0
	mov	x0, x23
	mov	w1, #1
	bl	_wait_event_interruptible
	mov	x0, x24
	bl	_drm_sched_entity_pop_job
	cbz	x0, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, x0
	ldr	x25, [x0, #8]
	mov	x0, x20
	bl	_atomic_inc
	mov	x0, x23
	bl	_drm_sched_job_begin
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	mov	x0, x23
	blr	x8
	mov	x24, x0
	mov	x0, x25
	bl	_drm_sched_fence_scheduled
	mov	x0, x24
	bl	_IS_ERR_OR_NULL
	cbz	w0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x24
	bl	_PTR_ERR
	mov	x1, x0
	mov	x0, x25
	bl	_dma_fence_set_error
	mov	x0, #0
	mov	x1, x23
	bl	_drm_sched_process_job
	b	LBB0_15
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x24
	bl	_dma_fence_get
	str	w0, [x25, #4]
	mov	x0, x24
	mov	x1, x23
	mov	x2, x21
	bl	_dma_fence_add_callback
	ldr	w8, [x26]
	cmn	w0, w8
	b.ne	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x24
	mov	x1, x23
	bl	_drm_sched_process_job
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x0
	cbz	w0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_DRM_ERROR
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x24
	bl	_dma_fence_put
LBB0_15:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_wake_up
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_current,4,2                    ; @current
	.comm	_SCHED_FIFO,4,2                 ; @SCHED_FIFO
	.comm	_ENOENT,4,2                     ; @ENOENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fence add callback failed (%d)\n"

	.no_dead_strip	_drm_sched_main
.subsections_via_symbols
