	.file	"122015458.c"
	.intel_syntax noprefix
	.text
	.globl	count
	.bss
	.align 4
	.type	count, @object
	.size	count, 4
count:
	.zero	4
	.globl	mutex
	.align 32
	.type	mutex, @object
	.size	mutex, 40
mutex:
	.zero	40
	.globl	lettercount
	.align 8
	.type	lettercount, @object
	.size	lettercount, 8
lettercount:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%d) %s\n"
	.text
	.globl	start
	.type	start, @function
start:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1104
	mov	QWORD PTR -1096[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -1096[rbp]
	mov	QWORD PTR -1048[rbp], rax
	mov	DWORD PTR -1076[rbp], 1
	mov	QWORD PTR -1064[rbp], 0
	jmp	.L2
.L5:
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	mov	rax, QWORD PTR -1096[rbp]
	mov	rdx, QWORD PTR [rax]
	lea	rax, -1040[rbp]
	mov	esi, 1023
	mov	rdi, rax
	call	fgets@PLT
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -1076[rbp], eax
	mov	DWORD PTR -1072[rbp], 0
	jmp	.L3
.L4:
	add	QWORD PTR -1064[rbp], 1
	add	DWORD PTR -1072[rbp], 1
.L3:
	mov	eax, DWORD PTR -1072[rbp]
	cmp	eax, DWORD PTR -1076[rbp]
	jl	.L4
.L2:
	cmp	DWORD PTR -1076[rbp], 0
	jne	.L5
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	mov	rax, QWORD PTR -1064[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -1064[rbp], rdx
	mov	edx, eax
	mov	eax, DWORD PTR count[rip]
	add	eax, edx
	mov	DWORD PTR count[rip], eax
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
	mov	rax, QWORD PTR -1048[rbp]
	mov	rdx, QWORD PTR [rax]
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	mov	QWORD PTR -1056[rbp], rax
	jmp	.L6
.L10:
	mov	rax, QWORD PTR -1048[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	rdx, QWORD PTR -1056[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -1068[rbp], 0
	jmp	.L7
.L9:
	mov	eax, DWORD PTR -1068[rbp]
	cdqe
	movzx	eax, BYTE PTR -1040[rbp+rax]
	cmp	al, 96
	jle	.L8
	mov	eax, DWORD PTR -1068[rbp]
	cdqe
	movzx	eax, BYTE PTR -1040[rbp+rax]
	cmp	al, 122
	jg	.L8
	mov	eax, DWORD PTR count[rip]
	add	eax, 1
	mov	DWORD PTR count[rip], eax
.L8:
	add	DWORD PTR -1068[rbp], 1
.L7:
	mov	eax, DWORD PTR -1068[rbp]
	cdqe
	movzx	eax, BYTE PTR -1040[rbp+rax]
	test	al, al
	jne	.L9
	mov	rax, QWORD PTR -1048[rbp]
	mov	rdx, QWORD PTR [rax]
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	mov	QWORD PTR -1056[rbp], rax
.L6:
	cmp	QWORD PTR -1056[rbp], 0
	jne	.L10
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR count[rip]
	movsx	rdx, eax
	mov	rax, QWORD PTR lettercount[rip]
	add	rax, rdx
	mov	QWORD PTR lettercount[rip], rax
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	start, .-start
	.section	.rodata
.LC1:
	.string	"r"
.LC2:
	.string	"tolstoy.txt"
.LC3:
	.string	"Cannot open file!"
.LC4:
	.string	"count = %llu\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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	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 -120[rbp], rax
	cmp	QWORD PTR -120[rbp], 0
	jne	.L14
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L14:
	mov	esi, 0
	lea	rdi, mutex[rip]
	call	pthread_mutex_init@PLT
	mov	DWORD PTR -128[rbp], 0
	jmp	.L15
.L16:
	mov	eax, DWORD PTR -128[rbp]
	cdqe
	sal	rax, 4
	add	rax, rbp
	lea	rdx, -80[rax]
	mov	rax, QWORD PTR -120[rbp]
	mov	QWORD PTR [rdx], rax
	mov	eax, DWORD PTR -128[rbp]
	cdqe
	sal	rax, 4
	add	rax, rbp
	lea	rdx, -72[rax]
	mov	eax, DWORD PTR -128[rbp]
	mov	DWORD PTR [rdx], eax
	lea	rdx, -80[rbp]
	mov	eax, DWORD PTR -128[rbp]
	cdqe
	sal	rax, 4
	add	rdx, rax
	lea	rcx, -112[rbp]
	mov	eax, DWORD PTR -128[rbp]
	cdqe
	sal	rax, 3
	add	rax, rcx
	mov	rcx, rdx
	lea	rdx, start[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	add	DWORD PTR -128[rbp], 1
.L15:
	cmp	DWORD PTR -128[rbp], 3
	jle	.L16
	mov	DWORD PTR -124[rbp], 0
	jmp	.L17
.L18:
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	mov	rax, QWORD PTR -112[rbp+rax*8]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	add	DWORD PTR -124[rbp], 1
.L17:
	cmp	DWORD PTR -124[rbp], 3
	jle	.L18
	mov	rax, QWORD PTR lettercount[rip]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, mutex[rip]
	call	pthread_mutex_destroy@PLT
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"122015458.c"
	.text
	.global	count
	.bss
	.align	2
	.type	count, %object
	.size	count, 4
count:
	.space	4
	.comm	mutex,24,4
	.global	lettercount
	.align	3
	.type	lettercount, %object
	.size	lettercount, 8
lettercount:
	.space	8
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d) %s\012\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	start
	.syntax unified
	.arm
	.fpu softvfp
	.type	start, %function
start:
	@ args = 0, pretend = 0, frame = 1072
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #1072
	str	r0, [fp, #-1096]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	ldr	r3, [fp, #-1096]
	str	r3, [fp, #-1072]
	mov	r3, #1
	str	r3, [fp, #-1088]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-1068]
	str	r3, [fp, #-1064]
	b	.L2
.L5:
	ldr	r0, .L13+4
	bl	pthread_mutex_lock
	ldr	r3, [fp, #-1096]
	ldr	r2, [r3]
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r1, .L13+8
	mov	r0, r3
	bl	fgets
	ldr	r0, .L13+4
	bl	pthread_mutex_unlock
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-1088]
	mov	r3, #0
	str	r3, [fp, #-1084]
	b	.L3
.L4:
	ldr	r2, [fp, #-1068]
	ldr	r3, [fp, #-1064]
	adds	r8, r2, #1
	adc	r9, r3, #0
	str	r8, [fp, #-1068]
	str	r9, [fp, #-1064]
	ldr	r3, [fp, #-1084]
	add	r3, r3, #1
	str	r3, [fp, #-1084]
.L3:
	ldr	r2, [fp, #-1084]
	ldr	r3, [fp, #-1088]
	cmp	r2, r3
	blt	.L4
.L2:
	ldr	r3, [fp, #-1088]
	cmp	r3, #0
	bne	.L5
	ldr	r0, .L13+4
	bl	pthread_mutex_lock
	ldr	r2, [fp, #-1068]
	ldr	r3, [fp, #-1064]
	adds	r6, r2, #1
	adc	r7, r3, #0
	str	r6, [fp, #-1068]
	str	r7, [fp, #-1064]
	ldr	r3, .L13+12
	ldr	r3, [r3]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, .L13+12
	str	r2, [r3]
	ldr	r0, .L13+4
	bl	pthread_mutex_unlock
	ldr	r3, [fp, #-1072]
	ldr	r2, [r3]
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	str	r0, [fp, #-1080]
	b	.L6
.L10:
	ldr	r3, [fp, #-1072]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-1080]
	mov	r1, r3
	ldr	r0, .L13+16
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-1076]
	b	.L7
.L9:
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [fp, #-1076]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #96
	bls	.L8
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [fp, #-1076]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #122
	bhi	.L8
	ldr	r3, .L13+12
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L13+12
	str	r3, [r2]
.L8:
	ldr	r3, [fp, #-1076]
	add	r3, r3, #1
	str	r3, [fp, #-1076]
.L7:
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [fp, #-1076]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L9
	ldr	r3, [fp, #-1072]
	ldr	r2, [r3]
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	str	r0, [fp, #-1080]
.L6:
	ldr	r3, [fp, #-1080]
	cmp	r3, #0
	bne	.L10
	ldr	r0, .L13+4
	bl	pthread_mutex_lock
	ldr	r3, .L13+12
	ldr	r3, [r3]
	mov	r0, r3
	asr	r1, r0, #31
	ldr	r3, .L13+20
	ldmia	r3, {r2-r3}
	adds	r4, r0, r2
	adc	r5, r1, r3
	ldr	r3, .L13+20
	stm	r3, {r4-r5}
	ldr	r0, .L13+4
	bl	pthread_mutex_unlock
	mov	r3, #0
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-32]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC1
	.word	mutex
	.word	1023
	.word	count
	.word	.LC0
	.word	lettercount
	.size	start, .-start
	.section	.rodata
	.align	2
.LC2:
	.ascii	"r\000"
	.align	2
.LC3:
	.ascii	"tolstoy.txt\000"
	.align	2
.LC4:
	.ascii	"Cannot open file!\000"
	.align	2
.LC5:
	.ascii	"count = %llu\012\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L23+4
	ldr	r0, .L23+8
	bl	fopen
	str	r0, [fp, #-60]
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bne	.L16
	ldr	r0, .L23+12
	bl	puts
	mov	r0, #1
	bl	exit
.L16:
	mov	r1, #0
	ldr	r0, .L23+16
	bl	pthread_mutex_init
	mov	r3, #0
	str	r3, [fp, #-68]
	b	.L17
.L18:
	ldr	r3, [fp, #-68]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [fp, #-60]
	str	r2, [r3, #-36]
	ldr	r3, [fp, #-68]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [fp, #-68]
	str	r2, [r3, #-32]
	sub	r2, fp, #56
	ldr	r3, [fp, #-68]
	lsl	r3, r3, #2
	add	r0, r2, r3
	sub	r2, fp, #40
	ldr	r3, [fp, #-68]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r2, .L23+20
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-68]
	add	r3, r3, #1
	str	r3, [fp, #-68]
.L17:
	ldr	r3, [fp, #-68]
	cmp	r3, #3
	ble	.L18
	mov	r3, #0
	str	r3, [fp, #-64]
	b	.L19
.L20:
	ldr	r3, [fp, #-64]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-52]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L19:
	ldr	r3, [fp, #-64]
	cmp	r3, #3
	ble	.L20
	ldr	r3, .L23+24
	ldmia	r3, {r2-r3}
	ldr	r0, .L23+28
	bl	printf
	ldr	r0, .L23+16
	bl	pthread_mutex_destroy
	ldr	r0, [fp, #-60]
	bl	fclose
	mov	r3, #0
	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	.LC6
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	mutex
	.word	start
	.word	lettercount
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
