	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pqm_set_gws                    ## -- Begin function pqm_set_gws
	.p2align	4, 0x90
_pqm_set_gws:                           ## @pqm_set_gws
	.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	%rdx, %r14
	movq	%rdi, %rbx
	movq	$0, -48(%rbp)
	callq	_get_queue_by_qid
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r13
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	(%rax), %r15
	jmp	LBB0_6
LBB0_3:
	leaq	L_.str(%rip), %rdi
LBB0_4:
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_5:
	xorl	%r15d, %r15d
LBB0_6:
	xorl	%edi, %edi
	testq	%r15, %r15
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_kfd_get_process_device_data
	testq	%rax, %rax
	je	LBB0_14
## %bb.11:
	movq	%rax, %r12
	movl	(%rax), %eax
	testq	%r14, %r14
	je	LBB0_15
## %bb.12:
	testl	%eax, %eax
	je	LBB0_17
## %bb.13:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_14:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_4
LBB0_15:
	testl	%eax, %eax
	je	LBB0_21
## %bb.16:
	movq	8(%r12), %rax
	movl	(%rax), %edi
	movq	(%r13), %rax
	movq	8(%rax), %rsi
	callq	_amdgpu_amdkfd_remove_gws_from_process
	jmp	LBB0_18
LBB0_17:
	movq	8(%r12), %rax
	movl	(%rax), %edi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rsi
	callq	_amdgpu_amdkfd_add_gws_to_process
LBB0_18:
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_9
## %bb.19:
	movq	-48(%rbp), %rax
	movq	(%r13), %rsi
	movq	%rax, 8(%rsi)
	testq	%r14, %r14
	je	LBB0_22
## %bb.20:
	movl	8(%r15), %edi
	callq	_amdgpu_amdkfd_get_num_gws
	movq	(%r13), %rsi
	jmp	LBB0_23
LBB0_21:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_22:
	xorl	%eax, %eax
LBB0_23:
	movl	%eax, (%r12)
	movq	(%rsi), %rax
	movq	(%rax), %rdi
	callq	*(%rdi)
	movl	%eax, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Queue id does not match any known queue\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.1:                               ## @.str.1
	.asciz	"Process device data doesn't exist\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pqm_set_gws                    ; -- Begin function pqm_set_gws
	.p2align	2
_pqm_set_gws:                           ; @pqm_set_gws
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x2
	mov	x22, x0
	str	xzr, [sp, #8]
	bl	_get_queue_by_qid
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_6
; %bb.2:
	ldr	x21, [x8]
	b	LBB0_7
LBB0_3:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
LBB0_4:
	bl	_pr_err
LBB0_5:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
	mov	x21, #0
LBB0_7:
	cmp	x21, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_11
; %bb.8:
Lloh4:
	adrp	x8, _ENODEV@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_10:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_11:
	ldr	w1, [x22]
	mov	x0, x21
	bl	_kfd_get_process_device_data
	cbz	x0, LBB0_15
; %bb.12:
	mov	x22, x0
	ldr	w8, [x0]
	cbz	x19, LBB0_16
; %bb.13:
	cbz	w8, LBB0_18
; %bb.14:
Lloh6:
	adrp	x8, _EBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_9
LBB0_15:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_16:
	cbz	w8, LBB0_5
; %bb.17:
	ldr	x8, [x22, #8]
	ldr	w0, [x8]
	ldr	x8, [x20]
	ldr	x1, [x8, #8]
	bl	_amdgpu_amdkfd_remove_gws_from_process
	b	LBB0_19
LBB0_18:
	ldr	x8, [x22, #8]
	ldr	w0, [x8]
	add	x2, sp, #8
	mov	x1, x19
	bl	_amdgpu_amdkfd_add_gws_to_process
LBB0_19:
	mov	x23, x0
	bl	_unlikely
	cbnz	x0, LBB0_10
; %bb.20:
	ldr	x8, [sp, #8]
	ldr	x1, [x20]
	str	x8, [x1, #8]
	cbz	x19, LBB0_22
; %bb.21:
	ldr	w0, [x21, #8]
	bl	_amdgpu_amdkfd_get_num_gws
	ldr	x1, [x20]
	b	LBB0_23
LBB0_22:
	mov	w0, #0
LBB0_23:
	str	w0, [x22]
	ldr	x8, [x1]
	ldr	x0, [x8]
	ldr	x8, [x0]
	blr	x8
	mov	x23, x0
	b	LBB0_10
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Queue id does not match any known queue\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.1:                               ; @.str.1
	.asciz	"Process device data doesn't exist\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
.subsections_via_symbols
