	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d3dx9_file_data_create
_d3dx9_file_data_create:                ## @d3dx9_file_data_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_TRACE
	movq	$0, (%r14)
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	_HEAP_ZERO_MEMORY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	movl	$32, %edx
	callq	_HeapAlloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%rax, %r13
	movq	_d3dx9_file_data_vtbl@GOTPCREL(%rip), %rax
	movq	%rax, 8(%r15)
	movl	$1, (%r15)
	leaq	24(%r15), %r12
	movq	_IID_IDirectXFileData@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r12, %rdx
	callq	_IDirectXFileObject_QueryInterface
	movq	%rax, %rdi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	_IID_IDirectXFileDataReference@GOTPCREL(%rip), %rsi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_IDirectXFileObject_QueryInterface
	movq	%rax, %rdi
	callq	_SUCCEEDED
	testq	%rax, %rax
	je	LBB0_11
## %bb.4:
	movq	-48(%rbp), %rdi
	movq	%r12, %rsi
	callq	_IDirectXFileDataReference_Resolve
	movq	%rax, %rbx
	movq	-48(%rbp), %rdi
	callq	_IUnknown_Release
	movq	%rbx, %rdi
	callq	_FAILED
	testq	%rax, %rax
	jne	LBB0_12
## %bb.5:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r13)
LBB0_6:
	movl	(%r12), %edi
	leaq	-48(%rbp), %rsi
	callq	_IDirectXFileData_GetNextObject
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_SUCCEEDED
	testq	%rax, %rax
	je	LBB0_18
## %bb.7:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r13), %ecx
	movq	16(%r13), %rax
	cmpl	%ebx, %ecx
	jb	LBB0_16
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	leal	(%rbx,%rbx), %r12d
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	16(%r13), %rdx
	shll	$4, %ebx
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	%ebx, %ecx
	callq	_HeapReAlloc
	movl	%r12d, %ebx
	testq	%rax, %rax
	jne	LBB0_15
	jmp	LBB0_26
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=1
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_HeapAlloc
	movl	$4, %ebx
	testq	%rax, %rax
	je	LBB0_26
LBB0_15:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%rax, 16(%r13)
	movl	4(%r13), %ecx
LBB0_16:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	-48(%rbp), %rdi
	movl	%ecx, %ecx
	leaq	(%rax,%rcx,8), %rsi
	callq	_d3dx9_file_data_create
	movq	%rax, %r12
	movq	-48(%rbp), %rdi
	callq	_IUnknown_Release
	movq	%r12, %rdi
	callq	_FAILED
	testq	%rax, %rax
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_8 Depth=1
	incl	4(%r13)
	movl	24(%r13), %edi
	leaq	-48(%rbp), %rsi
	callq	_IDirectXFileData_GetNextObject
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_SUCCEEDED
	testq	%rax, %rax
	jne	LBB0_8
	jmp	LBB0_18
LBB0_1:
	movq	_E_OUTOFMEMORY@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_11:
	leaq	L_.str.1(%rip), %rdi
	callq	_FIXME
LBB0_12:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	_HeapFree
	movq	_E_FAIL@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_26:
	movq	_E_OUTOFMEMORY@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
LBB0_18:
	addq	$8, %r15
	movq	_DXFILEERR_NOMOREOBJECTS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jne	LBB0_19
## %bb.20:
	cmpq	$0, 16(%r13)
	je	LBB0_23
## %bb.21:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	16(%r13), %rdx
	movl	4(%r13), %ecx
	shll	$3, %ecx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapReAlloc
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	movq	%rax, 16(%r13)
LBB0_23:
	movl	4(%r13), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	movq	%r15, (%r14)
	movq	_S_OK@GOTPCREL(%rip), %rax
LBB0_24:
	movq	(%rax), %r12
LBB0_25:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	(%r15), %rax
	movq	%r15, %rdi
	callq	*(%rax)
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dxfile_object %p, ret_iface %p.\n"

	.comm	_HEAP_ZERO_MEMORY,4,2           ## @HEAP_ZERO_MEMORY
	.comm	_E_OUTOFMEMORY,8,3              ## @E_OUTOFMEMORY
	.comm	_d3dx9_file_data_vtbl,8,3       ## @d3dx9_file_data_vtbl
	.comm	_IID_IDirectXFileData,4,2       ## @IID_IDirectXFileData
	.comm	_IID_IDirectXFileDataReference,4,2 ## @IID_IDirectXFileDataReference
	.comm	_E_FAIL,8,3                     ## @E_FAIL
	.comm	_TRUE,4,2                       ## @TRUE
L_.str.1:                               ## @.str.1
	.asciz	"Don't know what to do with binary object\n"

	.comm	_DXFILEERR_NOMOREOBJECTS,8,3    ## @DXFILEERR_NOMOREOBJECTS
L_.str.2:                               ## @.str.2
	.asciz	"Found %u children\n"

	.comm	_S_OK,8,3                       ## @S_OK
	.no_dead_strip	_d3dx9_file_data_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d3dx9_file_data_create
_d3dx9_file_data_create:                ; @d3dx9_file_data_create
	.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	x19, x1
	mov	x23, x0
	str	x1, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	bl	_TRACE
	str	xzr, [x19]
	bl	_GetProcessHeap
Lloh2:
	adrp	x8, _HEAP_ZERO_MEMORY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HEAP_ZERO_MEMORY@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w2, #32
	bl	_HeapAlloc
	cbz	x0, LBB0_14
; %bb.1:
	mov	x20, x0
Lloh5:
	adrp	x8, _d3dx9_file_data_vtbl@GOTPAGE
Lloh6:
	ldr	x8, [x8, _d3dx9_file_data_vtbl@GOTPAGEOFF]
	mov	x21, x0
	str	x8, [x21, #8]!
	mov	w8, #1
	mov	x22, x0
	str	w8, [x22], #24
Lloh7:
	adrp	x1, _IID_IDirectXFileData@GOTPAGE
Lloh8:
	ldr	x1, [x1, _IID_IDirectXFileData@GOTPAGEOFF]
	mov	x0, x23
	mov	x2, x22
	bl	_IDirectXFileObject_QueryInterface
	bl	_FAILED
	cbz	x0, LBB0_5
; %bb.2:
Lloh9:
	adrp	x1, _IID_IDirectXFileDataReference@GOTPAGE
Lloh10:
	ldr	x1, [x1, _IID_IDirectXFileDataReference@GOTPAGEOFF]
	add	x2, sp, #8
	mov	x0, x23
	bl	_IDirectXFileObject_QueryInterface
	bl	_SUCCEEDED
	cbz	x0, LBB0_15
; %bb.3:
	ldr	x0, [sp, #8]
	mov	x1, x22
	bl	_IDirectXFileDataReference_Resolve
	mov	x23, x0
	ldr	x0, [sp, #8]
	bl	_IUnknown_Release
	mov	x0, x23
	bl	_FAILED
	cbnz	x0, LBB0_16
; %bb.4:
Lloh11:
	adrp	x8, _TRUE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x20, #28]
LBB0_5:
	ldr	w0, [x22]
	add	x1, sp, #8
	bl	_IDirectXFileData_GetNextObject
	mov	x22, x0
	bl	_SUCCEEDED
	cbz	x0, LBB0_18
; %bb.6:
	mov	w23, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x20, #4]
	ldr	x0, [x20, #16]
	cmp	w9, w23
	b.lo	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	cbz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	lsl	w22, w23, #1
	bl	_GetProcessHeap
	ldr	x2, [x20, #16]
	lsl	w3, w23, #4
	mov	w1, #0
	bl	_HeapReAlloc
	mov	x23, x22
	cbnz	x0, LBB0_11
	b	LBB0_17
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	bl	_GetProcessHeap
	mov	w1, #0
	mov	w2, #32
	bl	_HeapAlloc
	mov	w23, #4
	cbz	x0, LBB0_17
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	str	x0, [x20, #16]
	ldr	w9, [x20, #4]
LBB0_12:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [sp, #8]
	add	x1, x0, w9, uxtw #3
	mov	x0, x8
	bl	_d3dx9_file_data_create
	mov	x22, x0
	ldr	x0, [sp, #8]
	bl	_IUnknown_Release
	mov	x0, x22
	bl	_FAILED
	cbnz	x0, LBB0_18
; %bb.13:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x20, #4]
	add	w8, w8, #1
	str	w8, [x20, #4]
	ldr	w0, [x20, #24]
	add	x1, sp, #8
	bl	_IDirectXFileData_GetNextObject
	mov	x22, x0
	bl	_SUCCEEDED
	cbnz	x0, LBB0_7
	b	LBB0_18
LBB0_14:
Lloh14:
	adrp	x8, _E_OUTOFMEMORY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _E_OUTOFMEMORY@GOTPAGEOFF]
	b	LBB0_23
LBB0_15:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_FIXME
LBB0_16:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x20
	bl	_HeapFree
Lloh18:
	adrp	x8, _E_FAIL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _E_FAIL@GOTPAGEOFF]
	b	LBB0_23
LBB0_17:
Lloh20:
	adrp	x8, _E_OUTOFMEMORY@GOTPAGE
Lloh21:
	ldr	x8, [x8, _E_OUTOFMEMORY@GOTPAGEOFF]
Lloh22:
	ldr	x22, [x8]
LBB0_18:
Lloh23:
	adrp	x8, _DXFILEERR_NOMOREOBJECTS@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DXFILEERR_NOMOREOBJECTS@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	cmp	x22, x8
	b.ne	LBB0_25
; %bb.19:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_22
; %bb.20:
	bl	_GetProcessHeap
	ldr	x2, [x20, #16]
	ldr	w8, [x20, #4]
	lsl	w3, w8, #3
	mov	w1, #0
	bl	_HeapReAlloc
	cbz	x0, LBB0_22
; %bb.21:
	str	x0, [x20, #16]
LBB0_22:
	ldr	w1, [x20, #4]
Lloh26:
	adrp	x0, l_.str.2@PAGE
Lloh27:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_TRACE
	str	x21, [x19]
Lloh28:
	adrp	x8, _S_OK@GOTPAGE
Lloh29:
	ldr	x8, [x8, _S_OK@GOTPAGEOFF]
LBB0_23:
	ldr	x22, [x8]
LBB0_24:
	mov	x0, x22
	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
LBB0_25:
	ldr	x8, [x21]
	ldr	x8, [x8]
	mov	x0, x21
	blr	x8
	b	LBB0_24
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dxfile_object %p, ret_iface %p.\n"

	.comm	_HEAP_ZERO_MEMORY,4,2           ; @HEAP_ZERO_MEMORY
	.comm	_E_OUTOFMEMORY,8,3              ; @E_OUTOFMEMORY
	.comm	_d3dx9_file_data_vtbl,8,3       ; @d3dx9_file_data_vtbl
	.comm	_IID_IDirectXFileData,4,2       ; @IID_IDirectXFileData
	.comm	_IID_IDirectXFileDataReference,4,2 ; @IID_IDirectXFileDataReference
	.comm	_E_FAIL,8,3                     ; @E_FAIL
	.comm	_TRUE,4,2                       ; @TRUE
l_.str.1:                               ; @.str.1
	.asciz	"Don't know what to do with binary object\n"

	.comm	_DXFILEERR_NOMOREOBJECTS,8,3    ; @DXFILEERR_NOMOREOBJECTS
l_.str.2:                               ; @.str.2
	.asciz	"Found %u children\n"

	.comm	_S_OK,8,3                       ; @S_OK
	.no_dead_strip	_d3dx9_file_data_create
.subsections_via_symbols
