	.file	"extr_safearray.c_SAFEARRAY_CopyData.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"VariantCopy failed with 0x%08x, element %u\n"
	.text
	.p2align 4
	.type	SAFEARRAY_CopyData, @function
SAFEARRAY_CopyData:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	r15d, DWORD PTR S_OK[rip]
	mov	QWORD PTR [rsp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	cmp	QWORD PTR 8[rdi], 0
	je	.L1
	cmp	QWORD PTR 8[rsi], 0
	je	.L3
	mov	eax, DWORD PTR [rdi]
	mov	rbp, rdi
	test	DWORD PTR FADF_DATADELETED[rip], eax
	je	.L4
.L3:
	mov	r15d, DWORD PTR E_INVALIDARG[rip]
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L53
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r15d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	call	SAFEARRAY_GetCellCount@PLT
	mov	rbx, QWORD PTR [rsp]
	mov	r13, QWORD PTR 8[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR ignored_copy_features[rip]
	mov	ecx, DWORD PTR [rbx]
	and	ecx, DWORD PTR FADF_CREATEVECTOR[rip]
	not	eax
	and	eax, DWORD PTR 0[rbp]
	or	eax, ecx
	mov	DWORD PTR [rbx], eax
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR FADF_VARIANT[rip], eax
	jne	.L54
	mov	rcx, QWORD PTR [rsp]
	mov	r12, QWORD PTR 8[rcx]
	test	DWORD PTR FADF_BSTR[rip], eax
	je	.L9
	test	edx, edx
	je	.L6
	lea	eax, -1[rdx]
	lea	rbx, 8[r13+rax*8]
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L56:
	call	SysStringByteLen@PLT
	mov	rdi, QWORD PTR 0[r13]
	mov	esi, eax
	call	SysAllocStringByteLen@PLT
	mov	QWORD PTR [r12], rax
	test	rax, rax
	je	.L55
.L11:
	add	r13, 8
	add	r12, 8
	cmp	r13, rbx
	je	.L51
.L12:
	mov	rdi, QWORD PTR [r12]
	call	SysFreeString@PLT
	mov	rdi, QWORD PTR 0[r13]
	test	rdi, rdi
	jne	.L56
	mov	QWORD PTR [r12], 0
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L54:
	mov	r14, QWORD PTR 8[rbx]
	lea	ebx, -1[rdx]
	test	edx, edx
	jne	.L8
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	sub	ebx, 1
	add	r13, 8
	add	r14, 8
	cmp	ebx, -1
	je	.L51
.L8:
	mov	rdi, r14
	mov	rsi, r13
	call	VariantCopy@PLT
	mov	edi, eax
	mov	r12d, eax
	call	FAILED@PLT
	test	rax, rax
	je	.L7
	mov	edx, ebx
	mov	esi, r12d
	lea	rdi, .LC0[rip]
	sub	ebx, 1
	call	FIXME@PLT
	add	r13, 8
	add	r14, 8
	cmp	ebx, -1
	jne	.L8
	.p2align 4,,10
	.p2align 3
.L51:
	mov	eax, DWORD PTR 0[rbp]
.L6:
	test	DWORD PTR FADF_HAVEIID[rip], eax
	jne	.L57
	test	DWORD PTR FADF_HAVEVARTYPE[rip], eax
	je	.L1
	mov	rdi, rbp
	call	SAFEARRAY_GetHiddenDWORD@PLT
	mov	rdi, QWORD PTR [rsp]
	mov	esi, eax
	call	SAFEARRAY_SetHiddenDWORD@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L57:
	lea	r12, 16[rsp]
	mov	rdi, rbp
	mov	rsi, r12
	call	SafeArrayGetIID@PLT
	mov	rdi, QWORD PTR [rsp]
	mov	rsi, r12
	call	SafeArraySetIID@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	test	DWORD PTR FADF_RECORD[rip], eax
	jne	.L58
	mov	ecx, DWORD PTR FADF_UNKNOWN[rip]
	or	ecx, DWORD PTR FADF_DISPATCH[rip]
	test	ecx, eax
	je	.L16
	test	edx, edx
	je	.L6
	lea	eax, -1[rdx]
	lea	rbx, 8[r12+rax*8]
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdi, QWORD PTR [r12]
	test	rdi, rdi
	je	.L17
	call	IUnknown_Release@PLT
.L17:
	mov	rdi, QWORD PTR 0[r13]
	mov	QWORD PTR [r12], rdi
	test	rdi, rdi
	je	.L18
	call	IUnknown_AddRef@PLT
.L18:
	add	r12, 8
	add	r13, 8
	cmp	rbx, r12
	jne	.L19
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L16:
	imul	edx, DWORD PTR 4[rbp]
	mov	rsi, r13
	mov	rdi, r12
	call	memcpy@PLT
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L55:
	mov	r15d, DWORD PTR E_OUTOFMEMORY[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L58:
	lea	rsi, 16[rsp]
	mov	rdi, rbp
	mov	DWORD PTR 12[rsp], edx
	call	SafeArrayGetRecordInfo@PLT
	mov	edx, DWORD PTR 12[rsp]
	test	edx, edx
	je	.L14
	mov	ebx, edx
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L59:
	movsx	rax, DWORD PTR 4[rbp]
	sal	rax, 3
	add	r13, rax
	add	r12, rax
	sub	ebx, 1
	je	.L14
.L15:
	mov	rdi, QWORD PTR 16[rsp]
	mov	rdx, r12
	mov	rsi, r13
	call	IRecordInfo_RecordCopy@PLT
	mov	edi, eax
	mov	r15d, eax
	call	FAILED@PLT
	test	rax, rax
	je	.L59
.L14:
	mov	rbx, QWORD PTR [rsp]
	mov	rsi, QWORD PTR 16[rsp]
	mov	rdi, rbx
	call	SafeArraySetRecordInfo@PLT
	mov	eax, DWORD PTR 4[rbp]
	mov	rdi, QWORD PTR 16[rsp]
	mov	DWORD PTR 4[rbx], eax
	call	IRecordInfo_Release@PLT
	mov	eax, DWORD PTR 0[rbp]
	jmp	.L6
.L53:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	SAFEARRAY_CopyData, .-SAFEARRAY_CopyData
	.comm	ignored_copy_features,4,4
	.comm	S_OK,4,4
	.comm	FADF_VARIANT,4,4
	.comm	FADF_UNKNOWN,4,4
	.comm	FADF_RECORD,4,4
	.comm	FADF_HAVEVARTYPE,4,4
	.comm	FADF_HAVEIID,4,4
	.comm	FADF_DISPATCH,4,4
	.comm	FADF_DATADELETED,4,4
	.comm	FADF_CREATEVECTOR,4,4
	.comm	FADF_BSTR,4,4
	.comm	E_OUTOFMEMORY,4,4
	.comm	E_INVALIDARG,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_safearray.c_SAFEARRAY_CopyData.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"VariantCopy failed with 0x%08x, element %u\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	SAFEARRAY_CopyData, %function
SAFEARRAY_CopyData:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r2, [r0, #8]
	ldr	r3, .L67
	cmp	r2, #0
	ldr	r2, .L67+4
	sub	sp, sp, #12
	ldr	r2, [r2]
	str	r2, [sp, #4]
	mov	r2,#0
	ldr	r10, [r3]
	beq	.L1
	ldr	r3, [r1, #8]
	mov	r6, r1
	cmp	r3, #0
	beq	.L3
	ldr	r3, .L67+8
	ldr	r2, [r0]
	ldr	r3, [r3]
	mov	r5, r0
	tst	r2, r3
	beq	.L4
.L3:
	ldr	r3, .L67+12
	ldr	r10, [r3]
.L1:
	ldr	r3, .L67+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L59
	mov	r0, r10
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	bl	SAFEARRAY_GetCellCount
	ldr	r3, .L67+16
	ldr	r2, .L67+20
	ldr	r1, [r6]
	ldr	r2, [r2]
	mov	r4, r0
	ldr	r0, [r3]
	ldr	r3, [r5]
	and	r1, r1, r2
	bic	r3, r3, r0
	orr	r3, r3, r1
	ldr	r2, .L67+24
	str	r3, [r6]
	ldr	r3, [r5]
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L60
	ldr	r2, .L67+28
	ldr	r9, [r6, #8]
	ldr	r2, [r2]
	ldr	r8, [r5, #8]
	tst	r3, r2
	beq	.L9
	cmp	r4, #0
	beq	.L6
	sub	r9, r9, #4
	sub	r8, r8, #4
	b	.L12
.L62:
	mov	r0, r7
	bl	SysStringByteLen
	mov	r1, r0
	mov	r0, r7
	bl	SysAllocStringByteLen
	cmp	r0, #0
	str	r0, [r9]
	beq	.L61
.L11:
	subs	r4, r4, #1
	beq	.L57
.L12:
	ldr	r0, [r9, #4]!
	bl	SysFreeString
	ldr	r7, [r8, #4]!
	cmp	r7, #0
	bne	.L62
	str	r7, [r9]
	b	.L11
.L60:
	cmp	r4, #0
	ldr	r8, [r5, #8]
	ldr	r9, [r6, #8]
	sub	r4, r4, #1
	beq	.L6
	ldr	fp, .L67+32
	b	.L8
.L7:
	sub	r4, r4, #1
	cmn	r4, #1
	add	r8, r8, #4
	add	r9, r9, #4
	beq	.L57
.L8:
	mov	r1, r8
	mov	r0, r9
	bl	VariantCopy
	mov	r7, r0
	bl	FAILED
	cmp	r0, #0
	beq	.L7
	mov	r1, r7
	mov	r2, r4
	mov	r0, fp
	bl	FIXME
	b	.L7
.L65:
	mov	r1, sp
	mov	r0, r5
	bl	SafeArrayGetRecordInfo
	cmp	r4, #0
	bne	.L15
	b	.L14
.L63:
	ldr	r3, [r5, #4]
	subs	r4, r4, #1
	add	r8, r8, r3, lsl #2
	add	r9, r9, r3, lsl #2
	beq	.L14
.L15:
	mov	r2, r9
	mov	r1, r8
	ldr	r0, [sp]
	bl	IRecordInfo_RecordCopy
	mov	r10, r0
	bl	FAILED
	cmp	r0, #0
	beq	.L63
.L14:
	ldr	r1, [sp]
	mov	r0, r6
	bl	SafeArraySetRecordInfo
	ldr	r3, [r5, #4]
	ldr	r0, [sp]
	str	r3, [r6, #4]
	bl	IRecordInfo_Release
	ldr	r3, [r5]
.L6:
	ldr	r2, .L67+36
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L64
	ldr	r2, .L67+40
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L1
	mov	r0, r5
	bl	SAFEARRAY_GetHiddenDWORD
	mov	r1, r0
	mov	r0, r6
	bl	SAFEARRAY_SetHiddenDWORD
	b	.L1
.L9:
	ldr	r2, .L67+44
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L65
	ldr	r2, .L67+48
	ldr	r1, .L67+52
	ldr	r2, [r2]
	ldr	r1, [r1]
	orr	r2, r2, r1
	tst	r2, r3
	bne	.L66
	ldr	r2, [r5, #4]
	mov	r1, r8
	mov	r0, r9
	mul	r2, r4, r2
	bl	memcpy
.L57:
	ldr	r3, [r5]
	b	.L6
.L64:
	mov	r1, sp
	mov	r0, r5
	bl	SafeArrayGetIID
	mov	r1, sp
	mov	r0, r6
	bl	SafeArraySetIID
	b	.L1
.L66:
	cmp	r4, #0
	sub	r4, r4, #1
	beq	.L6
	sub	r9, r9, #4
	sub	r8, r8, #4
.L19:
	ldr	r0, [r9, #4]!
	cmp	r0, #0
	beq	.L17
	bl	IUnknown_Release
.L17:
	ldr	r0, [r8, #4]!
	cmp	r0, #0
	str	r0, [r9]
	beq	.L18
	bl	IUnknown_AddRef
.L18:
	subs	r4, r4, #1
	bcs	.L19
	b	.L57
.L61:
	ldr	r3, .L67+56
	ldr	r10, [r3]
	b	.L1
.L59:
	bl	__stack_chk_fail
.L68:
	.align	2
.L67:
	.word	S_OK
	.word	.LC1
	.word	FADF_DATADELETED
	.word	E_INVALIDARG
	.word	ignored_copy_features
	.word	FADF_CREATEVECTOR
	.word	FADF_VARIANT
	.word	FADF_BSTR
	.word	.LC0
	.word	FADF_HAVEIID
	.word	FADF_HAVEVARTYPE
	.word	FADF_RECORD
	.word	FADF_UNKNOWN
	.word	FADF_DISPATCH
	.word	E_OUTOFMEMORY
	.size	SAFEARRAY_CopyData, .-SAFEARRAY_CopyData
	.comm	ignored_copy_features,4,4
	.comm	S_OK,4,4
	.comm	FADF_VARIANT,4,4
	.comm	FADF_UNKNOWN,4,4
	.comm	FADF_RECORD,4,4
	.comm	FADF_HAVEVARTYPE,4,4
	.comm	FADF_HAVEIID,4,4
	.comm	FADF_DISPATCH,4,4
	.comm	FADF_DATADELETED,4,4
	.comm	FADF_CREATEVECTOR,4,4
	.comm	FADF_BSTR,4,4
	.comm	E_OUTOFMEMORY,4,4
	.comm	E_INVALIDARG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
