	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_d3d9_surface_acquire_rendertarget_view ## -- Begin function d3d9_surface_acquire_rendertarget_view
	.p2align	4, 0x90
_d3d9_surface_acquire_rendertarget_view: ## @d3d9_surface_acquire_rendertarget_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	24(%rdi), %r14
	movq	%r14, %rdi
	callq	_d3d9_surface_AddRef
	movq	(%rbx), %rax
	testq	%rax, %rax
	jne	LBB0_6
## %bb.1:
	movl	28(%rbx), %esi
	movl	32(%rbx), %edi
	movq	_d3d9_view_wined3d_parent_ops@GOTPCREL(%rip), %rcx
	movq	%rbx, %rdx
	movq	%rbx, %r8
	callq	_wined3d_rendertarget_view_create_from_sub_resource
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	callq	_ERR
	movq	%r14, %rdi
	callq	_d3d9_surface_Release
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_3:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	leaq	8(%rbx), %rsi
	callq	_list_add_head
LBB0_5:
	movq	(%rbx), %rax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_d3d9_view_wined3d_parent_ops,4,2 ## @d3d9_view_wined3d_parent_ops
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to create rendertarget view, hr %#x.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_d3d9_surface_acquire_rendertarget_view ; -- Begin function d3d9_surface_acquire_rendertarget_view
	.p2align	2
_d3d9_surface_acquire_rendertarget_view: ; @d3d9_surface_acquire_rendertarget_view
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	add	x20, x0, #24
	mov	x0, x20
	bl	_d3d9_surface_AddRef
	ldr	x0, [x19]
	cbnz	x0, LBB0_6
; %bb.1:
	ldp	w1, w0, [x19, #28]
Lloh0:
	adrp	x3, _d3d9_view_wined3d_parent_ops@GOTPAGE
Lloh1:
	ldr	x3, [x3, _d3d9_view_wined3d_parent_ops@GOTPAGEOFF]
	mov	x2, x19
	mov	x4, x19
	bl	_wined3d_rendertarget_view_create_from_sub_resource
	mov	x21, x0
	bl	_FAILED
	cbz	x0, LBB0_3
; %bb.2:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_ERR
	mov	x0, x20
	bl	_d3d9_surface_Release
	mov	x0, #0
	b	LBB0_6
LBB0_3:
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_5
; %bb.4:
	add	x1, x19, #8
	bl	_list_add_head
LBB0_5:
	ldr	x0, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_d3d9_view_wined3d_parent_ops,4,2 ; @d3d9_view_wined3d_parent_ops
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to create rendertarget view, hr %#x.\n"

.subsections_via_symbols
