	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vulkan_surface_create          ## -- Begin function vulkan_surface_create
	.p2align	4, 0x90
_vulkan_surface_create:                 ## @vulkan_surface_create
	.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	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%r8d, -24(%rbp)
	movl	%r9d, -20(%rbp)
	xorl	%r14d, %r14d
	addl	$-128, %esi
	cmpl	$9, %esi
	ja	LBB0_7
## %bb.1:
	movq	%rdi, %rbx
	movl	$751, %eax                      ## imm = 0x2EF
	btl	%esi, %eax
	jae	LBB0_2
LBB0_4:
	movq	%rbx, %rdi
	callq	_vulkan_context_init_device
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movl	16(%rbp), %ecx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %edx
	movq	%rbx, %rdi
	callq	_vulkan_create_swapchain
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_vulkan_acquire_next_image
	movl	$1, %r14d
LBB0_7:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	cmpl	$8, %esi
	jne	LBB0_7
## %bb.3:
	movq	%rdx, %rcx
	leaq	-24(%rbp), %rsi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_vulkan_create_display_surface
	testl	%eax, %eax
	jne	LBB0_4
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR,4,2 ## @VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR
	.comm	_VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK,4,2 ## @VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK
	.comm	_VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK,4,2 ## @VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK
	.comm	_VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR,4,2 ## @VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR
	.comm	_VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR,4,2 ## @VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR
	.comm	_VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR,4,2 ## @VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR
	.comm	_VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR,4,2 ## @VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR
	.comm	_VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR,4,2 ## @VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR
	.comm	_VK_SUCCESS,4,2                 ## @VK_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vulkan_surface_create          ; -- Begin function vulkan_surface_create
	.p2align	2
_vulkan_surface_create:                 ; @vulkan_surface_create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	mov	w0, #0
	stp	w5, w4, [sp, #8]
	sub	w8, w1, #128
	cmp	w8, #9
	b.hi	LBB0_5
; %bb.1:
	mov	x20, x6
	mov	w9, #1
	lsl	w9, w9, w8
	mov	w10, #751
	tst	w9, w10
	b.eq	LBB0_6
LBB0_2:
	mov	x0, x19
	bl	_vulkan_context_init_device
	cbz	w0, LBB0_5
; %bb.3:
	ldp	w2, w1, [sp, #8]
	mov	x0, x19
	mov	x3, x20
	bl	_vulkan_create_swapchain
	cbz	w0, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_vulkan_acquire_next_image
	mov	w0, #1
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_6:
	cmp	w8, #8
	b.ne	LBB0_5
; %bb.7:
	mov	x3, x2
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x19
	bl	_vulkan_create_display_surface
	cbnz	w0, LBB0_2
	b	LBB0_5
	.cfi_endproc
                                        ; -- End function
	.comm	_VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR,4,2 ; @VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR
	.comm	_VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK,4,2 ; @VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK
	.comm	_VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK,4,2 ; @VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK
	.comm	_VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR,4,2 ; @VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR
	.comm	_VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR,4,2 ; @VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR
	.comm	_VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR,4,2 ; @VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR
	.comm	_VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR,4,2 ; @VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR
	.comm	_VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR,4,2 ; @VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR
	.comm	_VK_SUCCESS,4,2                 ; @VK_SUCCESS
.subsections_via_symbols
