	.file	"630016.c"
	.intel_syntax noprefix
	.text
	.globl	make_submarine
	.type	make_submarine, @function
make_submarine:
.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, 16
	mov	edi, 12
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 4[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	make_submarine, .-make_submarine
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"input.txt"
.LC2:
	.string	"Opened file"
.LC3:
	.string	"%s %d\n"
	.align 8
.LC4:
	.string	"Product of final x and depth: %d\n"
	.text
	.globl	part1
	.type	part1, @function
part1:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, 0
	call	make_submarine
	mov	QWORD PTR -40[rbp], rax
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -32[rbp], rax
	lea	rdi, .LC2[rip]
	call	puts@PLT
	jmp	.L4
.L7:
	movzx	eax, BYTE PTR -18[rbp]
	movsx	eax, al
	cmp	eax, 117
	je	.L5
	cmp	eax, 117
	jg	.L4
	cmp	eax, 100
	je	.L6
	cmp	eax, 102
	jne	.L4
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -44[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	jmp	.L4
.L5:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	ecx, DWORD PTR -44[rbp]
	sub	eax, ecx
	mov	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 4[rax], edx
	jmp	.L4
.L6:
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR -44[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 4[rax], edx
	nop
.L4:
	lea	rcx, -44[rbp]
	lea	rdx, -18[rbp]
	mov	rax, QWORD PTR -32[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	cmp	eax, -1
	jne	.L7
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 4[rax]
	imul	eax, edx
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	part1, .-part1
	.globl	part2
	.type	part2, @function
part2:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, 0
	call	make_submarine
	mov	QWORD PTR -40[rbp], rax
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -32[rbp], rax
	lea	rdi, .LC2[rip]
	call	puts@PLT
	jmp	.L10
.L13:
	movzx	eax, BYTE PTR -18[rbp]
	movsx	eax, al
	cmp	eax, 117
	je	.L11
	cmp	eax, 117
	jg	.L10
	cmp	eax, 100
	je	.L12
	cmp	eax, 102
	jne	.L10
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -44[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -40[rbp]
	mov	ecx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR -44[rbp]
	imul	eax, edx
	lea	edx, [rcx+rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 4[rax], edx
	jmp	.L10
.L11:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	ecx, DWORD PTR -44[rbp]
	sub	eax, ecx
	mov	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 8[rax], edx
	jmp	.L10
.L12:
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR -44[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 8[rax], edx
	nop
.L10:
	lea	rcx, -44[rbp]
	lea	rdx, -18[rbp]
	mov	rax, QWORD PTR -32[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	cmp	eax, -1
	jne	.L13
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 4[rax]
	imul	eax, edx
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	part2, .-part2
	.globl	main
	.type	main, @function
main:
.LFB9:
	.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], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	eax, 0
	call	part2
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	"630016.c"
	.text
	.align	2
	.global	make_submarine
	.syntax unified
	.arm
	.fpu softvfp
	.type	make_submarine, %function
make_submarine:
	@ 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	r0, #12
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	make_submarine, .-make_submarine
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"input.txt\000"
	.align	2
.LC2:
	.ascii	"Opened file\000"
	.align	2
.LC3:
	.ascii	"%s %d\012\000"
	.align	2
.LC4:
	.ascii	"Product of final x and depth: %d\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	part1
	.syntax unified
	.arm
	.fpu softvfp
	.type	part1, %function
part1:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	make_submarine
	str	r0, [fp, #-28]
	ldr	r1, .L9+4
	ldr	r0, .L9+8
	bl	fopen
	str	r0, [fp, #-24]
	ldr	r0, .L9+12
	bl	puts
	b	.L4
.L7:
	ldrb	r3, [fp, #-20]	@ zero_extendqisi2
	cmp	r3, #117
	beq	.L5
	cmp	r3, #117
	bgt	.L4
	cmp	r3, #100
	beq	.L6
	cmp	r3, #102
	bne	.L4
	ldr	r3, [fp, #-28]
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	add	r2, r2, r3
	ldr	r3, [fp, #-28]
	str	r2, [r3]
	b	.L4
.L5:
	ldr	r3, [fp, #-28]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-32]
	sub	r2, r2, r3
	ldr	r3, [fp, #-28]
	str	r2, [r3, #4]
	b	.L4
.L6:
	ldr	r3, [fp, #-28]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-32]
	add	r2, r2, r3
	ldr	r3, [fp, #-28]
	str	r2, [r3, #4]
	nop
.L4:
	sub	r3, fp, #32
	sub	r2, fp, #20
	ldr	r1, .L9+16
	ldr	r0, [fp, #-24]
	bl	__isoc99_fscanf
	mov	r3, r0
	cmn	r3, #1
	bne	.L7
	ldr	r0, [fp, #-24]
	bl	fclose
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	ldr	r2, [r2, #4]
	mul	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L9+20
	bl	printf
	ldr	r0, [fp, #-28]
	bl	free
	nop
	ldr	r3, .L9
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	part1, .-part1
	.section	.rodata
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	part2
	.syntax unified
	.arm
	.fpu softvfp
	.type	part2, %function
part2:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	make_submarine
	str	r0, [fp, #-28]
	ldr	r1, .L17+4
	ldr	r0, .L17+8
	bl	fopen
	str	r0, [fp, #-24]
	ldr	r0, .L17+12
	bl	puts
	b	.L12
.L15:
	ldrb	r3, [fp, #-20]	@ zero_extendqisi2
	cmp	r3, #117
	beq	.L13
	cmp	r3, #117
	bgt	.L12
	cmp	r3, #100
	beq	.L14
	cmp	r3, #102
	bne	.L12
	ldr	r3, [fp, #-28]
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	add	r2, r2, r3
	ldr	r3, [fp, #-28]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #8]
	ldr	r1, [fp, #-32]
	mul	r3, r1, r3
	add	r2, r2, r3
	ldr	r3, [fp, #-28]
	str	r2, [r3, #4]
	b	.L12
.L13:
	ldr	r3, [fp, #-28]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-32]
	sub	r2, r2, r3
	ldr	r3, [fp, #-28]
	str	r2, [r3, #8]
	b	.L12
.L14:
	ldr	r3, [fp, #-28]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-32]
	add	r2, r2, r3
	ldr	r3, [fp, #-28]
	str	r2, [r3, #8]
	nop
.L12:
	sub	r3, fp, #32
	sub	r2, fp, #20
	ldr	r1, .L17+16
	ldr	r0, [fp, #-24]
	bl	__isoc99_fscanf
	mov	r3, r0
	cmn	r3, #1
	bne	.L15
	ldr	r0, [fp, #-24]
	bl	fclose
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	ldr	r2, [r2, #4]
	mul	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L17+20
	bl	printf
	ldr	r0, [fp, #-28]
	bl	free
	nop
	ldr	r3, .L17
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC6
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	part2, .-part2
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	bl	part2
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
