	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cubetexture_init               ## -- Begin function cubetexture_init
	.p2align	4, 0x90
_cubetexture_init:                      ## @cubetexture_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r14d
	movl	%r8d, %r13d
	movq	%rcx, %r15
	movq	%rdx, %rbx
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movq	_Direct3DCubeTexture8_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_2D@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movl	%r14d, %edi
	movq	16(%rbp), %r14
	callq	_wined3dformat_from_d3dformat
	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	%r13d, %eax
	movq	_WINED3DUSAGE_LEGACY_CUBEMAP@GOTPCREL(%rip), %rcx
	movq	_WINED3DUSAGE_TEXTURE@GOTPCREL(%rip), %rdx
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	movl	%eax, -112(%rbp)
	movq	_D3DPOOL_SCRATCH@GOTPCREL(%rip), %rcx
	cmpq	%r14, (%rcx)
	jne	LBB0_2
## %bb.1:
	movq	_WINED3DUSAGE_SCRATCH@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, -112(%rbp)
LBB0_2:
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_wined3daccess_from_d3dpool
	movq	_WINED3D_RESOURCE_ACCESS_MAP_R@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_WINED3D_RESOURCE_ACCESS_MAP_W@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, -108(%rbp)
	movq	%rbx, -80(%rbp)
	movq	%rbx, -88(%rbp)
	movl	$1, -104(%rbp)
	movq	$0, -96(%rbp)
	movq	_D3DPOOL_DEFAULT@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jne	LBB0_5
## %bb.3:
	movq	_D3DUSAGE_DYNAMIC@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_4
LBB0_5:
	movq	_WINED3D_TEXTURE_CREATE_MAPPABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_6
LBB0_4:
	xorl	%r14d, %r14d
LBB0_6:
	testq	%r15, %r15
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	jne	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_wined3d_log2i
	movq	%rax, %r15
	incq	%r15
LBB0_8:
	xorl	%eax, %eax
	callq	_wined3d_mutex_lock
	movl	4(%r13), %edi
	leaq	8(%r12), %rax
	subq	$8, %rsp
	movq	_d3d8_texture_wined3d_parent_ops@GOTPCREL(%rip), %rbx
	leaq	-112(%rbp), %rsi
	movl	$6, %edx
	movq	%r15, %rcx
	movl	%r14d, %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_10
## %bb.9:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_WARN
	jmp	LBB0_11
LBB0_10:
	movq	%r13, (%r12)
	movq	%r13, %rdi
	callq	_IDirect3DDevice8_AddRef
	movq	_D3D_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Direct3DCubeTexture8_Vtbl,4,2  ## @Direct3DCubeTexture8_Vtbl
	.comm	_WINED3D_RTYPE_TEXTURE_2D,4,2   ## @WINED3D_RTYPE_TEXTURE_2D
	.comm	_WINED3D_MULTISAMPLE_NONE,4,2   ## @WINED3D_MULTISAMPLE_NONE
	.comm	_WINED3DUSAGE_MASK,4,2          ## @WINED3DUSAGE_MASK
	.comm	_WINED3DUSAGE_LEGACY_CUBEMAP,4,2 ## @WINED3DUSAGE_LEGACY_CUBEMAP
	.comm	_WINED3DUSAGE_TEXTURE,4,2       ## @WINED3DUSAGE_TEXTURE
	.comm	_D3DPOOL_SCRATCH,8,3            ## @D3DPOOL_SCRATCH
	.comm	_WINED3DUSAGE_SCRATCH,4,2       ## @WINED3DUSAGE_SCRATCH
	.comm	_WINED3D_RESOURCE_ACCESS_MAP_R,4,2 ## @WINED3D_RESOURCE_ACCESS_MAP_R
	.comm	_WINED3D_RESOURCE_ACCESS_MAP_W,4,2 ## @WINED3D_RESOURCE_ACCESS_MAP_W
	.comm	_D3DPOOL_DEFAULT,8,3            ## @D3DPOOL_DEFAULT
	.comm	_D3DUSAGE_DYNAMIC,4,2           ## @D3DUSAGE_DYNAMIC
	.comm	_WINED3D_TEXTURE_CREATE_MAPPABLE,4,2 ## @WINED3D_TEXTURE_CREATE_MAPPABLE
	.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 cube 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	_cubetexture_init               ; -- Begin function cubetexture_init
	.p2align	2
_cubetexture_init:                      ; @cubetexture_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	mov	x24, x6
	mov	x25, x5
	mov	x23, x4
	mov	x21, x3
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _Direct3DCubeTexture8_Vtbl@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Direct3DCubeTexture8_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_2D@GOTPAGE
Lloh3:
	ldr	x8, [x8, _WINED3D_RTYPE_TEXTURE_2D@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [sp, #72]
	mov	x0, x25
	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]
	str	xzr, [sp, #56]
Lloh8:
	adrp	x8, _WINED3DUSAGE_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _WINED3DUSAGE_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _WINED3DUSAGE_LEGACY_CUBEMAP@GOTPAGE
Lloh12:
	ldr	x9, [x9, _WINED3DUSAGE_LEGACY_CUBEMAP@GOTPAGEOFF]
	and	w8, w8, w23
Lloh13:
	ldr	w9, [x9]
Lloh14:
	adrp	x10, _WINED3DUSAGE_TEXTURE@GOTPAGE
Lloh15:
	ldr	x10, [x10, _WINED3DUSAGE_TEXTURE@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	orr	w8, w9, w8
	orr	w8, w8, w10
	str	w8, [sp, #16]
Lloh17:
	adrp	x9, _D3DPOOL_SCRATCH@GOTPAGE
Lloh18:
	ldr	x9, [x9, _D3DPOOL_SCRATCH@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x24
	b.ne	LBB0_2
; %bb.1:
Lloh20:
	adrp	x9, _WINED3DUSAGE_SCRATCH@GOTPAGE
Lloh21:
	ldr	x9, [x9, _WINED3DUSAGE_SCRATCH@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [sp, #16]
LBB0_2:
	mov	x0, x24
	mov	x1, x23
	bl	_wined3daccess_from_d3dpool
Lloh23:
	adrp	x8, _WINED3D_RESOURCE_ACCESS_MAP_R@GOTPAGE
Lloh24:
	ldr	x8, [x8, _WINED3D_RESOURCE_ACCESS_MAP_R@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh26:
	adrp	x9, _WINED3D_RESOURCE_ACCESS_MAP_W@GOTPAGE
Lloh27:
	ldr	x9, [x9, _WINED3D_RESOURCE_ACCESS_MAP_W@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w8, w8, w9
	stp	x22, x22, [sp, #40]
	mov	w9, #1
	stp	w8, w9, [sp, #20]
	str	xzr, [sp, #32]
Lloh29:
	adrp	x8, _D3DPOOL_DEFAULT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _D3DPOOL_DEFAULT@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	cmp	x8, x24
	b.ne	LBB0_4
; %bb.3:
Lloh32:
	adrp	x8, _D3DUSAGE_DYNAMIC@GOTPAGE
Lloh33:
	ldr	x8, [x8, _D3DUSAGE_DYNAMIC@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_10
LBB0_4:
Lloh35:
	adrp	x8, _WINED3D_TEXTURE_CREATE_MAPPABLE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _WINED3D_TEXTURE_CREATE_MAPPABLE@GOTPAGEOFF]
Lloh37:
	ldr	w23, [x8]
	cbnz	x21, LBB0_6
LBB0_5:
	mov	x0, x22
	bl	_wined3d_log2i
	add	x21, x0, #1
LBB0_6:
	bl	_wined3d_mutex_lock
	ldr	w0, [x19, #4]
	add	x8, x20, #8
	str	x8, [sp]
Lloh38:
	adrp	x7, _d3d8_texture_wined3d_parent_ops@GOTPAGE
Lloh39:
	ldr	x7, [x7, _d3d8_texture_wined3d_parent_ops@GOTPAGEOFF]
	add	x1, sp, #16
	mov	w2, #6
	mov	x3, x21
	mov	x4, x23
	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_8
; %bb.7:
Lloh40:
	adrp	x0, l_.str@PAGE
Lloh41:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_WARN
	b	LBB0_9
LBB0_8:
	str	x19, [x20]
	mov	x0, x19
	bl	_IDirect3DDevice8_AddRef
Lloh42:
	adrp	x8, _D3D_OK@GOTPAGE
Lloh43:
	ldr	x8, [x8, _D3D_OK@GOTPAGEOFF]
Lloh44:
	ldr	w21, [x8]
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_10:
	mov	w23, #0
	cbnz	x21, LBB0_6
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.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	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_Direct3DCubeTexture8_Vtbl,4,2  ; @Direct3DCubeTexture8_Vtbl
	.comm	_WINED3D_RTYPE_TEXTURE_2D,4,2   ; @WINED3D_RTYPE_TEXTURE_2D
	.comm	_WINED3D_MULTISAMPLE_NONE,4,2   ; @WINED3D_MULTISAMPLE_NONE
	.comm	_WINED3DUSAGE_MASK,4,2          ; @WINED3DUSAGE_MASK
	.comm	_WINED3DUSAGE_LEGACY_CUBEMAP,4,2 ; @WINED3DUSAGE_LEGACY_CUBEMAP
	.comm	_WINED3DUSAGE_TEXTURE,4,2       ; @WINED3DUSAGE_TEXTURE
	.comm	_D3DPOOL_SCRATCH,8,3            ; @D3DPOOL_SCRATCH
	.comm	_WINED3DUSAGE_SCRATCH,4,2       ; @WINED3DUSAGE_SCRATCH
	.comm	_WINED3D_RESOURCE_ACCESS_MAP_R,4,2 ; @WINED3D_RESOURCE_ACCESS_MAP_R
	.comm	_WINED3D_RESOURCE_ACCESS_MAP_W,4,2 ; @WINED3D_RESOURCE_ACCESS_MAP_W
	.comm	_D3DPOOL_DEFAULT,8,3            ; @D3DPOOL_DEFAULT
	.comm	_D3DUSAGE_DYNAMIC,4,2           ; @D3DUSAGE_DYNAMIC
	.comm	_WINED3D_TEXTURE_CREATE_MAPPABLE,4,2 ; @WINED3D_TEXTURE_CREATE_MAPPABLE
	.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 cube texture, hr %#x.\n"

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