	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function v3d_csd_job_run
_v3d_csd_job_run:                       ## @v3d_csd_job_run
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_to_csd_job
	movq	%rax, %r15
	movq	16(%rax), %rbx
	movq	%rax, (%rbx)
	movq	%rbx, %rdi
	callq	_v3d_invalidate_caches
	movq	_V3D_CSD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_v3d_fence_create
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	xorl	%r14d, %r14d
	jmp	LBB0_5
LBB0_2:
	addq	$8, %rbx
	movq	8(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_dma_fence_put
LBB0_4:
	movq	%r14, %rdi
	callq	_dma_fence_get
	movq	%rax, 8(%r15)
	movq	%r14, %rdi
	callq	_to_v3d_fence
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_trace_v3d_submit_csd
	movq	_V3D_CSD_QUEUED_CFG0@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	addq	$4, %rsi
	movq	(%r15), %rax
	movl	4(%rax), %edx
	xorl	%edi, %edi
	callq	_V3D_CORE_WRITE
	movq	(%rbx), %rsi
	addq	$8, %rsi
	movq	(%r15), %rax
	movl	8(%rax), %edx
	xorl	%edi, %edi
	callq	_V3D_CORE_WRITE
	movq	(%rbx), %rsi
	addq	$12, %rsi
	movq	(%r15), %rax
	movl	12(%rax), %edx
	xorl	%edi, %edi
	callq	_V3D_CORE_WRITE
	movq	(%rbx), %rsi
	addq	$16, %rsi
	movq	(%r15), %rax
	movl	16(%rax), %edx
	xorl	%edi, %edi
	callq	_V3D_CORE_WRITE
	movq	(%rbx), %rsi
	addq	$20, %rsi
	movq	(%r15), %rax
	movl	20(%rax), %edx
	xorl	%edi, %edi
	callq	_V3D_CORE_WRITE
	movq	(%rbx), %rsi
	addq	$24, %rsi
	movq	(%r15), %rax
	movl	24(%rax), %edx
	xorl	%edi, %edi
	callq	_V3D_CORE_WRITE
	movq	(%rbx), %rsi
	movq	(%r15), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	callq	_V3D_CORE_WRITE
LBB0_5:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V3D_CSD,4,2                    ## @V3D_CSD
	.comm	_V3D_CSD_QUEUED_CFG0,8,3        ## @V3D_CSD_QUEUED_CFG0
	.no_dead_strip	_v3d_csd_job_run
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function v3d_csd_job_run
_v3d_csd_job_run:                       ; @v3d_csd_job_run
	.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
	bl	_to_csd_job
	mov	x19, x0
	ldr	x20, [x0, #16]
	mov	x21, x20
	str	x0, [x21], #8
	mov	x0, x20
	bl	_v3d_invalidate_caches
Lloh0:
	adrp	x8, _V3D_CSD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V3D_CSD@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_v3d_fence_create
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x20, #0
	b	LBB0_5
LBB0_2:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_dma_fence_put
LBB0_4:
	mov	x0, x20
	bl	_dma_fence_get
	str	x0, [x19, #8]
	mov	x0, x20
	bl	_to_v3d_fence
	ldr	w1, [x0]
	mov	x0, x21
	bl	_trace_v3d_submit_csd
Lloh3:
	adrp	x21, _V3D_CSD_QUEUED_CFG0@GOTPAGE
Lloh4:
	ldr	x21, [x21, _V3D_CSD_QUEUED_CFG0@GOTPAGEOFF]
	ldr	x8, [x21]
	add	x1, x8, #4
	ldr	x8, [x19]
	ldr	w2, [x8, #4]
	mov	w0, #0
	bl	_V3D_CORE_WRITE
	ldr	x8, [x21]
	add	x1, x8, #8
	ldr	x8, [x19]
	ldr	w2, [x8, #8]
	mov	w0, #0
	bl	_V3D_CORE_WRITE
	ldr	x8, [x21]
	add	x1, x8, #12
	ldr	x8, [x19]
	ldr	w2, [x8, #12]
	mov	w0, #0
	bl	_V3D_CORE_WRITE
	ldr	x8, [x21]
	add	x1, x8, #16
	ldr	x8, [x19]
	ldr	w2, [x8, #16]
	mov	w0, #0
	bl	_V3D_CORE_WRITE
	ldr	x8, [x21]
	add	x1, x8, #20
	ldr	x8, [x19]
	ldr	w2, [x8, #20]
	mov	w0, #0
	bl	_V3D_CORE_WRITE
	ldr	x8, [x21]
	add	x1, x8, #24
	ldr	x8, [x19]
	ldr	w2, [x8, #24]
	mov	w0, #0
	bl	_V3D_CORE_WRITE
	ldr	x1, [x21]
	ldr	x8, [x19]
	ldr	w2, [x8]
	mov	w0, #0
	bl	_V3D_CORE_WRITE
LBB0_5:
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_V3D_CSD,4,2                    ; @V3D_CSD
	.comm	_V3D_CSD_QUEUED_CFG0,8,3        ; @V3D_CSD_QUEUED_CFG0
	.no_dead_strip	_v3d_csd_job_run
.subsections_via_symbols
