	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v10_0_get_cu_info
_gfx_v10_0_get_cu_info:                 ## @gfx_v10_0_get_cu_info
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rsi, %r13
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.3:
	movq	%rdi, %rcx
	leaq	-80(%rbp), %rdi
	movl	$4, %esi
	movl	$2, %edx
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	callq	_amdgpu_gfx_parse_disable_cu
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_lock
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movl	4(%rdi), %ecx
	movl	$0, %r14d
	movl	$0, %r15d
	testl	%ecx, %ecx
	jle	LBB0_25
## %bb.4:
	movl	8(%rdi), %eax
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	4(%rdi), %ecx
LBB0_24:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movslq	%ecx, %rdx
	cmpq	%rdx, %rbx
	jge	LBB0_25
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
                                        ##       Child Loop BB0_15 Depth 3
	testl	%eax, %eax
	jle	LBB0_24
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	leaq	(%rbx,%rbx), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movl	%ebx, %eax
	shll	$4, %eax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	xorl	%r12d, %r12d
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=2
	xorl	%esi, %esi
	xorl	%r9d, %r9d
LBB0_22:                                ##   in Loop: Header=BB0_7 Depth=2
	addl	%esi, %r14d
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, %eax
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	leal	(%rcx,%r12,8), %ecx
	movl	%r9d, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	orl	%r12d, %eax
	testl	$2147483646, %eax               ## imm = 0x7FFFFFFE
	movl	$0, %eax
	cmovnel	%eax, %edx
	orl	%edx, %r15d
	movq	8(%r13), %rax
	movq	(%rax,%rbx,8), %rax
	movl	%r9d, (%rax,%r12,4)
	incq	%r12
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movslq	8(%rdi), %rax
	cmpq	%rax, %r12
	jge	LBB0_23
LBB0_7:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_15 Depth 3
	movl	%ebx, %esi
	movl	%r12d, %edx
	movl	$-1, %ecx
	callq	_gfx_v10_0_select_se_sh
	cmpq	$3, %rbx
	ja	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	cmpq	$1, %r12
	ja	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	-104(%rbp), %rax                ## 8-byte Reload
	addq	%r12, %rax
	movl	-80(%rbp,%rax,4), %esi
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_gfx_v10_0_set_user_wgp_inactive_bitmap_per_sh
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=2
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_gfx_v10_0_get_cu_active_bitmap_per_sh
	movq	(%r13), %rcx
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rcx,%rdx,8), %rcx
	movl	%eax, (%rcx,%r12,4)
	movl	12(%rbx), %r8d
	testl	%r8d, %r8d
	jle	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=2
	cmpl	$1, %r8d
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=2
	movl	$1, %ecx
	xorl	%r9d, %r9d
	xorl	%esi, %esi
LBB0_20:                                ##   in Loop: Header=BB0_7 Depth=2
	testb	$1, %r8b
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_7 Depth=2
	andl	%ecx, %eax
	cmpl	%r8d, %esi
	movl	$0, %edx
	cmovgel	%edx, %ecx
	xorl	%edx, %edx
	testl	%eax, %eax
	setne	%dl
	cmovel	%eax, %ecx
	addl	%edx, %esi
	orl	%r9d, %ecx
	movl	%ecx, %r9d
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=2
	movl	%r8d, %r10d
	andl	$-2, %r10d
	movl	$1, %ecx
	xorl	%r9d, %r9d
	xorl	%esi, %esi
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_15 Depth=3
	xorl	%edi, %edi
	testl	%edx, %edx
	setne	%dil
	cmovel	%edx, %ebx
	addl	%edi, %esi
	orl	%ebx, %r9d
	shll	$2, %ecx
	addl	$-2, %r10d
	je	LBB0_20
LBB0_15:                                ##   Parent Loop BB0_5 Depth=1
                                        ##     Parent Loop BB0_7 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	%ecx, %ebx
	andl	%eax, %ebx
	movl	%ecx, %edx
	cmpl	%r8d, %esi
	jl	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=3
	xorl	%edx, %edx
LBB0_17:                                ##   in Loop: Header=BB0_15 Depth=3
	xorl	%edi, %edi
	testl	%ebx, %ebx
	setne	%dil
	cmovel	%ebx, %edx
	addl	%edi, %esi
	orl	%edx, %r9d
	leal	(%rcx,%rcx), %ebx
	movl	%ebx, %edx
	andl	%eax, %edx
	cmpl	%r8d, %esi
	jl	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_15 Depth=3
	xorl	%ebx, %ebx
	jmp	LBB0_19
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_26
LBB0_25:
	movl	$-1, %esi
	movl	$-1, %edx
	movl	$-1, %ecx
	movq	%rdi, %r12
	callq	_gfx_v10_0_select_se_sh
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	%r14d, 16(%r13)
	movl	%r15d, 20(%r13)
	movq	_NUM_SIMD_PER_CU@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r13)
	xorl	%eax, %eax
LBB0_26:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_28
## %bb.27:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NUM_SIMD_PER_CU,4,2            ## @NUM_SIMD_PER_CU
	.no_dead_strip	_gfx_v10_0_get_cu_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_v10_0_get_cu_info
_gfx_v10_0_get_cu_info:                 ; @gfx_v10_0_get_cu_info
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	cbz	x0, LBB0_16
; %bb.1:
	mov	x19, x1
	cbz	x1, LBB0_16
; %bb.2:
	mov	x20, x0
	add	x25, sp, #8
	add	x0, sp, #8
	mov	w1, #4
	mov	w2, #2
	bl	_amdgpu_gfx_parse_disable_cu
	mov	x0, x20
	bl	_mutex_lock
	ldr	w9, [x20, #4]
	cmp	w9, #1
	b.lt	LBB0_17
; %bb.3:
	mov	x21, #0
	mov	w23, #0
	mov	w24, #0
	ldr	w8, [x20, #8]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w9, [x20, #4]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x21, x21, #1
	cmp	x21, w9, sxtw
	b.ge	LBB0_18
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
                                        ;       Child Loop BB0_15 Depth 3
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x22, #0
	lsl	x26, x21, #1
	lsl	w27, w21, #4
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=2
	mov	w9, #0
	mov	w8, #0
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	add	w24, w9, w24
	orr	w9, w21, w22
	add	w10, w27, w22, lsl #3
	lsl	w10, w8, w10
	tst	x9, #0x7ffffffe
	csel	w9, w10, wzr, eq
	ldr	x10, [x19, #8]
	ldr	x10, [x10, x21, lsl #3]
	orr	w23, w23, w9
	str	w8, [x10, x22, lsl #2]
	add	x22, x22, #1
	ldrsw	x8, [x20, #8]
	cmp	x22, x8
	b.ge	LBB0_4
LBB0_10:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_15 Depth 3
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	mov	w3, #-1
	bl	_gfx_v10_0_select_se_sh
	cmp	x21, #3
	b.hi	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	cmp	x22, #1
	b.hi	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=2
	add	x8, x22, x26
	ldr	w1, [x25, x8, lsl #2]
	mov	x0, x20
	bl	_gfx_v10_0_set_user_wgp_inactive_bitmap_per_sh
LBB0_13:                                ;   in Loop: Header=BB0_10 Depth=2
	mov	x0, x20
	bl	_gfx_v10_0_get_cu_active_bitmap_per_sh
	ldr	x8, [x19]
	ldr	x8, [x8, x21, lsl #3]
	str	w0, [x8, x22, lsl #2]
	ldr	w10, [x20, #12]
	cmp	w10, #1
	b.lt	LBB0_8
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=2
	mov	w8, #0
	mov	w9, #0
	mov	w11, #1
	mov	x12, x10
LBB0_15:                                ;   Parent Loop BB0_6 Depth=1
                                        ;     Parent Loop BB0_10 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	cmp	w9, w10
	csel	w13, w11, wzr, lt
	tst	w11, w0
	cinc	w9, w9, ne
	csel	w13, wzr, w13, eq
	orr	w8, w13, w8
	lsl	w11, w11, #1
	subs	w12, w12, #1
	b.ne	LBB0_15
	b	LBB0_9
LBB0_16:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_19
LBB0_17:
	mov	w24, #0
	mov	w23, #0
LBB0_18:
	mov	x0, x20
	mov	w1, #-1
	mov	w2, #-1
	mov	w3, #-1
	bl	_gfx_v10_0_select_se_sh
	mov	x0, x20
	bl	_mutex_unlock
	mov	w0, #0
	stp	w24, w23, [x19, #16]
Lloh6:
	adrp	x8, _NUM_SIMD_PER_CU@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NUM_SIMD_PER_CU@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #24]
LBB0_19:
	ldr	x8, [sp, #40]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.20:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_21:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NUM_SIMD_PER_CU,4,2            ; @NUM_SIMD_PER_CU
	.no_dead_strip	_gfx_v10_0_get_cu_info
.subsections_via_symbols
