	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_d3d9_texture_new               ## -- Begin function d3d9_texture_new
	.p2align	4, 0x90
_d3d9_texture_new:                      ## @d3d9_texture_new
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	$0, -16(%rbp)
	testq	%rsi, %rsi
	jne	LBB0_6
## %bb.2:
	movl	72(%rbp), %eax
	movq	24(%rbp), %r11
	movq	16(%rbp), %r10
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	_D3DUSAGE_AUTOGENMIPMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_4:
	orl	%r9d, %eax
	subq	$8, %rsp
	leaq	-16(%rbp), %rbx
                                        ## kill: def $edi killed $edi killed $rdi
	movl	%edx, %esi
	movl	%ecx, %edx
	movl	%r8d, %ecx
	movl	%eax, %r8d
	movl	%r10d, %r9d
	pushq	$0
	pushq	%rbx
	pushq	%r11
	callq	_IDirect3DDevice9_CreateTexture
	addq	$32, %rsp
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	-16(%rbp), %rax
	jmp	LBB0_7
LBB0_6:
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_D3DUSAGE_AUTOGENMIPMAP,4,2     ## @D3DUSAGE_AUTOGENMIPMAP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_d3d9_texture_new               ; -- Begin function d3d9_texture_new
	.p2align	2
_d3d9_texture_new:                      ; @d3d9_texture_new
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	mov	x9, #0
	str	xzr, [sp, #8]
	cbnz	x1, LBB0_2
; %bb.1:
	mov	x8, x7
	ldr	w9, [x29, #48]
Lloh0:
	adrp	x10, _D3DUSAGE_AUTOGENMIPMAP@GOTPAGE
Lloh1:
	ldr	x10, [x10, _D3DUSAGE_AUTOGENMIPMAP@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	cmp	w9, #0
	csel	w9, wzr, w10, eq
	orr	w9, w9, w5
	str	xzr, [sp]
	add	x7, sp, #8
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	x1, x2
	mov	x2, x3
	mov	x3, x4
	mov	x4, x9
	mov	x5, x6
	mov	x6, x8
	bl	_IDirect3DDevice9_CreateTexture
	bl	_FAILED
	ldr	x8, [sp, #8]
	cmp	x0, #0
	csel	x9, x8, xzr, eq
LBB0_2:
	mov	x0, x9
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_D3DUSAGE_AUTOGENMIPMAP,4,2     ; @D3DUSAGE_AUTOGENMIPMAP
.subsections_via_symbols
