	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx10_kiq_query_status
_gfx10_kiq_query_status:                ## @gfx10_kiq_query_status
	.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
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	8(%rsi), %rax
	movq	(%rax), %rax
	movq	_AMDGPU_RING_TYPE_GFX@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpq	(%rcx), %rax
	sete	%r15b
	shll	$2, %r15d
	movq	_PACKET3_QUERY_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$5, %esi
	callq	_PACKET3
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_amdgpu_ring_write
	xorl	%edi, %edi
	callq	_PACKET3_QUERY_STATUS_CONTEXT_ID
	movl	%eax, %r14d
	xorl	%edi, %edi
	callq	_PACKET3_QUERY_STATUS_INTERRUPT_SEL
	orl	%eax, %r14d
	movl	$2, %edi
	callq	_PACKET3_QUERY_STATUS_COMMAND
	orl	%eax, %r14d
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_amdgpu_ring_write
	movl	(%r13), %edi
	callq	_PACKET3_QUERY_STATUS_DOORBELL_OFFSET
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_PACKET3_QUERY_STATUS_ENG_SEL
	orl	%eax, %ebx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_amdgpu_ring_write
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_lower_32_bits
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_amdgpu_ring_write
	movl	%ebx, %edi
	callq	_upper_32_bits
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_amdgpu_ring_write
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_lower_32_bits
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_amdgpu_ring_write
	movl	%ebx, %edi
	callq	_upper_32_bits
	movq	%r12, %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_amdgpu_ring_write              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AMDGPU_RING_TYPE_GFX,8,3       ## @AMDGPU_RING_TYPE_GFX
	.comm	_PACKET3_QUERY_STATUS,4,2       ## @PACKET3_QUERY_STATUS
	.no_dead_strip	_gfx10_kiq_query_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx10_kiq_query_status
_gfx10_kiq_query_status:                ; @gfx10_kiq_query_status
	.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
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	x8, [x1, #8]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _AMDGPU_RING_TYPE_GFX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AMDGPU_RING_TYPE_GFX@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w8, eq
	lsl	w23, w8, #2
Lloh3:
	adrp	x8, _PACKET3_QUERY_STATUS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PACKET3_QUERY_STATUS@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	w1, #5
	bl	_PACKET3
	mov	x1, x0
	mov	x0, x19
	bl	_amdgpu_ring_write
	mov	w0, #0
	bl	_PACKET3_QUERY_STATUS_CONTEXT_ID
	mov	x24, x0
	mov	w0, #0
	bl	_PACKET3_QUERY_STATUS_INTERRUPT_SEL
	orr	w24, w0, w24
	mov	w0, #2
	bl	_PACKET3_QUERY_STATUS_COMMAND
	orr	w1, w24, w0
	mov	x0, x19
	bl	_amdgpu_ring_write
	ldr	w0, [x22]
	bl	_PACKET3_QUERY_STATUS_DOORBELL_OFFSET
	mov	x22, x0
	mov	x0, x23
	bl	_PACKET3_QUERY_STATUS_ENG_SEL
	orr	w1, w0, w22
	mov	x0, x19
	bl	_amdgpu_ring_write
	mov	x0, x21
	bl	_lower_32_bits
	mov	x1, x0
	mov	x0, x19
	bl	_amdgpu_ring_write
	mov	x0, x21
	bl	_upper_32_bits
	mov	x1, x0
	mov	x0, x19
	bl	_amdgpu_ring_write
	mov	x0, x20
	bl	_lower_32_bits
	mov	x1, x0
	mov	x0, x19
	bl	_amdgpu_ring_write
	mov	x0, x20
	bl	_upper_32_bits
	mov	x1, x0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_amdgpu_ring_write
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AMDGPU_RING_TYPE_GFX,8,3       ; @AMDGPU_RING_TYPE_GFX
	.comm	_PACKET3_QUERY_STATUS,4,2       ; @PACKET3_QUERY_STATUS
	.no_dead_strip	_gfx10_kiq_query_status
.subsections_via_symbols
