	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_gfx_compute_queue_acquire ## -- Begin function amdgpu_gfx_compute_queue_acquire
	.p2align	4, 0x90
_amdgpu_gfx_compute_queue_acquire:      ## @amdgpu_gfx_compute_queue_acquire
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_amdgpu_gfx_is_multipipe_capable
	movq	_AMDGPU_MAX_COMPUTE_QUEUES@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	testl	%esi, %esi
	jle	LBB0_9
## %bb.1:
	movl	%eax, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	20(%r15), %esi
	movl	%ebx, %edi
	callq	_set_bit
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	movl	(%r12), %esi
	cmpl	%esi, %ebx
	jge	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	cltd
	idivl	8(%r15)
	movl	%edx, %ecx
	cltd
	idivl	12(%r15)
	cmpl	16(%r15), %eax
	jge	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$2, %ecx
	jb	LBB0_7
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	orl	%edx, %eax
	jne	LBB0_8
	jmp	LBB0_7
LBB0_9:
	movl	20(%r15), %edi
	callq	_bitmap_weight
	movq	%rax, (%r15)
	movq	_AMDGPU_MAX_COMPUTE_RINGS@GOTPCREL(%rip), %rbx
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	setg	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	(%rbx), %rax
	movq	%rax, (%r15)
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMDGPU_MAX_COMPUTE_QUEUES,4,2  ## @AMDGPU_MAX_COMPUTE_QUEUES
	.comm	_AMDGPU_MAX_COMPUTE_RINGS,8,3   ## @AMDGPU_MAX_COMPUTE_RINGS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_gfx_compute_queue_acquire ; -- Begin function amdgpu_gfx_compute_queue_acquire
	.p2align	2
_amdgpu_gfx_compute_queue_acquire:      ; @amdgpu_gfx_compute_queue_acquire
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	bl	_amdgpu_gfx_is_multipipe_capable
Lloh0:
	adrp	x22, _AMDGPU_MAX_COMPUTE_QUEUES@GOTPAGE
Lloh1:
	ldr	x22, [x22, _AMDGPU_MAX_COMPUTE_QUEUES@GOTPAGEOFF]
	ldr	w1, [x22]
	cmp	w1, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x20, x0
	mov	w21, #0
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x19, #20]
	mov	x0, x21
	bl	_set_bit
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w21, w21, #1
	ldr	w1, [x22]
	cmp	w21, w1
	b.ge	LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w9, w11, [x19, #8]
	sdiv	w10, w21, w9
	sdiv	w8, w10, w11
	ldr	w12, [x19, #16]
	cmp	w8, w12
	b.ge	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	w20, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	msub	w9, w9, w10, w21
	cmp	w8, #0
	ccmp	w9, #2, #2, eq
	b.lo	LBB0_2
	b	LBB0_3
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	msub	w9, w8, w11, w10
	orr	w8, w8, w9
	cbnz	w8, LBB0_3
	b	LBB0_2
LBB0_8:
	ldr	w0, [x19, #20]
	bl	_bitmap_weight
	str	x0, [x19]
Lloh2:
	adrp	x20, _AMDGPU_MAX_COMPUTE_RINGS@GOTPAGE
Lloh3:
	ldr	x20, [x20, _AMDGPU_MAX_COMPUTE_RINGS@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x0, x8
	cset	w0, gt
	bl	_WARN_ON
	cbz	x0, LBB0_10
; %bb.9:
	ldr	x8, [x20]
	str	x8, [x19]
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_AMDGPU_MAX_COMPUTE_QUEUES,4,2  ; @AMDGPU_MAX_COMPUTE_QUEUES
	.comm	_AMDGPU_MAX_COMPUTE_RINGS,8,3   ; @AMDGPU_MAX_COMPUTE_RINGS
.subsections_via_symbols
