	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vc4_queue_submit
_vc4_queue_submit:                      ## @vc4_queue_submit
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_to_vc4_dev
	movq	%rax, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, 16(%rax)
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	16(%rbx), %r13
	incq	%r13
	movq	%r13, 16(%rbx)
	movq	%r13, 24(%r15)
	movl	8(%rbx), %ecx
	movq	_vc4_fence_ops@GOTPCREL(%rip), %rsi
	movq	%r12, %rdi
	movq	%rbx, %rdx
	movq	%r13, %r8
	callq	_dma_fence_init
	movq	24(%r15), %rax
	movq	%rax, 8(%r12)
	movq	%r12, 16(%r15)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	movq	%r12, %rsi
	callq	_drm_syncobj_replace_fence
LBB0_4:
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_vc4_update_bo_seqnos
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_vc4_unlock_bo_reservations
	leaq	8(%r15), %rdi
	movq	%rbx, %rsi
	addq	$4, %rsi
	callq	_list_add_tail
	movq	%rbx, %rdi
	callq	_vc4_first_render_job
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_vc4_first_bin_job
	cmpq	%r15, %rax
	jne	LBB0_8
## %bb.5:
	testq	%r12, %r12
	je	LBB0_7
## %bb.6:
	movq	(%r12), %rax
	cmpq	(%r15), %rax
	jne	LBB0_8
LBB0_7:
	movq	%r14, %rdi
	callq	_vc4_submit_next_bin_job
	movq	%r14, %rdi
	callq	_vc4_queue_hangcheck
LBB0_8:
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_vc4_fence_ops,4,2              ## @vc4_fence_ops
	.no_dead_strip	_vc4_queue_submit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vc4_queue_submit
_vc4_queue_submit:                      ; @vc4_queue_submit
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	bl	_to_vc4_dev
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_8
; %bb.1:
	mov	x24, x0
	str	x19, [x0, #16]
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x20, #16]
	add	x25, x8, #1
	str	x25, [x20, #16]
	str	x25, [x21, #24]
	ldr	w3, [x20, #8]
Lloh3:
	adrp	x1, _vc4_fence_ops@GOTPAGE
Lloh4:
	ldr	x1, [x1, _vc4_fence_ops@GOTPAGEOFF]
	mov	x0, x24
	mov	x2, x20
	mov	x4, x25
	bl	_dma_fence_init
	ldr	x8, [x21, #24]
	str	x8, [x24, #8]
	str	x24, [x21, #16]
	cbz	x23, LBB0_3
; %bb.2:
	mov	x0, x23
	mov	x1, x24
	bl	_drm_syncobj_replace_fence
LBB0_3:
	mov	x0, x21
	mov	x1, x25
	bl	_vc4_update_bo_seqnos
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_vc4_unlock_bo_reservations
	add	x0, x21, #8
	add	x1, x20, #4
	bl	_list_add_tail
	mov	x0, x20
	bl	_vc4_first_render_job
	mov	x22, x0
	mov	x0, x20
	bl	_vc4_first_bin_job
	cmp	x0, x21
	b.ne	LBB0_7
; %bb.4:
	cbz	x22, LBB0_6
; %bb.5:
	ldr	x8, [x22]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_7
LBB0_6:
	mov	x0, x19
	bl	_vc4_submit_next_bin_job
	mov	x0, x19
	bl	_vc4_queue_hangcheck
LBB0_7:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_9
LBB0_8:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_vc4_fence_ops,4,2              ; @vc4_fence_ops
	.no_dead_strip	_vc4_queue_submit
.subsections_via_symbols
