	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function t4_sched_class_alloc
_t4_sched_class_alloc:                  ## @t4_sched_class_alloc
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.1:
	movq	%rsi, %rbx
	movq	(%rsi), %rax
	movq	_SCHED_CLS_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.2:
	movq	%rdi, %r14
	movq	%rbx, %rsi
	callq	_t4_sched_class_lookup
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_7
## %bb.3:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_t4_sched_class_lookup
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%rax, %r15
	leaq	-40(%rbp), %r12
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	$8, %edx
	callq	_memcpy
	movq	(%r15), %rax
	movq	%rax, -40(%rbp)
	movq	_SCHED_FW_OP_ADD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_t4_sched_class_fw_cmd
	testl	%eax, %eax
	je	LBB0_5
LBB0_6:
	xorl	%r15d, %r15d
LBB0_7:
	movq	%r15, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	16(%r15), %rdi
	leaq	-40(%rbp), %rsi
	movl	$8, %edx
	callq	_memcpy
	movq	%r15, %rdi
	addq	$12, %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	movq	_SCHED_STATE_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_SCHED_CLS_NONE,8,3             ## @SCHED_CLS_NONE
	.comm	_SCHED_FW_OP_ADD,4,2            ## @SCHED_FW_OP_ADD
	.comm	_SCHED_STATE_ACTIVE,4,2         ## @SCHED_STATE_ACTIVE
	.no_dead_strip	_t4_sched_class_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function t4_sched_class_alloc
_t4_sched_class_alloc:                  ; @t4_sched_class_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x1, LBB0_5
; %bb.1:
	mov	x21, x1
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _SCHED_CLS_NONE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SCHED_CLS_NONE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	mov	x20, x0
	mov	x1, x21
	bl	_t4_sched_class_lookup
	mov	x19, x0
	cbnz	x0, LBB0_6
; %bb.3:
	mov	x0, x20
	mov	x1, #0
	bl	_t4_sched_class_lookup
	cbz	x0, LBB0_5
; %bb.4:
	mov	x19, x0
	add	x0, sp, #8
	mov	x1, x21
	mov	w2, #8
	bl	_memcpy
	ldr	x8, [x19]
	str	x8, [sp, #8]
Lloh3:
	adrp	x8, _SCHED_FW_OP_ADD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SCHED_FW_OP_ADD@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	x1, sp, #8
	mov	x0, x20
	bl	_t4_sched_class_fw_cmd
	cbz	w0, LBB0_7
LBB0_5:
	mov	x19, #0
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_7:
	add	x0, x19, #16
	add	x1, sp, #8
	mov	w2, #8
	bl	_memcpy
	add	x0, x19, #12
	mov	w1, #0
	bl	_atomic_set
Lloh6:
	adrp	x8, _SCHED_STATE_ACTIVE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SCHED_STATE_ACTIVE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SCHED_CLS_NONE,8,3             ; @SCHED_CLS_NONE
	.comm	_SCHED_FW_OP_ADD,4,2            ; @SCHED_FW_OP_ADD
	.comm	_SCHED_STATE_ACTIVE,4,2         ; @SCHED_STATE_ACTIVE
	.no_dead_strip	_t4_sched_class_alloc
.subsections_via_symbols
