	.file	"231351.c"
	.intel_syntax noprefix
	.text
	.globl	strrev
	.type	strrev, @function
strrev:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	cmp	QWORD PTR -24[rbp], 0
	je	.L2
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L3
.L2:
	mov	rax, QWORD PTR -24[rbp]
	jmp	.L4
.L3:
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	jmp	.L5
.L6:
	mov	rax, QWORD PTR -16[rbp]
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	xor	edx, eax
	mov	rax, QWORD PTR -16[rbp]
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR -8[rbp]
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, BYTE PTR [rax]
	xor	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR -16[rbp]
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	xor	edx, eax
	mov	rax, QWORD PTR -16[rbp]
	mov	BYTE PTR [rax], dl
	add	QWORD PTR -16[rbp], 1
	sub	QWORD PTR -8[rbp], 1
.L5:
	mov	rax, QWORD PTR -8[rbp]
	cmp	rax, QWORD PTR -16[rbp]
	ja	.L6
	mov	rax, QWORD PTR -24[rbp]
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	strrev, .-strrev
	.globl	arrA
	.bss
	.align 32
	.type	arrA, @object
	.size	arrA, 200
arrA:
	.zero	200
	.globl	tot
	.align 4
	.type	tot, @object
	.size	tot, 4
tot:
	.zero	4
	.globl	st
	.align 32
	.type	st, @object
	.size	st, 50
st:
	.zero	50
	.globl	p
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.globl	q
	.align 8
	.type	q, @object
	.size	q, 8
q:
	.zero	8
	.text
	.globl	powr
	.type	powr, @function
powr:
.LFB1:
	.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	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -8[rbp], 1
	mov	QWORD PTR -16[rbp], 0
	jmp	.L8
.L9:
	mov	rax, QWORD PTR -8[rbp]
	imul	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	add	QWORD PTR -16[rbp], 1
.L8:
	mov	rax, QWORD PTR -16[rbp]
	cmp	rax, QWORD PTR -32[rbp]
	jl	.L9
	mov	rax, QWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	powr, .-powr
	.globl	z
	.type	z, @function
z:
.LFB2:
	.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, 24
	.cfi_offset 3, -24
	mov	DWORD PTR -28[rbp], edi
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	mov	esi, 10
	mov	rdi, rax
	call	powr
	add	rax, 1
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -20[rbp], 0
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, arrA[rip]
	mov	eax, DWORD PTR [rdx+rax]
	movsx	rbx, eax
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 1
	movsx	rdx, eax
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	mov	rsi, rdx
	mov	rdi, rax
	call	powr
	imul	rax, rbx
	add	QWORD PTR -16[rbp], rax
	add	DWORD PTR -20[rbp], 1
.L12:
	cmp	DWORD PTR -20[rbp], 8
	jle	.L13
	mov	rax, QWORD PTR -16[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	z, .-z
	.section	.rodata
	.align 8
.LC0:
	.string	"\n%s %ld %ld %ld %ld %ld %ld %ld %ld %ld"
	.text
	.globl	nBits
	.type	nBits, @function
nBits:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 72
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	DWORD PTR -68[rbp], edi
	mov	DWORD PTR -52[rbp], 0
	cmp	DWORD PTR -68[rbp], 0
	jg	.L16
	mov	eax, DWORD PTR tot[rip]
	add	eax, 1
	mov	DWORD PTR tot[rip], eax
	mov	DWORD PTR -52[rbp], 0
	jmp	.L17
.L18:
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rdx, st[rip]
	mov	BYTE PTR [rax+rdx], 48
	add	DWORD PTR -52[rbp], 1
.L17:
	cmp	DWORD PTR -52[rbp], 49
	jle	.L18
	mov	BYTE PTR st[rip+10], 49
	movzx	eax, BYTE PTR st[rip+10]
	mov	BYTE PTR st[rip+21], al
	movzx	eax, BYTE PTR st[rip+21]
	mov	BYTE PTR st[rip], al
	movzx	eax, BYTE PTR st[rip]
	mov	BYTE PTR st[rip+31], al
	mov	BYTE PTR st[rip+32], 0
	mov	DWORD PTR -52[rbp], 0
	jmp	.L19
.L20:
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, arrA[rip]
	mov	eax, DWORD PTR [rdx+rax]
	lea	edx, 48[rax]
	mov	eax, DWORD PTR -52[rbp]
	add	eax, 22
	mov	esi, edx
	movsx	rdx, eax
	lea	rcx, st[rip]
	mov	BYTE PTR [rdx+rcx], sil
	mov	edx, DWORD PTR -52[rbp]
	lea	ecx, 1[rdx]
	cdqe
	lea	rdx, st[rip]
	movzx	edx, BYTE PTR [rax+rdx]
	movsx	rax, ecx
	lea	rcx, st[rip]
	mov	BYTE PTR [rax+rcx], dl
	add	DWORD PTR -52[rbp], 1
.L19:
	cmp	DWORD PTR -52[rbp], 8
	jle	.L20
	mov	edi, 10
	call	z
	mov	QWORD PTR -80[rbp], rax
	mov	edi, 9
	call	z
	mov	r15, rax
	mov	edi, 8
	call	z
	mov	r14, rax
	mov	edi, 7
	call	z
	mov	r13, rax
	mov	edi, 6
	call	z
	mov	r12, rax
	mov	edi, 5
	call	z
	mov	rbx, rax
	mov	edi, 4
	call	z
	mov	QWORD PTR -88[rbp], rax
	mov	edi, 3
	call	z
	mov	QWORD PTR -96[rbp], rax
	mov	edi, 2
	call	z
	mov	QWORD PTR -104[rbp], rax
	lea	rdi, st[rip]
	call	strrev
	mov	rdx, rax
	mov	rax, QWORD PTR q[rip]
	push	QWORD PTR -80[rbp]
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	mov	r9, QWORD PTR -88[rbp]
	mov	r8, QWORD PTR -96[rbp]
	mov	rcx, QWORD PTR -104[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	rsp, 48
	mov	eax, DWORD PTR tot[rip]
	cmp	eax, 500
	jmp	.L15
.L16:
	mov	eax, DWORD PTR -68[rbp]
	sub	eax, 1
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, arrA[rip]
	mov	DWORD PTR [rdx+rax], 0
	mov	eax, DWORD PTR tot[rip]
	cmp	eax, 500
	je	.L24
	mov	eax, DWORD PTR -68[rbp]
	sub	eax, 1
	mov	edi, eax
	call	nBits
	mov	eax, DWORD PTR -68[rbp]
	sub	eax, 1
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, arrA[rip]
	mov	DWORD PTR [rdx+rax], 1
	mov	eax, DWORD PTR tot[rip]
	cmp	eax, 500
	je	.L25
	mov	eax, DWORD PTR -68[rbp]
	sub	eax, 1
	mov	edi, eax
	call	nBits
	jmp	.L15
.L24:
	nop
	jmp	.L15
.L25:
	nop
.L15:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	nBits, .-nBits
	.section	.rodata
.LC1:
	.string	"r+"
.LC2:
	.string	"input"
.LC3:
	.string	"w+"
.LC4:
	.string	"output"
.LC5:
	.string	"%ld"
.LC6:
	.string	"%ld %ld"
.LC7:
	.string	"Case #1:"
	.text
	.globl	main
	.type	main, @function
main:
.LFB4:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 2544
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rsi, .LC1[rip]
	lea	rdi, .LC2[rip]
	call	fopen@PLT
	mov	QWORD PTR p[rip], rax
	lea	rsi, .LC3[rip]
	lea	rdi, .LC4[rip]
	call	fopen@PLT
	mov	QWORD PTR q[rip], rax
	mov	rax, QWORD PTR p[rip]
	lea	rdx, -2544[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	rax, QWORD PTR -2544[rbp]
	mov	QWORD PTR -2520[rbp], rax
	jmp	.L27
.L28:
	mov	rax, QWORD PTR p[rip]
	lea	rcx, -2536[rbp]
	lea	rdx, -2528[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	rax, QWORD PTR q[rip]
	mov	rcx, rax
	mov	edx, 8
	mov	esi, 1
	lea	rdi, .LC7[rip]
	call	fwrite@PLT
	mov	edi, 9
	call	nBits
.L27:
	mov	rax, QWORD PTR -2544[rbp]
	lea	rdx, -1[rax]
	mov	QWORD PTR -2544[rbp], rdx
	test	rax, rax
	jne	.L28
	mov	rax, QWORD PTR p[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR q[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.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	"231351.c"
	.text
	.align	2
	.global	strrev
	.syntax unified
	.arm
	.fpu softvfp
	.type	strrev, %function
strrev:
	@ 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]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L3
.L2:
	ldr	r3, [fp, #-16]
	b	.L4
.L3:
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	b	.L5
.L6:
	ldr	r3, [fp, #-12]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	eor	r3, r3, r2
	and	r2, r3, #255
	ldr	r3, [fp, #-12]
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-12]
	ldrb	r3, [r3]	@ zero_extendqisi2
	eor	r3, r3, r2
	and	r2, r3, #255
	ldr	r3, [fp, #-8]
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	eor	r3, r3, r2
	and	r2, r3, #255
	ldr	r3, [fp, #-12]
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
.L5:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bhi	.L6
	ldr	r3, [fp, #-16]
.L4:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	strrev, .-strrev
	.comm	arrA,200,4
	.global	tot
	.bss
	.align	2
	.type	tot, %object
	.size	tot, 4
tot:
	.space	4
	.comm	st,50,4
	.comm	p,4,4
	.comm	q,4,4
	.text
	.align	2
	.global	powr
	.syntax unified
	.arm
	.fpu softvfp
	.type	powr, %function
powr:
	@ 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]
	str	r1, [fp, #-20]
	mov	r3, #1
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L8
.L9:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	mul	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L8:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L9
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	powr, .-powr
	.align	2
	.global	z
	.syntax unified
	.arm
	.fpu softvfp
	.type	z, %function
z:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	mov	r1, #10
	ldr	r0, [fp, #-24]
	bl	powr
	mov	r3, r0
	add	r3, r3, #1
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L12
.L13:
	ldr	r2, .L15
	ldr	r3, [fp, #-16]
	ldr	r4, [r2, r3, lsl #2]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	powr
	mov	r3, r0
	mul	r3, r4, r3
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L12:
	ldr	r3, [fp, #-16]
	cmp	r3, #8
	ble	.L13
	ldr	r3, [fp, #-20]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L16:
	.align	2
.L15:
	.word	arrA
	.size	z, .-z
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012%s %ld %ld %ld %ld %ld %ld %ld %ld %ld\000"
	.text
	.align	2
	.global	nBits
	.syntax unified
	.arm
	.fpu softvfp
	.type	nBits, %function
nBits:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #60
	str	r0, [fp, #-48]
	mov	r3, #0
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bgt	.L18
	ldr	r3, .L28
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L28
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L19
.L20:
	ldr	r2, .L28+4
	ldr	r3, [fp, #-40]
	add	r3, r2, r3
	mov	r2, #48
	strb	r2, [r3]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L19:
	ldr	r3, [fp, #-40]
	cmp	r3, #49
	ble	.L20
	ldr	r3, .L28+4
	mov	r2, #49
	strb	r2, [r3, #10]
	ldr	r3, .L28+4
	ldrb	r2, [r3, #10]	@ zero_extendqisi2
	ldr	r3, .L28+4
	strb	r2, [r3, #21]
	ldr	r3, .L28+4
	ldrb	r2, [r3, #21]	@ zero_extendqisi2
	ldr	r3, .L28+4
	strb	r2, [r3]
	ldr	r3, .L28+4
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, .L28+4
	strb	r2, [r3, #31]
	ldr	r3, .L28+4
	mov	r2, #0
	strb	r2, [r3, #32]
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L21
.L22:
	ldr	r2, .L28+8
	ldr	r3, [fp, #-40]
	ldr	r3, [r2, r3, lsl #2]
	and	r2, r3, #255
	ldr	r3, [fp, #-40]
	add	r3, r3, #22
	add	r2, r2, #48
	and	r1, r2, #255
	ldr	r2, .L28+4
	strb	r1, [r2, r3]
	ldr	r2, [fp, #-40]
	add	r2, r2, #1
	ldr	r1, .L28+4
	ldrb	r1, [r1, r3]	@ zero_extendqisi2
	ldr	r3, .L28+4
	strb	r1, [r3, r2]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L21:
	ldr	r3, [fp, #-40]
	cmp	r3, #8
	ble	.L22
	ldr	r3, .L28+12
	ldr	r4, [r3]
	ldr	r0, .L28+4
	bl	strrev
	str	r0, [fp, #-52]
	mov	r0, #2
	bl	z
	str	r0, [fp, #-56]
	mov	r0, #3
	bl	z
	mov	r5, r0
	mov	r0, #4
	bl	z
	mov	r6, r0
	mov	r0, #5
	bl	z
	mov	r7, r0
	mov	r0, #6
	bl	z
	mov	r8, r0
	mov	r0, #7
	bl	z
	mov	r9, r0
	mov	r0, #8
	bl	z
	mov	r10, r0
	mov	r0, #9
	bl	z
	str	r0, [fp, #-60]
	mov	r0, #10
	bl	z
	mov	r3, r0
	str	r3, [sp, #28]
	ldr	r1, [fp, #-60]
	str	r1, [sp, #24]
	str	r10, [sp, #20]
	str	r9, [sp, #16]
	str	r8, [sp, #12]
	str	r7, [sp, #8]
	str	r6, [sp, #4]
	str	r5, [sp]
	ldr	r3, [fp, #-56]
	ldr	r2, [fp, #-52]
	ldr	r1, .L28+16
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L28
	ldr	r3, [r3]
	cmp	r3, #500
	b	.L17
.L18:
	ldr	r3, [fp, #-48]
	sub	r3, r3, #1
	ldr	r2, .L28+8
	mov	r1, #0
	str	r1, [r2, r3, lsl #2]
	ldr	r3, .L28
	ldr	r3, [r3]
	cmp	r3, #500
	beq	.L26
	ldr	r3, [fp, #-48]
	sub	r3, r3, #1
	mov	r0, r3
	bl	nBits
	ldr	r3, [fp, #-48]
	sub	r3, r3, #1
	ldr	r2, .L28+8
	mov	r1, #1
	str	r1, [r2, r3, lsl #2]
	ldr	r3, .L28
	ldr	r3, [r3]
	cmp	r3, #500
	beq	.L27
	ldr	r3, [fp, #-48]
	sub	r3, r3, #1
	mov	r0, r3
	bl	nBits
	b	.L17
.L26:
	nop
	b	.L17
.L27:
	nop
.L17:
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L29:
	.align	2
.L28:
	.word	tot
	.word	st
	.word	arrA
	.word	q
	.word	.LC0
	.size	nBits, .-nBits
	.section	.rodata
	.align	2
.LC1:
	.ascii	"r+\000"
	.align	2
.LC2:
	.ascii	"input\000"
	.align	2
.LC3:
	.ascii	"w+\000"
	.align	2
.LC4:
	.ascii	"output\000"
	.align	2
.LC5:
	.ascii	"%ld\000"
	.align	2
.LC6:
	.ascii	"%ld %ld\000"
	.align	2
.LC7:
	.ascii	"Case #1:\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 2520
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2512
	sub	sp, sp, #8
	ldr	r3, .L35
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L35+4
	ldr	r0, .L35+8
	bl	fopen
	mov	r3, r0
	ldr	r2, .L35+12
	str	r3, [r2]
	ldr	r1, .L35+16
	ldr	r0, .L35+20
	bl	fopen
	mov	r3, r0
	ldr	r2, .L35+24
	str	r3, [r2]
	ldr	r3, .L35+12
	ldr	r0, [r3]
	sub	r3, fp, #2512
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r2, r3
	ldr	r1, .L35+28
	bl	__isoc99_fscanf
	ldr	r3, [fp, #-2524]
	str	r3, [fp, #-2512]
	b	.L31
.L32:
	ldr	r3, .L35+12
	ldr	r0, [r3]
	sub	r3, fp, #2512
	sub	r3, r3, #4
	sub	r3, r3, #4
	sub	r2, fp, #2512
	sub	r2, r2, #4
	ldr	r1, .L35+32
	bl	__isoc99_fscanf
	ldr	r3, .L35+24
	ldr	r3, [r3]
	mov	r2, #8
	mov	r1, #1
	ldr	r0, .L35+36
	bl	fwrite
	mov	r0, #9
	bl	nBits
.L31:
	ldr	r3, [fp, #-2524]
	sub	r2, r3, #1
	str	r2, [fp, #-2524]
	cmp	r3, #0
	bne	.L32
	ldr	r3, .L35+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	ldr	r3, .L35+24
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	mov	r3, #0
	ldr	r2, .L35
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L34
	bl	__stack_chk_fail
.L34:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L36:
	.align	2
.L35:
	.word	.LC8
	.word	.LC1
	.word	.LC2
	.word	p
	.word	.LC3
	.word	.LC4
	.word	q
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
