	.file	"184567.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"ERROR: wrong number of arguments"
.LC1:
	.string	"r"
	.align 8
.LC2:
	.string	"ERROR: file not opened properly"
	.align 8
.LC3:
	.string	"ERROR: tried to access invalid (less than 0) cell"
	.align 8
.LC4:
	.string	"ERROR: non-brainfuck character encountered: %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	QWORD PTR -40[rbp], 0
	mov	DWORD PTR -60[rbp], 0
	mov	BYTE PTR -61[rbp], 0
	mov	DWORD PTR -56[rbp], 1
	mov	DWORD PTR -52[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	DWORD PTR -48[rbp], 0
	mov	DWORD PTR -44[rbp], 0
	cmp	DWORD PTR -68[rbp], 2
	je	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L3
.L2:
	mov	esi, 4
	mov	edi, 1
	call	calloc@PLT
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L5
	lea	rdi, .LC2[rip]
	call	puts@PLT
	jmp	.L5
.L6:
	add	DWORD PTR -48[rbp], 1
.L5:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	cmp	eax, -1
	jne	.L6
	mov	eax, DWORD PTR -48[rbp]
	add	eax, 2
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	rewind@PLT
	mov	DWORD PTR -52[rbp], 0
	jmp	.L7
.L8:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -52[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -52[rbp], 1
.L7:
	mov	eax, DWORD PTR -52[rbp]
	cmp	eax, DWORD PTR -48[rbp]
	jl	.L8
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	DWORD PTR -52[rbp], 0
	jmp	.L9
.L34:
	mov	eax, DWORD PTR -52[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -61[rbp], al
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	movsx	rax, BYTE PTR -61[rbp]
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8192
	test	eax, eax
	jne	.L35
	movsx	eax, BYTE PTR -61[rbp]
	sub	eax, 43
	cmp	eax, 50
	ja	.L12
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L14[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L14[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L14:
	.long	.L21-.L14
	.long	.L20-.L14
	.long	.L19-.L14
	.long	.L18-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L17-.L14
	.long	.L12-.L14
	.long	.L16-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L12-.L14
	.long	.L15-.L14
	.long	.L12-.L14
	.long	.L13-.L14
	.text
.L21:
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	add	edx, 1
	mov	DWORD PTR [rax], edx
	jmp	.L11
.L19:
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	sub	edx, 1
	mov	DWORD PTR [rax], edx
	jmp	.L11
.L16:
	mov	eax, DWORD PTR -60[rbp]
	add	eax, 1
	cmp	DWORD PTR -56[rbp], eax
	je	.L22
	add	DWORD PTR -60[rbp], 1
	jmp	.L11
.L22:
	add	DWORD PTR -56[rbp], 1
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -40[rbp], rax
	add	DWORD PTR -60[rbp], 1
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	jmp	.L11
.L17:
	cmp	DWORD PTR -60[rbp], 0
	jle	.L24
	sub	DWORD PTR -60[rbp], 1
	jmp	.L11
.L24:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L3
.L18:
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	putchar@PLT
	jmp	.L11
.L20:
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	lea	rbx, [rdx+rax]
	call	getchar@PLT
	mov	DWORD PTR [rbx], eax
	jmp	.L11
.L15:
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L36
	add	DWORD PTR -44[rbp], 1
	jmp	.L27
.L29:
	add	DWORD PTR -52[rbp], 1
	mov	eax, DWORD PTR -52[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 93
	jne	.L28
	sub	DWORD PTR -44[rbp], 1
	jmp	.L27
.L28:
	mov	eax, DWORD PTR -52[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 91
	jne	.L27
	add	DWORD PTR -44[rbp], 1
.L27:
	cmp	DWORD PTR -44[rbp], 0
	jne	.L29
	jmp	.L36
.L13:
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L37
	add	DWORD PTR -44[rbp], 1
	jmp	.L31
.L33:
	sub	DWORD PTR -52[rbp], 1
	mov	eax, DWORD PTR -52[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 91
	jne	.L32
	sub	DWORD PTR -44[rbp], 1
	jmp	.L31
.L32:
	mov	eax, DWORD PTR -52[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 93
	jne	.L31
	add	DWORD PTR -44[rbp], 1
.L31:
	cmp	DWORD PTR -44[rbp], 0
	jne	.L33
	jmp	.L37
.L12:
	movsx	eax, BYTE PTR -61[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L3
.L35:
	nop
	jmp	.L11
.L36:
	nop
	jmp	.L11
.L37:
	nop
.L11:
	add	DWORD PTR -52[rbp], 1
.L9:
	mov	eax, DWORD PTR -52[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L34
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
.L3:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"184567.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"ERROR: wrong number of arguments\000"
	.align	2
.LC1:
	.ascii	"r\000"
	.align	2
.LC2:
	.ascii	"ERROR: file not opened properly\000"
	.align	2
.LC3:
	.ascii	"ERROR: tried to access invalid (less than 0) cell\000"
	.align	2
.LC4:
	.ascii	"ERROR: non-brainfuck character encountered: %d\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #52
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	mov	r3, #0
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #0
	strb	r3, [fp, #-45]
	mov	r3, #1
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-56]
	cmp	r3, #2
	beq	.L2
	ldr	r0, .L38
	bl	puts
	mov	r3, #1
	b	.L3
.L2:
	mov	r1, #4
	mov	r0, #1
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-60]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L38+4
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L5
	ldr	r0, .L38+8
	bl	puts
	b	.L5
.L6:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L5:
	ldr	r0, [fp, #-20]
	bl	fgetc
	mov	r3, r0
	cmn	r3, #1
	bne	.L6
	ldr	r3, [fp, #-28]
	add	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r0, [fp, #-20]
	bl	rewind
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L7
.L8:
	ldr	r0, [fp, #-20]
	bl	fgetc
	mov	r1, r0
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	and	r2, r1, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L7:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L8
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r0, [fp, #-20]
	bl	fclose
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L9
.L34:
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-45]
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldrb	r3, [fp, #-45]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	bne	.L35
	ldrb	r3, [fp, #-45]	@ zero_extendqisi2
	sub	r3, r3, #43
	cmp	r3, #50
	ldrls	pc, [pc, r3, asl #2]
	b	.L12
.L14:
	.word	.L21
	.word	.L20
	.word	.L19
	.word	.L18
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L17
	.word	.L12
	.word	.L16
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L15
	.word	.L12
	.word	.L13
.L21:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [r3]
	add	r2, r2, #1
	str	r2, [r3]
	b	.L11
.L19:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [r3]
	sub	r2, r2, #1
	str	r2, [r3]
	b	.L11
.L16:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	beq	.L22
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
	b	.L11
.L22:
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	mov	r1, r3
	ldr	r0, [fp, #-44]
	bl	realloc
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	b	.L11
.L17:
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	ble	.L24
	ldr	r3, [fp, #-40]
	sub	r3, r3, #1
	str	r3, [fp, #-40]
	b	.L11
.L24:
	ldr	r0, .L38+12
	bl	puts
	mov	r3, #1
	b	.L3
.L18:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	putchar
	b	.L11
.L20:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r4, r2, r3
	bl	getchar
	mov	r3, r0
	str	r3, [r4]
	b	.L11
.L15:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L36
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	b	.L27
.L29:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #93
	bne	.L28
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
	b	.L27
.L28:
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #91
	bne	.L27
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L27:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L29
	b	.L36
.L13:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L37
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	b	.L31
.L33:
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #91
	bne	.L32
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
	b	.L31
.L32:
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #93
	bne	.L31
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L31:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L33
	b	.L37
.L12:
	ldrb	r3, [fp, #-45]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L38+16
	bl	printf
	mov	r3, #1
	b	.L3
.L35:
	nop
	b	.L11
.L36:
	nop
	b	.L11
.L37:
	nop
.L11:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L9:
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L34
	ldr	r0, [fp, #-44]
	bl	free
	ldr	r0, [fp, #-16]
	bl	free
	mov	r3, #0
.L3:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L39:
	.align	2
.L38:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
