	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vulkan_draw_triangles          ## -- Begin function vulkan_draw_triangles
	.p2align	4, 0x90
_vulkan_draw_triangles:                 ## @vulkan_draw_triangles
	.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
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	28(%rsi), %edx
	testl	%edx, %edx
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %esi
	movq	%rbx, %rdi
	callq	_vulkan_transition_texture
LBB0_2:
	movq	(%r14), %rdx
	cmpq	8(%rbx), %rdx
	je	LBB0_4
## %bb.3:
	movl	(%rbx), %edi
	movq	_VK_PIPELINE_BIND_POINT_GRAPHICS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_vkCmdBindPipeline
	movq	(%r14), %rax
	movq	%rax, 8(%rbx)
	movq	_VULKAN_DIRTY_DYNAMIC_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 40(%rbx)
LBB0_4:
	movq	%rbx, %rdi
	callq	_vulkan_check_dynamic_state
	movq	56(%rbx), %rdi
	movq	64(%rbx), %rsi
	addq	$4, %rsi
	movl	32(%r14), %edx
	leaq	-32(%rbp), %rcx
	callq	_vulkan_buffer_chain_alloc
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	-24(%rbp), %edi
	movl	32(%r14), %edx
	movl	36(%r14), %esi
	callq	_memcpy
	movq	56(%rbx), %rax
	movq	64(%rbx), %rsi
	movl	(%rax), %edi
	callq	_vulkan_descriptor_manager_alloc
	movl	%eax, -20(%rbp)
	movq	56(%rbx), %rcx
	movl	(%rcx), %edi
	movl	-32(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	32(%r14), %r8d
	movl	24(%r14), %r10d
	movl	28(%r14), %r9d
	subq	$8, %rsp
	movl	%eax, %esi
	pushq	%r10
	callq	_vulkan_write_quad_descriptors
	addq	$16, %rsp
	movq	_VK_PIPELINE_BIND_POINT_GRAPHICS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edi
	movl	48(%rbx), %edx
	leaq	-20(%rbp), %r9
	xorl	%ecx, %ecx
	movl	$1, %r8d
	pushq	$0
	pushq	$0
	callq	_vkCmdBindDescriptorSets
	addq	$16, %rsp
	movq	_VK_NULL_HANDLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%rbx)
	movq	%rax, 24(%rbx)
	leaq	16(%rbx), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	(%rbx), %edi
	movq	16(%r14), %r8
	leaq	4(%r8), %rcx
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_vkCmdBindVertexBuffers
	movl	(%rbx), %edi
	movl	8(%r14), %esi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_vkCmdDraw
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VK_PIPELINE_BIND_POINT_GRAPHICS,4,2 ## @VK_PIPELINE_BIND_POINT_GRAPHICS
	.comm	_VULKAN_DIRTY_DYNAMIC_BIT,4,2   ## @VULKAN_DIRTY_DYNAMIC_BIT
	.comm	_VK_NULL_HANDLE,8,3             ## @VK_NULL_HANDLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vulkan_draw_triangles          ; -- Begin function vulkan_draw_triangles
	.p2align	2
_vulkan_draw_triangles:                 ; @vulkan_draw_triangles
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	mov	x20, x0
	ldr	w2, [x1, #28]
	cbz	w2, LBB0_2
; %bb.1:
	ldr	w1, [x20]
	mov	x0, x20
	bl	_vulkan_transition_texture
LBB0_2:
	ldr	x2, [x19]
	ldr	x8, [x20, #8]
Lloh0:
	adrp	x21, _VK_PIPELINE_BIND_POINT_GRAPHICS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _VK_PIPELINE_BIND_POINT_GRAPHICS@GOTPAGEOFF]
	cmp	x2, x8
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x20]
	ldr	w1, [x21]
	bl	_vkCmdBindPipeline
	ldr	x8, [x19]
	str	x8, [x20, #8]
Lloh2:
	adrp	x8, _VULKAN_DIRTY_DYNAMIC_BIT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VULKAN_DIRTY_DYNAMIC_BIT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [x20, #40]
	orr	w8, w9, w8
	str	w8, [x20, #40]
LBB0_4:
	mov	x0, x20
	bl	_vulkan_check_dynamic_state
	ldp	x0, x8, [x20, #56]
	add	x1, x8, #4
	ldr	w2, [x19, #32]
	mov	x3, sp
	bl	_vulkan_buffer_chain_alloc
	cbz	w0, LBB0_6
; %bb.5:
	ldr	w0, [sp, #8]
	ldp	w2, w1, [x19, #32]
	bl	_memcpy
	ldp	x8, x1, [x20, #56]
	ldr	w0, [x8]
	bl	_vulkan_descriptor_manager_alloc
	mov	x1, x0
	str	w0, [sp, #12]
	ldr	x8, [x20, #56]
	ldr	w0, [x8]
	ldp	w3, w2, [sp]
	ldp	w5, w4, [x19, #28]
	ldr	w6, [x19, #24]
	bl	_vulkan_write_quad_descriptors
	ldr	w0, [x20]
	ldr	w1, [x21]
	ldr	w2, [x20, #48]
	add	x5, sp, #12
	mov	w3, #0
	mov	w4, #1
	mov	w6, #0
	mov	x7, #0
	bl	_vkCmdBindDescriptorSets
Lloh5:
	adrp	x8, _VK_NULL_HANDLE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VK_NULL_HANDLE@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	stp	x8, x8, [x20, #24]
	add	x0, x20, #16
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	w0, [x20]
	ldr	x4, [x19, #16]
	add	x3, x4, #4
	mov	w1, #0
	mov	w2, #1
	bl	_vkCmdBindVertexBuffers
	ldr	w0, [x20]
	ldr	w1, [x19, #8]
	mov	w2, #1
	mov	w3, #0
	mov	w4, #0
	bl	_vkCmdDraw
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_VK_PIPELINE_BIND_POINT_GRAPHICS,4,2 ; @VK_PIPELINE_BIND_POINT_GRAPHICS
	.comm	_VULKAN_DIRTY_DYNAMIC_BIT,4,2   ; @VULKAN_DIRTY_DYNAMIC_BIT
	.comm	_VK_NULL_HANDLE,8,3             ; @VK_NULL_HANDLE
.subsections_via_symbols
