	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d3dx9_base_effect_get_texture
_d3dx9_base_effect_get_texture:         ## @d3dx9_base_effect_get_texture
	.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	%rdx, %rbx
	callq	_get_valid_parameter
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.1:
	testq	%rax, %rax
	je	LBB0_12
## %bb.2:
	cmpl	$0, 16(%rax)
	jne	LBB0_12
## %bb.3:
	movq	(%rax), %rcx
	movq	_D3DXPT_TEXTURE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_8
## %bb.4:
	movq	_D3DXPT_TEXTURE1D@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_8
## %bb.5:
	movq	_D3DXPT_TEXTURE2D@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_8
## %bb.6:
	movq	_D3DXPT_TEXTURE3D@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_8
## %bb.7:
	movq	_D3DXPT_TEXTURECUBE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_8
LBB0_12:
	leaq	L_.str.1(%rip), %rdi
	callq	_WARN
	movq	_D3DERR_INVALIDCALL@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_8:
	movq	8(%rax), %rax
	movq	(%rax), %rdi
	movq	%rdi, (%rbx)
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.10:
	callq	_IDirect3DBaseTexture9_AddRef
	movq	(%rbx), %rsi
	jmp	LBB0_11
LBB0_9:
	xorl	%esi, %esi
LBB0_11:
	leaq	L_.str(%rip), %rdi
	callq	_TRACE
	movq	_D3D_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_D3DXPT_TEXTURE,8,3             ## @D3DXPT_TEXTURE
	.comm	_D3DXPT_TEXTURE1D,8,3           ## @D3DXPT_TEXTURE1D
	.comm	_D3DXPT_TEXTURE2D,8,3           ## @D3DXPT_TEXTURE2D
	.comm	_D3DXPT_TEXTURE3D,8,3           ## @D3DXPT_TEXTURE3D
	.comm	_D3DXPT_TEXTURECUBE,8,3         ## @D3DXPT_TEXTURECUBE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Returning %p\n"

	.comm	_D3D_OK,4,2                     ## @D3D_OK
L_.str.1:                               ## @.str.1
	.asciz	"Parameter not found.\n"

	.comm	_D3DERR_INVALIDCALL,4,2         ## @D3DERR_INVALIDCALL
	.no_dead_strip	_d3dx9_base_effect_get_texture
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d3dx9_base_effect_get_texture
_d3dx9_base_effect_get_texture:         ; @d3dx9_base_effect_get_texture
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	bl	_get_valid_parameter
	cbz	x19, LBB0_6
; %bb.1:
	cbz	x0, LBB0_6
; %bb.2:
	ldr	w8, [x0, #16]
	cbnz	w8, LBB0_6
; %bb.3:
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _D3DXPT_TEXTURE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _D3DXPT_TEXTURE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _D3DXPT_TEXTURE1D@GOTPAGE
Lloh4:
	ldr	x10, [x10, _D3DXPT_TEXTURE1D@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
Lloh6:
	adrp	x11, _D3DXPT_TEXTURE2D@GOTPAGE
Lloh7:
	ldr	x11, [x11, _D3DXPT_TEXTURE2D@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
Lloh9:
	adrp	x12, _D3DXPT_TEXTURE3D@GOTPAGE
Lloh10:
	ldr	x12, [x12, _D3DXPT_TEXTURE3D@GOTPAGEOFF]
Lloh11:
	ldr	x12, [x12]
Lloh12:
	adrp	x13, _D3DXPT_TEXTURECUBE@GOTPAGE
Lloh13:
	ldr	x13, [x13, _D3DXPT_TEXTURECUBE@GOTPAGEOFF]
Lloh14:
	ldr	x13, [x13]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	ccmp	x8, x11, #4, ne
	ccmp	x8, x12, #4, ne
	ccmp	x8, x13, #4, ne
	b.ne	LBB0_6
; %bb.4:
	ldr	x8, [x0, #8]
	ldr	x0, [x8]
	str	x0, [x19]
	cbz	x0, LBB0_8
; %bb.5:
	bl	_IDirect3DBaseTexture9_AddRef
	ldr	x1, [x19]
	b	LBB0_9
LBB0_6:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_WARN
Lloh17:
	adrp	x8, _D3DERR_INVALIDCALL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _D3DERR_INVALIDCALL@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	x1, #0
LBB0_9:
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
Lloh21:
	adrp	x8, _D3D_OK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _D3D_OK@GOTPAGEOFF]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_D3DXPT_TEXTURE,8,3             ; @D3DXPT_TEXTURE
	.comm	_D3DXPT_TEXTURE1D,8,3           ; @D3DXPT_TEXTURE1D
	.comm	_D3DXPT_TEXTURE2D,8,3           ; @D3DXPT_TEXTURE2D
	.comm	_D3DXPT_TEXTURE3D,8,3           ; @D3DXPT_TEXTURE3D
	.comm	_D3DXPT_TEXTURECUBE,8,3         ; @D3DXPT_TEXTURECUBE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Returning %p\n"

	.comm	_D3D_OK,4,2                     ; @D3D_OK
l_.str.1:                               ; @.str.1
	.asciz	"Parameter not found.\n"

	.comm	_D3DERR_INVALIDCALL,4,2         ; @D3DERR_INVALIDCALL
	.no_dead_strip	_d3dx9_base_effect_get_texture
.subsections_via_symbols
