	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v8_0_get_csb_buffer
_gfx_v8_0_get_csb_buffer:               ## @gfx_v8_0_get_csb_buffer
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	testq	%rsi, %rsi
	je	LBB0_15
## %bb.1:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, 8(%rax)
	je	LBB0_15
## %bb.2:
	movq	%rsi, %r13
	movq	_PACKET3_PREAMBLE_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_PACKET3
	movl	%eax, %edi
	callq	_cpu_to_le32
	movq	%rax, (%r13)
	movq	_PACKET3_PREAMBLE_BEGIN_CLEAR_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, 8(%r13)
	movq	_PACKET3_CONTEXT_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_PACKET3
	movl	%eax, %edi
	callq	_cpu_to_le32
	movq	%rax, 16(%r13)
	movl	$-2147483648, %edi              ## imm = 0x80000000
	callq	_cpu_to_le32
	movq	%rax, 24(%r13)
	movl	$-2147483648, %edi              ## imm = 0x80000000
	callq	_cpu_to_le32
	movq	%rax, 32(%r13)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %r14
	testq	%r14, %r14
	je	LBB0_3
## %bb.4:
	leaq	16(%r13), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	$5, %ebx
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
                                        ##       Child Loop BB0_10 Depth 3
	cmpq	$0, (%r14)
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %r15
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	24(%rax), %r14
	addq	$16, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rbx
	testq	%r14, %r14
	jne	LBB0_5
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=2
	cmpq	$0, 16(%r14)
	leaq	16(%r14), %r14
	movq	%r15, %rbx
	je	LBB0_13
LBB0_7:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_10 Depth 3
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	_SECT_CONTEXT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	_PACKET3_SET_CONTEXT_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r14), %esi
	callq	_PACKET3
	movl	%eax, %edi
	callq	_cpu_to_le32
	movq	%rax, (%r13,%rbx,8)
	movl	12(%r14), %edi
	movq	_PACKET3_SET_CONTEXT_REG_START@GOTPCREL(%rip), %rax
	subl	(%rax), %edi
	callq	_cpu_to_le32
	leaq	2(%rbx), %r15
	movq	%rax, 8(%r13,%rbx,8)
	cmpl	$0, 8(%r14)
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%rbx,8), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_5 Depth=1
                                        ##     Parent Loop BB0_7 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_cpu_to_le32
	movq	%rax, (%r12,%rbx,8)
	incq	%rbx
	movslq	8(%r14), %rax
	cmpq	%rax, %rbx
	jb	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=2
	addq	%rbx, %r15
	jmp	LBB0_12
LBB0_3:
	movl	$5, %r15d
LBB0_14:
	movq	_PACKET3_SET_CONTEXT_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$2, %esi
	callq	_PACKET3
	movl	%eax, %edi
	callq	_cpu_to_le32
	movq	%rax, (%r13,%r15,8)
	movq	_mmPA_SC_RASTER_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PACKET3_SET_CONTEXT_REG_START@GOTPCREL(%rip), %rax
	subl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, 8(%r13,%r15,8)
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, 16(%r13,%r15,8)
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movl	4(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, 24(%r13,%r15,8)
	movq	_PACKET3_PREAMBLE_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_PACKET3
	movl	%eax, %edi
	callq	_cpu_to_le32
	movq	%rax, 32(%r13,%r15,8)
	movq	_PACKET3_PREAMBLE_END_CLEAR_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, 40(%r13,%r15,8)
	movq	_PACKET3_CLEAR_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_PACKET3
	movl	%eax, %edi
	callq	_cpu_to_le32
	movq	%rax, 48(%r13,%r15,8)
	xorl	%edi, %edi
	callq	_cpu_to_le32
	movq	%rax, 56(%r13,%r15,8)
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PACKET3_PREAMBLE_CNTL,4,2      ## @PACKET3_PREAMBLE_CNTL
	.comm	_PACKET3_PREAMBLE_BEGIN_CLEAR_STATE,4,2 ## @PACKET3_PREAMBLE_BEGIN_CLEAR_STATE
	.comm	_PACKET3_CONTEXT_CONTROL,4,2    ## @PACKET3_CONTEXT_CONTROL
	.comm	_SECT_CONTEXT,8,3               ## @SECT_CONTEXT
	.comm	_PACKET3_SET_CONTEXT_REG,4,2    ## @PACKET3_SET_CONTEXT_REG
	.comm	_PACKET3_SET_CONTEXT_REG_START,4,2 ## @PACKET3_SET_CONTEXT_REG_START
	.comm	_mmPA_SC_RASTER_CONFIG,4,2      ## @mmPA_SC_RASTER_CONFIG
	.comm	_PACKET3_PREAMBLE_END_CLEAR_STATE,4,2 ## @PACKET3_PREAMBLE_END_CLEAR_STATE
	.comm	_PACKET3_CLEAR_STATE,4,2        ## @PACKET3_CLEAR_STATE
	.no_dead_strip	_gfx_v8_0_get_csb_buffer
.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_get_csb_buffer
_gfx_v8_0_get_csb_buffer:               ; @gfx_v8_0_get_csb_buffer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	cbz	x1, LBB0_14
; %bb.1:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_14
; %bb.2:
	mov	x20, x1
Lloh0:
	adrp	x8, _PACKET3_PREAMBLE_CNTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PACKET3_PREAMBLE_CNTL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_PACKET3
	bl	_cpu_to_le32
	str	x0, [x20]
Lloh3:
	adrp	x8, _PACKET3_PREAMBLE_BEGIN_CLEAR_STATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PACKET3_PREAMBLE_BEGIN_CLEAR_STATE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	str	x0, [x20, #8]
Lloh6:
	adrp	x8, _PACKET3_CONTEXT_CONTROL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PACKET3_CONTEXT_CONTROL@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_PACKET3
	bl	_cpu_to_le32
	str	x0, [x20, #16]
	mov	w0, #-2147483648
	bl	_cpu_to_le32
	str	x0, [x20, #24]
	mov	w0, #-2147483648
	bl	_cpu_to_le32
	str	x0, [x20, #32]
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	x24, [x8, #8]
	ldr	x26, [x24, #8]
Lloh9:
	adrp	x23, _PACKET3_SET_CONTEXT_REG@GOTPAGE
Lloh10:
	ldr	x23, [x23, _PACKET3_SET_CONTEXT_REG@GOTPAGEOFF]
Lloh11:
	adrp	x22, _PACKET3_SET_CONTEXT_REG_START@GOTPAGE
Lloh12:
	ldr	x22, [x22, _PACKET3_SET_CONTEXT_REG_START@GOTPAGEOFF]
	cbz	x26, LBB0_12
; %bb.3:
	add	x25, x20, #16
	mov	w21, #5
Lloh13:
	adrp	x27, _SECT_CONTEXT@GOTPAGE
Lloh14:
	ldr	x27, [x27, _SECT_CONTEXT@GOTPAGEOFF]
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;       Child Loop BB0_9 Depth 3
	ldr	x8, [x26]
	cbnz	x8, LBB0_6
	b	LBB0_11
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	mov	x21, x28
	ldr	x8, [x26, #16]!
	cbz	x8, LBB0_11
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_9 Depth 3
	ldr	x8, [x24]
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w0, [x23]
	ldr	w1, [x26, #8]
	bl	_PACKET3
	bl	_cpu_to_le32
	add	x19, x20, x21, lsl #3
	str	x0, [x19]
	ldr	w8, [x26, #12]
	ldr	w9, [x22]
	sub	w0, w8, w9
	bl	_cpu_to_le32
	add	x28, x21, #2
	str	x0, [x19, #8]
	ldr	w8, [x26, #8]
	cbz	w8, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x19, #0
	add	x21, x25, x21, lsl #3
LBB0_9:                                 ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x8, [x26]
	ldr	w0, [x8, x19, lsl #2]
	bl	_cpu_to_le32
	str	x0, [x21, x19, lsl #3]
	add	x19, x19, #1
	ldrsw	x8, [x26, #8]
	cmp	x19, x8
	b.lo	LBB0_9
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=2
	add	x21, x28, x19
	ldr	x8, [x26, #16]!
	cbnz	x8, LBB0_6
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x26, [x24, #24]
	add	x24, x24, #16
	cbnz	x26, LBB0_4
	b	LBB0_13
LBB0_12:
	mov	w21, #5
LBB0_13:
	ldr	w0, [x23]
	mov	w1, #2
	bl	_PACKET3
	bl	_cpu_to_le32
	add	x20, x20, x21, lsl #3
	str	x0, [x20]
Lloh15:
	adrp	x8, _mmPA_SC_RASTER_CONFIG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _mmPA_SC_RASTER_CONFIG@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x22]
	sub	w0, w8, w9
	bl	_cpu_to_le32
	str	x0, [x20, #8]
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_cpu_to_le32
	str	x0, [x20, #16]
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	w0, [x8, #4]
	bl	_cpu_to_le32
	str	x0, [x20, #24]
Lloh18:
	adrp	x8, _PACKET3_PREAMBLE_CNTL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PACKET3_PREAMBLE_CNTL@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_PACKET3
	bl	_cpu_to_le32
	str	x0, [x20, #32]
Lloh21:
	adrp	x8, _PACKET3_PREAMBLE_END_CLEAR_STATE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PACKET3_PREAMBLE_END_CLEAR_STATE@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	str	x0, [x20, #40]
Lloh24:
	adrp	x8, _PACKET3_CLEAR_STATE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PACKET3_CLEAR_STATE@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_PACKET3
	bl	_cpu_to_le32
	str	x0, [x20, #48]
	mov	w0, #0
	bl	_cpu_to_le32
	str	x0, [x20, #56]
LBB0_14:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_PACKET3_PREAMBLE_CNTL,4,2      ; @PACKET3_PREAMBLE_CNTL
	.comm	_PACKET3_PREAMBLE_BEGIN_CLEAR_STATE,4,2 ; @PACKET3_PREAMBLE_BEGIN_CLEAR_STATE
	.comm	_PACKET3_CONTEXT_CONTROL,4,2    ; @PACKET3_CONTEXT_CONTROL
	.comm	_SECT_CONTEXT,8,3               ; @SECT_CONTEXT
	.comm	_PACKET3_SET_CONTEXT_REG,4,2    ; @PACKET3_SET_CONTEXT_REG
	.comm	_PACKET3_SET_CONTEXT_REG_START,4,2 ; @PACKET3_SET_CONTEXT_REG_START
	.comm	_mmPA_SC_RASTER_CONFIG,4,2      ; @mmPA_SC_RASTER_CONFIG
	.comm	_PACKET3_PREAMBLE_END_CLEAR_STATE,4,2 ; @PACKET3_PREAMBLE_END_CLEAR_STATE
	.comm	_PACKET3_CLEAR_STATE,4,2        ; @PACKET3_CLEAR_STATE
	.no_dead_strip	_gfx_v8_0_get_csb_buffer
.subsections_via_symbols
