	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_sched_entity_init          ## -- Begin function drm_sched_entity_init
	.p2align	4, 0x90
_drm_sched_entity_init:                 ## @drm_sched_entity_init
	.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
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.1:
	movq	%rsi, %r14
	testq	%rsi, %rsi
	je	LBB0_15
## %bb.2:
	movq	%rcx, %r13
	movl	%edx, %r15d
	movq	%rdi, %rbx
	testl	%edx, %edx
	je	LBB0_4
## %bb.3:
	cmpq	$0, (%r14)
	je	LBB0_15
LBB0_4:
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	leaq	56(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	movq	$0, 32(%rbx)
	movq	%r13, 48(%rbx)
	movl	%r15d, (%rbx)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %edi
	movl	$8, %esi
	callq	_kcalloc
	movq	%rax, 40(%rbx)
	testq	%rax, %rax
	je	LBB0_18
## %bb.5:
	testl	%r15d, %r15d
	je	LBB0_14
## %bb.6:
	movq	(%r14), %rcx
	movq	%rcx, (%rax)
	cmpl	$1, %r15d
	je	LBB0_13
## %bb.7:
	movl	%r15d, %esi
	leaq	-1(%rsi), %rdx
	addq	$-2, %rsi
	movl	%edx, %eax
	andl	$3, %eax
	movl	$1, %ecx
	cmpq	$3, %rsi
	jb	LBB0_11
## %bb.8:
	andq	$-4, %rdx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	40(%rbx), %rsi
	movq	8(%r14,%rcx,8), %rdi
	movq	%rdi, 8(%rsi,%rcx,8)
	movq	40(%rbx), %rsi
	movq	16(%r14,%rcx,8), %rdi
	movq	%rdi, 16(%rsi,%rcx,8)
	movq	40(%rbx), %rsi
	movq	24(%r14,%rcx,8), %rdi
	movq	%rdi, 24(%rsi,%rcx,8)
	movq	40(%rbx), %rsi
	movq	32(%r14,%rcx,8), %rdi
	movq	%rdi, 32(%rsi,%rcx,8)
	addq	$4, %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_9
## %bb.10:
	incq	%rcx
LBB0_11:
	testq	%rax, %rax
	je	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	40(%rbx), %rdx
	movq	(%r14,%rcx,8), %rsi
	movq	%rsi, (%rdx,%rcx,8)
	incq	%rcx
	decq	%rax
	jne	LBB0_12
LBB0_13:
	movq	(%r14), %rax
	movq	%rax, 32(%rbx)
LBB0_14:
	movq	$0, 24(%rbx)
	leaq	16(%rbx), %rdi
	callq	_spin_lock_init
	leaq	12(%rbx), %rdi
	callq	_spsc_queue_init
	leaq	8(%rbx), %rdi
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	callq	_atomic_set
	movl	$2, %edi
	callq	_dma_fence_context_alloc
	movl	%eax, 4(%rbx)
	jmp	LBB0_17
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
LBB0_16:
	subl	(%rax), %r12d
LBB0_17:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_sched_entity_init          ; -- Begin function drm_sched_entity_init
	.p2align	2
_drm_sched_entity_init:                 ; @drm_sched_entity_init
	.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
	cbz	x0, LBB0_11
; %bb.1:
	mov	x20, x1
	cbz	x1, LBB0_11
; %bb.2:
	mov	x22, x3
	mov	x21, x2
	mov	x19, x0
	cbz	w2, LBB0_4
; %bb.3:
	ldr	x8, [x20]
	cbz	x8, LBB0_11
LBB0_4:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #64
	bl	_memset
	add	x0, x19, #56
	bl	_INIT_LIST_HEAD
	str	xzr, [x19, #32]
	str	x22, [x19, #48]
	str	w21, [x19]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x21
	mov	w1, #8
	bl	_kcalloc
	str	x0, [x19, #40]
	cbz	x0, LBB0_14
; %bb.5:
	cbz	w21, LBB0_10
; %bb.6:
	ldr	x8, [x20]
	str	x8, [x0]
	cmp	w21, #1
	b.eq	LBB0_9
; %bb.7:
	mov	w8, w21
	mov	w9, #1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x19, #40]
	lsl	x11, x9, #3
	ldr	x12, [x20, x11]
	str	x12, [x10, x11]
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_8
LBB0_9:
	ldr	x8, [x20]
	str	x8, [x19, #32]
LBB0_10:
	str	xzr, [x19, #24]
	add	x0, x19, #16
	bl	_spin_lock_init
	add	x0, x19, #12
	bl	_spsc_queue_init
	add	x0, x19, #8
	mov	w1, #0
	bl	_atomic_set
	mov	w0, #2
	bl	_dma_fence_context_alloc
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #4]
	b	LBB0_13
LBB0_11:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	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
LBB0_14:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
