	.file	"547441.c"
	.intel_syntax noprefix
	.text
	.globl	count_memory
	.type	count_memory, @function
count_memory:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], 0
.L5:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 44
	jne	.L2
	add	DWORD PTR -4[rbp], 1
	jmp	.L3
.L2:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L3
	add	DWORD PTR -4[rbp], 1
	jmp	.L7
.L3:
	add	DWORD PTR -8[rbp], 1
	jmp	.L5
.L7:
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	count_memory, .-count_memory
	.globl	init_memory
	.type	init_memory, @function
init_memory:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 72
	.cfi_offset 3, -24
	mov	QWORD PTR -56[rbp], rdi
	mov	QWORD PTR -64[rbp], rsi
	mov	QWORD PTR -72[rbp], rdx
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	count_memory
	mov	DWORD PTR -44[rbp], eax
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR -44[rbp]
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	DWORD PTR -48[rbp], 0
.L12:
	mov	rax, QWORD PTR -32[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 44
	jne	.L9
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	lea	rbx, [rdx+rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR [rbx], eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 1
	mov	QWORD PTR -40[rbp], rax
	add	DWORD PTR -48[rbp], 1
	jmp	.L10
.L9:
	mov	rax, QWORD PTR -32[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L10
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	lea	rbx, [rdx+rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR [rbx], eax
	jmp	.L13
.L10:
	add	QWORD PTR -32[rbp], 1
	jmp	.L12
.L13:
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	init_memory, .-init_memory
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	print_memory
	.type	print_memory, @function
print_memory:
.LFB8:
	.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 -4[rbp], 0
	jmp	.L15
.L17:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -28[rbp]
	sub	eax, 1
	cmp	DWORD PTR -4[rbp], eax
	je	.L16
	mov	edi, 44
	call	putchar@PLT
.L16:
	add	DWORD PTR -4[rbp], 1
.L15:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L17
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	print_memory, .-print_memory
	.globl	parse_instruction
	.type	parse_instruction, @function
parse_instruction:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, DWORD PTR -36[rbp]
	lea	rax, -14[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	DWORD PTR -20[rbp], eax
	mov	DWORD PTR -24[rbp], 0
	cmp	DWORD PTR -20[rbp], 2
	jle	.L19
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 2
	mov	DWORD PTR -24[rbp], eax
.L19:
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, -14[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	atoi@PLT
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	parse_instruction, .-parse_instruction
	.globl	parse_mode
	.type	parse_mode, @function
parse_mode:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	DWORD PTR -40[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, DWORD PTR -36[rbp]
	lea	rax, -14[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 2
	cmp	DWORD PTR -40[rbp], eax
	jl	.L23
	mov	eax, 0
	jmp	.L25
.L23:
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 3
	sub	eax, DWORD PTR -40[rbp]
	cdqe
	movzx	eax, BYTE PTR -14[rbp+rax]
	movsx	eax, al
	sub	eax, 48
.L25:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	parse_mode, .-parse_mode
	.globl	get_param_value
	.type	get_param_value, @function
get_param_value:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	QWORD PTR -16[rbp], rdx
	cmp	DWORD PTR -4[rbp], 0
	jne	.L28
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	jmp	.L29
.L28:
	mov	eax, DWORD PTR -8[rbp]
.L29:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	get_param_value, .-get_param_value
	.section	.rodata
.LC1:
	.string	"Enter input: "
.LC2:
	.string	"%d\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 136
	.cfi_offset 3, -24
	mov	QWORD PTR -136[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -112[rbp], 0
.L43:
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -108[rbp], eax
	mov	eax, DWORD PTR -108[rbp]
	mov	edi, eax
	call	parse_instruction
	mov	DWORD PTR -104[rbp], eax
	cmp	DWORD PTR -104[rbp], 1
	jne	.L31
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	ebx, DWORD PTR [rax]
	mov	eax, DWORD PTR -108[rbp]
	mov	esi, 0
	mov	edi, eax
	call	parse_mode
	mov	ecx, eax
	mov	rax, QWORD PTR -136[rbp]
	mov	rdx, rax
	mov	esi, ebx
	mov	edi, ecx
	call	get_param_value
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	add	rax, 2
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	ebx, DWORD PTR [rax]
	mov	eax, DWORD PTR -108[rbp]
	mov	esi, 1
	mov	edi, eax
	call	parse_mode
	mov	ecx, eax
	mov	rax, QWORD PTR -136[rbp]
	mov	rdx, rax
	mov	esi, ebx
	mov	edi, ecx
	call	get_param_value
	mov	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	add	rax, 3
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	ecx, DWORD PTR -36[rbp]
	mov	edx, DWORD PTR -32[rbp]
	add	edx, ecx
	mov	DWORD PTR [rax], edx
	add	DWORD PTR -112[rbp], 4
	jmp	.L43
.L31:
	cmp	DWORD PTR -104[rbp], 2
	jne	.L33
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	ebx, DWORD PTR [rax]
	mov	eax, DWORD PTR -108[rbp]
	mov	esi, 0
	mov	edi, eax
	call	parse_mode
	mov	ecx, eax
	mov	rax, QWORD PTR -136[rbp]
	mov	rdx, rax
	mov	esi, ebx
	mov	edi, ecx
	call	get_param_value
	mov	DWORD PTR -48[rbp], eax
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	add	rax, 2
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	ebx, DWORD PTR [rax]
	mov	eax, DWORD PTR -108[rbp]
	mov	esi, 1
	mov	edi, eax
	call	parse_mode
	mov	ecx, eax
	mov	rax, QWORD PTR -136[rbp]
	mov	rdx, rax
	mov	esi, ebx
	mov	edi, ecx
	call	get_param_value
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	add	rax, 3
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -40[rbp], eax
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -48[rbp]
	imul	eax, DWORD PTR -44[rbp]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -112[rbp], 4
	jmp	.L43
.L33:
	cmp	DWORD PTR -104[rbp], 3
	jne	.L34
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -116[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -52[rbp], eax
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -116[rbp]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -112[rbp], 2
	jmp	.L43
.L34:
	cmp	DWORD PTR -104[rbp], 4
	jne	.L35
	mov	eax, DWORD PTR -108[rbp]
	mov	esi, 0
	mov	edi, eax
	call	parse_mode
	mov	DWORD PTR -60[rbp], eax
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	ecx, DWORD PTR [rax]
	mov	rdx, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR -60[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	get_param_value
	mov	DWORD PTR -56[rbp], eax
	mov	eax, DWORD PTR -56[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -112[rbp], 2
	jmp	.L43
.L35:
	cmp	DWORD PTR -104[rbp], 5
	jne	.L36
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	ebx, DWORD PTR [rax]
	mov	eax, DWORD PTR -108[rbp]
	mov	esi, 0
	mov	edi, eax
	call	parse_mode
	mov	ecx, eax
	mov	rax, QWORD PTR -136[rbp]
	mov	rdx, rax
	mov	esi, ebx
	mov	edi, ecx
	call	get_param_value
	mov	DWORD PTR -68[rbp], eax
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	add	rax, 2
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	ebx, DWORD PTR [rax]
	mov	eax, DWORD PTR -108[rbp]
	mov	esi, 1
	mov	edi, eax
	call	parse_mode
	mov	ecx, eax
	mov	rax, QWORD PTR -136[rbp]
	mov	rdx, rax
	mov	esi, ebx
	mov	edi, ecx
	call	get_param_value
	mov	DWORD PTR -64[rbp], eax
	cmp	DWORD PTR -68[rbp], 0
	je	.L37
	mov	eax, DWORD PTR -64[rbp]
	mov	DWORD PTR -112[rbp], eax
	jmp	.L43
.L37:
	add	DWORD PTR -112[rbp], 3
	jmp	.L43
.L36:
	cmp	DWORD PTR -104[rbp], 6
	jne	.L38
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	ebx, DWORD PTR [rax]
	mov	eax, DWORD PTR -108[rbp]
	mov	esi, 0
	mov	edi, eax
	call	parse_mode
	mov	ecx, eax
	mov	rax, QWORD PTR -136[rbp]
	mov	rdx, rax
	mov	esi, ebx
	mov	edi, ecx
	call	get_param_value
	mov	DWORD PTR -76[rbp], eax
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	add	rax, 2
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	ebx, DWORD PTR [rax]
	mov	eax, DWORD PTR -108[rbp]
	mov	esi, 1
	mov	edi, eax
	call	parse_mode
	mov	ecx, eax
	mov	rax, QWORD PTR -136[rbp]
	mov	rdx, rax
	mov	esi, ebx
	mov	edi, ecx
	call	get_param_value
	mov	DWORD PTR -72[rbp], eax
	cmp	DWORD PTR -76[rbp], 0
	jne	.L39
	mov	eax, DWORD PTR -72[rbp]
	mov	DWORD PTR -112[rbp], eax
	jmp	.L43
.L39:
	add	DWORD PTR -112[rbp], 3
	jmp	.L43
.L38:
	cmp	DWORD PTR -104[rbp], 7
	jne	.L40
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	ebx, DWORD PTR [rax]
	mov	eax, DWORD PTR -108[rbp]
	mov	esi, 0
	mov	edi, eax
	call	parse_mode
	mov	ecx, eax
	mov	rax, QWORD PTR -136[rbp]
	mov	rdx, rax
	mov	esi, ebx
	mov	edi, ecx
	call	get_param_value
	mov	DWORD PTR -88[rbp], eax
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	add	rax, 2
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	ebx, DWORD PTR [rax]
	mov	eax, DWORD PTR -108[rbp]
	mov	esi, 1
	mov	edi, eax
	call	parse_mode
	mov	ecx, eax
	mov	rax, QWORD PTR -136[rbp]
	mov	rdx, rax
	mov	esi, ebx
	mov	edi, ecx
	call	get_param_value
	mov	DWORD PTR -84[rbp], eax
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	add	rax, 3
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -80[rbp], eax
	mov	eax, DWORD PTR -88[rbp]
	cmp	eax, DWORD PTR -84[rbp]
	setl	cl
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rdx, rax
	movzx	eax, cl
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -112[rbp], 4
	jmp	.L43
.L40:
	cmp	DWORD PTR -104[rbp], 8
	jne	.L41
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	ebx, DWORD PTR [rax]
	mov	eax, DWORD PTR -108[rbp]
	mov	esi, 0
	mov	edi, eax
	call	parse_mode
	mov	ecx, eax
	mov	rax, QWORD PTR -136[rbp]
	mov	rdx, rax
	mov	esi, ebx
	mov	edi, ecx
	call	get_param_value
	mov	DWORD PTR -100[rbp], eax
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	add	rax, 2
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	ebx, DWORD PTR [rax]
	mov	eax, DWORD PTR -108[rbp]
	mov	esi, 1
	mov	edi, eax
	call	parse_mode
	mov	ecx, eax
	mov	rax, QWORD PTR -136[rbp]
	mov	rdx, rax
	mov	esi, ebx
	mov	edi, ecx
	call	get_param_value
	mov	DWORD PTR -96[rbp], eax
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	add	rax, 3
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -92[rbp], eax
	mov	eax, DWORD PTR -100[rbp]
	cmp	eax, DWORD PTR -96[rbp]
	sete	cl
	mov	eax, DWORD PTR -92[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -136[rbp]
	add	rdx, rax
	movzx	eax, cl
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -112[rbp], 4
	jmp	.L43
.L41:
	cmp	DWORD PTR -104[rbp], 99
	je	.L46
	jmp	.L43
.L46:
	nop
	nop
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L44
	call	__stack_chk_fail@PLT
.L44:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	run, .-run
	.section	.rodata
.LC3:
	.string	"(%s) should be (%s) => ("
.LC4:
	.string	")"
	.text
	.globl	run_test_case
	.type	run_test_case, @function
run_test_case:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -16[rbp], 0
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdx, -20[rbp]
	lea	rcx, -16[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	init_memory
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	run
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	print_memory
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L48
	call	__stack_chk_fail@PLT
.L48:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	run_test_case, .-run_test_case
	.section	.rodata
.LC5:
	.string	"Output: %s: \n"
	.text
	.globl	run_output_test_case
	.type	run_output_test_case, @function
run_output_test_case:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -16[rbp], 0
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdx, -20[rbp]
	lea	rcx, -16[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	init_memory
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	run
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L50
	call	__stack_chk_fail@PLT
.L50:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	run_output_test_case, .-run_output_test_case
	.section	.rodata
.LC6:
	.string	"Running on input:"
.LC7:
	.string	"r"
.LC8:
	.string	"input.txt"
	.text
	.globl	main
	.type	main, @function
main:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rsi, .LC7[rip]
	lea	rdi, .LC8[rip]
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	rdx, QWORD PTR -24[rbp]
	lea	rcx, -40[rbp]
	lea	rax, -48[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	getline@PLT
	mov	QWORD PTR -32[rbp], 0
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, -52[rbp]
	lea	rcx, -32[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	init_memory
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	run
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L53
	call	__stack_chk_fail@PLT
.L53:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	main, .-main
	.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	"547441.c"
	.text
	.align	2
	.global	count_memory
	.syntax unified
	.arm
	.fpu softvfp
	.type	count_memory, %function
count_memory:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
.L5:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #44
	bne	.L2
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	b	.L3
.L2:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L3
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	b	.L7
.L3:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L5
.L7:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	count_memory, .-count_memory
	.align	2
	.global	init_memory
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_memory, %function
init_memory:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #44
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	str	r2, [fp, #-48]
	ldr	r0, [fp, #-40]
	bl	count_memory
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-24]
.L12:
	ldr	r3, [fp, #-28]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #44
	bne	.L9
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r4, r2, r3
	ldr	r0, [fp, #-32]
	bl	atoi
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	b	.L10
.L9:
	ldr	r3, [fp, #-28]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L10
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r4, r2, r3
	ldr	r0, [fp, #-32]
	bl	atoi
	mov	r3, r0
	str	r3, [r4]
	b	.L13
.L10:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
	b	.L12
.L13:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	init_memory, .-init_memory
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\000"
	.text
	.align	2
	.global	print_memory
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_memory, %function
print_memory:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L15
.L17:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L18
	bl	printf
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	beq	.L16
	mov	r0, #44
	bl	putchar
.L16:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L15:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L17
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC0
	.size	print_memory, .-print_memory
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	parse_instruction
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_instruction, %function
parse_instruction:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	ldr	r3, .L24
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #16
	ldr	r2, [fp, #-32]
	ldr	r1, .L24+4
	mov	r0, r3
	bl	sprintf
	str	r0, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-20]
	cmp	r3, #2
	ble	.L21
	ldr	r3, [fp, #-20]
	sub	r3, r3, #2
	str	r3, [fp, #-24]
.L21:
	ldr	r3, [fp, #-24]
	sub	r2, fp, #16
	add	r3, r2, r3
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L24
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L23
	bl	__stack_chk_fail
.L23:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC1
	.word	.LC0
	.size	parse_instruction, .-parse_instruction
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	parse_mode
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_mode, %function
parse_mode:
	@ 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]
	ldr	r3, .L31
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #16
	ldr	r2, [fp, #-24]
	ldr	r1, .L31+4
	mov	r0, r3
	bl	sprintf
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	sub	r3, r3, #2
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	blt	.L27
	mov	r3, #0
	b	.L29
.L27:
	ldr	r3, [fp, #-20]
	sub	r2, r3, #3
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldrb	r3, [r3, #-12]	@ zero_extendqisi2
	sub	r3, r3, #48
.L29:
	ldr	r2, .L31
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L30
	bl	__stack_chk_fail
.L30:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L32:
	.align	2
.L31:
	.word	.LC2
	.word	.LC0
	.size	parse_mode, .-parse_mode
	.align	2
	.global	get_param_value
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_param_value, %function
get_param_value:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L34
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	b	.L35
.L34:
	ldr	r3, [fp, #-12]
.L35:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	get_param_value, .-get_param_value
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Enter input: \000"
	.align	2
.LC4:
	.ascii	"%d\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	run
	.syntax unified
	.arm
	.fpu softvfp
	.type	run, %function
run:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #104
	str	r0, [fp, #-104]
	ldr	r3, .L53
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-96]
.L49:
	ldr	r3, [fp, #-96]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-92]
	ldr	r0, [fp, #-92]
	bl	parse_instruction
	str	r0, [fp, #-88]
	ldr	r3, [fp, #-88]
	cmp	r3, #1
	bne	.L37
	mov	r1, #0
	ldr	r0, [fp, #-92]
	bl	parse_mode
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-104]
	mov	r1, r3
	bl	get_param_value
	str	r0, [fp, #-20]
	mov	r1, #1
	ldr	r0, [fp, #-92]
	bl	parse_mode
	ldr	r3, [fp, #-96]
	add	r3, r3, #2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-104]
	mov	r1, r3
	bl	get_param_value
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-96]
	add	r3, r3, #3
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	ldr	r1, [fp, #-20]
	ldr	r2, [fp, #-16]
	add	r2, r1, r2
	str	r2, [r3]
	ldr	r3, [fp, #-96]
	add	r3, r3, #4
	str	r3, [fp, #-96]
	b	.L49
.L37:
	ldr	r3, [fp, #-88]
	cmp	r3, #2
	bne	.L39
	mov	r1, #0
	ldr	r0, [fp, #-92]
	bl	parse_mode
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-104]
	mov	r1, r3
	bl	get_param_value
	str	r0, [fp, #-32]
	mov	r1, #1
	ldr	r0, [fp, #-92]
	bl	parse_mode
	ldr	r3, [fp, #-96]
	add	r3, r3, #2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-104]
	mov	r1, r3
	bl	get_param_value
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-96]
	add	r3, r3, #3
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	ldr	r2, [fp, #-32]
	ldr	r1, [fp, #-28]
	mul	r2, r1, r2
	str	r2, [r3]
	ldr	r3, [fp, #-96]
	add	r3, r3, #4
	str	r3, [fp, #-96]
	b	.L49
.L39:
	ldr	r3, [fp, #-88]
	cmp	r3, #3
	bne	.L40
	ldr	r0, .L53+4
	bl	printf
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, .L53+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	ldr	r2, [fp, #-100]
	str	r2, [r3]
	ldr	r3, [fp, #-96]
	add	r3, r3, #2
	str	r3, [fp, #-96]
	b	.L49
.L40:
	ldr	r3, [fp, #-88]
	cmp	r3, #4
	bne	.L41
	mov	r1, #0
	ldr	r0, [fp, #-92]
	bl	parse_mode
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-104]
	mov	r1, r3
	ldr	r0, [fp, #-44]
	bl	get_param_value
	str	r0, [fp, #-40]
	ldr	r1, [fp, #-40]
	ldr	r0, .L53+12
	bl	printf
	ldr	r3, [fp, #-96]
	add	r3, r3, #2
	str	r3, [fp, #-96]
	b	.L49
.L41:
	ldr	r3, [fp, #-88]
	cmp	r3, #5
	bne	.L42
	mov	r1, #0
	ldr	r0, [fp, #-92]
	bl	parse_mode
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-104]
	mov	r1, r3
	bl	get_param_value
	str	r0, [fp, #-52]
	mov	r1, #1
	ldr	r0, [fp, #-92]
	bl	parse_mode
	ldr	r3, [fp, #-96]
	add	r3, r3, #2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-104]
	mov	r1, r3
	bl	get_param_value
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	beq	.L43
	ldr	r3, [fp, #-48]
	str	r3, [fp, #-96]
	b	.L49
.L43:
	ldr	r3, [fp, #-96]
	add	r3, r3, #3
	str	r3, [fp, #-96]
	b	.L49
.L42:
	ldr	r3, [fp, #-88]
	cmp	r3, #6
	bne	.L44
	mov	r1, #0
	ldr	r0, [fp, #-92]
	bl	parse_mode
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-104]
	mov	r1, r3
	bl	get_param_value
	str	r0, [fp, #-60]
	mov	r1, #1
	ldr	r0, [fp, #-92]
	bl	parse_mode
	ldr	r3, [fp, #-96]
	add	r3, r3, #2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-104]
	mov	r1, r3
	bl	get_param_value
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bne	.L45
	ldr	r3, [fp, #-56]
	str	r3, [fp, #-96]
	b	.L49
.L45:
	ldr	r3, [fp, #-96]
	add	r3, r3, #3
	str	r3, [fp, #-96]
	b	.L49
.L44:
	ldr	r3, [fp, #-88]
	cmp	r3, #7
	bne	.L46
	mov	r1, #0
	ldr	r0, [fp, #-92]
	bl	parse_mode
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-104]
	mov	r1, r3
	bl	get_param_value
	str	r0, [fp, #-72]
	mov	r1, #1
	ldr	r0, [fp, #-92]
	bl	parse_mode
	ldr	r3, [fp, #-96]
	add	r3, r3, #2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-104]
	mov	r1, r3
	bl	get_param_value
	str	r0, [fp, #-68]
	ldr	r3, [fp, #-96]
	add	r3, r3, #3
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-64]
	ldr	r2, [fp, #-72]
	ldr	r3, [fp, #-68]
	cmp	r2, r3
	movlt	r3, #1
	movge	r3, #0
	and	r1, r3, #255
	ldr	r3, [fp, #-64]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	mov	r2, r1
	str	r2, [r3]
	ldr	r3, [fp, #-96]
	add	r3, r3, #4
	str	r3, [fp, #-96]
	b	.L49
.L46:
	ldr	r3, [fp, #-88]
	cmp	r3, #8
	bne	.L47
	mov	r1, #0
	ldr	r0, [fp, #-92]
	bl	parse_mode
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-104]
	mov	r1, r3
	bl	get_param_value
	str	r0, [fp, #-84]
	mov	r1, #1
	ldr	r0, [fp, #-92]
	bl	parse_mode
	ldr	r3, [fp, #-96]
	add	r3, r3, #2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-104]
	mov	r1, r3
	bl	get_param_value
	str	r0, [fp, #-80]
	ldr	r3, [fp, #-96]
	add	r3, r3, #3
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-76]
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-80]
	cmp	r2, r3
	moveq	r3, #1
	movne	r3, #0
	and	r1, r3, #255
	ldr	r3, [fp, #-76]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-104]
	add	r3, r2, r3
	mov	r2, r1
	str	r2, [r3]
	ldr	r3, [fp, #-96]
	add	r3, r3, #4
	str	r3, [fp, #-96]
	b	.L49
.L47:
	ldr	r3, [fp, #-88]
	cmp	r3, #99
	beq	.L52
	b	.L49
.L52:
	nop
	nop
	ldr	r3, .L53
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L50
	bl	__stack_chk_fail
.L50:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L54:
	.align	2
.L53:
	.word	.LC5
	.word	.LC3
	.word	.LC0
	.word	.LC4
	.size	run, .-run
	.section	.rodata
	.align	2
.LC6:
	.ascii	"(%s) should be (%s) => (\000"
	.align	2
.LC7:
	.ascii	")\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	run_test_case
	.syntax unified
	.arm
	.fpu softvfp
	.type	run_test_case, %function
run_test_case:
	@ 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]
	ldr	r3, .L57
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-24]
	ldr	r0, .L57+4
	bl	printf
	sub	r2, fp, #12
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	init_memory
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	run
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-12]
	mov	r1, r2
	mov	r0, r3
	bl	print_memory
	ldr	r0, .L57+8
	bl	puts
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	free
	nop
	ldr	r3, .L57
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L56
	bl	__stack_chk_fail
.L56:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L58:
	.align	2
.L57:
	.word	.LC8
	.word	.LC6
	.word	.LC7
	.size	run_test_case, .-run_test_case
	.section	.rodata
	.align	2
.LC9:
	.ascii	"Output: %s: \012\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	run_output_test_case
	.syntax unified
	.arm
	.fpu softvfp
	.type	run_output_test_case, %function
run_output_test_case:
	@ 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]
	ldr	r3, .L61
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r1, [fp, #-28]
	ldr	r0, .L61+4
	bl	printf
	sub	r2, fp, #12
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	init_memory
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	run
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	free
	nop
	ldr	r3, .L61
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L60
	bl	__stack_chk_fail
.L60:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L62:
	.align	2
.L61:
	.word	.LC10
	.word	.LC9
	.size	run_output_test_case, .-run_output_test_case
	.section	.rodata
	.align	2
.LC11:
	.ascii	"Running on input:\000"
	.align	2
.LC12:
	.ascii	"r\000"
	.align	2
.LC13:
	.ascii	"input.txt\000"
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L66
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L66+4
	bl	puts
	ldr	r1, .L66+8
	ldr	r0, .L66+12
	bl	fopen
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-28]
	sub	r1, fp, #28
	sub	r3, fp, #32
	ldr	r2, [fp, #-16]
	mov	r0, r3
	bl	getline
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-32]
	sub	r2, fp, #20
	sub	r1, fp, #24
	mov	r0, r3
	bl	init_memory
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-20]
	lsl	r2, r2, #2
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	memcpy
	ldr	r0, [fp, #-12]
	bl	run
	ldr	r0, [fp, #-12]
	bl	free
	mov	r3, #0
	ldr	r2, .L66
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L65
	bl	__stack_chk_fail
.L65:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L67:
	.align	2
.L66:
	.word	.LC14
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
