	.file	"extr_shell.c_process_input.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	";"
.LC1:
	.string	"Error: out of memory\n"
.LC2:
	.string	"Error: near line %d:"
.LC3:
	.string	"Error:"
.LC4:
	.string	"%s %s\n"
.LC5:
	.string	"Error: incomplete SQL: %s\n"
	.text
	.p2align 4
	.type	process_input, @function
process_input:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xor	r12d, r12d
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xor	ebp, ebp
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xor	ebx, ebx
	sub	rsp, 152
	.cfi_def_cfa_offset 208
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 136[rsp], rax
	xor	eax, eax
	mov	DWORD PTR 12[rsp], 0
	mov	DWORD PTR 4[rsp], 0
	mov	DWORD PTR [rsp], 0
	.p2align 4,,10
	.p2align 3
.L2:
	mov	edi, DWORD PTR 24[r15]
	call	fflush@PLT
	mov	rdi, r12
	call	free@PLT
	mov	rsi, r13
	mov	rdi, rbp
	call	one_input_line@PLT
	mov	r12, rax
	test	rax, rax
	je	.L73
	cmp	QWORD PTR seenInterrupt[rip], 0
	je	.L5
	test	r13, r13
	jne	.L4
	mov	QWORD PTR seenInterrupt[rip], 0
.L5:
	add	DWORD PTR 4[rsp], 1
	test	rbp, rbp
	je	.L6
	cmp	BYTE PTR 0[rbp], 0
	jne	.L11
.L6:
	mov	rdi, r12
	call	_all_whitespace@PLT
	test	rax, rax
	jne	.L10
.L11:
	cmp	BYTE PTR [r12], 46
	jne	.L9
	test	ebx, ebx
	je	.L74
.L9:
	mov	rdi, r12
	call	_is_command_terminator@PLT
	test	rax, rax
	jne	.L75
.L15:
	test	rbp, rbp
	je	.L76
.L17:
	mov	rdi, r12
	call	strlen30@PLT
	mov	rdi, rbp
	lea	esi, 4[rbx+rax]
	mov	r14d, eax
	call	realloc@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L77
.L23:
	movsx	rax, ebx
	lea	ecx, 1[rbx]
	lea	edx, 1[r14]
	mov	rsi, r12
	mov	BYTE PTR 0[rbp+rax], 10
	movsx	rdi, ecx
	add	rdi, rbp
	mov	DWORD PTR 8[rsp], ecx
	call	memcpy@PLT
	mov	ecx, DWORD PTR 8[rsp]
	add	ecx, r14d
	mov	r14d, ecx
.L22:
	test	rbp, rbp
	je	.L38
	mov	esi, r14d
	movsx	rdi, ebx
	sub	esi, ebx
	add	rdi, rbp
	call	_contains_semicolon@PLT
	test	rax, rax
	jne	.L78
.L24:
	mov	rdi, rbp
	call	_all_whitespace@PLT
	test	rax, rax
	jne	.L35
.L38:
	mov	ebx, r14d
.L10:
	mov	esi, DWORD PTR [rsp]
	test	esi, esi
	je	.L2
.L13:
	mov	ecx, DWORD PTR bail_on_error[rip]
	test	ecx, ecx
	je	.L2
	test	r13, r13
	jne	.L4
	cmp	QWORD PTR stdin_is_interactive[rip], 0
	jne	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	test	rbp, rbp
	je	.L33
	mov	rdi, rbp
	call	_all_whitespace@PLT
	test	rax, rax
	je	.L79
.L34:
	mov	rdi, rbp
	call	free@PLT
.L33:
	mov	rdi, r12
	call	free@PLT
	mov	edx, DWORD PTR [rsp]
	xor	eax, eax
	test	edx, edx
	setg	al
	mov	rdx, QWORD PTR 136[rsp]
	xor	rdx, QWORD PTR fs:40
	jne	.L80
	add	rsp, 152
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L74:
	.cfi_restore_state
	cmp	QWORD PTR 16[r15], 0
	jne	.L81
.L12:
	mov	rsi, r15
	mov	rdi, r12
	call	do_meta_command@PLT
	mov	ebx, eax
	cmp	eax, 2
	je	.L4
	test	eax, eax
	je	.L10
	add	DWORD PTR [rsp], 1
	xor	ebx, ebx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L75:
	mov	esi, ebx
	mov	rdi, rbp
	call	_is_complete@PLT
	test	rax, rax
	je	.L15
	mov	edx, 2
	lea	rsi, .LC0[rip]
	mov	rdi, r12
	call	memcpy@PLT
	test	rbp, rbp
	jne	.L17
	.p2align 4,,10
	.p2align 3
.L76:
	movsx	edi, BYTE PTR [r12]
	mov	r14, r12
	test	dil, dil
	jne	.L18
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L20:
	movsx	edi, BYTE PTR 1[r14]
	add	r14, 1
	test	dil, dil
	je	.L10
.L18:
	call	IsSpace@PLT
	test	rax, rax
	jne	.L20
	cmp	BYTE PTR [r14], 0
	je	.L10
	mov	rdi, r12
	call	strlen30@PLT
	lea	edi, 3[rax]
	mov	r14d, eax
	call	malloc@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L82
.L21:
	lea	edx, 1[r14]
	mov	rsi, r12
	mov	rdi, rbp
	call	memcpy@PLT
	mov	eax, DWORD PTR 4[rsp]
	mov	DWORD PTR 12[rsp], eax
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L78:
	mov	rdi, rbp
	call	sqlite3_complete@PLT
	test	rax, rax
	je	.L24
	mov	QWORD PTR 8[r15], 0
	mov	rdi, r15
	call	open_db@PLT
	mov	edi, DWORD PTR [r15]
	lea	r8, 24[rsp]
	mov	rcx, r15
	mov	edx, DWORD PTR shell_callback[rip]
	mov	rsi, rbp
	call	shell_exec@PLT
	test	eax, eax
	jne	.L25
	cmp	QWORD PTR 24[rsp], 0
	je	.L35
.L25:
	lea	rbx, 32[rsp]
	test	r13, r13
	je	.L83
.L27:
	mov	ecx, DWORD PTR 12[rsp]
	lea	rdx, .LC2[rip]
	mov	rsi, rbx
	xor	eax, eax
	mov	edi, 100
	call	sqlite3_snprintf@PLT
.L29:
	mov	rcx, QWORD PTR 24[rsp]
	test	rcx, rcx
	je	.L30
	mov	edi, DWORD PTR stderr[rip]
	mov	rdx, rbx
	lea	rsi, .LC4[rip]
	xor	eax, eax
	call	fprintf@PLT
	mov	rdi, QWORD PTR 24[rsp]
	call	sqlite3_free@PLT
	mov	QWORD PTR 24[rsp], 0
.L31:
	add	DWORD PTR [rsp], 1
.L35:
	mov	rdi, rbp
	xor	ebx, ebx
	xor	ebp, ebp
	call	free@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L77:
	mov	edi, DWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L81:
	mov	rdi, r12
	call	puts@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L79:
	mov	edi, DWORD PTR stderr[rip]
	mov	rdx, rbp
	lea	rsi, .LC5[rip]
	call	fprintf@PLT
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L73:
	cmp	QWORD PTR stdin_is_interactive[rip], 0
	je	.L4
	mov	edi, 10
	call	putchar@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L83:
	cmp	QWORD PTR stdin_is_interactive[rip], 0
	je	.L27
	lea	rdx, .LC3[rip]
	mov	rsi, rbx
	mov	edi, 100
	xor	eax, eax
	call	sqlite3_snprintf@PLT
	jmp	.L29
.L30:
	mov	edi, DWORD PTR [r15]
	call	sqlite3_errmsg@PLT
	mov	edi, DWORD PTR stderr[rip]
	mov	rdx, rbx
	lea	rsi, .LC4[rip]
	mov	rcx, rax
	xor	eax, eax
	call	fprintf@PLT
	jmp	.L31
.L82:
	mov	edi, DWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
	jmp	.L21
.L80:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	process_input, .-process_input
	.comm	stdin_is_interactive,8,8
	.comm	stderr,4,4
	.comm	shell_callback,4,4
	.comm	seenInterrupt,8,8
	.comm	bail_on_error,4,4
	.comm	END_TIMER,4,4
	.comm	BEGIN_TIMER,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_shell.c_process_input.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	";\000"
	.align	2
.LC1:
	.ascii	"Error: out of memory\012\000"
	.align	2
.LC2:
	.ascii	"Error: near line %d:\000"
	.align	2
.LC3:
	.ascii	"Error:\000"
	.align	2
.LC4:
	.ascii	"%s %s\012\000"
	.align	2
.LC5:
	.ascii	"Error: incomplete SQL: %s\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	process_input, %function
process_input:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r3
	mov	r10, r0
	mov	r8, r1
	mov	r9, r3
	mov	r6, r3
	mov	r5, r3
	sub	sp, sp, #140
	ldr	r2, .L104
	str	r3, [sp, #16]
	ldr	fp, .L104+4
	ldr	r2, [r2]
	str	r2, [sp, #132]
	mov	r2,#0
	str	r3, [sp, #12]
.L2:
	ldr	r0, [r10, #12]
	bl	fflush
	mov	r0, r4
	bl	free
	mov	r1, r8
	mov	r0, r5
	bl	one_input_line
	subs	r4, r0, #0
	beq	.L92
	ldr	r3, [fp]
	cmp	r3, #0
	beq	.L5
	cmp	r8, #0
	bne	.L4
	str	r8, [fp]
.L5:
	cmp	r5, #0
	add	r9, r9, #1
	beq	.L6
	ldrb	r3, [r5]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L10
.L6:
	mov	r0, r4
	bl	_all_whitespace
	cmp	r0, #0
	bne	.L9
.L10:
	ldrb	r3, [r4]	@ zero_extendqisi2
	cmp	r3, #46
	cmpeq	r6, #0
	beq	.L93
	mov	r0, r4
	bl	_is_command_terminator
	cmp	r0, #0
	bne	.L94
.L14:
	cmp	r5, #0
	beq	.L95
.L16:
	mov	r0, r4
	bl	strlen30
	add	r1, r0, r6
	mov	r7, r0
	add	r1, r1, #4
	mov	r0, r5
	bl	realloc
	subs	r5, r0, #0
	add	r3, r6, #1
	beq	.L96
	mov	r1, #10
	add	r2, r7, #1
	strb	r1, [r5, r6]
	add	r7, r7, r3
	mov	r1, r4
	add	r0, r5, r3
	bl	memcpy
	add	r0, r5, r6
	sub	r1, r7, r6
	bl	_contains_semicolon
	cmp	r0, #0
	bne	.L97
.L23:
	mov	r0, r5
	bl	_all_whitespace
	cmp	r0, #0
	moveq	r6, r7
	bne	.L34
.L9:
	ldr	r3, [sp, #12]
	cmp	r3, #0
	beq	.L2
.L12:
	ldr	r3, .L104+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L2
	cmp	r8, #0
	bne	.L4
	ldr	r3, .L104+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L2
.L4:
	cmp	r5, #0
	beq	.L32
	mov	r0, r5
	bl	_all_whitespace
	cmp	r0, #0
	beq	.L98
.L33:
	mov	r0, r5
	bl	free
.L32:
	mov	r0, r4
	bl	free
	ldr	r3, [sp, #12]
	cmp	r3, #0
	ldr	r3, .L104
	movle	r0, #0
	movgt	r0, #1
	ldr	r2, [r3]
	ldr	r3, [sp, #132]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L99
	add	sp, sp, #140
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L93:
	ldr	r3, [r10, #8]
	cmp	r3, #0
	bne	.L100
.L11:
	mov	r1, r10
	mov	r0, r4
	bl	do_meta_command
	cmp	r0, #2
	mov	r6, r0
	beq	.L4
	cmp	r0, #0
	beq	.L9
	ldr	r3, [sp, #12]
	mov	r6, #0
	add	r3, r3, #1
	str	r3, [sp, #12]
	b	.L12
.L94:
	mov	r1, r6
	mov	r0, r5
	bl	_is_complete
	cmp	r0, #0
	beq	.L14
	mov	r2, #2
	mov	r0, r4
	ldr	r1, .L104+16
	bl	memcpy
	cmp	r5, #0
	bne	.L16
.L95:
	ldrb	r0, [r4]	@ zero_extendqisi2
	cmp	r0, #0
	movne	r7, r4
	bne	.L17
	b	.L9
.L19:
	ldrb	r0, [r7, #1]!	@ zero_extendqisi2
	cmp	r0, #0
	beq	.L9
.L17:
	bl	IsSpace
	cmp	r0, #0
	bne	.L19
	ldrb	r3, [r7]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L9
	mov	r0, r4
	bl	strlen30
	mov	r7, r0
	add	r0, r0, #3
	bl	malloc
	subs	r5, r0, #0
	beq	.L101
.L20:
	mov	r1, r4
	add	r2, r7, #1
	mov	r0, r5
	bl	memcpy
	add	r0, r5, r6
	sub	r1, r7, r6
	str	r9, [sp, #16]
	bl	_contains_semicolon
	cmp	r0, #0
	beq	.L23
.L97:
	mov	r0, r5
	bl	sqlite3_complete
	cmp	r0, #0
	beq	.L23
	mov	r3, #0
	mov	r0, r10
	str	r3, [r10, #4]
	bl	open_db
	add	r3, sp, #28
	ldr	r2, .L104+20
	str	r3, [sp]
	mov	r1, r5
	mov	r3, r10
	ldr	r2, [r2]
	ldr	r0, [r10]
	bl	shell_exec
	cmp	r0, #0
	beq	.L102
.L24:
	add	r6, sp, #32
	cmp	r8, #0
	mov	r1, r6
	beq	.L103
.L26:
	mov	r0, #100
	ldr	r3, [sp, #16]
	ldr	r2, .L104+24
	bl	sqlite3_snprintf
.L28:
	ldr	r3, [sp, #28]
	ldr	r2, .L104+28
	cmp	r3, #0
	ldr	r7, [r2]
	beq	.L29
	mov	r2, r6
	ldr	r1, .L104+32
	mov	r0, r7
	bl	fprintf
	ldr	r0, [sp, #28]
	bl	sqlite3_free
	mov	r3, #0
	str	r3, [sp, #28]
.L30:
	ldr	r3, [sp, #12]
	add	r3, r3, #1
	str	r3, [sp, #12]
.L34:
	mov	r0, r5
	mov	r5, #0
	bl	free
	mov	r6, r5
	b	.L9
.L100:
	mov	r0, r4
	bl	puts
	b	.L11
.L98:
	ldr	r3, .L104+28
	mov	r2, r5
	ldr	r0, [r3]
	ldr	r1, .L104+36
	bl	fprintf
	b	.L33
.L102:
	ldr	r3, [sp, #28]
	cmp	r3, #0
	bne	.L24
	b	.L34
.L92:
	ldr	r3, .L104+12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L4
	mov	r0, #10
	bl	putchar
	b	.L4
.L103:
	ldr	r3, .L104+12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L26
	ldr	r2, .L104+40
	mov	r0, #100
	bl	sqlite3_snprintf
	b	.L28
.L29:
	ldr	r0, [r10]
	bl	sqlite3_errmsg
	mov	r2, r6
	mov	r3, r0
	ldr	r1, .L104+32
	mov	r0, r7
	bl	fprintf
	b	.L30
.L96:
	str	r3, [sp, #20]
	ldr	r3, .L104+28
	ldr	r1, .L104+44
	ldr	r0, [r3]
	bl	fprintf
	mov	r0, #1
	bl	exit
	mov	r1, #10
	ldr	r3, [sp, #20]
	strb	r1, [r6]
	mov	r0, r3
	mov	r1, r4
	add	r2, r7, #1
	add	r6, r7, r3
	bl	memcpy
	b	.L9
.L99:
	bl	__stack_chk_fail
.L101:
	ldr	r3, .L104+28
	ldr	r1, .L104+44
	ldr	r0, [r3]
	bl	fprintf
	mov	r0, #1
	bl	exit
	b	.L20
.L105:
	.align	2
.L104:
	.word	.LC6
	.word	seenInterrupt
	.word	bail_on_error
	.word	stdin_is_interactive
	.word	.LC0
	.word	shell_callback
	.word	.LC2
	.word	stderr
	.word	.LC4
	.word	.LC5
	.word	.LC3
	.word	.LC1
	.size	process_input, .-process_input
	.comm	stdin_is_interactive,4,4
	.comm	stderr,4,4
	.comm	shell_callback,4,4
	.comm	seenInterrupt,4,4
	.comm	bail_on_error,4,4
	.comm	END_TIMER,4,4
	.comm	BEGIN_TIMER,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
