	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_sched_resources
_set_sched_resources:                   ## @set_sched_resources
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %rcx
	movl	12(%rcx), %esi
	movl	%esi, -80(%rbp)
	movq	_KGD_MAX_QUEUES@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_1
## %bb.2:
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	cltd
	idivl	(%rcx)
	cltd
	idivl	4(%rcx)
	movl	%eax, %r13d
	movl	8(%rcx), %esi
	movl	%ebx, %edi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testl	%r13d, %r13d
	jg	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%edi, %edi
	cmpq	$64, %rbx
	setae	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	btsq	%rbx, %r12
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jge	LBB0_9
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r15), %rcx
	jmp	LBB0_3
LBB0_9:
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	jmp	LBB0_10
LBB0_1:
	xorl	%r12d, %r12d
LBB0_10:
	movq	%r12, -96(%rbp)
	jmp	LBB0_11
LBB0_6:
	movq	%r12, -96(%rbp)
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_pr_err
	movl	-44(%rbp), %esi                 ## 4-byte Reload
LBB0_11:
	movq	$-1, -88(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -72(%rbp)
	movq	$0, -56(%rbp)
	leaq	L_.str.1(%rip), %rdi
	movq	%r12, %rdx
	callq	_pr_debug
	leaq	-96(%rbp), %rsi
	movq	%r15, %rdi
	callq	_pm_send_set_resources
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KGD_MAX_QUEUES,4,2             ## @KGD_MAX_QUEUES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid queue enabled by amdgpu: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Scheduling resources:\nvmid mask: 0x%8X\nqueue mask: 0x%8llX\n"

	.no_dead_strip	_set_sched_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_sched_resources
_set_sched_resources:                   ; @set_sched_resources
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x0
	ldr	x8, [x0, #8]
	ldr	w20, [x8, #12]
	str	w20, [sp, #16]
Lloh0:
	adrp	x23, _KGD_MAX_QUEUES@GOTPAGE
Lloh1:
	ldr	x23, [x23, _KGD_MAX_QUEUES@GOTPAGEOFF]
	ldr	w9, [x23]
	cmp	w9, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x22, #0
	mov	x21, #0
	mov	w24, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w25, w26, [x8]
	ldr	w1, [x8, #8]
	mov	x0, x22
	bl	_test_bit
	cbz	w0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sdiv	w8, w22, w25
	sdiv	w8, w8, w26
	cmp	w8, #0
	b.gt	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	x22, #63
	cset	w0, hi
	bl	_WARN_ON
	cbnz	x0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	lsl	x8, x24, x22
	orr	x21, x21, x8
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x23]
	cmp	x22, x8
	b.ge	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #8]
	b	LBB0_2
LBB0_8:
	mov	x21, #0
LBB0_9:
	str	x21, [sp]
	b	LBB0_11
LBB0_10:
	str	x21, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_pr_err
LBB0_11:
	mov	x8, #-1
	str	x8, [sp, #8]
	stp	xzr, xzr, [sp, #24]
	str	xzr, [sp, #40]
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	bl	_pr_debug
	mov	x1, sp
	mov	x0, x19
	bl	_pm_send_set_resources
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_KGD_MAX_QUEUES,4,2             ; @KGD_MAX_QUEUES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid queue enabled by amdgpu: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Scheduling resources:\nvmid mask: 0x%8X\nqueue mask: 0x%8llX\n"

	.no_dead_strip	_set_sched_resources
.subsections_via_symbols
