	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CreateD3D9MipMap               ## -- Begin function CreateD3D9MipMap
	.p2align	4, 0x90
_CreateD3D9MipMap:                      ## @CreateD3D9MipMap
	.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
	movl	%r9d, %r15d
	movl	%r8d, %ebx
	movq	%rcx, %r14
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r13
	leaq	-48(%rbp), %rdi
	movl	$4, %esi
	callq	_AlignedAlloc
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_DPRINT1
	movq	_E_OUTOFMEMORY@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	movl	16(%rbp), %r9d
	movq	-48(%rbp), %rdi
	addq	$36, %rdi
	movq	_RT_EXTERNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_D3D9MipMap_Vtbl@GOTPCREL(%rip), %rsi
	movl	%ebx, %edx
	movq	%r14, %rcx
	movl	%r15d, %r8d
	pushq	%rax
	pushq	%r13
	callq	_InitDirect3DBaseTexture9
	addq	$16, %rsp
	movq	-48(%rbp), %rax
	movq	_D3D9MipMap_Vtbl@GOTPCREL(%rip), %rcx
	movq	%rcx, (%rax)
	movq	-48(%rbp), %rax
	movl	%ebx, 32(%rax)
	movq	%r12, 24(%rax)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, 16(%rax)
	movl	%r15d, 8(%rax)
	movq	24(%rbp), %rcx
	movq	%rax, (%rcx)
	movq	_D3D_OK@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %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	"Could not create D3D9MipMap"

	.comm	_E_OUTOFMEMORY,4,2              ## @E_OUTOFMEMORY
	.comm	_D3D9MipMap_Vtbl,4,2            ## @D3D9MipMap_Vtbl
	.comm	_RT_EXTERNAL,4,2                ## @RT_EXTERNAL
	.comm	_UNIMPLEMENTED,4,2              ## @UNIMPLEMENTED
	.comm	_D3D_OK,4,2                     ## @D3D_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CreateD3D9MipMap               ; -- Begin function CreateD3D9MipMap
	.p2align	2
_CreateD3D9MipMap:                      ; @CreateD3D9MipMap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x7
	mov	x24, x6
	mov	x20, x5
	mov	x22, x4
	mov	x26, x3
	mov	x21, x2
	mov	x23, x1
	mov	x25, x0
	add	x0, sp, #8
	mov	w1, #4
	bl	_AlignedAlloc
	bl	_FAILED
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPRINT1
Lloh2:
	adrp	x8, _E_OUTOFMEMORY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _E_OUTOFMEMORY@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
	ldr	x8, [sp, #8]
	add	x0, x8, #36
Lloh4:
	adrp	x8, _RT_EXTERNAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _RT_EXTERNAL@GOTPAGEOFF]
Lloh6:
	ldr	w7, [x8]
Lloh7:
	adrp	x27, _D3D9MipMap_Vtbl@GOTPAGE
Lloh8:
	ldr	x27, [x27, _D3D9MipMap_Vtbl@GOTPAGEOFF]
	mov	x1, x27
	mov	x2, x22
	mov	x3, x26
	mov	x4, x20
	mov	x5, x24
	mov	x6, x25
	bl	_InitDirect3DBaseTexture9
	ldr	x8, [sp, #8]
	str	x27, [x8]
	ldr	x8, [sp, #8]
	str	w22, [x8, #32]
	stp	x21, x23, [x8, #16]
	str	w20, [x8, #8]
	str	x8, [x19]
Lloh9:
	adrp	x8, _D3D_OK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _D3D_OK@GOTPAGEOFF]
LBB0_3:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not create D3D9MipMap"

	.comm	_E_OUTOFMEMORY,4,2              ; @E_OUTOFMEMORY
	.comm	_D3D9MipMap_Vtbl,4,2            ; @D3D9MipMap_Vtbl
	.comm	_RT_EXTERNAL,4,2                ; @RT_EXTERNAL
	.comm	_UNIMPLEMENTED,4,2              ; @UNIMPLEMENTED
	.comm	_D3D_OK,4,2                     ; @D3D_OK
.subsections_via_symbols
