	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vc4_irq_finish_render_job
_vc4_irq_finish_render_job:             ## @vc4_irq_finish_render_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	%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	%rdi, %r15
	callq	_to_vc4_dev
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_vc4_first_render_job
	testq	%rax, %rax
	je	LBB0_14
## %bb.1:
	movq	%rax, %r14
	incl	12(%rbx)
	movq	%rax, %rdi
	addq	$16, %rdi
	leaq	8(%rbx), %rsi
	callq	_list_move_tail
	movq	%rbx, %rdi
	callq	_vc4_first_bin_job
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_vc4_first_render_job
	movq	%rax, %r13
	movq	(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.2:
	testq	%r13, %r13
	jne	LBB0_6
## %bb.3:
	testq	%r12, %r12
	je	LBB0_5
## %bb.4:
	cmpq	%rsi, (%r12)
	je	LBB0_6
LBB0_5:
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_vc4_perfmon_stop
LBB0_6:
	testq	%r13, %r13
	je	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	callq	_vc4_submit_next_render_job
LBB0_11:
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	callq	_dma_fence_signal_locked
	movq	8(%r14), %rdi
	callq	_dma_fence_put
	movq	$0, 8(%r14)
LBB0_13:
	movq	%rbx, %rdi
	addq	$4, %rdi
	callq	_wake_up_all
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_schedule_work                  ## TAILCALL
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	testq	%r12, %r12
	je	LBB0_11
## %bb.9:
	movq	(%r12), %rax
	cmpq	(%r14), %rax
	je	LBB0_11
## %bb.10:
	movq	%r15, %rdi
	callq	_vc4_submit_next_bin_job
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_vc4_irq_finish_render_job
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vc4_irq_finish_render_job
_vc4_irq_finish_render_job:             ; @vc4_irq_finish_render_job
	.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	x21, x0
	bl	_to_vc4_dev
	mov	x19, x0
	bl	_vc4_first_render_job
	cbz	x0, LBB0_10
; %bb.1:
	mov	x20, x0
	ldr	w8, [x19, #12]
	add	w8, w8, #1
	str	w8, [x19, #12]
	add	x0, x0, #16
	add	x1, x19, #8
	bl	_list_move_tail
	mov	x0, x19
	bl	_vc4_first_bin_job
	mov	x22, x0
	mov	x0, x19
	bl	_vc4_first_render_job
	mov	x23, x0
	ldr	x1, [x20]
	cmp	x1, #0
	ccmp	x0, #0, #0, ne
	b.ne	LBB0_5
; %bb.2:
	cbz	x22, LBB0_4
; %bb.3:
	ldr	x8, [x22]
	cmp	x8, x1
	b.eq	LBB0_5
LBB0_4:
	mov	x0, x19
	mov	w2, #1
	bl	_vc4_perfmon_stop
LBB0_5:
	cbz	x23, LBB0_11
; %bb.6:
	mov	x0, x21
	bl	_vc4_submit_next_render_job
LBB0_7:
	ldr	x0, [x20, #8]
	cbz	x0, LBB0_9
; %bb.8:
	bl	_dma_fence_signal_locked
	ldr	x0, [x20, #8]
	bl	_dma_fence_put
	str	xzr, [x20, #8]
LBB0_9:
	add	x0, x19, #4
	bl	_wake_up_all
	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	_schedule_work
LBB0_10:
	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
LBB0_11:
	cbz	x22, LBB0_7
; %bb.12:
	ldr	x8, [x22]
	ldr	x9, [x20]
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.13:
	mov	x0, x21
	bl	_vc4_submit_next_bin_job
	b	LBB0_7
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_vc4_irq_finish_render_job
.subsections_via_symbols
