	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_volumetexture_init             ## -- Begin function volumetexture_init
	.p2align	4, 0x90
_volumetexture_init:                    ## @volumetexture_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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r15
	movq	%r8, %rbx
	movq	%rcx, %r13
	movq	%rdx, %r14
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movq	_Direct3DVolumeTexture8_Vtbl@GOTPCREL(%rip), %rax
	movq	%rax, 24(%rdi)
	addq	$16, %rdi
	callq	_d3d8_resource_init
	leaq	12(%r12), %rdi
	callq	_list_init
	movq	_WINED3D_RTYPE_TEXTURE_3D@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movl	24(%rbp), %edi
	callq	_wined3dformat_from_d3dformat
	movq	32(%rbp), %rdi
	movl	16(%rbp), %esi
	movl	%eax, -60(%rbp)
	movq	_WINED3D_MULTISAMPLE_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	$0, -72(%rbp)
	movq	_WINED3DUSAGE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%esi, %eax
	movq	_WINED3DUSAGE_TEXTURE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, -120(%rbp)
	movq	_D3DPOOL_SCRATCH@GOTPCREL(%rip), %rcx
	cmpq	%rdi, (%rcx)
	jne	LBB0_2
## %bb.1:
	movq	_WINED3DUSAGE_SCRATCH@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, -120(%rbp)
LBB0_2:
	callq	_wined3daccess_from_d3dpool
	movl	%eax, -80(%rbp)
	movq	%r14, -88(%rbp)
	movq	%r13, -96(%rbp)
	movq	%rbx, -104(%rbp)
	movq	$0, -112(%rbp)
	testq	%r15, %r15
	jne	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_max
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_max
	movq	%rax, %rdi
	callq	_wined3d_log2i
	movq	%rax, %r15
	incq	%r15
LBB0_4:
	xorl	%eax, %eax
	callq	_wined3d_mutex_lock
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	4(%r14), %edi
	leaq	8(%r12), %rax
	subq	$8, %rsp
	movq	_d3d8_texture_wined3d_parent_ops@GOTPCREL(%rip), %rbx
	leaq	-120(%rbp), %rsi
	movl	$1, %edx
	movq	%r15, %rcx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%rax
	pushq	%rbx
	pushq	%r12
	callq	_wined3d_texture_create
	addq	$32, %rsp
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_wined3d_mutex_unlock
	movl	%ebx, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_WARN
	jmp	LBB0_7
LBB0_6:
	movq	%r14, (%r12)
	movq	%r14, %rdi
	callq	_IDirect3DDevice8_AddRef
	movq	_D3D_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Direct3DVolumeTexture8_Vtbl,4,2 ## @Direct3DVolumeTexture8_Vtbl
	.comm	_WINED3D_RTYPE_TEXTURE_3D,4,2   ## @WINED3D_RTYPE_TEXTURE_3D
	.comm	_WINED3D_MULTISAMPLE_NONE,4,2   ## @WINED3D_MULTISAMPLE_NONE
	.comm	_WINED3DUSAGE_MASK,4,2          ## @WINED3DUSAGE_MASK
	.comm	_WINED3DUSAGE_TEXTURE,4,2       ## @WINED3DUSAGE_TEXTURE
	.comm	_D3DPOOL_SCRATCH,8,3            ## @D3DPOOL_SCRATCH
	.comm	_WINED3DUSAGE_SCRATCH,4,2       ## @WINED3DUSAGE_SCRATCH
	.comm	_d3d8_texture_wined3d_parent_ops,4,2 ## @d3d8_texture_wined3d_parent_ops
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to create wined3d volume texture, hr %#x.\n"

	.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	_volumetexture_init             ; -- Begin function volumetexture_init
	.p2align	2
_volumetexture_init:                    ; @volumetexture_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x27, x7
	mov	x25, x6
	mov	x21, x5
	mov	x22, x4
	mov	x23, x3
	mov	x24, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x26, [x29, #16]
Lloh0:
	adrp	x8, _Direct3DVolumeTexture8_Vtbl@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Direct3DVolumeTexture8_Vtbl@GOTPAGEOFF]
	str	x8, [x0, #24]
	add	x0, x0, #16
	bl	_d3d8_resource_init
	add	x0, x20, #12
	bl	_list_init
Lloh2:
	adrp	x8, _WINED3D_RTYPE_TEXTURE_3D@GOTPAGE
Lloh3:
	ldr	x8, [x8, _WINED3D_RTYPE_TEXTURE_3D@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [sp, #72]
	mov	x0, x27
	bl	_wined3dformat_from_d3dformat
Lloh5:
	adrp	x8, _WINED3D_MULTISAMPLE_NONE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WINED3D_MULTISAMPLE_NONE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	stp	w8, w0, [sp, #64]
Lloh8:
	adrp	x8, _WINED3DUSAGE_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _WINED3DUSAGE_MASK@GOTPAGEOFF]
	str	xzr, [sp, #56]
Lloh10:
	ldr	w8, [x8]
	and	w8, w8, w25
Lloh11:
	adrp	x9, _WINED3DUSAGE_TEXTURE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _WINED3DUSAGE_TEXTURE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [sp, #8]
Lloh14:
	adrp	x9, _D3DPOOL_SCRATCH@GOTPAGE
Lloh15:
	ldr	x9, [x9, _D3DPOOL_SCRATCH@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x26
	b.ne	LBB0_2
; %bb.1:
Lloh17:
	adrp	x9, _WINED3DUSAGE_SCRATCH@GOTPAGE
Lloh18:
	ldr	x9, [x9, _WINED3DUSAGE_SCRATCH@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [sp, #8]
LBB0_2:
	mov	x0, x26
	mov	x1, x25
	bl	_wined3daccess_from_d3dpool
	str	w0, [sp, #48]
	stp	x23, x24, [sp, #32]
	stp	xzr, x22, [sp, #16]
	cbnz	x21, LBB0_4
; %bb.3:
	mov	x0, x24
	mov	x1, x23
	bl	_max
	mov	x1, x22
	bl	_max
	bl	_wined3d_log2i
	add	x21, x0, #1
LBB0_4:
	bl	_wined3d_mutex_lock
	ldr	w0, [x19, #4]
	add	x8, x20, #8
	str	x8, [sp]
Lloh20:
	adrp	x7, _d3d8_texture_wined3d_parent_ops@GOTPAGE
Lloh21:
	ldr	x7, [x7, _d3d8_texture_wined3d_parent_ops@GOTPAGEOFF]
	add	x1, sp, #8
	mov	w2, #1
	mov	x3, x21
	mov	w4, #0
	mov	x5, #0
	mov	x6, x20
	bl	_wined3d_texture_create
	mov	x21, x0
	bl	_wined3d_mutex_unlock
	mov	x0, x21
	bl	_FAILED
	cbz	x0, LBB0_6
; %bb.5:
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_WARN
	b	LBB0_7
LBB0_6:
	str	x19, [x20]
	mov	x0, x19
	bl	_IDirect3DDevice8_AddRef
Lloh24:
	adrp	x8, _D3D_OK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _D3D_OK@GOTPAGEOFF]
Lloh26:
	ldr	w21, [x8]
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_Direct3DVolumeTexture8_Vtbl,4,2 ; @Direct3DVolumeTexture8_Vtbl
	.comm	_WINED3D_RTYPE_TEXTURE_3D,4,2   ; @WINED3D_RTYPE_TEXTURE_3D
	.comm	_WINED3D_MULTISAMPLE_NONE,4,2   ; @WINED3D_MULTISAMPLE_NONE
	.comm	_WINED3DUSAGE_MASK,4,2          ; @WINED3DUSAGE_MASK
	.comm	_WINED3DUSAGE_TEXTURE,4,2       ; @WINED3DUSAGE_TEXTURE
	.comm	_D3DPOOL_SCRATCH,8,3            ; @D3DPOOL_SCRATCH
	.comm	_WINED3DUSAGE_SCRATCH,4,2       ; @WINED3DUSAGE_SCRATCH
	.comm	_d3d8_texture_wined3d_parent_ops,4,2 ; @d3d8_texture_wined3d_parent_ops
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to create wined3d volume texture, hr %#x.\n"

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