	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function texture3d_prepare_texture
_texture3d_prepare_texture:             ## @texture3d_prepare_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	%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
	movq	%rdi, %rbx
	movq	8(%rdi), %r12
	xorl	%eax, %eax
	testq	%rdx, %rdx
	setne	%al
	movl	8(%r12,%rax,4), %r14d
	movl	4(%rdi), %r13d
	imull	(%rdi), %r13d
	movq	(%rsi), %r15
	callq	_wined3d_texture_bind_and_dirtify
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_wined3d_texture_use_immutable_storage
	testq	%rax, %rax
	je	LBB0_1
## %bb.5:
	movq	_GL_TEXTURE_3D@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	(%rbx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_wined3d_texture_get_level_width
	movl	%eax, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_wined3d_texture_get_level_height
	movl	%eax, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_wined3d_texture_get_level_depth
	movl	%r13d, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r14d, %edx
	movl	%r15d, %ecx
	movl	%r12d, %r8d
	movl	%eax, %r9d
	callq	_glTexStorage3D
	movl	%eax, %edi
	callq	_GL_EXTCALL
	leaq	L_.str(%rip), %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_checkGLcall                    ## TAILCALL
LBB0_1:
	testl	%r13d, %r13d
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.2:
	movl	%r14d, %r15d
	movq	%rbx, %r12
	xorl	%ebx, %ebx
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %r15d
	movq	_GL_TEXTURE_3D@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_wined3d_texture_get_level_width
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_wined3d_texture_get_level_height
	movl	%eax, %r14d
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_wined3d_texture_get_level_depth
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %r10d
	movl	4(%rcx), %r11d
	movl	%r13d, %edi
	movl	%r15d, %r13d
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	%ebx, %esi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%r14d, %r8d
	movl	%eax, %r9d
	pushq	$0
	pushq	%r10
	pushq	%r11
	pushq	$0
	callq	_glTexImage3D
	addq	$32, %rsp
	movl	%eax, %edi
	callq	_GL_EXTCALL
	leaq	L_.str.1(%rip), %rdi
	callq	_checkGLcall
	incl	%ebx
	cmpl	%ebx, %r15d
	jne	LBB0_3
LBB0_4:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GL_TEXTURE_3D,4,2              ## @GL_TEXTURE_3D
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"glTexStorage3D"

L_.str.1:                               ## @.str.1
	.asciz	"glTexImage3D"

	.no_dead_strip	_texture3d_prepare_texture
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function texture3d_prepare_texture
_texture3d_prepare_texture:             ; @texture3d_prepare_texture
	.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	x20, x0
	ldr	x26, [x0, #8]
	mov	w8, #12
	mov	w9, #8
	cmp	x2, #0
	csel	x8, x9, x8, eq
	ldr	w19, [x26, x8]
	ldp	w22, w23, [x0]
	ldr	x21, [x1]
	bl	_wined3d_texture_bind_and_dirtify
	mov	x0, x20
	mov	x1, x21
	bl	_wined3d_texture_use_immutable_storage
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _GL_TEXTURE_3D@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GL_TEXTURE_3D@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	ldr	w22, [x20]
	mov	x0, x20
	mov	w1, #0
	bl	_wined3d_texture_get_level_width
	mov	x23, x0
	mov	x0, x20
	mov	w1, #0
	bl	_wined3d_texture_get_level_height
	mov	x24, x0
	mov	x0, x20
	mov	w1, #0
	bl	_wined3d_texture_get_level_depth
	mov	x5, x0
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	mov	x3, x23
	mov	x4, x24
	bl	_glTexStorage3D
	bl	_GL_EXTCALL
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	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
	b	_checkGLcall
LBB0_2:
	mul	w27, w23, w22
	cbz	w27, LBB0_5
; %bb.3:
	mov	w21, #0
Lloh5:
	adrp	x28, _GL_TEXTURE_3D@GOTPAGE
Lloh6:
	ldr	x28, [x28, _GL_TEXTURE_3D@GOTPAGEOFF]
Lloh7:
	adrp	x22, l_.str.1@PAGE
Lloh8:
	add	x22, x22, l_.str.1@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w23, [x28]
	mov	x0, x20
	mov	x1, x21
	bl	_wined3d_texture_get_level_width
	mov	x24, x0
	mov	x0, x20
	mov	x1, x21
	bl	_wined3d_texture_get_level_height
	mov	x25, x0
	mov	x0, x20
	mov	x1, x21
	bl	_wined3d_texture_get_level_depth
	mov	x5, x0
	ldp	w8, w7, [x26]
	str	xzr, [sp, #8]
	str	w8, [sp]
	mov	x0, x23
	mov	x1, x21
	mov	x2, x19
	mov	x3, x24
	mov	x4, x25
	mov	w6, #0
	bl	_glTexImage3D
	bl	_GL_EXTCALL
	mov	x0, x22
	bl	_checkGLcall
	add	w21, w21, #1
	cmp	w27, w21
	b.ne	LBB0_4
LBB0_5:
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_GL_TEXTURE_3D,4,2              ; @GL_TEXTURE_3D
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"glTexStorage3D"

l_.str.1:                               ; @.str.1
	.asciz	"glTexImage3D"

	.no_dead_strip	_texture3d_prepare_texture
.subsections_via_symbols
