	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v9_0_get_cu_info
_gfx_v9_0_get_cu_info:                  ## @gfx_v9_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	$136, %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, %rcx
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.3:
	movq	%rdi, %rbx
	movl	4(%rdi), %esi
	movl	8(%rdi), %edx
	movl	%edx, %eax
	imull	%esi, %eax
	cmpl	$17, %eax
	jl	LBB0_4
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_24
LBB0_4:
	movq	%rcx, -128(%rbp)                ## 8-byte Spill
	leaq	-112(%rbp), %rdi
	movq	%rbx, -136(%rbp)                ## 8-byte Spill
	callq	_amdgpu_gfx_parse_disable_cu
	movq	-136(%rbp), %rdi                ## 8-byte Reload
	callq	_mutex_lock
	movq	-136(%rbp), %rdi                ## 8-byte Reload
	movl	4(%rdi), %eax
	movl	$0, %r14d
	movl	$0, %r15d
	testl	%eax, %eax
	jle	LBB0_23
## %bb.5:
	movl	8(%rdi), %ecx
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	4(%rdi), %eax
LBB0_22:                                ##   in Loop: Header=BB0_6 Depth=1
	incl	%ebx
	cmpl	%eax, %ebx
	jge	LBB0_23
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
                                        ##       Child Loop BB0_13 Depth 3
	testl	%ecx, %ecx
	jle	LBB0_22
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%ebx, %r11d
	andl	$3, %r11d
	movl	%ebx, %eax
	shrl	$2, %eax
	movq	%rax, -168(%rbp)                ## 8-byte Spill
	movl	%ebx, %eax
	shll	$4, %eax
	movq	%rax, -160(%rbp)                ## 8-byte Spill
	xorl	%r12d, %r12d
	movq	-128(%rbp), %r13                ## 8-byte Reload
	movl	%ebx, -140(%rbp)                ## 4-byte Spill
	movq	%r11, -152(%rbp)                ## 8-byte Spill
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_8 Depth=2
	xorl	%edi, %edi
	xorl	%r10d, %r10d
	movl	%r14d, %r15d
	movl	-116(%rbp), %r14d               ## 4-byte Reload
LBB0_20:                                ##   in Loop: Header=BB0_8 Depth=2
	addl	%edi, %r14d
	movq	8(%r13), %rax
	movq	(%rax,%r11,8), %rax
	movl	%r10d, (%rax,%r8,4)
	movl	-140(%rbp), %ebx                ## 4-byte Reload
	movl	%ebx, %eax
	movq	-160(%rbp), %rcx                ## 8-byte Reload
	leal	(%rcx,%r12,8), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r10d
	orl	%r12d, %eax
	testl	$2147483646, %eax               ## imm = 0x7FFFFFFE
	movl	$0, %eax
	cmovnel	%eax, %r10d
	orl	%r10d, %r15d
	incq	%r12
	movq	-136(%rbp), %rdi                ## 8-byte Reload
	movslq	8(%rdi), %rcx
	cmpq	%rcx, %r12
	jge	LBB0_21
LBB0_8:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_13 Depth 3
	movl	%r14d, -116(%rbp)               ## 4-byte Spill
	movl	%r15d, %r14d
	movl	%ebx, %esi
	movl	%r12d, %edx
	movl	$-1, %ecx
	movq	%rdi, %r15
	callq	_gfx_v9_0_select_se_sh
	movl	8(%r15), %eax
	imull	%ebx, %eax
	addl	%r12d, %eax
	cltq
	movl	-112(%rbp,%rax,4), %esi
	movq	%r15, %rdi
	callq	_gfx_v9_0_set_user_cu_inactive_bitmap
	movq	%r15, %rdi
	callq	_gfx_v9_0_get_cu_active_bitmap
	movq	-152(%rbp), %r11                ## 8-byte Reload
	movq	(%r13), %rcx
	movq	(%rcx,%r11,8), %rcx
	movq	-168(%rbp), %rdx                ## 8-byte Reload
	leaq	(%r12,%rdx), %r8
	movl	%eax, (%rcx,%r8,4)
	movl	12(%r15), %r9d
	testl	%r9d, %r9d
	jle	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=2
	cmpl	$1, %r9d
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=2
	movl	$1, %esi
	xorl	%r10d, %r10d
	xorl	%edi, %edi
	movl	%r14d, %r15d
	movl	-116(%rbp), %r14d               ## 4-byte Reload
LBB0_18:                                ##   in Loop: Header=BB0_8 Depth=2
	testb	$1, %r9b
	movq	-128(%rbp), %r13                ## 8-byte Reload
	movq	-152(%rbp), %r11                ## 8-byte Reload
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_8 Depth=2
	andl	%esi, %eax
	cmpl	%r9d, %edi
	movl	$0, %ecx
	cmovgel	%ecx, %esi
	xorl	%ecx, %ecx
	testl	%eax, %eax
	setne	%cl
	cmovel	%eax, %esi
	addl	%ecx, %edi
	orl	%r10d, %esi
	movl	%esi, %r10d
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=2
	movl	%r9d, %r11d
	andl	$-2, %r11d
	movl	$1, %esi
	xorl	%r10d, %r10d
	xorl	%edi, %edi
	movl	%r14d, %r15d
	movl	-116(%rbp), %r14d               ## 4-byte Reload
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=3
	xorl	%ecx, %ecx
	testl	%edx, %edx
	setne	%cl
	cmovel	%edx, %ebx
	addl	%ecx, %edi
	orl	%ebx, %r10d
	shll	$2, %esi
	addl	$-2, %r11d
	je	LBB0_18
LBB0_13:                                ##   Parent Loop BB0_6 Depth=1
                                        ##     Parent Loop BB0_8 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	%esi, %ebx
	andl	%eax, %ebx
	movl	%esi, %edx
	cmpl	%r9d, %edi
	jl	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=3
	xorl	%edx, %edx
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=3
	xorl	%ecx, %ecx
	testl	%ebx, %ebx
	setne	%cl
	cmovel	%ebx, %edx
	addl	%ecx, %edi
	orl	%edx, %r10d
	leal	(%rsi,%rsi), %ebx
	movl	%ebx, %edx
	andl	%eax, %edx
	cmpl	%r9d, %edi
	jl	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=3
	xorl	%ebx, %ebx
	jmp	LBB0_17
LBB0_23:
	movl	$-1, %esi
	movl	$-1, %edx
	movl	$-1, %ecx
	movq	%rdi, %rbx
	callq	_gfx_v9_0_select_se_sh
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	-128(%rbp), %rcx                ## 8-byte Reload
	movl	%r14d, 16(%rcx)
	movl	%r15d, 20(%rcx)
	movq	_NUM_SIMD_PER_CU@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rcx)
	xorl	%eax, %eax
LBB0_24:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_26
## %bb.25:
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	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_v9_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_v9_0_get_cu_info
_gfx_v9_0_get_cu_info:                  ; @gfx_v9_0_get_cu_info
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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, #72]
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x1
	cbz	x1, LBB0_3
; %bb.2:
	mov	x20, x0
	ldp	w1, w2, [x0, #4]
	mul	w8, w2, w1
	cmp	w8, #17
	b.lt	LBB0_4
LBB0_3:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_4:
	add	x25, sp, #8
	add	x0, sp, #8
	bl	_amdgpu_gfx_parse_disable_cu
	mov	x0, x20
	bl	_mutex_lock
	ldr	w9, [x20, #4]
	cmp	w9, #1
	b.lt	LBB0_15
; %bb.5:
	mov	w23, #0
	mov	w24, #0
	mov	w21, #0
	ldr	w8, [x20, #8]
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w9, [x20, #4]
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	w21, w21, #1
	cmp	w21, w9
	b.ge	LBB0_16
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
                                        ;       Child Loop BB0_14 Depth 3
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x22, #0
	and	w26, w21, #0x3
	lsr	w27, w21, #2
	lsl	w28, w21, #4
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=2
	mov	w10, #0
	mov	w9, #0
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=2
	add	w24, w10, w24
	orr	w10, w21, w22
	add	w11, w28, w22, lsl #3
	lsl	w11, w9, w11
	tst	w10, #0x7ffffffe
	csel	w10, w11, wzr, eq
	ldr	x11, [x19, #8]
	ldr	x11, [x11, x26, lsl #3]
	orr	w23, w23, w10
	str	w9, [x11, x8, lsl #2]
	add	x22, x22, #1
	ldrsw	x8, [x20, #8]
	cmp	x22, x8
	b.ge	LBB0_6
LBB0_12:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_14 Depth 3
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	mov	w3, #-1
	bl	_gfx_v9_0_select_se_sh
	ldr	w8, [x20, #8]
	madd	w8, w8, w21, w22
	ldr	w1, [x25, w8, sxtw #2]
	mov	x0, x20
	bl	_gfx_v9_0_set_user_cu_inactive_bitmap
	mov	x0, x20
	bl	_gfx_v9_0_get_cu_active_bitmap
	ldr	x8, [x19]
	ldr	x9, [x8, x26, lsl #3]
	add	x8, x22, x27
	str	w0, [x9, x8, lsl #2]
	ldr	w11, [x20, #12]
	cmp	w11, #1
	b.lt	LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
	mov	w9, #0
	mov	w10, #0
	mov	w12, #1
	mov	x13, x11
LBB0_14:                                ;   Parent Loop BB0_8 Depth=1
                                        ;     Parent Loop BB0_12 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	cmp	w10, w11
	csel	w14, w12, wzr, lt
	tst	w12, w0
	cinc	w10, w10, ne
	csel	w14, wzr, w14, eq
	orr	w9, w14, w9
	lsl	w12, w12, #1
	subs	w13, w13, #1
	b.ne	LBB0_14
	b	LBB0_11
LBB0_15:
	mov	w24, #0
	mov	w23, #0
LBB0_16:
	mov	x0, x20
	mov	w1, #-1
	mov	w2, #-1
	mov	w3, #-1
	bl	_gfx_v9_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_17:
	ldr	x8, [sp, #72]
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_19
; %bb.18:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_19:
	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_v9_0_get_cu_info
.subsections_via_symbols
