	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d3dx9_effect_init
_d3dx9_effect_init:                     ## @d3dx9_effect_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	%r9, %r12
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r8d
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	32(%rbp), %r15
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	movq	%r13, %rcx
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, %r9
	callq	_TRACE
	movq	_ID3DXEffect_Vtbl@GOTPCREL(%rip), %rax
	movq	%rax, 48(%rbx)
	movl	$1, (%rbx)
	testq	%r15, %r15
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	movq	(%r15), %rax
	movq	%r15, %rdi
	callq	*(%rax)
	movq	%r15, %rdi
	callq	_impl_from_ID3DXEffectPool
	movq	%rax, %r12
	jmp	LBB0_3
LBB0_1:
	xorl	%r12d, %r12d
LBB0_3:
	movq	%r15, 40(%rbx)
	movq	%r14, %rdi
	callq	_IDirect3DDevice9_AddRef
	movq	%r14, 32(%rbx)
	leaq	16(%rbx), %r15
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	movl	16(%rbp), %r9d
	pushq	40(%rbp)
	pushq	%r12
	pushq	%rbx
	pushq	24(%rbp)
	callq	_d3dx9_base_effect_init
	addq	$32, %rsp
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	callq	_FIXME
	movq	%rbx, %rdi
	callq	_free_effect
	jmp	LBB0_8
LBB0_5:
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rax, 24(%rbx)
	movq	$0, 8(%rbx)
LBB0_7:
	movq	_D3D_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_8:
	movl	%r14d, %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	"effect %p, device %p, data %p, data_size %lu, pool %p\n"

	.comm	_ID3DXEffect_Vtbl,4,2           ## @ID3DXEffect_Vtbl
L_.str.1:                               ## @.str.1
	.asciz	"Failed to parse effect, hr %#x.\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d3dx9_effect_init
_d3dx9_effect_init:                     ; @d3dx9_effect_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x7
	mov	x22, x6
	mov	x23, x5
	mov	x20, x4
	mov	x24, x3
	mov	x25, x2
	mov	x26, x1
	mov	x19, x0
	ldp	x27, x28, [x29, #16]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x26
	mov	x3, x25
	mov	x4, x24
	mov	x5, x27
	bl	_TRACE
Lloh2:
	adrp	x8, _ID3DXEffect_Vtbl@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ID3DXEffect_Vtbl@GOTPAGEOFF]
	str	x8, [x19, #48]
	mov	w8, #1
	str	w8, [x19]
	str	x28, [sp, #24]                  ; 8-byte Folded Spill
	cbz	x27, LBB0_2
; %bb.1:
	ldr	x8, [x27]
	ldr	x8, [x8]
	mov	x0, x27
	blr	x8
	mov	x0, x27
	bl	_impl_from_ID3DXEffectPool
	mov	x28, x0
	b	LBB0_3
LBB0_2:
	mov	x28, #0
LBB0_3:
	str	x27, [x19, #40]
	mov	x0, x26
	bl	_IDirect3DDevice9_AddRef
	str	x26, [x19, #32]
	add	x26, x19, #16
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	stp	x28, x8, [sp]
	mov	x0, x26
	mov	x1, x25
	mov	x2, x24
	mov	x3, x20
	mov	x4, x23
	mov	x5, x22
	mov	x6, x21
	mov	x7, x19
	bl	_d3dx9_base_effect_init
	mov	x20, x0
	bl	_FAILED
	cbz	x0, LBB0_5
; %bb.4:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_FIXME
	mov	x0, x19
	bl	_free_effect
	b	LBB0_8
LBB0_5:
	ldr	x8, [x26]
	cbz	x8, LBB0_7
; %bb.6:
	str	x8, [x19, #24]
	str	xzr, [x19, #8]
LBB0_7:
Lloh6:
	adrp	x8, _D3D_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _D3D_OK@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"effect %p, device %p, data %p, data_size %lu, pool %p\n"

	.comm	_ID3DXEffect_Vtbl,4,2           ; @ID3DXEffect_Vtbl
l_.str.1:                               ; @.str.1
	.asciz	"Failed to parse effect, hr %#x.\n"

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