	.file	"extr_datacache.c_read_clipformat.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	read_clipformat, @function
read_clipformat:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	edx, 4
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rsi
	sub	rsp, 40
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	DWORD PTR [rsi], 0
	lea	r12, 16[rsp]
	lea	rsi, 12[rsp]
	mov	rcx, r12
	call	IStream_Read@PLT
	mov	r8, rax
	mov	rax, QWORD PTR S_OK[rip]
	cmp	rax, r8
	jne	.L17
	cmp	DWORD PTR 16[rsp], 4
	je	.L3
.L17:
	mov	rax, QWORD PTR DV_E_CLIPFORMAT[rip]
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L19
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
.L3:
	.cfi_restore_state
	mov	r13d, DWORD PTR 12[rsp]
	test	r13d, r13d
	je	.L1
	cmp	r13d, -1
	je	.L20
	xor	eax, eax
	call	GetProcessHeap@PLT
	mov	edx, r13d
	xor	esi, esi
	mov	edi, eax
	call	HeapAlloc@PLT
	mov	r13, rax
	mov	rax, QWORD PTR E_OUTOFMEMORY[rip]
	test	r13, r13
	je	.L1
	mov	edx, DWORD PTR 12[rsp]
	xor	eax, eax
	mov	rcx, r12
	mov	rsi, r13
	mov	rdi, rbp
	call	IStream_Read@PLT
	cmp	QWORD PTR S_OK[rip], rax
	jne	.L10
	movsx	rax, DWORD PTR 12[rsp]
	cmp	DWORD PTR 16[rsp], eax
	jne	.L10
	cmp	BYTE PTR -1[r13+rax], 0
	jne	.L10
	mov	rdi, r13
	call	RegisterClipboardFormatA@PLT
	mov	DWORD PTR [rbx], eax
	xor	eax, eax
	call	GetProcessHeap@PLT
	mov	rdx, r13
	xor	esi, esi
	mov	edi, eax
	call	HeapFree@PLT
	mov	rax, QWORD PTR S_OK[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	xor	eax, eax
	call	GetProcessHeap@PLT
	mov	rdx, r13
	xor	esi, esi
	mov	edi, eax
	call	HeapFree@PLT
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L20:
	lea	rsi, 20[rsp]
	mov	rcx, r12
	mov	edx, 4
	mov	rdi, rbp
	xor	eax, eax
	call	IStream_Read@PLT
	mov	r8, rax
	mov	rax, QWORD PTR S_OK[rip]
	cmp	rax, r8
	jne	.L17
	cmp	DWORD PTR 16[rsp], 4
	jne	.L17
	mov	edx, DWORD PTR 20[rsp]
	mov	DWORD PTR [rbx], edx
	jmp	.L1
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	read_clipformat, .-read_clipformat
	.comm	S_OK,8,8
	.comm	E_OUTOFMEMORY,8,8
	.comm	DV_E_CLIPFORMAT,8,8
	.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_datacache.c_read_clipformat.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_clipformat, %function
read_clipformat:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r7, #0
	ldr	r3, .L22
	sub	sp, sp, #20
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r4, r1
	add	r3, sp, #4
	str	r7, [r1]
	mov	r2, #4
	mov	r1, sp
	mov	r6, r0
	bl	IStream_Read
	ldr	r5, .L22+4
	ldr	r3, [r5]
	cmp	r3, r0
	bne	.L17
	ldr	r2, [sp, #4]
	cmp	r2, #4
	beq	.L3
.L17:
	ldr	r3, .L22+8
	ldr	r3, [r3]
.L1:
	ldr	r2, .L22
	ldr	r1, [r2]
	ldr	r2, [sp, #12]
	eors	r1, r2, r1
	mov	r2, #0
	bne	.L19
	mov	r0, r3
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L3:
	ldr	r1, [sp]
	cmp	r1, #0
	beq	.L1
	cmn	r1, #1
	beq	.L20
	bl	GetProcessHeap
	mov	r1, r7
	ldr	r2, [sp]
	bl	HeapAlloc
	subs	r7, r0, #0
	beq	.L21
	add	r3, sp, #4
	mov	r0, r6
	mov	r1, r7
	ldr	r2, [sp]
	bl	IStream_Read
	ldr	r3, [r5]
	cmp	r3, r0
	bne	.L10
	ldm	sp, {r2, r3}
	cmp	r3, r2
	bne	.L10
	add	r3, r7, r3
	ldrb	r6, [r3, #-1]	@ zero_extendqisi2
	cmp	r6, #0
	bne	.L10
	mov	r0, r7
	bl	RegisterClipboardFormatA
	str	r0, [r4]
	bl	GetProcessHeap
	mov	r2, r7
	mov	r1, r6
	bl	HeapFree
	ldr	r3, [r5]
	b	.L1
.L10:
	bl	GetProcessHeap
	mov	r2, r7
	mov	r1, #0
	bl	HeapFree
	b	.L17
.L20:
	add	r3, sp, #4
	mov	r0, r6
	add	r1, sp, #8
	bl	IStream_Read
	ldr	r3, [r5]
	cmp	r3, r0
	bne	.L17
	ldr	r2, [sp, #4]
	cmp	r2, #4
	bne	.L17
	ldr	r2, [sp, #8]
	str	r2, [r4]
	b	.L1
.L21:
	ldr	r3, .L22+12
	ldr	r3, [r3]
	b	.L1
.L19:
	bl	__stack_chk_fail
.L23:
	.align	2
.L22:
	.word	.LC0
	.word	S_OK
	.word	DV_E_CLIPFORMAT
	.word	E_OUTOFMEMORY
	.size	read_clipformat, .-read_clipformat
	.comm	S_OK,4,4
	.comm	E_OUTOFMEMORY,4,4
	.comm	DV_E_CLIPFORMAT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
