	.file	"50137506.c"
	.intel_syntax noprefix
	.text
	.local	licence
	.comm	licence,15000,32
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"input08.txt"
.LC2:
	.string	"%hhu "
	.text
	.type	readlicence, @function
readlicence:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L2
	mov	eax, 0
	jmp	.L7
.L2:
	mov	DWORD PTR -20[rbp], 0
	jmp	.L4
.L6:
	mov	edx, DWORD PTR -20[rbp]
	lea	eax, 1[rdx]
	mov	DWORD PTR -20[rbp], eax
	movzx	eax, BYTE PTR -21[rbp]
	mov	ecx, edx
	lea	rdx, licence[rip]
	mov	BYTE PTR [rcx+rdx], al
.L4:
	cmp	DWORD PTR -20[rbp], 14999
	ja	.L5
	lea	rdx, -21[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	cmp	eax, 1
	je	.L6
.L5:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -20[rbp]
.L7:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	readlicence, .-readlicence
	.type	sumdata, @function
sumdata:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], 0
	mov	eax, DWORD PTR i.1[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR i.1[rip], edx
	mov	edx, eax
	lea	rax, licence[rip]
	movzx	eax, BYTE PTR [rdx+rax]
	mov	BYTE PTR -6[rbp], al
	mov	eax, DWORD PTR i.1[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR i.1[rip], edx
	mov	edx, eax
	lea	rax, licence[rip]
	movzx	eax, BYTE PTR [rdx+rax]
	mov	BYTE PTR -5[rbp], al
	jmp	.L10
.L11:
	call	sumdata
	add	DWORD PTR -4[rbp], eax
.L10:
	movzx	eax, BYTE PTR -6[rbp]
	lea	edx, -1[rax]
	mov	BYTE PTR -6[rbp], dl
	test	al, al
	jne	.L11
	jmp	.L12
.L13:
	mov	eax, DWORD PTR i.1[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR i.1[rip], edx
	mov	edx, eax
	lea	rax, licence[rip]
	movzx	eax, BYTE PTR [rdx+rax]
	movzx	eax, al
	add	DWORD PTR -4[rbp], eax
.L12:
	movzx	eax, BYTE PTR -5[rbp]
	lea	edx, -1[rax]
	mov	BYTE PTR -5[rbp], dl
	test	al, al
	jne	.L13
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	sumdata, .-sumdata
	.type	sumnode, @function
sumnode:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -76[rbp], 0
	mov	eax, DWORD PTR i.0[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR i.0[rip], edx
	mov	edx, eax
	lea	rax, licence[rip]
	movzx	eax, BYTE PTR [rdx+rax]
	mov	BYTE PTR -77[rbp], al
	mov	eax, DWORD PTR i.0[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR i.0[rip], edx
	mov	edx, eax
	lea	rax, licence[rip]
	movzx	eax, BYTE PTR [rdx+rax]
	mov	BYTE PTR -78[rbp], al
	cmp	BYTE PTR -77[rbp], 0
	jne	.L16
	jmp	.L17
.L18:
	mov	eax, DWORD PTR i.0[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR i.0[rip], edx
	mov	edx, eax
	lea	rax, licence[rip]
	movzx	eax, BYTE PTR [rdx+rax]
	movzx	eax, al
	add	DWORD PTR -76[rbp], eax
.L17:
	movzx	eax, BYTE PTR -78[rbp]
	lea	edx, -1[rax]
	mov	BYTE PTR -78[rbp], dl
	test	al, al
	jne	.L18
	jmp	.L19
.L16:
	mov	DWORD PTR -72[rbp], 0
	jmp	.L20
.L21:
	call	sumnode
	mov	edx, DWORD PTR -72[rbp]
	mov	DWORD PTR -64[rbp+rdx*4], eax
	add	DWORD PTR -72[rbp], 1
.L20:
	movzx	eax, BYTE PTR -77[rbp]
	cmp	DWORD PTR -72[rbp], eax
	jb	.L21
	jmp	.L22
.L23:
	mov	eax, DWORD PTR i.0[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR i.0[rip], edx
	mov	edx, eax
	lea	rax, licence[rip]
	movzx	eax, BYTE PTR [rdx+rax]
	movzx	eax, al
	mov	DWORD PTR -68[rbp], eax
	cmp	DWORD PTR -68[rbp], 0
	je	.L22
	movzx	eax, BYTE PTR -77[rbp]
	cmp	DWORD PTR -68[rbp], eax
	ja	.L22
	mov	eax, DWORD PTR -68[rbp]
	sub	eax, 1
	mov	eax, eax
	mov	eax, DWORD PTR -64[rbp+rax*4]
	add	DWORD PTR -76[rbp], eax
.L22:
	movzx	eax, BYTE PTR -78[rbp]
	lea	edx, -1[rax]
	mov	BYTE PTR -78[rbp], dl
	test	al, al
	jne	.L23
.L19:
	mov	eax, DWORD PTR -76[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	sumnode, .-sumnode
	.section	.rodata
.LC3:
	.string	"Part 1: %u\n"
.LC4:
	.string	"Part 2: %u\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	call	readlicence
	call	sumdata
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	call	sumnode
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	main, .-main
	.local	i.1
	.comm	i.1,4,4
	.local	i.0
	.comm	i.0,4,4
	.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	"50137506.c"
	.text
	.local	licence
	.comm	licence,15000,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"input08.txt\000"
	.align	2
.LC2:
	.ascii	"%hhu \000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	readlicence, %function
readlicence:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L9+4
	ldr	r0, .L9+8
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L2
	mov	r3, #0
	b	.L7
.L2:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L4
.L6:
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	ldrb	r1, [fp, #-17]	@ zero_extendqisi2
	ldr	r2, .L9+12
	strb	r1, [r2, r3]
.L4:
	ldr	r3, [fp, #-16]
	ldr	r2, .L9+16
	cmp	r3, r2
	bhi	.L5
	sub	r3, fp, #17
	mov	r2, r3
	ldr	r1, .L9+20
	ldr	r0, [fp, #-12]
	bl	__isoc99_fscanf
	mov	r3, r0
	cmp	r3, #1
	beq	.L6
.L5:
	ldr	r0, [fp, #-12]
	bl	fclose
	ldr	r3, [fp, #-16]
.L7:
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	licence
	.word	14999
	.word	.LC2
	.size	readlicence, .-readlicence
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sumdata, %function
sumdata:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, .L17
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L17
	str	r2, [r1]
	ldr	r2, .L17+4
	ldrb	r3, [r2, r3]
	strb	r3, [fp, #-10]
	ldr	r3, .L17
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L17
	str	r2, [r1]
	ldr	r2, .L17+4
	ldrb	r3, [r2, r3]
	strb	r3, [fp, #-9]
	b	.L12
.L13:
	bl	sumdata
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	str	r3, [fp, #-8]
.L12:
	ldrb	r3, [fp, #-10]	@ zero_extendqisi2
	sub	r2, r3, #1
	strb	r2, [fp, #-10]
	cmp	r3, #0
	bne	.L13
	b	.L14
.L15:
	ldr	r3, .L17
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L17
	str	r2, [r1]
	ldr	r2, .L17+4
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	str	r3, [fp, #-8]
.L14:
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	sub	r2, r3, #1
	strb	r2, [fp, #-9]
	cmp	r3, #0
	bne	.L15
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	i.4611
	.word	licence
	.size	sumdata, .-sumdata
	.section	.rodata
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sumnode, %function
sumnode:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	ldr	r3, .L30
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-68]
	ldr	r3, .L30+4
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L30+4
	str	r2, [r1]
	ldr	r2, .L30+8
	ldrb	r3, [r2, r3]
	strb	r3, [fp, #-69]
	ldr	r3, .L30+4
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L30+4
	str	r2, [r1]
	ldr	r2, .L30+8
	ldrb	r3, [r2, r3]
	strb	r3, [fp, #-70]
	ldrb	r3, [fp, #-69]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L20
	b	.L21
.L22:
	ldr	r3, .L30+4
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L30+4
	str	r2, [r1]
	ldr	r2, .L30+8
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-68]
	add	r3, r3, r2
	str	r3, [fp, #-68]
.L21:
	ldrb	r3, [fp, #-70]	@ zero_extendqisi2
	sub	r2, r3, #1
	strb	r2, [fp, #-70]
	cmp	r3, #0
	bne	.L22
	b	.L23
.L20:
	mov	r3, #0
	str	r3, [fp, #-64]
	b	.L24
.L25:
	bl	sumnode
	mov	r2, r0
	ldr	r3, [fp, #-64]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-52]
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L24:
	ldrb	r3, [fp, #-69]	@ zero_extendqisi2
	ldr	r2, [fp, #-64]
	cmp	r2, r3
	bcc	.L25
	b	.L26
.L27:
	ldr	r3, .L30+4
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L30+4
	str	r2, [r1]
	ldr	r2, .L30+8
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	beq	.L26
	ldrb	r3, [fp, #-69]	@ zero_extendqisi2
	ldr	r2, [fp, #-60]
	cmp	r2, r3
	bhi	.L26
	ldr	r3, [fp, #-60]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-52]
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	str	r3, [fp, #-68]
.L26:
	ldrb	r3, [fp, #-70]	@ zero_extendqisi2
	sub	r2, r3, #1
	strb	r2, [fp, #-70]
	cmp	r3, #0
	bne	.L27
.L23:
	ldr	r3, [fp, #-68]
	ldr	r2, .L30
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L29
	bl	__stack_chk_fail
.L29:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC4
	.word	i.4624
	.word	licence
	.size	sumnode, .-sumnode
	.section	.rodata
	.align	2
.LC5:
	.ascii	"Part 1: %u\012\000"
	.align	2
.LC6:
	.ascii	"Part 2: %u\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	readlicence
	bl	sumdata
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L34
	bl	printf
	bl	sumnode
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L34+4
	bl	printf
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L35:
	.align	2
.L34:
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.local	i.4611
	.comm	i.4611,4,4
	.local	i.4624
	.comm	i.4624,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
