	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d3d9_texture_acquire_shader_resource_view
_d3d9_texture_acquire_shader_resource_view: ## @d3d9_texture_acquire_shader_resource_view
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$64, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rax
	testq	%rax, %rax
	jne	LBB0_4
## %bb.1:
	movq	%rdi, %rbx
	movl	8(%rdi), %edi
	leaq	-24(%rbp), %rdx
	xorl	%esi, %esi
	callq	_wined3d_texture_get_sub_resource_desc
	movl	-20(%rbp), %eax
	movl	%eax, -32(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -48(%rbp)
	movl	8(%rbx), %edi
	callq	_wined3d_texture_get_level_count
	movl	%eax, -56(%rbp)
	movq	$0, -64(%rbp)
	movq	_WINED3DUSAGE_LEGACY_CUBEMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	andl	-24(%rbp), %eax
	setne	%cl
	leal	(%rcx,%rcx,4), %eax
	incl	%eax
	movl	%eax, -72(%rbp)
	movl	8(%rbx), %edi
	callq	_wined3d_texture_get_resource
	movq	_d3d9_srv_wined3d_parent_ops@GOTPCREL(%rip), %rcx
	leaq	-72(%rbp), %rdi
	movl	%eax, %esi
	movq	%rbx, %rdx
	movq	%rbx, %r8
	callq	_wined3d_shader_resource_view_create
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	callq	_ERR
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_3:
	movq	(%rbx), %rax
LBB0_4:
	addq	$64, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3DUSAGE_LEGACY_CUBEMAP,4,2 ## @WINED3DUSAGE_LEGACY_CUBEMAP
	.comm	_d3d9_srv_wined3d_parent_ops,4,2 ## @d3d9_srv_wined3d_parent_ops
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to create shader resource view, hr %#x.\n"

	.no_dead_strip	_d3d9_texture_acquire_shader_resource_view
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d3d9_texture_acquire_shader_resource_view
_d3d9_texture_acquire_shader_resource_view: ; @d3d9_texture_acquire_shader_resource_view
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x0, [x0]
	cbnz	x0, LBB0_4
; %bb.1:
	ldr	w0, [x19, #8]
	sub	x2, x29, #24
	mov	w1, #0
	bl	_wined3d_texture_get_sub_resource_desc
	ldur	w8, [x29, #-20]
	str	w8, [sp, #48]
	stp	xzr, xzr, [sp, #32]
	ldr	w0, [x19, #8]
	bl	_wined3d_texture_get_level_count
	str	w0, [sp, #24]
	str	xzr, [sp, #16]
	ldur	w8, [x29, #-24]
Lloh0:
	adrp	x9, _WINED3DUSAGE_LEGACY_CUBEMAP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WINED3DUSAGE_LEGACY_CUBEMAP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	mov	w8, #6
	csinc	w8, w8, wzr, ne
	str	w8, [sp, #8]
	ldr	w0, [x19, #8]
	bl	_wined3d_texture_get_resource
	mov	x1, x0
Lloh3:
	adrp	x3, _d3d9_srv_wined3d_parent_ops@GOTPAGE
Lloh4:
	ldr	x3, [x3, _d3d9_srv_wined3d_parent_ops@GOTPAGEOFF]
	add	x0, sp, #8
	mov	x2, x19
	mov	x4, x19
	bl	_wined3d_shader_resource_view_create
	mov	x20, x0
	bl	_FAILED
	cbz	x0, LBB0_3
; %bb.2:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_ERR
	mov	x0, #0
	b	LBB0_4
LBB0_3:
	ldr	x0, [x19]
LBB0_4:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3DUSAGE_LEGACY_CUBEMAP,4,2 ; @WINED3DUSAGE_LEGACY_CUBEMAP
	.comm	_d3d9_srv_wined3d_parent_ops,4,2 ; @d3d9_srv_wined3d_parent_ops
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to create shader resource view, hr %#x.\n"

	.no_dead_strip	_d3d9_texture_acquire_shader_resource_view
.subsections_via_symbols
