	.file	"extr_buffer.c_buffer_destroy_buffer_object.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Deleting buffer object for buffer %p, disabling transform feedback.\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"glDeleteBuffers"
	.text
	.p2align 4
	.type	buffer_destroy_buffer_object, @function
buffer_destroy_buffer_object:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	QWORD PTR 16[rdi], 0
	je	.L26
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	cmp	QWORD PTR 32[rdi], 0
	je	.L4
	mov	eax, DWORD PTR [rdi]
	mov	rbp, rsi
	test	DWORD PTR WINED3D_BIND_VERTEX_BUFFER[rip], eax
	jne	.L30
.L5:
	test	DWORD PTR WINED3D_BIND_INDEX_BUFFER[rip], eax
	jne	.L31
.L6:
	test	DWORD PTR WINED3D_BIND_CONSTANT_BUFFER[rip], eax
	jne	.L32
.L7:
	test	DWORD PTR WINED3D_BIND_STREAM_OUTPUT[rip], eax
	jne	.L33
.L4:
	lea	rsi, 16[rbx]
	mov	edi, 1
	call	glDeleteBuffers@PLT
	mov	edi, eax
	call	GL_EXTCALL@PLT
	lea	rdi, .LC1[rip]
	call	checkGLcall@PLT
	mov	rdi, QWORD PTR 8[rbx]
	mov	QWORD PTR 16[rbx], 0
	test	rdi, rdi
	je	.L9
	call	wined3d_fence_destroy@PLT
	mov	QWORD PTR 8[rbx], 0
.L9:
	mov	eax, DWORD PTR WINED3D_BUFFER_APPLESYNC[rip]
	not	eax
	and	DWORD PTR 4[rbx], eax
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore 3
	.cfi_restore 6
	ret
	.p2align 4,,10
	.p2align 3
.L33:
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -24
	.cfi_offset 6, -16
	mov	edi, DWORD PTR 24[rbx]
	mov	esi, DWORD PTR STATE_STREAM_OUTPUT[rip]
	call	device_invalidate_state@PLT
	cmp	QWORD PTR 0[rbp], 0
	je	.L4
	mov	rsi, rbx
	lea	rdi, .LC0[rip]
	call	WARN@PLT
	mov	rdi, rbp
	call	context_end_transform_feedback@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L32:
	mov	edi, DWORD PTR WINED3D_SHADER_TYPE_VERTEX[rip]
	call	STATE_CONSTANT_BUFFER@PLT
	mov	edi, DWORD PTR 24[rbx]
	mov	esi, eax
	call	device_invalidate_state@PLT
	mov	edi, DWORD PTR WINED3D_SHADER_TYPE_HULL[rip]
	call	STATE_CONSTANT_BUFFER@PLT
	mov	edi, DWORD PTR 24[rbx]
	mov	esi, eax
	call	device_invalidate_state@PLT
	mov	edi, DWORD PTR WINED3D_SHADER_TYPE_DOMAIN[rip]
	call	STATE_CONSTANT_BUFFER@PLT
	mov	edi, DWORD PTR 24[rbx]
	mov	esi, eax
	call	device_invalidate_state@PLT
	mov	edi, DWORD PTR WINED3D_SHADER_TYPE_GEOMETRY[rip]
	call	STATE_CONSTANT_BUFFER@PLT
	mov	edi, DWORD PTR 24[rbx]
	mov	esi, eax
	call	device_invalidate_state@PLT
	mov	edi, DWORD PTR WINED3D_SHADER_TYPE_PIXEL[rip]
	call	STATE_CONSTANT_BUFFER@PLT
	mov	edi, DWORD PTR 24[rbx]
	mov	esi, eax
	call	device_invalidate_state@PLT
	mov	edi, DWORD PTR WINED3D_SHADER_TYPE_COMPUTE[rip]
	call	STATE_CONSTANT_BUFFER@PLT
	mov	edi, DWORD PTR 24[rbx]
	mov	esi, eax
	call	device_invalidate_state@PLT
	mov	eax, DWORD PTR [rbx]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L31:
	mov	edi, DWORD PTR 24[rbx]
	mov	esi, DWORD PTR STATE_INDEXBUFFER[rip]
	call	device_invalidate_state@PLT
	mov	eax, DWORD PTR [rbx]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L30:
	mov	edi, DWORD PTR 24[rdi]
	mov	esi, DWORD PTR STATE_STREAMSRC[rip]
	call	device_invalidate_state@PLT
	mov	eax, DWORD PTR [rbx]
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	buffer_destroy_buffer_object, .-buffer_destroy_buffer_object
	.comm	WINED3D_SHADER_TYPE_VERTEX,4,4
	.comm	WINED3D_SHADER_TYPE_PIXEL,4,4
	.comm	WINED3D_SHADER_TYPE_HULL,4,4
	.comm	WINED3D_SHADER_TYPE_GEOMETRY,4,4
	.comm	WINED3D_SHADER_TYPE_DOMAIN,4,4
	.comm	WINED3D_SHADER_TYPE_COMPUTE,4,4
	.comm	WINED3D_BUFFER_APPLESYNC,4,4
	.comm	WINED3D_BIND_VERTEX_BUFFER,4,4
	.comm	WINED3D_BIND_STREAM_OUTPUT,4,4
	.comm	WINED3D_BIND_INDEX_BUFFER,4,4
	.comm	WINED3D_BIND_CONSTANT_BUFFER,4,4
	.comm	STATE_STREAM_OUTPUT,4,4
	.comm	STATE_STREAMSRC,4,4
	.comm	STATE_INDEXBUFFER,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_buffer.c_buffer_destroy_buffer_object.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Deleting buffer object for buffer %p, disabling tra"
	.ascii	"nsform feedback.\012\000"
	.align	2
.LC1:
	.ascii	"glDeleteBuffers\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	buffer_destroy_buffer_object, %function
buffer_destroy_buffer_object:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0, #12]
	cmp	r3, #0
	bxeq	lr
	ldr	r3, [r0, #20]
	push	{r4, r5, r6, lr}
	cmp	r3, #0
	mov	r4, r0
	beq	.L4
	ldr	r2, .L40
	ldr	r3, [r0]
	ldr	r2, [r2]
	mov	r5, r1
	tst	r3, r2
	bne	.L36
.L5:
	ldr	r2, .L40+4
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L37
.L6:
	ldr	r2, .L40+8
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L38
.L7:
	ldr	r2, .L40+12
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L39
.L4:
	mov	r5, #0
	add	r1, r4, #12
	mov	r0, #1
	bl	glDeleteBuffers
	bl	GL_EXTCALL
	ldr	r0, .L40+16
	bl	checkGLcall
	ldr	r0, [r4, #8]
	str	r5, [r4, #12]
	cmp	r0, r5
	beq	.L9
	bl	wined3d_fence_destroy
	str	r5, [r4, #8]
.L9:
	ldr	r2, .L40+20
	ldr	r3, [r4, #4]
	ldr	r2, [r2]
	bic	r3, r3, r2
	str	r3, [r4, #4]
	pop	{r4, r5, r6, pc}
.L39:
	ldr	r3, .L40+24
	ldr	r0, [r4, #16]
	ldr	r1, [r3]
	bl	device_invalidate_state
	ldr	r3, [r5]
	cmp	r3, #0
	beq	.L4
	mov	r1, r4
	ldr	r0, .L40+28
	bl	WARN
	mov	r0, r5
	bl	context_end_transform_feedback
	b	.L4
.L38:
	ldr	r3, .L40+32
	ldr	r6, [r4, #16]
	ldr	r0, [r3]
	bl	STATE_CONSTANT_BUFFER
	mov	r1, r0
	mov	r0, r6
	bl	device_invalidate_state
	ldr	r3, .L40+36
	ldr	r6, [r4, #16]
	ldr	r0, [r3]
	bl	STATE_CONSTANT_BUFFER
	mov	r1, r0
	mov	r0, r6
	bl	device_invalidate_state
	ldr	r3, .L40+40
	ldr	r6, [r4, #16]
	ldr	r0, [r3]
	bl	STATE_CONSTANT_BUFFER
	mov	r1, r0
	mov	r0, r6
	bl	device_invalidate_state
	ldr	r3, .L40+44
	ldr	r6, [r4, #16]
	ldr	r0, [r3]
	bl	STATE_CONSTANT_BUFFER
	mov	r1, r0
	mov	r0, r6
	bl	device_invalidate_state
	ldr	r3, .L40+48
	ldr	r6, [r4, #16]
	ldr	r0, [r3]
	bl	STATE_CONSTANT_BUFFER
	mov	r1, r0
	mov	r0, r6
	bl	device_invalidate_state
	ldr	r3, .L40+52
	ldr	r6, [r4, #16]
	ldr	r0, [r3]
	bl	STATE_CONSTANT_BUFFER
	mov	r1, r0
	mov	r0, r6
	bl	device_invalidate_state
	ldr	r3, [r4]
	b	.L7
.L37:
	ldr	r3, .L40+56
	ldr	r0, [r4, #16]
	ldr	r1, [r3]
	bl	device_invalidate_state
	ldr	r3, [r4]
	b	.L6
.L36:
	ldr	r3, .L40+60
	ldr	r0, [r0, #16]
	ldr	r1, [r3]
	bl	device_invalidate_state
	ldr	r3, [r4]
	b	.L5
.L41:
	.align	2
.L40:
	.word	WINED3D_BIND_VERTEX_BUFFER
	.word	WINED3D_BIND_INDEX_BUFFER
	.word	WINED3D_BIND_CONSTANT_BUFFER
	.word	WINED3D_BIND_STREAM_OUTPUT
	.word	.LC1
	.word	WINED3D_BUFFER_APPLESYNC
	.word	STATE_STREAM_OUTPUT
	.word	.LC0
	.word	WINED3D_SHADER_TYPE_VERTEX
	.word	WINED3D_SHADER_TYPE_HULL
	.word	WINED3D_SHADER_TYPE_DOMAIN
	.word	WINED3D_SHADER_TYPE_GEOMETRY
	.word	WINED3D_SHADER_TYPE_PIXEL
	.word	WINED3D_SHADER_TYPE_COMPUTE
	.word	STATE_INDEXBUFFER
	.word	STATE_STREAMSRC
	.size	buffer_destroy_buffer_object, .-buffer_destroy_buffer_object
	.comm	WINED3D_SHADER_TYPE_VERTEX,4,4
	.comm	WINED3D_SHADER_TYPE_PIXEL,4,4
	.comm	WINED3D_SHADER_TYPE_HULL,4,4
	.comm	WINED3D_SHADER_TYPE_GEOMETRY,4,4
	.comm	WINED3D_SHADER_TYPE_DOMAIN,4,4
	.comm	WINED3D_SHADER_TYPE_COMPUTE,4,4
	.comm	WINED3D_BUFFER_APPLESYNC,4,4
	.comm	WINED3D_BIND_VERTEX_BUFFER,4,4
	.comm	WINED3D_BIND_STREAM_OUTPUT,4,4
	.comm	WINED3D_BIND_INDEX_BUFFER,4,4
	.comm	WINED3D_BIND_CONSTANT_BUFFER,4,4
	.comm	STATE_STREAM_OUTPUT,4,4
	.comm	STATE_STREAMSRC,4,4
	.comm	STATE_INDEXBUFFER,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
