	.file	"960582.c"
	.intel_syntax noprefix
	.text
	.globl	number1
	.bss
	.align 4
	.type	number1, @object
	.size	number1, 4
number1:
	.zero	4
	.globl	number2
	.align 4
	.type	number2, @object
	.size	number2, 4
number2:
	.zero	4
	.section	.rodata
	.align 8
.LC0:
	.string	"\n1:sum of two numbers\n2:difference of two numbers\n3:product of two numbers"
.LC1:
	.string	"<0: terminate the program"
.LC2:
	.string	"Select calculation:"
.LC3:
	.string	"%d"
.LC4:
	.string	"Terminating the program..."
.LC5:
	.string	"%d + %d = %d\n"
.LC6:
	.string	"%d - %d = %d\n"
.LC7:
	.string	"%d * %d = %d\n"
.LC8:
	.string	"Terminating the program...\n"
	.text
	.globl	main
	.type	main, @function
main:
.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
.L7:
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -24[rbp]
	test	eax, eax
	jns	.L2
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L3
.L2:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, 1
	jne	.L4
	mov	eax, 0
	call	promtanswer
	mov	eax, 0
	call	calculate_sum
	mov	DWORD PTR -12[rbp], eax
	mov	edx, DWORD PTR number2[rip]
	mov	eax, DWORD PTR number1[rip]
	mov	ecx, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, 2
	jne	.L5
	mov	eax, 0
	call	promtanswer
	mov	eax, 0
	call	calculate_difference
	mov	DWORD PTR -16[rbp], eax
	mov	edx, DWORD PTR number2[rip]
	mov	eax, DWORD PTR number1[rip]
	mov	ecx, DWORD PTR -16[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L3
.L5:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, 3
	jne	.L6
	mov	eax, 0
	call	promtanswer
	mov	eax, 0
	call	calculate_product
	mov	DWORD PTR -20[rbp], eax
	mov	edx, DWORD PTR number2[rip]
	mov	eax, DWORD PTR number1[rip]
	mov	ecx, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L3
.L6:
	lea	rdi, .LC8[rip]
	call	puts@PLT
.L3:
	mov	eax, DWORD PTR -24[rbp]
	test	eax, eax
	jg	.L7
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	calculate_sum
	.type	calculate_sum, @function
calculate_sum:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edx, DWORD PTR number1[rip]
	mov	eax, DWORD PTR number2[rip]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	calculate_sum, .-calculate_sum
	.globl	calculate_difference
	.type	calculate_difference, @function
calculate_difference:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, DWORD PTR number1[rip]
	mov	edx, DWORD PTR number2[rip]
	sub	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	calculate_difference, .-calculate_difference
	.globl	calculate_product
	.type	calculate_product, @function
calculate_product:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edx, DWORD PTR number1[rip]
	mov	eax, DWORD PTR number2[rip]
	imul	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	calculate_product, .-calculate_product
	.section	.rodata
.LC9:
	.string	"Enter the first number:"
.LC10:
	.string	"Enter the second number:"
	.text
	.globl	promtanswer
	.type	promtanswer, @function
promtanswer:
.LFB4:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, number1[rip]
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, number2[rip]
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	promtanswer, .-promtanswer
	.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	"960582.c"
	.text
	.comm	number1,4,4
	.comm	number2,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\0121:sum of two numbers\0122:difference of two num"
	.ascii	"bers\0123:product of two numbers\000"
	.align	2
.LC1:
	.ascii	"<0: terminate the program\000"
	.align	2
.LC2:
	.ascii	"Select calculation:\000"
	.align	2
.LC3:
	.ascii	"%d\000"
	.align	2
.LC4:
	.ascii	"Terminating the program...\000"
	.align	2
.LC5:
	.ascii	"%d + %d = %d\012\000"
	.align	2
.LC6:
	.ascii	"%d - %d = %d\012\000"
	.align	2
.LC7:
	.ascii	"%d * %d = %d\012\000"
	.align	2
.LC8:
	.ascii	"Terminating the program...\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
.L7:
	ldr	r0, .L10+4
	bl	puts
	ldr	r0, .L10+8
	bl	puts
	ldr	r0, .L10+12
	bl	printf
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L10+16
	bl	__isoc99_scanf
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L10+20
	bl	printf
	b	.L3
.L2:
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	bne	.L4
	bl	promtanswer
	bl	calculate_sum
	str	r0, [fp, #-12]
	ldr	r3, .L10+24
	ldr	r1, [r3]
	ldr	r3, .L10+28
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	ldr	r0, .L10+32
	bl	printf
	b	.L3
.L4:
	ldr	r3, [fp, #-24]
	cmp	r3, #2
	bne	.L5
	bl	promtanswer
	bl	calculate_difference
	str	r0, [fp, #-16]
	ldr	r3, .L10+24
	ldr	r1, [r3]
	ldr	r3, .L10+28
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r0, .L10+36
	bl	printf
	b	.L3
.L5:
	ldr	r3, [fp, #-24]
	cmp	r3, #3
	bne	.L6
	bl	promtanswer
	bl	calculate_product
	str	r0, [fp, #-20]
	ldr	r3, .L10+24
	ldr	r1, [r3]
	ldr	r3, .L10+28
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	ldr	r0, .L10+40
	bl	printf
	b	.L3
.L6:
	ldr	r0, .L10+44
	bl	puts
.L3:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bgt	.L7
	mov	r3, #0
	ldr	r2, .L10
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC9
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	number1
	.word	number2
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.align	2
	.global	calculate_sum
	.syntax unified
	.arm
	.fpu softvfp
	.type	calculate_sum, %function
calculate_sum:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, .L14+4
	ldr	r3, [r3]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L15:
	.align	2
.L14:
	.word	number1
	.word	number2
	.size	calculate_sum, .-calculate_sum
	.align	2
	.global	calculate_difference
	.syntax unified
	.arm
	.fpu softvfp
	.type	calculate_difference, %function
calculate_difference:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, .L18+4
	ldr	r3, [r3]
	sub	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L19:
	.align	2
.L18:
	.word	number1
	.word	number2
	.size	calculate_difference, .-calculate_difference
	.align	2
	.global	calculate_product
	.syntax unified
	.arm
	.fpu softvfp
	.type	calculate_product, %function
calculate_product:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	ldr	r3, .L22
	ldr	r3, [r3]
	ldr	r2, .L22+4
	ldr	r2, [r2]
	mul	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L23:
	.align	2
.L22:
	.word	number1
	.word	number2
	.size	calculate_product, .-calculate_product
	.section	.rodata
	.align	2
.LC10:
	.ascii	"Enter the first number:\000"
	.align	2
.LC11:
	.ascii	"Enter the second number:\000"
	.text
	.align	2
	.global	promtanswer
	.syntax unified
	.arm
	.fpu softvfp
	.type	promtanswer, %function
promtanswer:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L25
	bl	printf
	ldr	r1, .L25+4
	ldr	r0, .L25+8
	bl	__isoc99_scanf
	ldr	r0, .L25+12
	bl	printf
	ldr	r1, .L25+16
	ldr	r0, .L25+8
	bl	__isoc99_scanf
	nop
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC10
	.word	number1
	.word	.LC3
	.word	.LC11
	.word	number2
	.size	promtanswer, .-promtanswer
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
