	.file	"87638122.c"
	.intel_syntax noprefix
	.text
	.globl	count
	.type	count, @function
count:
.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	eax, edi
	mov	QWORD PTR -32[rbp], rsi
	mov	BYTE PTR -20[rbp], al
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -4[rbp], eax
	jmp	.L2
.L4:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	BYTE PTR -20[rbp], al
	jne	.L3
	add	DWORD PTR -8[rbp], 1
.L3:
	add	DWORD PTR -12[rbp], 1
.L2:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jl	.L4
	mov	eax, DWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	count, .-count
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"input.txt"
.LC2:
	.string	"%c %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	DWORD PTR -116[rbp], edi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR stdin[rip]
	mov	rdx, rax
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	freopen@PLT
.L11:
	lea	rax, -102[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	movzx	eax, BYTE PTR -102[rbp]
	cmp	al, 35
	je	.L15
	lea	rax, -96[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	mov	DWORD PTR -112[rbp], 0
	lea	rax, -102[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -108[rbp], eax
	jmp	.L9
.L10:
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	movzx	eax, BYTE PTR -102[rbp+rax]
	movsx	eax, al
	lea	rdx, -96[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	count
	mov	edx, eax
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	movzx	eax, BYTE PTR -102[rbp+rax]
	movsx	eax, al
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -112[rbp], 1
.L9:
	mov	eax, DWORD PTR -112[rbp]
	cmp	eax, DWORD PTR -108[rbp]
	jl	.L10
	jmp	.L11
.L15:
	nop
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	"87638122.c"
	.text
	.align	2
	.global	count
	.syntax unified
	.arm
	.fpu softvfp
	.type	count, %function
count:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	mov	r3, r0
	str	r1, [fp, #-28]
	strb	r3, [fp, #-21]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r0, [fp, #-28]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-8]
	b	.L2
.L4:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldrb	r2, [fp, #-21]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L3
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L3:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L2:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L4
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	count, .-count
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"input.txt\000"
	.align	2
.LC2:
	.ascii	"%c %d\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #116
	str	r0, [fp, #-120]
	str	r1, [fp, #-124]
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L16+4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L16+8
	ldr	r0, .L16+12
	bl	freopen
.L11:
	sub	r3, fp, #108
	mov	r0, r3
	bl	gets
	ldrb	r3, [fp, #-108]	@ zero_extendqisi2
	cmp	r3, #35
	beq	.L15
	sub	r3, fp, #100
	mov	r0, r3
	bl	gets
	mov	r3, #0
	str	r3, [fp, #-116]
	sub	r3, fp, #108
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-112]
	b	.L9
.L10:
	sub	r2, fp, #108
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r4, r3
	sub	r2, fp, #108
	ldr	r3, [fp, #-116]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r2, fp, #100
	mov	r1, r2
	mov	r0, r3
	bl	count
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L16+16
	bl	printf
	ldr	r3, [fp, #-116]
	add	r3, r3, #1
	str	r3, [fp, #-116]
.L9:
	ldr	r2, [fp, #-116]
	ldr	r3, [fp, #-112]
	cmp	r2, r3
	blt	.L10
	b	.L11
.L15:
	nop
	mov	r3, #0
	ldr	r2, .L16
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC3
	.word	stdin
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
