	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_gfx_graphics_queue_acquire ## -- Begin function amdgpu_gfx_graphics_queue_acquire
	.p2align	4, 0x90
_amdgpu_gfx_graphics_queue_acquire:     ## @amdgpu_gfx_graphics_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_AMDGPU_MAX_GFX_QUEUES@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	testl	%esi, %esi
	jle	LBB0_6
## %bb.1:
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	cmpl	%esi, %ebx
	jge	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	cltd
	idivl	(%r14)
	movl	%edx, %ecx
	cltd
	idivl	4(%r14)
	cmpl	8(%r14), %eax
	jge	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	orl	%ecx, %eax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	12(%r14), %esi
	movl	%ebx, %edi
	callq	_set_bit
	movl	(%r15), %esi
	jmp	LBB0_5
LBB0_6:
	movl	12(%r14), %edi
	callq	_bitmap_weight
	movl	%eax, 16(%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMDGPU_MAX_GFX_QUEUES,4,2      ## @AMDGPU_MAX_GFX_QUEUES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_gfx_graphics_queue_acquire ; -- Begin function amdgpu_gfx_graphics_queue_acquire
	.p2align	2
_amdgpu_gfx_graphics_queue_acquire:     ; @amdgpu_gfx_graphics_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
Lloh0:
	adrp	x21, _AMDGPU_MAX_GFX_QUEUES@GOTPAGE
Lloh1:
	ldr	x21, [x21, _AMDGPU_MAX_GFX_QUEUES@GOTPAGEOFF]
	ldr	w1, [x21]
	cmp	w1, #1
	b.lt	LBB0_6
; %bb.1:
	mov	w20, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w20, w20, #1
	cmp	w20, w1
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w8, w9, [x19]
	sdiv	w10, w20, w8
	sdiv	w9, w10, w9
	ldr	w11, [x19, #8]
	cmp	w9, w11
	b.ge	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mul	w8, w10, w8
	cmp	w9, #0
	ccmp	w8, w20, #0, eq
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x19, #12]
	mov	x0, x20
	bl	_set_bit
	ldr	w1, [x21]
	b	LBB0_2
LBB0_6:
	ldr	w0, [x19, #12]
	bl	_bitmap_weight
	str	w0, [x19, #16]
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_AMDGPU_MAX_GFX_QUEUES,4,2      ; @AMDGPU_MAX_GFX_QUEUES
.subsections_via_symbols
