	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function v3d_open
_v3d_open:                              ## @v3d_open
	.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	%rsi, %r14
	callq	_to_v3d_dev
	movq	%rax, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, 8(%rax)
	movq	_V3D_MAX_QUEUES@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_5
## %bb.3:
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movq	_DRM_SCHED_PRIORITY_NORMAL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	shlq	$2, %rcx
	addq	(%rax,%r14,2), %rcx
	movq	%rcx, -56(%rbp)
	movq	(%rbx), %rdi
	addq	%r14, %rdi
	leaq	-56(%rbp), %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_drm_sched_entity_init
	incq	%r13
	movslq	(%r12), %rax
	addq	$4, %r14
	cmpq	%rax, %r13
	jl	LBB0_4
LBB0_5:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	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	_V3D_MAX_QUEUES,4,2             ## @V3D_MAX_QUEUES
	.comm	_DRM_SCHED_PRIORITY_NORMAL,8,3  ## @DRM_SCHED_PRIORITY_NORMAL
	.no_dead_strip	_v3d_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function v3d_open
_v3d_open:                              ; @v3d_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x1
	bl	_to_v3d_dev
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x21, x0
	str	x20, [x0, #8]
Lloh3:
	adrp	x22, _V3D_MAX_QUEUES@GOTPAGE
Lloh4:
	ldr	x22, [x22, _V3D_MAX_QUEUES@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x23, #0
	mov	x24, #0
Lloh5:
	adrp	x25, _DRM_SCHED_PRIORITY_NORMAL@GOTPAGE
Lloh6:
	ldr	x25, [x25, _DRM_SCHED_PRIORITY_NORMAL@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	x8, [x8, x24, lsl #3]
	ldr	x9, [x25]
	add	x8, x8, x9, lsl #2
	str	x8, [sp, #8]
	ldr	x8, [x21]
	add	x0, x8, x23
	add	x1, sp, #8
	mov	w2, #1
	mov	x3, #0
	bl	_drm_sched_entity_init
	add	x24, x24, #1
	ldrsw	x8, [x22]
	add	x23, x23, #4
	cmp	x24, x8
	b.lt	LBB0_3
LBB0_4:
	mov	w0, #0
	str	x21, [x19]
	b	LBB0_6
LBB0_5:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_V3D_MAX_QUEUES,4,2             ; @V3D_MAX_QUEUES
	.comm	_DRM_SCHED_PRIORITY_NORMAL,8,3  ; @DRM_SCHED_PRIORITY_NORMAL
	.no_dead_strip	_v3d_open
.subsections_via_symbols
