	.file	"extr_surface.c_d3d8_surface_acquire_rendertarget_view.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Failed to create rendertarget view, hr %#x.\n"
	.text
	.p2align 4
	.globl	d3d8_surface_acquire_rendertarget_view
	.type	d3d8_surface_acquire_rendertarget_view, @function
d3d8_surface_acquire_rendertarget_view:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	lea	rbp, 24[rdi]
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	mov	rdi, rbp
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	d3d8_surface_AddRef@PLT
	mov	r12, QWORD PTR [rbx]
	test	r12, r12
	je	.L10
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	edi, DWORD PTR 32[rbx]
	mov	esi, DWORD PTR 28[rbx]
	mov	r8, rbx
	lea	rcx, d3d8_view_wined3d_parent_ops[rip]
	mov	rdx, rbx
	call	wined3d_rendertarget_view_create_from_sub_resource@PLT
	mov	edi, eax
	mov	r13d, eax
	call	FAILED@PLT
	test	rax, rax
	jne	.L11
	mov	rdi, QWORD PTR 16[rbx]
	test	rdi, rdi
	je	.L4
	lea	rsi, 8[rbx]
	call	list_add_head@PLT
.L4:
	mov	r12, QWORD PTR [rbx]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	mov	rax, r12
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	esi, r13d
	lea	rdi, .LC0[rip]
	call	ERR@PLT
	mov	rdi, rbp
	call	d3d8_surface_Release@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	d3d8_surface_acquire_rendertarget_view, .-d3d8_surface_acquire_rendertarget_view
	.comm	d3d8_view_wined3d_parent_ops,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_surface.c_d3d8_surface_acquire_rendertarget_view.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Failed to create rendertarget view, hr %#x.\012\000"
	.text
	.align	2
	.global	d3d8_surface_acquire_rendertarget_view
	.syntax unified
	.arm
	.fpu softvfp
	.type	d3d8_surface_acquire_rendertarget_view, %function
d3d8_surface_acquire_rendertarget_view:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r4, r0
	add	r6, r0, #12
	mov	r0, r6
	sub	sp, sp, #12
	bl	d3d8_surface_AddRef
	ldr	r5, [r4]
	cmp	r5, #0
	beq	.L10
.L1:
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L10:
	str	r4, [sp]
	mov	r2, r4
	ldr	r3, .L12
	ldr	r1, [r4, #16]
	ldr	r0, [r4, #20]
	bl	wined3d_rendertarget_view_create_from_sub_resource
	mov	r7, r0
	bl	FAILED
	cmp	r0, #0
	bne	.L11
	ldr	r0, [r4, #8]
	cmp	r0, #0
	beq	.L4
	add	r1, r4, #4
	bl	list_add_head
.L4:
	ldr	r5, [r4]
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L11:
	mov	r1, r7
	ldr	r0, .L12+4
	bl	ERR
	mov	r0, r6
	bl	d3d8_surface_Release
	b	.L1
.L13:
	.align	2
.L12:
	.word	d3d8_view_wined3d_parent_ops
	.word	.LC0
	.size	d3d8_surface_acquire_rendertarget_view, .-d3d8_surface_acquire_rendertarget_view
	.comm	d3d8_view_wined3d_parent_ops,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
