	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_fence_driver_init_ring  ## -- Begin function amdgpu_fence_driver_init_ring
	.p2align	4, 0x90
_amdgpu_fence_driver_init_ring:         ## @amdgpu_fence_driver_init_ring
	.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
	movq	8(%rdi), %r13
	testq	%r13, %r13
	je	LBB0_1
## %bb.3:
	movl	%esi, %r15d
	leal	-1(%r15), %eax
	testl	%eax, %esi
	jne	LBB0_1
## %bb.4:
	movq	%rdi, %rbx
	addq	$44, %rdi
	xorps	%xmm0, %xmm0
	movups	%xmm0, 48(%rbx)
	movq	$0, 64(%rbx)
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_atomic_set
	movl	$0, 24(%rbx)
	leaq	40(%rbx), %rdi
	movq	_amdgpu_fence_fallback@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_timer_setup
	leal	(%r15,%r15), %r12d
	leal	(%r15,%r15), %eax
	decl	%eax
	movl	%eax, 28(%rbx)
	leaq	36(%rbx), %rdi
	callq	_spin_lock_init
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r12d, %edi
	movl	$8, %esi
	callq	_kcalloc
	movl	%eax, 32(%rbx)
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movq	16(%rbx), %rax
	movl	(%rax), %eax
	movq	_AMDGPU_RING_TYPE_KIQ@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_16
## %bb.7:
	cmpl	$128, %eax
	je	LBB0_13
## %bb.8:
	cmpl	$130, %eax
	je	LBB0_11
## %bb.9:
	cmpl	$129, %eax
	je	LBB0_14
## %bb.10:
	addq	$24, %r13
	jmp	LBB0_14
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_13:
	addq	$16, %r13
	jmp	LBB0_14
LBB0_11:
	movq	8(%rbx), %rdi
	callq	_amdgpu_sriov_vf
	testl	%eax, %eax
	jne	LBB0_14
## %bb.12:
	addq	$8, %r13
LBB0_14:
	movq	(%r13), %r8
	leaq	4(%rbx), %rdi
	movq	_amdgpu_job_hang_limit@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%rbx), %r9d
	movq	_amdgpu_sched_ops@GOTPCREL(%rip), %rsi
	movl	%r15d, %edx
	callq	_drm_sched_init
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movl	%eax, %r15d
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movl	%r15d, %r14d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_amdgpu_fence_fallback,4,2      ## @amdgpu_fence_fallback
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AMDGPU_RING_TYPE_KIQ,4,2       ## @AMDGPU_RING_TYPE_KIQ
	.comm	_amdgpu_sched_ops,4,2           ## @amdgpu_sched_ops
	.comm	_amdgpu_job_hang_limit,4,2      ## @amdgpu_job_hang_limit
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to create scheduler on ring %s.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_fence_driver_init_ring  ; -- Begin function amdgpu_fence_driver_init_ring
	.p2align	2
_amdgpu_fence_driver_init_ring:         ; @amdgpu_fence_driver_init_ring
	.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
	ldr	x22, [x0, #8]
	cbz	x22, LBB0_5
; %bb.1:
	mov	x20, x1
	sub	w8, w1, #1
	tst	w1, w8
	b.ne	LBB0_5
; %bb.2:
	mov	x19, x0
	add	x0, x0, #44
	stp	xzr, xzr, [x19, #48]
	str	xzr, [x19, #64]
	mov	w1, #0
	bl	_atomic_set
	str	wzr, [x19, #24]
	add	x0, x19, #40
Lloh0:
	adrp	x8, _amdgpu_fence_fallback@GOTPAGE
Lloh1:
	ldr	x8, [x8, _amdgpu_fence_fallback@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_timer_setup
	lsl	w21, w20, #1
	sub	w8, w21, #1
	str	w8, [x19, #28]
	add	x0, x19, #36
	bl	_spin_lock_init
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x21
	mov	w1, #8
	bl	_kcalloc
	str	w0, [x19, #32]
	cbz	w0, LBB0_8
; %bb.3:
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _AMDGPU_RING_TYPE_KIQ@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AMDGPU_RING_TYPE_KIQ@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.4:
	mov	w20, #0
	b	LBB0_7
LBB0_5:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_7:
	mov	x0, x20
	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_8:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
LBB0_9:
	cmp	w8, #128
	b.eq	LBB0_12
; %bb.10:
	cmp	w8, #130
	b.eq	LBB0_13
; %bb.11:
	cmp	w8, #129
	add	x8, x22, #24
	csel	x8, x8, x22, ne
	b	LBB0_14
LBB0_12:
	add	x8, x22, #16
	b	LBB0_14
LBB0_13:
	ldr	x0, [x19, #8]
	bl	_amdgpu_sriov_vf
	add	x8, x22, #8
	cmp	w0, #0
	csel	x8, x22, x8, ne
LBB0_14:
	ldr	x4, [x8]
Lloh13:
	adrp	x8, _amdgpu_job_hang_limit@GOTPAGE
Lloh14:
	ldr	x8, [x8, _amdgpu_job_hang_limit@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	mov	x0, x19
	ldr	w5, [x0], #4
Lloh16:
	adrp	x1, _amdgpu_sched_ops@GOTPAGE
Lloh17:
	ldr	x1, [x1, _amdgpu_sched_ops@GOTPAGEOFF]
	mov	x2, x20
	bl	_drm_sched_init
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.15:
	ldr	w1, [x19]
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_amdgpu_fence_fallback,4,2      ; @amdgpu_fence_fallback
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AMDGPU_RING_TYPE_KIQ,4,2       ; @AMDGPU_RING_TYPE_KIQ
	.comm	_amdgpu_sched_ops,4,2           ; @amdgpu_sched_ops
	.comm	_amdgpu_job_hang_limit,4,2      ; @amdgpu_job_hang_limit
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to create scheduler on ring %s.\n"

.subsections_via_symbols
