	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_sched_entity_flush         ## -- Begin function drm_sched_entity_flush
	.p2align	4, 0x90
_drm_sched_entity_flush:                ## @drm_sched_entity_flush
	.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	8(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rax), %rax
	movq	_current@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	movq	_PF_EXITING@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	testl	%edx, (%rcx)
	je	LBB0_6
## %bb.3:
	testq	%r14, %r14
	je	LBB0_4
## %bb.5:
	movl	(%rax), %r15d
	movq	%rbx, %rdi
	callq	_drm_sched_entity_is_idle
	movl	%r15d, %edi
	movl	%eax, %esi
	movq	%r14, %rdx
	callq	_wait_event_timeout
	movq	%rax, %r14
	jmp	LBB0_7
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_12
LBB0_6:
	movl	(%rax), %r15d
	movq	%rbx, %rdi
	callq	_drm_sched_entity_is_idle
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_wait_event_killable
	jmp	LBB0_7
LBB0_4:
	xorl	%r14d, %r14d
LBB0_7:
	leaq	16(%rbx), %rdi
	movq	(%r13), %rax
	movq	16(%rax), %rsi
	xorl	%edx, %edx
	callq	_cmpxchg
	movq	(%r13), %rcx
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	cmpq	16(%rcx), %rax
	jne	LBB0_12
LBB0_9:
	movl	(%r12), %eax
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.10:
	movq	8(%rcx), %rax
	movq	_SIGKILL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.11:
	leaq	4(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock
	movl	$1, (%rbx)
	movq	8(%rbx), %rdi
	movq	%rbx, %rsi
	callq	_drm_sched_rq_remove_entity
	movq	%r15, %rdi
	callq	_spin_unlock
LBB0_12:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_current,8,3                    ## @current
	.comm	_PF_EXITING,4,2                 ## @PF_EXITING
	.comm	_SIGKILL,8,3                    ## @SIGKILL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_sched_entity_flush         ; -- Begin function drm_sched_entity_flush
	.p2align	2
_drm_sched_entity_flush:                ; @drm_sched_entity_flush
	.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
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x8]
Lloh0:
	adrp	x23, _current@GOTPAGE
Lloh1:
	ldr	x23, [x23, _current@GOTPAGEOFF]
	ldr	x9, [x23]
	ldr	w9, [x9]
Lloh2:
	adrp	x22, _PF_EXITING@GOTPAGE
Lloh3:
	ldr	x22, [x22, _PF_EXITING@GOTPAGEOFF]
	ldr	w10, [x22]
	tst	w10, w9
	b.eq	LBB0_5
; %bb.2:
	cbz	x19, LBB0_6
; %bb.3:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_drm_sched_entity_is_idle
	mov	x1, x0
	mov	x0, x21
	mov	x2, x19
	bl	_wait_event_timeout
	mov	x19, x0
	b	LBB0_6
LBB0_4:
	mov	x19, #0
	b	LBB0_11
LBB0_5:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_drm_sched_entity_is_idle
	mov	x1, x0
	mov	x0, x21
	bl	_wait_event_killable
LBB0_6:
	add	x0, x20, #16
	ldr	x8, [x23]
	ldr	x1, [x8, #16]
	mov	x2, #0
	bl	_cmpxchg
	ldr	x8, [x23]
	cbz	x0, LBB0_8
; %bb.7:
	ldr	x9, [x8, #16]
	cmp	x0, x9
	b.ne	LBB0_11
LBB0_8:
	ldr	w9, [x8]
	ldr	w10, [x22]
	tst	w10, w9
	b.eq	LBB0_11
; %bb.9:
	ldr	x8, [x8, #8]
Lloh4:
	adrp	x9, _SIGKILL@GOTPAGE
Lloh5:
	ldr	x9, [x9, _SIGKILL@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	add	x21, x20, #4
	mov	x0, x21
	bl	_spin_lock
	mov	w8, #1
	str	w8, [x20]
	ldr	x0, [x20, #8]
	mov	x1, x20
	bl	_drm_sched_rq_remove_entity
	mov	x0, x21
	bl	_spin_unlock
LBB0_11:
	mov	x0, x19
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_current,8,3                    ; @current
	.comm	_PF_EXITING,4,2                 ; @PF_EXITING
	.comm	_SIGKILL,8,3                    ; @SIGKILL
.subsections_via_symbols
