#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ clear_line(char *);
int getline_my(char *);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int proc = 0;
  int len = 0;
  int dep = 0;
  int dur = 0;
  float sum = 0.0;
  char line[100];
  printf("Input please amount of money of deposit:");
  len = getline_my(line);
  dep = atoi(line);
  printf("Deposit: %d;\n", dep);
  clear_line(line);
  printf("Input please amount of procents of deposit:");
  len = getline_my(line);
  proc = atoi(line);
  printf("Amount of procents: %d;\n", proc);
  clear_line(line);
  printf("Input please duration of deposit (in monthes):");
  len = getline_my(line);
  dur = atoi(line);
  printf("Duration: %d;\n", dur);
  clear_line(line);
  sum = (dep * proc) / 100 * 30 * dur / 365;
  printf("in the end we have: %f.\n ", sum);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x80(%rbp),%rdi
call   1050 <getline_my@plt>
mov    %eax,-0x8(%rbp)
lea    -0x80(%rbp),%rdi
call   1060 <atoi@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x80(%rbp),%rdi
call   1030 <clear_line@plt>
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x80(%rbp),%rdi
call   1050 <getline_my@plt>
mov    %eax,-0x8(%rbp)
lea    -0x80(%rbp),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x80(%rbp),%rdi
call   1030 <clear_line@plt>
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x80(%rbp),%rdi
call   1050 <getline_my@plt>
mov    %eax,-0x8(%rbp)
lea    -0x80(%rbp),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x80(%rbp),%rdi
call   1030 <clear_line@plt>
mov    -0xc(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
imul   $0x1e,%eax,%eax
imul   -0x10(%rbp),%eax
mov    $0x16d,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe54(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x68,%rsp
lea    0xeaf(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rsp,%r15
mov    %r15,%rdi
call   1050 <getline_my@plt>
mov    %r15,%rdi
call   1060 <atoi@plt>
mov    %eax,%r14d
lea    0xeb4(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
call   1030 <clear_line@plt>
lea    0xeaa(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
call   1050 <getline_my@plt>
mov    %r15,%rdi
call   1060 <atoi@plt>
mov    %eax,%ebp
lea    0xeb6(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
call   1030 <clear_line@plt>
lea    0xeb7(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
call   1050 <getline_my@plt>
mov    %r15,%rdi
call   1060 <atoi@plt>
mov    %eax,%ebx
lea    0xec6(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
call   1030 <clear_line@plt>
imul   %r14d,%ebp
movslq %ebp,%rax
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
sar    $0x5,%eax
add    %ecx,%eax
imul   %ebx,%eax
mov    %eax,%ecx
shl    $0x5,%ecx
sub    %eax,%ecx
sub    %eax,%ecx
movslq %ecx,%rax
imul   $0xffffffffb38cf9b1,%rax,%rcx
shr    $0x20,%rcx
add    %ecx,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x8,%eax
add    %ecx,%eax
cvtsi2ss %eax,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe71(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [41 x i8] c"Input please amount of money of deposit:\00"
@.str.1 = [14 x i8] c"Deposit: %d;\0A\00"
@.str.2 = [44 x i8] c"Input please amount of procents of deposit:\00"
@.str.3 = [25 x i8] c"Amount of procents: %d;\0A\00"
@.str.4 = [47 x i8] c"Input please duration of deposit (in monthes):\00"
@.str.5 = [15 x i8] c"Duration: %d;\0A\00"
@.str.6 = [26 x i8] c"in the end we have: %f.\0A \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca [100 x i8]
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
store float 0.000000e+00, float* %5
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%9 = call i32 @getline_my(i8* %8)
store i32 %9, i32* %2
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%11 = call i32 @atoi(i8* %10)
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %12)
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%15 = call i32 @clear_line(i8* %14)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%18 = call i32 @getline_my(i8* %17)
store i32 %18, i32* %2
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%20 = call i32 @atoi(i8* %19)
store i32 %20, i32* %1
%21 = load i32, i32* %1
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 %21)
%23 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%24 = call i32 @clear_line(i8* %23)
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.4, i64 0, i64 0))
%26 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%27 = call i32 @getline_my(i8* %26)
store i32 %27, i32* %2
%28 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%29 = call i32 @atoi(i8* %28)
store i32 %29, i32* %4
%30 = load i32, i32* %4
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 %30)
%32 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%33 = call i32 @clear_line(i8* %32)
%34 = load i32, i32* %3
%35 = load i32, i32* %1
%36 = mul nsw i32 %34, %35
%37 = sdiv i32 %36, 100
%38 = mul nsw i32 %37, 30
%39 = load i32, i32* %4
%40 = mul nsw i32 %38, %39
%41 = sdiv i32 %40, 365
%42 = sitofp i32 %41 to float
store float %42, float* %5
%43 = load float, float* %5
%44 = fpext float %43 to double
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0), double %44)
ret i32 0
}

LLVM IR (-O2):
@.str = [41 x i8] c"Input please amount of money of deposit:\00"
@.str.1 = [14 x i8] c"Deposit: %d;\0A\00"
@.str.2 = [44 x i8] c"Input please amount of procents of deposit:\00"
@.str.3 = [25 x i8] c"Amount of procents: %d;\0A\00"
@.str.4 = [47 x i8] c"Input please duration of deposit (in monthes):\00"
@.str.5 = [15 x i8] c"Duration: %d;\0A\00"
@.str.6 = [26 x i8] c"in the end we have: %f.\0A \00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @getline_my(i8* %2)
%5 = call i32 @atoi(i8* %2)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = call i32 @clear_line(i8* %2)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @getline_my(i8* %2)
%10 = call i32 @atoi(i8* %2)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 %10)
%12 = call i32 @clear_line(i8* %2)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.4, i64 0, i64 0))
%14 = call i32 @getline_my(i8* %2)
%15 = call i32 @atoi(i8* %2)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 %15)
%17 = call i32 @clear_line(i8* %2)
%18 = mul nsw i32 %10, %5
%19 = sdiv i32 %18, 100
%20 = mul nsw i32 %19, 30
%21 = mul nsw i32 %20, %15
%22 = sdiv i32 %21, 365
%23 = sitofp i32 %22 to float
%24 = fpext float %23 to double
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0), double %24)
ret i32 0
}