	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_load_volume_from_dds           ## -- Begin function load_volume_from_dds
	.p2align	4, 0x90
_load_volume_from_dds:                  ## @load_volume_from_dds
	.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
                                        ## kill: def $r9d killed $r9d def $r9
	movq	%rcx, %rbx
	movq	24(%rbp), %r15
	movq	(%r15), %rax
	movq	_D3DRTYPE_VOLUMETEXTURE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movl	16(%r15), %esi
	movl	8(%r15), %edi
	movl	12(%r15), %edx
	leaq	-48(%rbp), %rcx
	leaq	-44(%rbp), %r8
	callq	_calculate_dds_surface_size
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_E_NOTIMPL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_5
LBB0_1:
	movq	_D3DXERR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_5
LBB0_4:
	movl	16(%rbp), %r10d
	addq	$4, %rbx
	movl	8(%r15), %r8d
	movl	-48(%rbp), %r9d
	movl	-44(%rbp), %eax
	subq	$8, %rsp
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	movq	%rbx, %rcx
	pushq	%r10
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	pushq	$0
	pushq	%rax
	callq	_D3DXLoadVolumeFromMemory
	addq	$48, %rsp
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_D3DRTYPE_VOLUMETEXTURE,8,3     ## @D3DRTYPE_VOLUMETEXTURE
	.comm	_D3DXERR_INVALIDDATA,4,2        ## @D3DXERR_INVALIDDATA
	.comm	_E_NOTIMPL,4,2                  ## @E_NOTIMPL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_load_volume_from_dds           ; -- Begin function load_volume_from_dds
	.p2align	2
_load_volume_from_dds:                  ; @load_volume_from_dds
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	ldr	x8, [x7]
Lloh0:
	adrp	x9, _D3DRTYPE_VOLUMETEXTURE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _D3DRTYPE_VOLUMETEXTURE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	mov	x25, x7
	mov	x23, x6
	mov	x22, x5
	mov	x21, x4
	mov	x26, x3
	mov	x19, x2
	mov	x20, x1
	mov	x24, x0
	ldp	w2, w1, [x7, #12]
	ldr	w0, [x7, #8]
	add	x3, sp, #28
	add	x4, sp, #24
	bl	_calculate_dds_surface_size
	bl	_FAILED
	cbz	x0, LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _E_NOTIMPL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _E_NOTIMPL@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_3:
Lloh6:
	adrp	x8, _D3DXERR_INVALIDDATA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _D3DXERR_INVALIDDATA@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_4:
	add	x3, x26, #4
	ldr	w4, [x25, #8]
	ldp	w6, w5, [sp, #24]
	stp	w22, w23, [sp, #8]
	str	x21, [sp]
	mov	x0, x24
	mov	x1, x20
	mov	x2, x19
	mov	x7, #0
	bl	_D3DXLoadVolumeFromMemory
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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_D3DRTYPE_VOLUMETEXTURE,8,3     ; @D3DRTYPE_VOLUMETEXTURE
	.comm	_D3DXERR_INVALIDDATA,4,2        ; @D3DXERR_INVALIDDATA
	.comm	_E_NOTIMPL,4,2                  ; @E_NOTIMPL
.subsections_via_symbols
