	.file	"extr_query.c_to_safearray.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	to_safearray
	.type	to_safearray, @function
to_safearray:
.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
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	mov	edi, esi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	get_type_size@PLT
	mov	edi, ebp
	mov	r13d, eax
	call	to_vartype@PLT
	test	rbx, rbx
	je	.L2
	mov	edx, DWORD PTR [rbx]
	xor	esi, esi
	mov	rdi, rax
	mov	rbp, rax
	call	SafeArrayCreateVector@PLT
	mov	r12, rax
	test	rax, rax
	je	.L2
	mov	eax, DWORD PTR [rbx]
	mov	DWORD PTR 4[rsp], 0
	test	eax, eax
	jle	.L1
	xor	edx, edx
	lea	r14, 4[rsp]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rsi, r14
	mov	rdi, r12
	call	SafeArrayPutElement@PLT
	cmp	rax, QWORD PTR S_OK[rip]
	jne	.L22
	mov	eax, DWORD PTR 4[rsp]
	lea	edx, 1[rax]
	mov	DWORD PTR 4[rsp], edx
	cmp	edx, DWORD PTR [rbx]
	jge	.L1
.L8:
	imul	edx, r13d
	movsx	rdx, edx
	add	rdx, QWORD PTR 8[rbx]
	cmp	QWORD PTR VT_BSTR[rip], rbp
	jne	.L4
	mov	rdi, QWORD PTR [rdx]
	call	SysAllocString@PLT
	mov	r15, rax
	test	rax, rax
	je	.L5
	mov	rdx, rax
	mov	rsi, r14
	mov	rdi, r12
	call	SafeArrayPutElement@PLT
	cmp	rax, QWORD PTR S_OK[rip]
	jne	.L5
	mov	rdi, r15
	call	SysFreeString@PLT
	mov	eax, DWORD PTR 4[rsp]
	lea	edx, 1[rax]
	mov	DWORD PTR 4[rsp], edx
	cmp	edx, DWORD PTR [rbx]
	jl	.L8
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L23
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r12
	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
.L2:
	.cfi_restore_state
	xor	r12d, r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdi, r15
	call	SysFreeString@PLT
	mov	rdi, r12
	xor	r12d, r12d
	call	SafeArrayDestroy@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L22:
	mov	rdi, r12
	xor	r12d, r12d
	call	SafeArrayDestroy@PLT
	jmp	.L1
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	to_safearray, .-to_safearray
	.comm	VT_BSTR,8,8
	.comm	S_OK,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_query.c_to_safearray.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	to_safearray
	.syntax unified
	.arm
	.fpu softvfp
	.type	to_safearray, %function
to_safearray:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L24
	sub	sp, sp, #8
	mov	r4, r0
	mov	r0, r1
	mov	r5, r1
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	get_type_size
	mov	r6, r0
	mov	r0, r5
	bl	to_vartype
	cmp	r4, #0
	beq	.L2
	mov	r1, #0
	ldr	r2, [r4]
	mov	r7, r0
	bl	SafeArrayCreateVector
	subs	r5, r0, #0
	beq	.L2
	mov	r3, #0
	ldr	r2, [r4]
	str	r3, [sp]
	cmp	r2, r3
	ble	.L1
	ldr	r8, .L24+4
	ldr	r9, .L24+8
	b	.L8
.L4:
	mov	r1, sp
	mov	r0, r5
	bl	SafeArrayPutElement
	ldr	r3, [r9]
	cmp	r0, r3
	bne	.L22
.L7:
	ldr	r3, [sp]
	ldr	r2, [r4]
	add	r3, r3, #1
	cmp	r3, r2
	str	r3, [sp]
	bge	.L1
.L8:
	mul	r3, r6, r3
	ldr	r2, [r8]
	ldr	r1, [r4, #4]
	cmp	r2, r7
	add	r2, r3, r1
	bne	.L4
	ldr	r0, [r3, r1]
	bl	SysAllocString
	subs	r10, r0, #0
	beq	.L5
	mov	r2, r10
	mov	r1, sp
	mov	r0, r5
	bl	SafeArrayPutElement
	ldr	r3, [r9]
	cmp	r0, r3
	bne	.L5
	mov	r0, r10
	bl	SysFreeString
	b	.L7
.L2:
	mov	r5, #0
.L1:
	ldr	r3, .L24
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L23
	mov	r0, r5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L5:
	mov	r0, r10
	bl	SysFreeString
	mov	r0, r5
	bl	SafeArrayDestroy
	mov	r5, #0
	b	.L1
.L22:
	mov	r0, r5
	bl	SafeArrayDestroy
	mov	r5, #0
	b	.L1
.L23:
	bl	__stack_chk_fail
.L25:
	.align	2
.L24:
	.word	.LC0
	.word	VT_BSTR
	.word	S_OK
	.size	to_safearray, .-to_safearray
	.comm	VT_BSTR,4,4
	.comm	S_OK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
