	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d3dx9_parse_name
_d3dx9_parse_name:                      ## @d3dx9_parse_name
	.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	%rdi, %r14
	movq	%rsi, -32(%rbp)
	leaq	-32(%rbp), %rdi
	leaq	-20(%rbp), %rsi
	callq	_read_dword
	movl	-20(%rbp), %esi
	leaq	L_.str(%rip), %rdi
	callq	_TRACE
	movq	_D3D_OK@GOTPCREL(%rip), %rbx
	cmpl	$0, -20(%rbp)
	je	LBB0_4
## %bb.1:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	-20(%rbp), %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapAlloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	-32(%rbp), %rdi
	movl	-20(%rbp), %esi
	callq	_debugstr_an
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_TRACE
	movq	(%r14), %rdi
	movq	-32(%rbp), %rsi
	movl	-20(%rbp), %edx
	callq	_memcpy
	jmp	LBB0_4
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	callq	_ERR
	movq	_E_OUTOFMEMORY@GOTPCREL(%rip), %rbx
LBB0_4:
	movl	(%rbx), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Name size: %#x\n"

	.comm	_D3D_OK,4,2                     ## @D3D_OK
L_.str.1:                               ## @.str.1
	.asciz	"Failed to allocate name memory.\n"

	.comm	_E_OUTOFMEMORY,4,2              ## @E_OUTOFMEMORY
L_.str.2:                               ## @.str.2
	.asciz	"Name: %s.\n"

	.no_dead_strip	_d3dx9_parse_name
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d3dx9_parse_name
_d3dx9_parse_name:                      ; @d3dx9_parse_name
	.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
	str	x1, [sp, #8]
	add	x0, sp, #8
	add	x1, sp, #4
	bl	_read_dword
	ldr	w1, [sp, #4]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	ldr	w8, [sp, #4]
	cbz	w8, LBB0_3
; %bb.1:
	bl	_GetProcessHeap
	ldr	w2, [sp, #4]
	mov	w1, #0
	bl	_HeapAlloc
	str	x0, [x19]
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x0, [sp, #8]
	ldr	w1, [sp, #4]
	bl	_debugstr_an
	mov	x1, x0
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_TRACE
	ldr	x0, [x19]
	ldr	x1, [sp, #8]
	ldr	w2, [sp, #4]
	bl	_memcpy
LBB0_3:
Lloh4:
	adrp	x8, _D3D_OK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _D3D_OK@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
Lloh8:
	adrp	x8, _E_OUTOFMEMORY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _E_OUTOFMEMORY@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Name size: %#x\n"

	.comm	_D3D_OK,4,2                     ; @D3D_OK
l_.str.1:                               ; @.str.1
	.asciz	"Failed to allocate name memory.\n"

	.comm	_E_OUTOFMEMORY,4,2              ; @E_OUTOFMEMORY
l_.str.2:                               ; @.str.2
	.asciz	"Name: %s.\n"

	.no_dead_strip	_d3dx9_parse_name
.subsections_via_symbols
