	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d3dx9_create_object
_d3dx9_create_object:                   ## @d3dx9_create_object
	.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	%rsi, %r14
	movq	16(%rsi), %rbx
	movq	(%rdi), %rax
	movq	(%rax), %r12
	movq	8(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_ERR
LBB0_2:
	movl	(%rbx), %eax
	movq	_D3D_OK@GOTPCREL(%rip), %r15
	cmpl	$128, %eax
	je	LBB0_8
## %bb.3:
	cmpl	$130, %eax
	je	LBB0_10
## %bb.4:
	cmpl	$129, %eax
	jne	LBB0_13
## %bb.5:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	12(%r14), %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapAlloc
	movq	8(%rbx), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movl	8(%r14), %esi
	movl	12(%r14), %edx
	movq	%rax, %rdi
	callq	_memcpy
	jmp	LBB0_13
LBB0_8:
	movl	8(%r14), %esi
	movq	8(%rbx), %rdx
	movq	%r12, %rdi
	callq	_IDirect3DDevice9_CreateVertexShader
	movl	%eax, %edi
	callq	_FAILED
	testl	%eax, %eax
	je	LBB0_13
## %bb.9:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_12
LBB0_10:
	movl	8(%r14), %esi
	movq	8(%rbx), %rdx
	movq	%r12, %rdi
	callq	_IDirect3DDevice9_CreatePixelShader
	movl	%eax, %edi
	callq	_FAILED
	testl	%eax, %eax
	je	LBB0_13
## %bb.11:
	leaq	L_.str.3(%rip), %rdi
LBB0_12:
	callq	_WARN
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	jmp	LBB0_13
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	callq	_ERR
	movq	_E_OUTOFMEMORY@GOTPCREL(%rip), %r15
LBB0_13:
	movl	(%r15), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Parameter data already allocated.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Out of memory.\n"

	.comm	_E_OUTOFMEMORY,4,2              ## @E_OUTOFMEMORY
L_.str.2:                               ## @.str.2
	.asciz	"Failed to create vertex shader.\n"

	.comm	_TRUE,8,3                       ## @TRUE
L_.str.3:                               ## @.str.3
	.asciz	"Failed to create pixel shader.\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d3dx9_create_object
_d3dx9_create_object:                   ; @d3dx9_create_object
	.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	x19, x1
	ldr	x21, [x1, #16]
	ldr	x8, [x0]
	ldr	x20, [x8]
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERR
LBB0_2:
	ldr	w8, [x21]
	cmp	w8, #128
	b.eq	LBB0_7
; %bb.3:
	cmp	w8, #130
	b.eq	LBB0_9
; %bb.4:
	cmp	w8, #129
	b.ne	LBB0_12
; %bb.5:
	bl	_GetProcessHeap
	ldr	w2, [x19, #12]
	mov	w1, #0
	bl	_HeapAlloc
	ldr	x8, [x21, #8]
	str	x0, [x8]
	cbz	x0, LBB0_14
; %bb.6:
	ldp	w1, w2, [x19, #8]
	bl	_memcpy
	b	LBB0_12
LBB0_7:
	ldr	w1, [x19, #8]
	ldr	x2, [x21, #8]
	mov	x0, x20
	bl	_IDirect3DDevice9_CreateVertexShader
	bl	_FAILED
	cbz	w0, LBB0_12
; %bb.8:
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_9:
	ldr	w1, [x19, #8]
	ldr	x2, [x21, #8]
	mov	x0, x20
	bl	_IDirect3DDevice9_CreatePixelShader
	bl	_FAILED
	cbz	w0, LBB0_12
; %bb.10:
Lloh4:
	adrp	x0, l_.str.3@PAGE
Lloh5:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_11:
	bl	_WARN
Lloh6:
	adrp	x8, _TRUE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_12:
Lloh9:
	adrp	x8, _D3D_OK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _D3D_OK@GOTPAGEOFF]
LBB0_13:
	ldr	w0, [x8]
	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
LBB0_14:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
Lloh13:
	adrp	x8, _E_OUTOFMEMORY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _E_OUTOFMEMORY@GOTPAGEOFF]
	b	LBB0_13
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Parameter data already allocated.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Out of memory.\n"

	.comm	_E_OUTOFMEMORY,4,2              ; @E_OUTOFMEMORY
l_.str.2:                               ; @.str.2
	.asciz	"Failed to create vertex shader.\n"

	.comm	_TRUE,8,3                       ; @TRUE
l_.str.3:                               ; @.str.3
	.asciz	"Failed to create pixel shader.\n"

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