	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v8_0_ring_emit_gds_switch
_gfx_v8_0_ring_emit_gds_switch:         ## @gfx_v8_0_ring_emit_gds_switch
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	16(%rbp), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_PACKET3_WRITE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rax, %rbx
	movl	$3, %esi
	callq	_PACKET3
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_amdgpu_ring_write
	xorl	%edi, %edi
	callq	_WRITE_DATA_ENGINE_SEL
	movl	%eax, %r12d
	xorl	%edi, %edi
	callq	_WRITE_DATA_DST_SEL
	orl	%eax, %r12d
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_amdgpu_ring_write
	movq	_amdgpu_gds_reg_offset@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	shlq	$4, %r15
	movl	(%rax,%r15), %esi
	movq	%r13, %rdi
	callq	_amdgpu_ring_write
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_amdgpu_ring_write
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_amdgpu_ring_write
	movq	%rbx, %r14
	movl	(%rbx), %edi
	movl	$3, %esi
	callq	_PACKET3
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_amdgpu_ring_write
	xorl	%edi, %edi
	callq	_WRITE_DATA_ENGINE_SEL
	movl	%eax, %ebx
	xorl	%edi, %edi
	callq	_WRITE_DATA_DST_SEL
	orl	%eax, %ebx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_amdgpu_ring_write
	movq	(%r12), %rax
	movl	4(%rax,%r15), %esi
	movq	%r13, %rdi
	callq	_amdgpu_ring_write
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_amdgpu_ring_write
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_amdgpu_ring_write
	movl	(%r14), %edi
	movl	$3, %esi
	callq	_PACKET3
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_amdgpu_ring_write
	xorl	%edi, %edi
	callq	_WRITE_DATA_ENGINE_SEL
	movl	%eax, %ebx
	xorl	%edi, %edi
	callq	_WRITE_DATA_DST_SEL
	orl	%eax, %ebx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_amdgpu_ring_write
	movq	(%r12), %rax
	movl	8(%rax,%r15), %esi
	movq	%r13, %rdi
	callq	_amdgpu_ring_write
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_amdgpu_ring_write
	movq	_GDS_GWS_VMID0__SIZE__SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	shlq	%cl, %rax
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	orl	%eax, %esi
	movq	%r13, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_amdgpu_ring_write
	movl	(%r14), %edi
	movl	$3, %esi
	callq	_PACKET3
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_amdgpu_ring_write
	xorl	%edi, %edi
	callq	_WRITE_DATA_ENGINE_SEL
	movl	%eax, %ebx
	xorl	%edi, %edi
	callq	_WRITE_DATA_DST_SEL
	orl	%eax, %ebx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_amdgpu_ring_write
	movq	(%r12), %rax
	movl	12(%rax,%r15), %esi
	movq	%r13, %rdi
	callq	_amdgpu_ring_write
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_amdgpu_ring_write
	movl	24(%rbp), %ecx
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	addl	%edx, %ecx
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	movl	$-1, %esi
	movl	%edx, %ecx
	shll	%cl, %esi
	addl	%eax, %esi
	movq	%r13, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_amdgpu_ring_write              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PACKET3_WRITE_DATA,4,2         ## @PACKET3_WRITE_DATA
	.comm	_amdgpu_gds_reg_offset,8,3      ## @amdgpu_gds_reg_offset
	.comm	_GDS_GWS_VMID0__SIZE__SHIFT,8,3 ## @GDS_GWS_VMID0__SIZE__SHIFT
	.no_dead_strip	_gfx_v8_0_ring_emit_gds_switch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_v8_0_ring_emit_gds_switch
_gfx_v8_0_ring_emit_gds_switch:         ; @gfx_v8_0_ring_emit_gds_switch
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x7
	mov	x19, x6
	mov	x23, x5
	mov	x22, x4
	mov	x24, x3
	mov	x25, x2
	mov	x26, x1
	mov	x21, x0
Lloh0:
	adrp	x28, _PACKET3_WRITE_DATA@GOTPAGE
Lloh1:
	ldr	x28, [x28, _PACKET3_WRITE_DATA@GOTPAGEOFF]
	ldr	w0, [x28]
	mov	w1, #3
	bl	_PACKET3
	mov	x1, x0
	mov	x0, x21
	bl	_amdgpu_ring_write
	mov	w0, #0
	bl	_WRITE_DATA_ENGINE_SEL
	mov	x27, x0
	mov	w0, #0
	bl	_WRITE_DATA_DST_SEL
	orr	w1, w0, w27
	mov	x0, x21
	bl	_amdgpu_ring_write
Lloh2:
	adrp	x27, _amdgpu_gds_reg_offset@GOTPAGE
Lloh3:
	ldr	x27, [x27, _amdgpu_gds_reg_offset@GOTPAGEOFF]
	ldr	x8, [x27]
	lsl	x26, x26, #4
	ldr	w1, [x8, x26]
	mov	x0, x21
	bl	_amdgpu_ring_write
	mov	x0, x21
	mov	w1, #0
	bl	_amdgpu_ring_write
	mov	x0, x21
	mov	x1, x25
	bl	_amdgpu_ring_write
	ldr	w0, [x28]
	mov	w1, #3
	bl	_PACKET3
	mov	x1, x0
	mov	x0, x21
	bl	_amdgpu_ring_write
	mov	w0, #0
	bl	_WRITE_DATA_ENGINE_SEL
	mov	x25, x0
	mov	w0, #0
	bl	_WRITE_DATA_DST_SEL
	orr	w1, w0, w25
	mov	x0, x21
	bl	_amdgpu_ring_write
	ldr	x8, [x27]
	add	x8, x8, x26
	ldr	w1, [x8, #4]
	mov	x0, x21
	bl	_amdgpu_ring_write
	mov	x0, x21
	mov	w1, #0
	bl	_amdgpu_ring_write
	mov	x0, x21
	mov	x1, x24
	bl	_amdgpu_ring_write
	ldr	w0, [x28]
	mov	w1, #3
	bl	_PACKET3
	mov	x1, x0
	mov	x0, x21
	bl	_amdgpu_ring_write
	mov	w0, #0
	bl	_WRITE_DATA_ENGINE_SEL
	mov	x24, x0
	mov	w0, #0
	bl	_WRITE_DATA_DST_SEL
	orr	w1, w0, w24
	mov	x0, x21
	bl	_amdgpu_ring_write
	ldr	x8, [x27]
	add	x8, x8, x26
	ldr	w1, [x8, #8]
	mov	x0, x21
	bl	_amdgpu_ring_write
	mov	x0, x21
	mov	w1, #0
	bl	_amdgpu_ring_write
Lloh4:
	adrp	x8, _GDS_GWS_VMID0__SIZE__SHIFT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GDS_GWS_VMID0__SIZE__SHIFT@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	lsl	x8, x23, x8
	orr	w1, w8, w22
	mov	x0, x21
	bl	_amdgpu_ring_write
	ldr	w0, [x28]
	mov	w1, #3
	bl	_PACKET3
	mov	x1, x0
	mov	x0, x21
	bl	_amdgpu_ring_write
	mov	w0, #0
	bl	_WRITE_DATA_ENGINE_SEL
	mov	x22, x0
	mov	w0, #0
	bl	_WRITE_DATA_DST_SEL
	orr	w1, w0, w22
	mov	x0, x21
	bl	_amdgpu_ring_write
	ldr	x8, [x27]
	add	x8, x8, x26
	ldr	w1, [x8, #12]
	mov	x0, x21
	bl	_amdgpu_ring_write
	mov	x0, x21
	mov	w1, #0
	bl	_amdgpu_ring_write
	add	w8, w20, w19
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #-1
	lsl	w9, w9, w19
	add	w1, w8, w9
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_amdgpu_ring_write
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PACKET3_WRITE_DATA,4,2         ; @PACKET3_WRITE_DATA
	.comm	_amdgpu_gds_reg_offset,8,3      ; @amdgpu_gds_reg_offset
	.comm	_GDS_GWS_VMID0__SIZE__SHIFT,8,3 ; @GDS_GWS_VMID0__SIZE__SHIFT
	.no_dead_strip	_gfx_v8_0_ring_emit_gds_switch
.subsections_via_symbols
