	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function etnaviv_sched_timedout_job
_etnaviv_sched_timedout_job:            ## @etnaviv_sched_timedout_job
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_to_etnaviv_submit
	movq	%rax, %rbx
	movq	8(%rax), %r14
	movl	(%rax), %edi
	callq	_dma_fence_is_signaled
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	movq	_VIVS_FE_DMA_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_gpu_read
	movl	(%r14), %ecx
	movl	%eax, %edx
	subl	%ecx, %edx
	cmpl	$17, %edx
	jb	LBB0_4
## %bb.2:
	movq	%rax, (%r14)
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	8(%r14), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_drm_sched_stop
	testq	%r15, %r15
	je	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	callq	_drm_sched_increase_karma
LBB0_6:
	movq	%rbx, %rdi
	callq	_etnaviv_core_dump
	movq	%r14, %rdi
	callq	_etnaviv_gpu_recover_hang
	movq	%r12, %rdi
	callq	_drm_sched_resubmit_jobs
	movq	%r12, %rdi
	movl	$1, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_drm_sched_start                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VIVS_FE_DMA_ADDRESS,4,2        ## @VIVS_FE_DMA_ADDRESS
	.no_dead_strip	_etnaviv_sched_timedout_job
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function etnaviv_sched_timedout_job
_etnaviv_sched_timedout_job:            ; @etnaviv_sched_timedout_job
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
	bl	_to_etnaviv_submit
	mov	x21, x0
	ldr	x19, [x0, #8]
	ldr	w0, [x0]
	bl	_dma_fence_is_signaled
	cbnz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _VIVS_FE_DMA_ADDRESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VIVS_FE_DMA_ADDRESS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gpu_read
	ldr	w8, [x19]
	sub	w8, w0, w8
	cmp	w8, #17
	b.lo	LBB0_4
; %bb.2:
	str	x0, [x19]
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	add	x22, x19, #8
	mov	x0, x22
	mov	x1, x20
	bl	_drm_sched_stop
	cbz	x20, LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_drm_sched_increase_karma
LBB0_6:
	mov	x0, x21
	bl	_etnaviv_core_dump
	mov	x0, x19
	bl	_etnaviv_gpu_recover_hang
	mov	x0, x22
	bl	_drm_sched_resubmit_jobs
	mov	x0, x22
	mov	w1, #1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_drm_sched_start
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_VIVS_FE_DMA_ADDRESS,4,2        ; @VIVS_FE_DMA_ADDRESS
	.no_dead_strip	_etnaviv_sched_timedout_job
.subsections_via_symbols
