	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vulkan_descriptor_manager_alloc ## -- Begin function vulkan_descriptor_manager_alloc
	.p2align	4, 0x90
_vulkan_descriptor_manager_alloc:       ## @vulkan_descriptor_manager_alloc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	movq	(%rsi), %rax
	movq	8(%rsi), %rcx
	movq	_VULKAN_DESCRIPTOR_MANAGER_BLOCK_SETS@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jge	LBB0_2
## %bb.1:
	leaq	1(%rax), %rdx
	shlq	$2, %rax
	addq	(%rcx), %rax
	movq	%rdx, (%rbx)
	jmp	LBB0_5
LBB0_2:
	movq	8(%rcx), %rax
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rsi
	callq	_vulkan_alloc_descriptor_pool
	movq	8(%rbx), %rcx
	movq	%rax, 8(%rcx)
	movq	%rax, %rdi
	callq	_retro_assert
	movq	8(%rbx), %rax
	movq	8(%rax), %rax
LBB0_4:
	movq	%rax, 8(%rbx)
	movq	(%rax), %rax
	movq	$1, (%rbx)
LBB0_5:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VULKAN_DESCRIPTOR_MANAGER_BLOCK_SETS,8,3 ## @VULKAN_DESCRIPTOR_MANAGER_BLOCK_SETS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vulkan_descriptor_manager_alloc ; -- Begin function vulkan_descriptor_manager_alloc
	.p2align	2
_vulkan_descriptor_manager_alloc:       ; @vulkan_descriptor_manager_alloc
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
Lloh0:
	adrp	x8, _VULKAN_DESCRIPTOR_MANAGER_BLOCK_SETS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VULKAN_DESCRIPTOR_MANAGER_BLOCK_SETS@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x8]
	ldp	x8, x9, [x1]
	cmp	x8, x10
	b.ge	LBB0_2
; %bb.1:
	ldr	x9, [x9]
	add	x10, x8, #1
	str	x10, [x19]
	add	x8, x9, x8, lsl #2
	b	LBB0_5
LBB0_2:
	ldr	x9, [x9, #8]
	cbnz	x9, LBB0_4
; %bb.3:
	mov	x1, x19
	bl	_vulkan_alloc_descriptor_pool
	ldr	x8, [x19, #8]
	str	x0, [x8, #8]
	bl	_retro_assert
	ldr	x8, [x19, #8]
	ldr	x9, [x8, #8]
LBB0_4:
	ldr	x8, [x9]
	mov	w10, #1
	stp	x10, x9, [x19]
LBB0_5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_VULKAN_DESCRIPTOR_MANAGER_BLOCK_SETS,8,3 ; @VULKAN_DESCRIPTOR_MANAGER_BLOCK_SETS
.subsections_via_symbols
