	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_d3d9_vertex_declaration_create ## -- Begin function d3d9_vertex_declaration_create
	.p2align	4, 0x90
_d3d9_vertex_declaration_create:        ## @d3d9_vertex_declaration_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	$4, %edi
	callq	_heap_alloc_zero
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%rax, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_vertexdeclaration_init
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_WARN
	movq	%r15, %rdi
	callq	_heap_free
	jmp	LBB0_6
LBB0_1:
	movq	_E_OUTOFMEMORY@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	callq	_TRACE
	movq	%r15, (%r14)
	movq	_D3D_OK@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_E_OUTOFMEMORY,4,2              ## @E_OUTOFMEMORY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to initialize vertex declaration, hr %#x.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Created vertex declaration %p.\n"

	.comm	_D3D_OK,4,2                     ## @D3D_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_d3d9_vertex_declaration_create ; -- Begin function d3d9_vertex_declaration_create
	.p2align	2
_d3d9_vertex_declaration_create:        ; @d3d9_vertex_declaration_create
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	mov	w0, #4
	bl	_heap_alloc_zero
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	mov	x1, x22
	mov	x2, x21
	bl	_vertexdeclaration_init
	mov	x21, x0
	bl	_FAILED
	cbz	x0, LBB0_4
; %bb.2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_WARN
	mov	x0, x19
	bl	_heap_free
	b	LBB0_6
LBB0_3:
Lloh2:
	adrp	x8, _E_OUTOFMEMORY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _E_OUTOFMEMORY@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_TRACE
	str	x19, [x20]
Lloh6:
	adrp	x8, _D3D_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _D3D_OK@GOTPAGEOFF]
LBB0_5:
	ldr	w21, [x8]
LBB0_6:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_E_OUTOFMEMORY,4,2              ; @E_OUTOFMEMORY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to initialize vertex declaration, hr %#x.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Created vertex declaration %p.\n"

	.comm	_D3D_OK,4,2                     ; @D3D_OK
.subsections_via_symbols
