	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function v3d_gpu_reset_for_timeout
_v3d_gpu_reset_for_timeout:             ## @v3d_gpu_reset_for_timeout
	.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	%rsi, %r14
	movq	%rdi, %r12
	callq	_mutex_lock
	movq	_V3D_MAX_QUEUES@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	je	LBB0_3
## %bb.1:
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rdi
	addq	%r13, %rdi
	movq	%r14, %rsi
	callq	_drm_sched_stop
	incq	%rbx
	movl	(%r15), %eax
	addq	$4, %r13
	cmpq	%rax, %rbx
	jb	LBB0_2
LBB0_3:
	testq	%r14, %r14
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_drm_sched_increase_karma
LBB0_5:
	movq	%r12, %rdi
	callq	_v3d_reset
	cmpl	$0, (%r15)
	je	LBB0_11
## %bb.6:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rdi
	addq	%r14, %rdi
	callq	_drm_sched_resubmit_jobs
	incq	%rbx
	movl	(%r15), %eax
	addq	$4, %r14
	cmpq	%rax, %rbx
	jb	LBB0_7
## %bb.8:
	testl	%eax, %eax
	je	LBB0_11
## %bb.9:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rdi
	addq	%r14, %rdi
	movl	$1, %esi
	callq	_drm_sched_start
	incq	%rbx
	movl	(%r15), %eax
	addq	$4, %r14
	cmpq	%rax, %rbx
	jb	LBB0_10
LBB0_11:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_V3D_MAX_QUEUES,4,2             ## @V3D_MAX_QUEUES
	.no_dead_strip	_v3d_gpu_reset_for_timeout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function v3d_gpu_reset_for_timeout
_v3d_gpu_reset_for_timeout:             ; @v3d_gpu_reset_for_timeout
	.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	x19, x0
	bl	_mutex_lock
Lloh0:
	adrp	x21, _V3D_MAX_QUEUES@GOTPAGE
Lloh1:
	ldr	x21, [x21, _V3D_MAX_QUEUES@GOTPAGEOFF]
	ldr	w8, [x21]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x22, #0
	mov	x23, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x0, x8, x22
	mov	x1, x20
	bl	_drm_sched_stop
	add	x23, x23, #1
	ldr	w8, [x21]
	add	x22, x22, #4
	cmp	x23, x8
	b.lo	LBB0_2
LBB0_3:
	cbz	x20, LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_drm_sched_increase_karma
LBB0_5:
	mov	x0, x19
	bl	_v3d_reset
	ldr	w8, [x21]
	cbz	w8, LBB0_11
; %bb.6:
	mov	x20, #0
	mov	x22, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x0, x8, x20
	bl	_drm_sched_resubmit_jobs
	add	x22, x22, #1
	ldr	w8, [x21]
	add	x20, x20, #4
	cmp	x22, x8
	b.lo	LBB0_7
; %bb.8:
	cbz	w8, LBB0_11
; %bb.9:
	mov	x20, #0
	mov	x22, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x0, x8, x20
	mov	w1, #1
	bl	_drm_sched_start
	add	x22, x22, #1
	ldr	w8, [x21]
	add	x20, x20, #4
	cmp	x22, x8
	b.lo	LBB0_10
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
	b	_mutex_unlock
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_V3D_MAX_QUEUES,4,2             ; @V3D_MAX_QUEUES
	.no_dead_strip	_v3d_gpu_reset_for_timeout
.subsections_via_symbols
