	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vulkan_set_texture_frame
_vulkan_set_texture_frame:              ## @vulkan_set_texture_frame
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $ecx killed $ecx def $rcx
	movq	$0, -88(%rbp)
	movq	_VK_COMPONENT_SWIZZLE_B@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -104(%rbp)
	movq	_VK_COMPONENT_SWIZZLE_G@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -100(%rbp)
	movq	_VK_COMPONENT_SWIZZLE_R@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -96(%rbp)
	movq	_VK_COMPONENT_SWIZZLE_A@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -92(%rbp)
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.1:
	movl	%r8d, %r15d
	movl	%edx, %r8d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	32(%rdi), %rax
	movl	(%rax), %r13d
	movq	16(%rdi), %rax
	movq	24(%rdi), %rdx
	movq	%r13, %r12
	shlq	$5, %r12
	leaq	(%rdx,%r12), %rsi
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rdx,%r12), %rdx
	testq	%rdx, %rdx
	cmovneq	%rsi, %rdx
	xorl	%r10d, %r10d
	testl	%r8d, %r8d
	movq	_VK_FORMAT_B4G4R4A4_UNORM_PACK16@GOTPCREL(%rip), %rdi
	cmovneq	_VK_FORMAT_B8G8R8A8_UNORM@GOTPCREL(%rip), %rdi
	movl	(%rdi), %r9d
	leaq	-104(%rbp), %r11
	cmovneq	%r10, %r11
	cmpq	$0, 8(%rax,%r12)
	movq	%r13, -136(%rbp)                ## 8-byte Spill
	movl	%r8d, -60(%rbp)                 ## 4-byte Spill
	movss	%xmm0, -64(%rbp)                ## 4-byte Spill
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movq	%rsi, -128(%rbp)                ## 8-byte Spill
	jne	LBB0_2
## %bb.3:
	movq	_VULKAN_TEXTURE_STREAMED@GOTPCREL(%rip), %r10
	jmp	LBB0_4
LBB0_2:
	movq	_VULKAN_TEXTURE_STAGING@GOTPCREL(%rip), %r10
LBB0_4:
	subq	$8, %rsp
	leaq	-184(%rbp), %rdi
	movq	%r14, %rsi
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	%r15d, %r8d
	pushq	(%r10)
	movq	%r11, -120(%rbp)                ## 8-byte Spill
	pushq	%r11
	pushq	$0
	callq	_vulkan_create_texture
	addq	$32, %rsp
	movups	-184(%rbp), %xmm0
	movups	-168(%rbp), %xmm1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movups	%xmm1, 16(%rcx,%r12)
	movups	%xmm0, (%rcx,%r12)
	movq	%r14, -144(%rbp)                ## 8-byte Spill
	movq	32(%r14), %rax
	movl	4(%rax), %edi
	movq	8(%rcx,%r12), %rsi
	movl	24(%rcx,%r12), %edx
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movl	20(%rcx,%r12), %ecx
	leaq	-88(%rbp), %r9
	xorl	%r8d, %r8d
	callq	_vkMapMemory
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.5:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	leal	(,%rax,4), %r15d
	movq	-88(%rbp), %r14
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	addq	%rcx, %rax
	addq	$16, %rax
	movq	%rax, -152(%rbp)                ## 8-byte Spill
	movl	%r15d, %r12d
	shlq	$2, %r12
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_memcpy
	movq	-152(%rbp), %rax                ## 8-byte Reload
	movslq	(%rax), %rax
	leaq	(%r14,%rax,4), %r14
	addq	%r12, %rbx
	decl	%r13d
	jne	LBB0_6
LBB0_7:
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%rdx), %r14
	addq	$8, %r14
	movq	-144(%rbp), %rbx                ## 8-byte Reload
	movss	-64(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rbx)
	movq	-136(%rbp), %r12                ## 8-byte Reload
	movl	%r12d, 4(%rbx)
	movq	-128(%rbp), %rsi                ## 8-byte Reload
	movq	(%rsi), %rax
	movq	_VULKAN_TEXTURE_STAGING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.8:
	movq	-112(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%rdx), %r15
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rdx
	testq	%rdx, %rdx
	cmovneq	%r15, %rdx
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	movq	_VK_FORMAT_B8G8R8A8_UNORM@GOTPCREL(%rip), %rax
	jne	LBB0_10
## %bb.9:
	movq	_VK_FORMAT_B4G4R4A4_UNORM_PACK16@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %r9d
	movq	_VULKAN_TEXTURE_DYNAMIC@GOTPCREL(%rip), %rax
	subq	$8, %rsp
	leaq	-184(%rbp), %rdi
	movq	%rbx, %rsi
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	pushq	(%rax)
	pushq	-120(%rbp)                      ## 8-byte Folded Reload
	pushq	$0
	callq	_vulkan_create_texture
	addq	$32, %rsp
	movups	-184(%rbp), %xmm0
	movups	-168(%rbp), %xmm1
	movups	%xmm1, 16(%r15)
	movups	%xmm0, (%r15)
	jmp	LBB0_12
LBB0_11:
	movq	%rbx, %rdi
	callq	_vulkan_sync_texture_to_gpu
LBB0_12:
	movq	32(%rbx), %rax
	movl	4(%rax), %edi
	movq	(%r14), %rsi
	callq	_vkUnmapMemory
	movq	8(%rbx), %rax
	movl	$1, (%rax,%r12,4)
LBB0_13:
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VK_COMPONENT_SWIZZLE_B,4,2     ## @VK_COMPONENT_SWIZZLE_B
	.comm	_VK_COMPONENT_SWIZZLE_G,4,2     ## @VK_COMPONENT_SWIZZLE_G
	.comm	_VK_COMPONENT_SWIZZLE_R,4,2     ## @VK_COMPONENT_SWIZZLE_R
	.comm	_VK_COMPONENT_SWIZZLE_A,4,2     ## @VK_COMPONENT_SWIZZLE_A
	.comm	_VK_FORMAT_B8G8R8A8_UNORM,4,2   ## @VK_FORMAT_B8G8R8A8_UNORM
	.comm	_VK_FORMAT_B4G4R4A4_UNORM_PACK16,4,2 ## @VK_FORMAT_B4G4R4A4_UNORM_PACK16
	.comm	_VULKAN_TEXTURE_STAGING,8,3     ## @VULKAN_TEXTURE_STAGING
	.comm	_VULKAN_TEXTURE_STREAMED,8,3    ## @VULKAN_TEXTURE_STREAMED
	.comm	_VULKAN_TEXTURE_DYNAMIC,8,3     ## @VULKAN_TEXTURE_DYNAMIC
	.no_dead_strip	_vulkan_set_texture_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vulkan_set_texture_frame
_vulkan_set_texture_frame:              ; @vulkan_set_texture_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	d9, d8, [sp, #96]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #112]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	str	xzr, [sp, #88]
Lloh0:
	adrp	x8, _VK_COMPONENT_SWIZZLE_B@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VK_COMPONENT_SWIZZLE_B@GOTPAGEOFF]
Lloh2:
	adrp	x9, _VK_COMPONENT_SWIZZLE_G@GOTPAGE
Lloh3:
	ldr	x9, [x9, _VK_COMPONENT_SWIZZLE_G@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #72]
Lloh6:
	adrp	x8, _VK_COMPONENT_SWIZZLE_R@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VK_COMPONENT_SWIZZLE_R@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _VK_COMPONENT_SWIZZLE_A@GOTPAGE
Lloh10:
	ldr	x9, [x9, _VK_COMPONENT_SWIZZLE_A@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #80]
	cbz	x0, LBB0_8
; %bb.1:
	mov	x20, x4
	fmov	s8, s0
	mov	x23, x1
	mov	x19, x0
	ldp	x21, x8, [x0, #24]
	ldr	w8, [x8]
	str	x8, [sp, #32]                   ; 8-byte Folded Spill
	lsl	x8, x8, #5
	ldr	x9, [x0, #16]
	add	x25, x21, x8
	add	x24, x9, x8
	mov	x22, x25
	ldr	x8, [x22, #8]!
Lloh12:
	adrp	x9, _VK_FORMAT_B8G8R8A8_UNORM@GOTPAGE
Lloh13:
	ldr	x9, [x9, _VK_FORMAT_B8G8R8A8_UNORM@GOTPAGEOFF]
	cmp	x8, #0
	csel	x1, xzr, x25, eq
Lloh14:
	adrp	x8, _VK_FORMAT_B4G4R4A4_UNORM_PACK16@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VK_FORMAT_B4G4R4A4_UNORM_PACK16@GOTPAGEOFF]
	str	w2, [sp, #20]                   ; 4-byte Folded Spill
	cmp	w2, #0
	csel	x8, x8, x9, eq
	ldr	w4, [x8]
	add	x8, sp, #72
	str	x24, [sp, #8]                   ; 8-byte Folded Spill
	ldr	x9, [x24, #8]!
Lloh16:
	adrp	x10, _VULKAN_TEXTURE_STAGING@GOTPAGE
Lloh17:
	ldr	x10, [x10, _VULKAN_TEXTURE_STAGING@GOTPAGEOFF]
	csel	x6, x8, xzr, eq
Lloh18:
	adrp	x8, _VULKAN_TEXTURE_STREAMED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _VULKAN_TEXTURE_STREAMED@GOTPAGEOFF]
	cmp	x9, #0
	csel	x8, x8, x10, eq
	ldr	x7, [x8]
	add	x8, sp, #40
	str	w3, [sp, #24]                   ; 4-byte Folded Spill
	mov	x2, x3
	mov	x3, x20
	mov	x5, #0
	str	x6, [sp]                        ; 8-byte Folded Spill
	bl	_vulkan_create_texture
	ldur	q0, [sp, #40]
	ldur	q1, [sp, #56]
	stp	q0, q1, [x25]
	ldr	x8, [x19, #32]
	ldr	w0, [x8, #4]
	ldr	x1, [x22]
	ldp	w3, w2, [x25, #20]
	add	x5, sp, #88
	mov	w4, #0
	bl	_vkMapMemory
	str	w20, [sp, #28]                  ; 4-byte Folded Spill
	cbz	w20, LBB0_4
; %bb.2:
	ldp	w8, w20, [sp, #24]              ; 8-byte Folded Reload
	lsl	w26, w8, #2
	ldr	x27, [sp, #88]
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	add	x8, x21, x8, lsl #5
	add	x21, x8, #16
	lsl	x28, x26, #2
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x27
	mov	x1, x23
	mov	x2, x26
	bl	_memcpy
	ldrsw	x8, [x21]
	add	x27, x27, x8, lsl #2
	add	x23, x23, x28
	subs	w20, w20, #1
	b.ne	LBB0_3
LBB0_4:
	str	s8, [x19]
	ldr	x20, [sp, #32]                  ; 8-byte Folded Reload
	str	w20, [x19, #4]
	ldr	x8, [x25]
Lloh20:
	adrp	x9, _VULKAN_TEXTURE_STAGING@GOTPAGE
Lloh21:
	ldr	x9, [x9, _VULKAN_TEXTURE_STAGING@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	ldr	x8, [x24]
	cmp	x8, #0
	ldp	x6, x21, [sp]                   ; 16-byte Folded Reload
	csel	x1, xzr, x21, eq
	ldp	w8, w2, [sp, #20]               ; 8-byte Folded Reload
	cmp	w8, #0
Lloh23:
	adrp	x8, _VK_FORMAT_B8G8R8A8_UNORM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _VK_FORMAT_B8G8R8A8_UNORM@GOTPAGEOFF]
Lloh25:
	adrp	x9, _VK_FORMAT_B4G4R4A4_UNORM_PACK16@GOTPAGE
Lloh26:
	ldr	x9, [x9, _VK_FORMAT_B4G4R4A4_UNORM_PACK16@GOTPAGEOFF]
	csel	x8, x9, x8, eq
	ldr	w4, [x8]
Lloh27:
	adrp	x8, _VULKAN_TEXTURE_DYNAMIC@GOTPAGE
Lloh28:
	ldr	x8, [x8, _VULKAN_TEXTURE_DYNAMIC@GOTPAGEOFF]
Lloh29:
	ldr	x7, [x8]
	add	x8, sp, #40
	mov	x0, x19
	ldr	w3, [sp, #28]                   ; 4-byte Folded Reload
	mov	x5, #0
	bl	_vulkan_create_texture
	ldur	q0, [sp, #40]
	ldur	q1, [sp, #56]
	stp	q0, q1, [x21]
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	mov	x1, x25
	bl	_vulkan_sync_texture_to_gpu
LBB0_7:
	ldr	x8, [x19, #32]
	ldr	w0, [x8, #4]
	ldr	x1, [x22]
	bl	_vkUnmapMemory
	ldr	x8, [x19, #8]
	mov	w9, #1
	str	w9, [x8, x20, lsl #2]
LBB0_8:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #96]               ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_VK_COMPONENT_SWIZZLE_B,4,2     ; @VK_COMPONENT_SWIZZLE_B
	.comm	_VK_COMPONENT_SWIZZLE_G,4,2     ; @VK_COMPONENT_SWIZZLE_G
	.comm	_VK_COMPONENT_SWIZZLE_R,4,2     ; @VK_COMPONENT_SWIZZLE_R
	.comm	_VK_COMPONENT_SWIZZLE_A,4,2     ; @VK_COMPONENT_SWIZZLE_A
	.comm	_VK_FORMAT_B8G8R8A8_UNORM,4,2   ; @VK_FORMAT_B8G8R8A8_UNORM
	.comm	_VK_FORMAT_B4G4R4A4_UNORM_PACK16,4,2 ; @VK_FORMAT_B4G4R4A4_UNORM_PACK16
	.comm	_VULKAN_TEXTURE_STAGING,8,3     ; @VULKAN_TEXTURE_STAGING
	.comm	_VULKAN_TEXTURE_STREAMED,8,3    ; @VULKAN_TEXTURE_STREAMED
	.comm	_VULKAN_TEXTURE_DYNAMIC,8,3     ; @VULKAN_TEXTURE_DYNAMIC
	.no_dead_strip	_vulkan_set_texture_frame
.subsections_via_symbols
