	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function parse_texture_filename
_parse_texture_filename:                ## @parse_texture_filename
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	(%r12), %rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapFree
	movq	$0, (%r12)
	movq	(%r14), %rax
	leaq	-36(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	*8(%rax)
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	jne	LBB0_7
## %bb.1:
	movl	-36(%rbp), %esi
	cmpl	$7, %esi
	ja	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_WARN
	movq	_E_FAIL@GOTPCREL(%rip), %rbx
	jmp	LBB0_6
LBB0_3:
	movq	-48(%rbp), %rax
	movq	(%rax), %r15
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_strlen
	leaq	1(%rax), %rdx
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_HeapAlloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_strcpy
	movq	%rbx, (%r12)
	movq	_D3D_OK@GOTPCREL(%rip), %rbx
	jmp	LBB0_6
LBB0_4:
	movq	_E_OUTOFMEMORY@GOTPCREL(%rip), %rbx
LBB0_6:
	movq	(%r14), %rax
	movq	%r14, %rdi
	callq	*(%rax)
	movl	(%rbx), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"truncated data (%lu bytes)\n"

	.comm	_E_FAIL,4,2                     ## @E_FAIL
	.comm	_E_OUTOFMEMORY,4,2              ## @E_OUTOFMEMORY
	.comm	_D3D_OK,4,2                     ## @D3D_OK
	.no_dead_strip	_parse_texture_filename
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function parse_texture_filename
_parse_texture_filename:                ; @parse_texture_filename
	.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	x20, x1
	mov	x19, x0
	bl	_GetProcessHeap
	ldr	x2, [x20]
	mov	w1, #0
	bl	_HeapFree
	str	xzr, [x20]
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
	add	x1, sp, #12
	mov	x2, sp
	mov	x0, x19
	blr	x8
	mov	x21, x0
	bl	_FAILED
	cbnz	x0, LBB0_7
; %bb.1:
	ldr	w1, [sp, #12]
	cmp	w1, #7
	b.hi	LBB0_3
; %bb.2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_WARN
Lloh2:
	adrp	x20, _E_FAIL@GOTPAGE
Lloh3:
	ldr	x20, [x20, _E_FAIL@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:
	ldr	x8, [sp]
	ldr	x21, [x8]
	bl	_GetProcessHeap
	mov	x22, x0
	mov	x0, x21
	bl	_strlen
	add	x2, x0, #1
	mov	x0, x22
	mov	w1, #0
	bl	_HeapAlloc
	cbz	x0, LBB0_5
; %bb.4:
	mov	x22, x0
	mov	x1, x21
	bl	_strcpy
	str	x22, [x20]
Lloh4:
	adrp	x20, _D3D_OK@GOTPAGE
Lloh5:
	ldr	x20, [x20, _D3D_OK@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh6:
	adrp	x20, _E_OUTOFMEMORY@GOTPAGE
Lloh7:
	ldr	x20, [x20, _E_OUTOFMEMORY@GOTPAGEOFF]
LBB0_6:
	ldr	x8, [x19]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	ldr	w21, [x20]
LBB0_7:
	mov	x0, x21
	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	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"truncated data (%lu bytes)\n"

	.comm	_E_FAIL,4,2                     ; @E_FAIL
	.comm	_E_OUTOFMEMORY,4,2              ; @E_OUTOFMEMORY
	.comm	_D3D_OK,4,2                     ; @D3D_OK
	.no_dead_strip	_parse_texture_filename
.subsections_via_symbols
