	.file	"676522.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"###invalid index %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1008
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	jmp	.L2
.L3:
	lea	rax, -1008[rbp]
	mov	rdi, rax
	call	semi_invalid_c
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
.L2:
	lea	rax, -1008[rbp]
	mov	esi, 1000
	mov	rdi, rax
	call	get_multi_line
	test	eax, eax
	jne	.L3
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	semi_invalid_c
	.type	semi_invalid_c, @function
semi_invalid_c:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1040
	mov	QWORD PTR -1032[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1016[rbp], 0
	mov	DWORD PTR -1012[rbp], -1
	mov	QWORD PTR -1008[rbp], 0
	mov	QWORD PTR -1000[rbp], 0
	lea	rdx, -992[rbp]
	mov	eax, 0
	mov	ecx, 123
	mov	rdi, rdx
	rep stosq
	jmp	.L7
.L18:
	mov	rax, QWORD PTR -1032[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 91
	je	.L8
	mov	rax, QWORD PTR -1032[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 40
	je	.L8
	mov	rax, QWORD PTR -1032[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 123
	jne	.L9
.L8:
	add	DWORD PTR -1012[rbp], 1
	mov	rax, QWORD PTR -1032[rbp]
	movzx	edx, BYTE PTR [rax]
	mov	eax, DWORD PTR -1012[rbp]
	cdqe
	mov	BYTE PTR -1008[rbp+rax], dl
	jmp	.L10
.L9:
	mov	rax, QWORD PTR -1032[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 93
	je	.L11
	mov	rax, QWORD PTR -1032[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 41
	je	.L11
	mov	rax, QWORD PTR -1032[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 125
	jne	.L10
.L11:
	cmp	DWORD PTR -1012[rbp], -1
	jne	.L12
	mov	eax, DWORD PTR -1016[rbp]
	jmp	.L19
.L12:
	mov	rax, QWORD PTR -1032[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 93
	jne	.L14
	mov	eax, DWORD PTR -1012[rbp]
	cdqe
	movzx	eax, BYTE PTR -1008[rbp+rax]
	cmp	al, 91
	je	.L15
.L14:
	mov	rax, QWORD PTR -1032[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 41
	jne	.L16
	mov	eax, DWORD PTR -1012[rbp]
	cdqe
	movzx	eax, BYTE PTR -1008[rbp+rax]
	cmp	al, 40
	je	.L15
.L16:
	mov	rax, QWORD PTR -1032[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 125
	jne	.L17
	mov	eax, DWORD PTR -1012[rbp]
	cdqe
	movzx	eax, BYTE PTR -1008[rbp+rax]
	cmp	al, 123
	jne	.L17
.L15:
	mov	eax, DWORD PTR -1012[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -1012[rbp], edx
	cdqe
	mov	BYTE PTR -1008[rbp+rax], 0
	jmp	.L10
.L17:
	mov	eax, DWORD PTR -1016[rbp]
	jmp	.L19
.L10:
	add	DWORD PTR -1016[rbp], 1
	add	QWORD PTR -1032[rbp], 1
	lea	rax, -1008[rbp]
	mov	rdi, rax
	call	puts@PLT
.L7:
	mov	rax, QWORD PTR -1032[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L18
	mov	eax, -1
.L19:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	semi_invalid_c, .-semi_invalid_c
	.globl	get_multi_line
	.type	get_multi_line, @function
get_multi_line:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L22
.L27:
	cmp	DWORD PTR -4[rbp], 10
	jne	.L23
	cmp	DWORD PTR -8[rbp], 0
	je	.L24
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	jmp	.L25
.L24:
	mov	DWORD PTR -8[rbp], 1
	jmp	.L26
.L23:
	mov	DWORD PTR -8[rbp], 0
.L26:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -4[rbp]
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -12[rbp], 1
.L22:
	mov	eax, DWORD PTR -28[rbp]
	sub	eax, 1
	cmp	DWORD PTR -12[rbp], eax
	jge	.L25
	call	getchar@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L27
.L25:
	mov	eax, DWORD PTR -12[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	get_multi_line, .-get_multi_line
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"676522.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"###invalid index %d\012\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1008
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1008
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	b	.L2
.L3:
	sub	r3, fp, #1008
	mov	r0, r3
	bl	semi_invalid_c
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L6+4
	bl	printf
.L2:
	sub	r3, fp, #1008
	mov	r1, #1000
	mov	r0, r3
	bl	get_multi_line
	mov	r3, r0
	cmp	r3, #0
	bne	.L3
	mov	r3, #0
	ldr	r2, .L6
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L5
	bl	__stack_chk_fail
.L5:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC1
	.word	.LC0
	.size	main, .-main
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	semi_invalid_c
	.syntax unified
	.arm
	.fpu softvfp
	.type	semi_invalid_c, %function
semi_invalid_c:
	@ args = 0, pretend = 0, frame = 1024
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1024
	str	r0, [fp, #-1024]
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1016]
	mvn	r3, #0
	str	r3, [fp, #-1012]
	mov	r3, #0
	str	r3, [fp, #-1008]
	sub	r3, fp, #1004
	mov	r2, #996
	mov	r1, #0
	mov	r0, r3
	bl	memset
	b	.L9
.L20:
	ldr	r3, [fp, #-1024]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #91
	beq	.L10
	ldr	r3, [fp, #-1024]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #40
	beq	.L10
	ldr	r3, [fp, #-1024]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #123
	bne	.L11
.L10:
	ldr	r3, [fp, #-1012]
	add	r3, r3, #1
	str	r3, [fp, #-1012]
	ldr	r3, [fp, #-1024]
	ldrb	r1, [r3]	@ zero_extendqisi2
	sub	r2, fp, #1008
	ldr	r3, [fp, #-1012]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	b	.L12
.L11:
	ldr	r3, [fp, #-1024]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #93
	beq	.L13
	ldr	r3, [fp, #-1024]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #41
	beq	.L13
	ldr	r3, [fp, #-1024]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #125
	bne	.L12
.L13:
	ldr	r3, [fp, #-1012]
	cmn	r3, #1
	bne	.L14
	ldr	r3, [fp, #-1016]
	b	.L21
.L14:
	ldr	r3, [fp, #-1024]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #93
	bne	.L16
	sub	r2, fp, #1008
	ldr	r3, [fp, #-1012]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #91
	beq	.L17
.L16:
	ldr	r3, [fp, #-1024]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #41
	bne	.L18
	sub	r2, fp, #1008
	ldr	r3, [fp, #-1012]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #40
	beq	.L17
.L18:
	ldr	r3, [fp, #-1024]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #125
	bne	.L19
	sub	r2, fp, #1008
	ldr	r3, [fp, #-1012]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #123
	bne	.L19
.L17:
	ldr	r3, [fp, #-1012]
	sub	r2, r3, #1
	str	r2, [fp, #-1012]
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3, #-1004]
	b	.L12
.L19:
	ldr	r3, [fp, #-1016]
	b	.L21
.L12:
	ldr	r3, [fp, #-1016]
	add	r3, r3, #1
	str	r3, [fp, #-1016]
	ldr	r3, [fp, #-1024]
	add	r3, r3, #1
	str	r3, [fp, #-1024]
	sub	r3, fp, #1008
	mov	r0, r3
	bl	puts
.L9:
	ldr	r3, [fp, #-1024]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L20
	mvn	r3, #0
.L21:
	ldr	r2, .L23
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L22
	bl	__stack_chk_fail
.L22:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC2
	.size	semi_invalid_c, .-semi_invalid_c
	.align	2
	.global	get_multi_line
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_multi_line, %function
get_multi_line:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L26
.L31:
	ldr	r3, [fp, #-8]
	cmp	r3, #10
	bne	.L27
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L28
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	b	.L29
.L28:
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L30
.L27:
	mov	r3, #0
	str	r3, [fp, #-12]
.L30:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L26:
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bge	.L29
	bl	getchar
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L31
.L29:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	get_multi_line, .-get_multi_line
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
