	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vertexdeclaration_init
_vertexdeclaration_init:                ## @vertexdeclaration_init
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r14
	movq	%rdi, %r15
	leaq	-56(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	callq	_convert_to_wined3d_declaration
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rdi
LBB0_2:
	movl	%ebx, %esi
	callq	_WARN
	jmp	LBB0_9
LBB0_3:
	movq	_d3d9_vertex_declaration_vtbl@GOTPCREL(%rip), %rax
	movq	%rax, 32(%r15)
	movl	$1, (%r15)
	movl	-44(%rbp), %ebx
	leal	4(,%rbx,4), %r13d
	movl	%r13d, %edi
	callq	_heap_alloc
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	incl	%ebx
	movq	%rax, %rdi
	movq	%r12, %rsi
	movl	%r13d, %edx
	callq	_memcpy
	movl	%ebx, 4(%r15)
	xorl	%eax, %eax
	callq	_wined3d_mutex_lock
	movl	4(%r14), %edi
	movq	-56(%rbp), %rsi
	movl	-44(%rbp), %edx
	leaq	24(%r15), %r9
	movq	_d3d9_vertexdeclaration_wined3d_parent_ops@GOTPCREL(%rip), %r8
	movq	%r15, %rcx
	callq	_wined3d_vertex_declaration_create
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_wined3d_mutex_unlock
	movq	-56(%rbp), %rdi
	callq	_heap_free
	movl	%ebx, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	16(%r15), %rdi
	callq	_heap_free
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	movq	-56(%rbp), %rdi
	callq	_heap_free
	leaq	L_.str.1(%rip), %rdi
	callq	_ERR
	movq	_D3DERR_OUTOFVIDEOMEMORY@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_7:
	movq	%r14, 8(%r15)
	movq	%r14, %rdi
	callq	_IDirect3DDevice9Ex_AddRef
	movq	_D3D_OK@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to create wined3d vertex declaration elements, hr %#x.\n"

	.comm	_d3d9_vertex_declaration_vtbl,4,2 ## @d3d9_vertex_declaration_vtbl
L_.str.1:                               ## @.str.1
	.asciz	"Failed to allocate vertex declaration elements memory.\n"

	.comm	_D3DERR_OUTOFVIDEOMEMORY,4,2    ## @D3DERR_OUTOFVIDEOMEMORY
	.comm	_d3d9_vertexdeclaration_wined3d_parent_ops,4,2 ## @d3d9_vertexdeclaration_wined3d_parent_ops
L_.str.2:                               ## @.str.2
	.asciz	"Failed to create wined3d vertex declaration, hr %#x.\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vertexdeclaration_init
_vertexdeclaration_init:                ; @vertexdeclaration_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	add	x1, sp, #8
	add	x2, sp, #4
	mov	x0, x22
	bl	_convert_to_wined3d_declaration
	mov	x21, x0
	bl	_FAILED
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
LBB0_2:
	mov	x1, x21
	bl	_WARN
	b	LBB0_9
LBB0_3:
Lloh2:
	adrp	x8, _d3d9_vertex_declaration_vtbl@GOTPAGE
Lloh3:
	ldr	x8, [x8, _d3d9_vertex_declaration_vtbl@GOTPAGEOFF]
	str	x8, [x20, #32]
	mov	w8, #1
	str	w8, [x20]
	ldr	w8, [sp, #4]
	add	w23, w8, #1
	lsl	w21, w23, #2
	mov	x0, x21
	bl	_heap_alloc
	str	x0, [x20, #16]
	cbz	x0, LBB0_6
; %bb.4:
	mov	x1, x22
	mov	x2, x21
	bl	_memcpy
	str	w23, [x20, #4]
	bl	_wined3d_mutex_lock
	ldr	w0, [x19, #4]
	ldr	x1, [sp, #8]
	add	x5, x20, #24
	ldr	w2, [sp, #4]
Lloh4:
	adrp	x4, _d3d9_vertexdeclaration_wined3d_parent_ops@GOTPAGE
Lloh5:
	ldr	x4, [x4, _d3d9_vertexdeclaration_wined3d_parent_ops@GOTPAGEOFF]
	mov	x3, x20
	bl	_wined3d_vertex_declaration_create
	mov	x21, x0
	bl	_wined3d_mutex_unlock
	ldr	x0, [sp, #8]
	bl	_heap_free
	mov	x0, x21
	bl	_FAILED
	cbz	x0, LBB0_7
; %bb.5:
	ldr	x0, [x20, #16]
	bl	_heap_free
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_6:
	ldr	x0, [sp, #8]
	bl	_heap_free
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
Lloh10:
	adrp	x8, _D3DERR_OUTOFVIDEOMEMORY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _D3DERR_OUTOFVIDEOMEMORY@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
	str	x19, [x20, #8]
	mov	x0, x19
	bl	_IDirect3DDevice9Ex_AddRef
Lloh12:
	adrp	x8, _D3D_OK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _D3D_OK@GOTPAGEOFF]
LBB0_8:
	ldr	w21, [x8]
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to create wined3d vertex declaration elements, hr %#x.\n"

	.comm	_d3d9_vertex_declaration_vtbl,4,2 ; @d3d9_vertex_declaration_vtbl
l_.str.1:                               ; @.str.1
	.asciz	"Failed to allocate vertex declaration elements memory.\n"

	.comm	_D3DERR_OUTOFVIDEOMEMORY,4,2    ; @D3DERR_OUTOFVIDEOMEMORY
	.comm	_d3d9_vertexdeclaration_wined3d_parent_ops,4,2 ; @d3d9_vertexdeclaration_wined3d_parent_ops
l_.str.2:                               ; @.str.2
	.asciz	"Failed to create wined3d vertex declaration, hr %#x.\n"

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