	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vulkan_present                 ## -- Begin function vulkan_present
	.p2align	4, 0x90
_vulkan_present:                        ## @vulkan_present
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$80, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, -20(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movq	$0, -48(%rbp)
	movq	_VK_SUCCESS@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	%rax, -32(%rbp)
	cmpl	$0, 8(%rdi)
	je	LBB0_5
## %bb.1:
	movq	%rdi, %rbx
	movl	$0, 8(%rdi)
	movq	(%rdi), %rax
	movq	_VK_NULL_HANDLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.6:
	movl	$10, %edi
	addq	$80, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_retro_sleep                    ## TAILCALL
LBB0_2:
	movl	$1, -96(%rbp)
	movq	%rbx, -88(%rbp)
	leaq	-20(%rbp), %rax
	movq	%rax, -80(%rbp)
	leaq	-32(%rbp), %rax
	movq	%rax, -72(%rbp)
	movl	$1, -64(%rbp)
	movl	%esi, %eax
	shlq	$2, %rax
	addq	24(%rbx), %rax
	movq	%rax, -56(%rbp)
	movl	16(%rbx), %edi
	leaq	-96(%rbp), %rsi
	callq	_vkQueuePresentKHR
	movq	(%r14), %rcx
	cmpq	%rcx, %rax
	jne	LBB0_4
## %bb.3:
	cmpq	%rcx, -32(%rbp)
	je	LBB0_5
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_RARCH_LOG
	movq	%rbx, %rdi
	callq	_vulkan_destroy_swapchain
LBB0_5:
	addq	$80, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VK_STRUCTURE_TYPE_PRESENT_INFO_KHR,4,2 ## @VK_STRUCTURE_TYPE_PRESENT_INFO_KHR
	.comm	_VK_SUCCESS,8,3                 ## @VK_SUCCESS
	.comm	_VK_NULL_HANDLE,8,3             ## @VK_NULL_HANDLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[Vulkan]: QueuePresent failed, destroying swapchain.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vulkan_present                 ; -- Begin function vulkan_present
	.p2align	2
_vulkan_present:                        ; @vulkan_present
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	stur	w1, [x29, #-20]
	str	xzr, [sp, #64]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #32]
	str	q0, [sp, #16]
Lloh0:
	adrp	x20, _VK_SUCCESS@GOTPAGE
Lloh1:
	ldr	x20, [x20, _VK_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x20]
	str	x8, [sp, #8]
	ldr	w8, [x0, #8]
	cbz	w8, LBB0_6
; %bb.1:
	mov	x19, x0
	str	wzr, [x0, #8]
	ldr	x8, [x0]
Lloh2:
	adrp	x9, _VK_NULL_HANDLE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _VK_NULL_HANDLE@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	mov	w0, #10
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_retro_sleep
LBB0_3:
	mov	w8, #1
	str	w8, [sp, #16]
	sub	x9, x29, #20
	stp	x19, x9, [sp, #24]
	add	x9, sp, #8
	str	x9, [sp, #40]
	str	w8, [sp, #48]
	ldr	x8, [x19, #24]
	add	x8, x8, w1, uxtw #2
	str	x8, [sp, #56]
	ldr	w0, [x19, #16]
	add	x1, sp, #16
	bl	_vkQueuePresentKHR
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.4:
	ldr	x9, [sp, #8]
	cmp	x9, x8
	b.eq	LBB0_6
LBB0_5:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_LOG
	mov	x0, x19
	bl	_vulkan_destroy_swapchain
LBB0_6:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_VK_STRUCTURE_TYPE_PRESENT_INFO_KHR,4,2 ; @VK_STRUCTURE_TYPE_PRESENT_INFO_KHR
	.comm	_VK_SUCCESS,8,3                 ; @VK_SUCCESS
	.comm	_VK_NULL_HANDLE,8,3             ; @VK_NULL_HANDLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[Vulkan]: QueuePresent failed, destroying swapchain.\n"

.subsections_via_symbols
