	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ddraw_find_decl                ## -- Begin function ddraw_find_decl
	.p2align	4, 0x90
_ddraw_find_decl:                       ## @ddraw_find_decl
	.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	%rdi, %rbx
	movq	$0, -48(%rbp)
	movq	8(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	movq	%rsi, %r12
	xorl	%eax, %eax
	callq	_TRACE
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %r15d
	testl	%r15d, %r15d
	jle	LBB0_8
## %bb.1:
	decl	%r15d
	xorl	%r14d, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	decl	%r13d
	movl	%r13d, %r15d
	cmpl	%r15d, %r14d
	jg	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%r15,%r14), %r13d
	sarl	%r13d
	movslq	%r13d, %rbx
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_TRACE
	shlq	$4, %rbx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx,%rbx), %rax
	cmpq	%r12, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	jge	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%r13d
	movl	%r13d, %r14d
	cmpl	%r15d, %r14d
	jle	LBB0_2
LBB0_8:
	movslq	%r14d, %r14
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_TRACE
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	16(%r15), %edi
	movq	_ddraw_null_wined3d_parent_ops@GOTPCREL(%rip), %rcx
	leaq	-48(%rbp), %r8
	movq	%r12, %r13
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_wined3d_vertex_declaration_create_from_fvf
	movq	_S_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.9:
	movl	(%r15), %edx
	movl	4(%r15), %eax
	cmpl	%edx, %eax
	jne	LBB0_10
## %bb.11:
	movl	%eax, %edi
	shrl	$31, %edi
	addl	%eax, %edi
	sarl	%edi
	movl	$8, %esi
	callq	_max
	movl	%eax, %ebx
	movl	(%r15), %esi
	addl	%eax, %esi
	shll	$4, %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_heap_realloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	%rax, 8(%r15)
	addl	%ebx, 4(%r15)
	movq	%rax, %r12
	movl	(%r15), %edx
	jmp	LBB0_14
LBB0_3:
	movq	8(%rcx,%rbx), %rsi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	movq	%rcx, %r14
	callq	_TRACE
	movq	8(%r14,%rbx), %rbx
	jmp	LBB0_15
LBB0_10:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
LBB0_14:
	movq	%r14, %rbx
	shlq	$4, %rbx
	leaq	(%r12,%rbx), %rsi
	leaq	(%r12,%rbx), %rdi
	addq	$16, %rdi
	subl	%r14d, %edx
	shll	$4, %edx
	callq	_memmove
	movq	-48(%rbp), %rax
	movq	%rax, 8(%r12,%rbx)
	movq	%r13, (%r12,%rbx)
	movl	(%r15), %edx
	incl	%edx
	movl	%edx, (%r15)
	movq	-48(%rbp), %rsi
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	movq	-48(%rbp), %rbx
	jmp	LBB0_15
LBB0_12:
	movq	-48(%rbp), %rdi
	callq	_wined3d_vertex_declaration_decref
	xorl	%ebx, %ebx
LBB0_15:
	movq	%rbx, %rax
	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	"Searching for declaration for fvf %08x... "

L_.str.1:                               ## @.str.1
	.asciz	"%d "

L_.str.2:                               ## @.str.2
	.asciz	"found %p\n"

L_.str.3:                               ## @.str.3
	.asciz	"not found. Creating and inserting at position %d.\n"

	.comm	_ddraw_null_wined3d_parent_ops,4,2 ## @ddraw_null_wined3d_parent_ops
	.comm	_S_OK,8,3                       ## @S_OK
L_.str.4:                               ## @.str.4
	.asciz	"Returning %p. %d decls in array\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ddraw_find_decl                ; -- Begin function ddraw_find_decl
	.p2align	2
_ddraw_find_decl:                       ; @ddraw_find_decl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x1
	mov	x19, x0
	str	xzr, [sp, #8]
	ldr	x21, [x0, #8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	ldr	w8, [x19]
	mov	w24, #0
	subs	w25, w8, #1
	b.lt	LBB0_4
; %bb.1:
Lloh2:
	adrp	x22, l_.str.1@PAGE
Lloh3:
	add	x22, x22, l_.str.1@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	w8, w25, w24
	asr	w26, w8, #1
	sbfx	x23, x8, #1, #31
	mov	x0, x22
	mov	x1, x23
	bl	_TRACE
	sbfiz	x8, x26, #4, #32
	ldr	x8, [x21, x8]
	cmp	x8, x20
	b.eq	LBB0_10
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	w9, w23, #1
	cmp	x8, x20
	csinc	w24, w24, w23, ge
	csel	w25, w25, w9, lt
	cmp	w24, w25
	b.le	LBB0_2
LBB0_4:
	sxtw	x22, w24
Lloh4:
	adrp	x0, l_.str.3@PAGE
Lloh5:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x22
	bl	_TRACE
	ldr	w0, [x19, #16]
Lloh6:
	adrp	x3, _ddraw_null_wined3d_parent_ops@GOTPAGE
Lloh7:
	ldr	x3, [x3, _ddraw_null_wined3d_parent_ops@GOTPAGEOFF]
	add	x4, sp, #8
	mov	x1, x20
	mov	x2, x19
	bl	_wined3d_vertex_declaration_create_from_fvf
Lloh8:
	adrp	x8, _S_OK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _S_OK@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.5:
	ldp	w8, w9, [x19]
	cmp	w9, w8
	b.ne	LBB0_8
; %bb.6:
	cmp	w9, #0
	cinc	w8, w9, lt
	asr	w0, w8, #1
	mov	w1, #8
	bl	_max
	mov	x23, x0
	ldr	w8, [x19]
	add	w8, w8, w0
	lsl	w1, w8, #4
	mov	x0, x21
	bl	_heap_realloc
	cbz	x0, LBB0_12
; %bb.7:
	mov	x21, x0
	str	x0, [x19, #8]
	ldp	w8, w9, [x19]
	add	w9, w9, w23
	str	w9, [x19, #4]
LBB0_8:
	add	x21, x21, x22, lsl #4
	add	x0, x21, #16
	sub	w8, w8, w22
	lsl	w2, w8, #4
	mov	x1, x21
	bl	_memmove
	ldr	x8, [sp, #8]
	stp	x20, x8, [x21]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	ldr	x1, [sp, #8]
	str	x8, [sp]
Lloh11:
	adrp	x0, l_.str.4@PAGE
Lloh12:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_TRACE
	ldr	x0, [sp, #8]
	b	LBB0_11
LBB0_9:
	mov	x0, #0
	b	LBB0_11
LBB0_10:
	add	x19, x21, x23, lsl #4
	ldr	x1, [x19, #8]
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_TRACE
	ldr	x0, [x19, #8]
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_12:
	ldr	x0, [sp, #8]
	bl	_wined3d_vertex_declaration_decref
	mov	x0, #0
	b	LBB0_11
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Searching for declaration for fvf %08x... "

l_.str.1:                               ; @.str.1
	.asciz	"%d "

l_.str.2:                               ; @.str.2
	.asciz	"found %p\n"

l_.str.3:                               ; @.str.3
	.asciz	"not found. Creating and inserting at position %d.\n"

	.comm	_ddraw_null_wined3d_parent_ops,4,2 ; @ddraw_null_wined3d_parent_ops
	.comm	_S_OK,8,3                       ; @S_OK
l_.str.4:                               ; @.str.4
	.asciz	"Returning %p. %d decls in array\n"

.subsections_via_symbols
