	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v10_0_kiq_disable_kgq
_gfx_v10_0_kiq_disable_kgq:             ## @gfx_v10_0_kiq_disable_kgq
	.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	16(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	cmpq	$0, 8(%rax)
	je	LBB0_2
## %bb.4:
	movq	%rdi, %r15
	leaq	24(%rdi), %r14
	movl	(%rdi), %esi
	imull	(%rax), %esi
	movq	%r14, %rdi
	callq	_amdgpu_ring_alloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.9:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	cmpl	$0, (%r15)
	jle	LBB0_8
## %bb.6:
	xorl	%r13d, %r13d
	movq	_PREEMPT_QUEUES@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rax
	movq	8(%r15), %rsi
	addq	%r13, %rsi
	movl	(%r12), %edx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	*8(%rax)
	incq	%rbx
	movslq	(%r15), %rax
	addq	$4, %r13
	cmpq	%rax, %rbx
	jl	LBB0_7
LBB0_8:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_amdgpu_ring_test_ring          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PREEMPT_QUEUES,4,2             ## @PREEMPT_QUEUES
	.no_dead_strip	_gfx_v10_0_kiq_disable_kgq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_v10_0_kiq_disable_kgq
_gfx_v10_0_kiq_disable_kgq:             ; @gfx_v10_0_kiq_disable_kgq
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_4
; %bb.2:
	mov	x19, x0
	add	x20, x0, #24
	ldr	w8, [x8]
	ldr	w9, [x0]
	mul	w1, w9, w8
	mov	x0, x20
	bl	_amdgpu_ring_alloc
	cbz	x0, LBB0_6
; %bb.3:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.7:
	mov	x21, #0
	mov	x22, #0
Lloh4:
	adrp	x23, _PREEMPT_QUEUES@GOTPAGE
Lloh5:
	ldr	x23, [x23, _PREEMPT_QUEUES@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x9, x8, [x19, #8]
	ldr	x8, [x8, #8]
	add	x1, x9, x21
	ldr	w2, [x23]
	mov	x0, x20
	mov	w3, #0
	mov	w4, #0
	blr	x8
	add	x22, x22, #1
	ldrsw	x8, [x19]
	add	x21, x21, #4
	cmp	x22, x8
	b.lt	LBB0_8
LBB0_9:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_amdgpu_ring_test_ring
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PREEMPT_QUEUES,4,2             ; @PREEMPT_QUEUES
	.no_dead_strip	_gfx_v10_0_kiq_disable_kgq
.subsections_via_symbols
