	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc4_submit_cl_ioctl            ## -- Begin function vc4_submit_cl_ioctl
	.p2align	4, 0x90
_vc4_submit_cl_ioctl:                   ## @vc4_submit_cl_ioctl
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_to_vc4_dev
	cmpl	$0, 12(%rax)
	je	LBB0_3
## %bb.1:
	movq	%rax, %r12
	movl	(%r14), %esi
	movq	_VC4_SUBMIT_CL_USE_CLEAR_COLOR@GOTPCREL(%rip), %rax
	movq	_VC4_SUBMIT_CL_FIXED_RCL_ORDER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_VC4_SUBMIT_CL_RCL_ORDER_INCREASING_X@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_VC4_SUBMIT_CL_RCL_ORDER_INCREASING_Y@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	notl	%ecx
	testl	%ecx, %esi
	je	LBB0_4
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_6
LBB0_3:
	leaq	L_.str(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_4:
	movl	4(%r14), %esi
	testl	%esi, %esi
	je	LBB0_9
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
LBB0_6:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_7:
	subl	(%rax), %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	(%r13), %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %edi
	movl	$32, %esi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_vc4_v3d_pm_get
	testl	%eax, %eax
	je	LBB0_13
## %bb.11:
	movl	%eax, %r15d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
	jmp	LBB0_8
LBB0_12:
	leaq	L_.str.3(%rip), %rdi
	callq	_DRM_ERROR
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	jmp	LBB0_7
LBB0_13:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r14, (%r15)
	movq	%r15, %rdi
	addq	$28, %rdi
	callq	_INIT_LIST_HEAD
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	callq	_vc4_cl_lookup_bos
	movq	%r15, %rcx
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_15
LBB0_14:
	movl	(%r12), %edi
	movq	%rcx, %rsi
	callq	_vc4_complete_exec
	jmp	LBB0_8
LBB0_15:
	movq	40(%r14), %rsi
	testq	%rsi, %rsi
	movq	%rcx, %r15
	je	LBB0_17
## %bb.16:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_vc4_perfmon_find
	movl	%eax, 24(%r15)
	testl	%eax, %eax
	je	LBB0_23
LBB0_17:
	movq	32(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_21
## %bb.18:
	leaq	-64(%rbp), %r8
	movq	%r13, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_drm_syncobj_find_fence
	movq	%r15, %rcx
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.19:
	movq	-64(%rbp), %rdi
	movl	8(%r12), %esi
	callq	_dma_fence_match_context
	testl	%eax, %eax
	je	LBB0_30
LBB0_20:
	movq	-64(%rbp), %rdi
	callq	_dma_fence_put
	movq	-48(%rbp), %r15                 ## 8-byte Reload
LBB0_21:
	movq	(%r15), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_24
## %bb.22:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_vc4_get_bcl
	movq	%r15, %rcx
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_14
	jmp	LBB0_25
LBB0_23:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	movq	%r15, %rcx
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_14
LBB0_24:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r15)
	movq	%r15, %rcx
LBB0_25:
	movq	%rbx, %rdi
	movq	%rcx, %rsi
	callq	_vc4_get_rcl
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.26:
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%rcx, %rsi
	callq	_vc4_lock_bo_reservations
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.27:
	movq	24(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_32
## %bb.28:
	movq	%r13, %rdi
	callq	_drm_syncobj_find
	testq	%rax, %rax
	je	LBB0_35
## %bb.29:
	movq	%rax, %r13
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	$0, (%rsi)
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%rax, %rcx
	callq	_vc4_queue_submit
	movl	%eax, %r15d
	movq	%r13, %rdi
	callq	_drm_syncobj_put
	jmp	LBB0_33
LBB0_30:
	movq	-64(%rbp), %rdi
	movl	$1, %esi
	callq	_dma_fence_wait
	testl	%eax, %eax
	je	LBB0_20
## %bb.31:
	movl	%eax, %r15d
	movq	-64(%rbp), %rdi
	callq	_dma_fence_put
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_14
LBB0_32:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	$0, (%rsi)
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_vc4_queue_submit
	movl	%eax, %r15d
LBB0_33:
	testl	%r15d, %r15d
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	jne	LBB0_14
## %bb.34:
	movl	4(%r12), %eax
	movl	%eax, 16(%r14)
	xorl	%r15d, %r15d
	jmp	LBB0_8
LBB0_35:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VC4_SUBMIT_CL with no VC4 V3D probed\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_VC4_SUBMIT_CL_USE_CLEAR_COLOR,4,2 ## @VC4_SUBMIT_CL_USE_CLEAR_COLOR
	.comm	_VC4_SUBMIT_CL_FIXED_RCL_ORDER,4,2 ## @VC4_SUBMIT_CL_FIXED_RCL_ORDER
	.comm	_VC4_SUBMIT_CL_RCL_ORDER_INCREASING_X,4,2 ## @VC4_SUBMIT_CL_RCL_ORDER_INCREASING_X
	.comm	_VC4_SUBMIT_CL_RCL_ORDER_INCREASING_Y,4,2 ## @VC4_SUBMIT_CL_RCL_ORDER_INCREASING_Y
L_.str.1:                               ## @.str.1
	.asciz	"Unknown flags: 0x%02x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"Invalid pad: 0x%08x\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.3:                               ## @.str.3
	.asciz	"malloc failure on exec struct\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ENOENT,4,2                     ## @ENOENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc4_submit_cl_ioctl            ; -- Begin function vc4_submit_cl_ioctl
	.p2align	2
_vc4_submit_cl_ioctl:                   ; @vc4_submit_cl_ioctl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x2
	mov	x20, x1
	mov	x22, x0
	bl	_to_vc4_dev
	ldr	w8, [x0, #12]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _VC4_SUBMIT_CL_USE_CLEAR_COLOR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VC4_SUBMIT_CL_USE_CLEAR_COLOR@GOTPAGEOFF]
Lloh2:
	adrp	x10, _VC4_SUBMIT_CL_FIXED_RCL_ORDER@GOTPAGE
Lloh3:
	ldr	x10, [x10, _VC4_SUBMIT_CL_FIXED_RCL_ORDER@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh6:
	adrp	x10, _VC4_SUBMIT_CL_RCL_ORDER_INCREASING_X@GOTPAGE
Lloh7:
	ldr	x10, [x10, _VC4_SUBMIT_CL_RCL_ORDER_INCREASING_X@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w9, w10
Lloh9:
	adrp	x10, _VC4_SUBMIT_CL_RCL_ORDER_INCREASING_Y@GOTPAGE
Lloh10:
	ldr	x10, [x10, _VC4_SUBMIT_CL_RCL_ORDER_INCREASING_Y@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w9, w9, w10
	bics	wzr, w8, w9
	b.eq	LBB0_4
; %bb.2:
	str	x8, [sp]
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_3:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
Lloh16:
	adrp	x8, _ENODEV@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_9
; %bb.5:
	str	x8, [sp]
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_6:
	bl	_DRM_DEBUG
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_8:
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_9:
	mov	x19, x0
	ldr	x25, [x23]
Lloh22:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	w0, #1
	mov	w1, #32
	bl	_kcalloc
	cbz	x0, LBB0_12
; %bb.10:
	mov	x21, x0
	mov	x0, x19
	bl	_vc4_v3d_pm_get
	cbz	w0, LBB0_13
; %bb.11:
	mov	x24, x0
	mov	x0, x21
	bl	_kfree
	b	LBB0_8
LBB0_12:
Lloh25:
	adrp	x0, l_.str.3@PAGE
Lloh26:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_ERROR
Lloh27:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
LBB0_13:
	mov	x0, x21
	str	x20, [x0], #28
	bl	_INIT_LIST_HEAD
	mov	x0, x22
	mov	x1, x23
	mov	x2, x21
	bl	_vc4_cl_lookup_bos
	mov	x24, x0
	cbz	w0, LBB0_15
LBB0_14:
	ldr	w0, [x19]
	mov	x1, x21
	bl	_vc4_complete_exec
	b	LBB0_8
LBB0_15:
	ldr	x1, [x20, #40]
	cbz	x1, LBB0_17
; %bb.16:
	mov	x0, x25
	bl	_vc4_perfmon_find
	str	w0, [x21, #24]
	cbz	w0, LBB0_23
LBB0_17:
	ldr	x1, [x20, #32]
	cbz	x1, LBB0_21
; %bb.18:
	add	x4, sp, #16
	mov	x0, x23
	mov	w2, #0
	mov	w3, #0
	bl	_drm_syncobj_find_fence
	mov	x24, x0
	cbnz	w0, LBB0_14
; %bb.19:
	ldr	x0, [sp, #16]
	ldr	w1, [x19, #8]
	bl	_dma_fence_match_context
	cbz	w0, LBB0_31
LBB0_20:
	ldr	x0, [sp, #16]
	bl	_dma_fence_put
LBB0_21:
	ldr	x8, [x21]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_25
; %bb.22:
	mov	x0, x22
	mov	x1, x21
	bl	_vc4_get_bcl
	mov	x24, x0
	cbnz	w0, LBB0_14
	b	LBB0_26
LBB0_23:
Lloh29:
	adrp	x8, _ENOENT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_24:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_14
LBB0_25:
	stp	xzr, xzr, [x21, #8]
LBB0_26:
	mov	x0, x22
	mov	x1, x21
	bl	_vc4_get_rcl
	mov	x24, x0
	cbnz	w0, LBB0_14
; %bb.27:
	add	x2, sp, #24
	mov	x0, x22
	mov	x1, x21
	bl	_vc4_lock_bo_reservations
	mov	x24, x0
	cbnz	w0, LBB0_14
; %bb.28:
	ldr	x1, [x20, #24]
	cbz	x1, LBB0_33
; %bb.29:
	mov	x0, x23
	bl	_drm_syncobj_find
	cbz	x0, LBB0_36
; %bb.30:
	mov	x23, x0
	str	xzr, [x21]
	add	x2, sp, #24
	mov	x0, x22
	mov	x1, x21
	mov	x3, x23
	bl	_vc4_queue_submit
	mov	x24, x0
	mov	x0, x23
	bl	_drm_syncobj_put
	b	LBB0_34
LBB0_31:
	ldr	x0, [sp, #16]
	mov	w1, #1
	bl	_dma_fence_wait
	cbz	w0, LBB0_20
; %bb.32:
	mov	x24, x0
	ldr	x0, [sp, #16]
	bl	_dma_fence_put
	b	LBB0_14
LBB0_33:
	str	xzr, [x21]
	add	x2, sp, #24
	mov	x0, x22
	mov	x1, x21
	mov	x3, #0
	bl	_vc4_queue_submit
	mov	x24, x0
LBB0_34:
	cbnz	w24, LBB0_14
; %bb.35:
	ldr	w8, [x19, #4]
	str	w8, [x20, #16]
	b	LBB0_8
LBB0_36:
Lloh31:
	adrp	x8, _EINVAL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_24
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VC4_SUBMIT_CL with no VC4 V3D probed\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_VC4_SUBMIT_CL_USE_CLEAR_COLOR,4,2 ; @VC4_SUBMIT_CL_USE_CLEAR_COLOR
	.comm	_VC4_SUBMIT_CL_FIXED_RCL_ORDER,4,2 ; @VC4_SUBMIT_CL_FIXED_RCL_ORDER
	.comm	_VC4_SUBMIT_CL_RCL_ORDER_INCREASING_X,4,2 ; @VC4_SUBMIT_CL_RCL_ORDER_INCREASING_X
	.comm	_VC4_SUBMIT_CL_RCL_ORDER_INCREASING_Y,4,2 ; @VC4_SUBMIT_CL_RCL_ORDER_INCREASING_Y
l_.str.1:                               ; @.str.1
	.asciz	"Unknown flags: 0x%02x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"Invalid pad: 0x%08x\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.3:                               ; @.str.3
	.asciz	"malloc failure on exec struct\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ENOENT,4,2                     ; @ENOENT
.subsections_via_symbols
