#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 /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int /*<<< orphan*/ system(char *);
main() {
  double c, intereses, capital;
  float r;
  int t;
  system("cls");
  printf("Capital invertido        ");
  scanf("%lf", &c);
  printf("\nA un %% anual del         ");
  scanf("%f", &r);
  printf("\nDurante cuántos días     ");
  scanf("%d", &t);
  printf("\n\n");
  intereses = c * r * t / (360L * 100);
  capital = c + intereses;
  printf("Intereses producidos...%10.0f\n", intereses);
  printf("Capital acumulado......%10.0f\n", capital);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xec9(%rip),%rdi
call   1030 <system@plt>
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xecd(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xecd(%rip),%rdi
lea    -0x1c(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xecd(%rip),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe2b(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xe73(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x18(%rbp),%xmm0
lea    0xe7f(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xebd(%rip),%rdi
call   1040 <system@plt>
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xec1(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xeb2(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xec0(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xeb0(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xebf(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xeed(%rip),%rdi
call   1030 <puts@plt>
movsd  0x10(%rsp),%xmm2
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm1
mulsd  %xmm2,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sdl (%rsp),%xmm0
mulsd  %xmm1,%xmm0
divsd  0xe1b(%rip),%xmm0
addsd  %xmm0,%xmm2
movsd  %xmm2,0x8(%rsp)
lea    0xe73(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xe84(%rip),%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"cls\00"
@.str.1 = [26 x i8] c"Capital invertido \00"
@.str.2 = [4 x i8] c"%lf\00"
@.str.3 = [28 x i8] c"\0AA un %% anual del \00"
@.str.4 = [3 x i8] c"%f\00"
@.str.5 = [29 x i8] c"\0ADurante cu\C3\A1ntos d\C3\ADas \00"
@.str.6 = [3 x i8] c"%d\00"
@.str.7 = [3 x i8] c"\0A\0A\00"
@.str.8 = [31 x i8] c"Intereses producidos...%10.0f\0A\00"
@.str.9 = [31 x i8] c"Capital acumulado......%10.0f\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca float
%5 = alloca i32
%6 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %1)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %4)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %5)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%14 = load double, double* %1
%15 = load float, float* %4
%16 = fpext float %15 to double
%17 = fmul double %14, %16
%18 = load i32, i32* %5
%19 = sitofp i32 %18 to double
%20 = fmul double %17, %19
%21 = fdiv double %20, 3.600000e+04
store double %21, double* %2
%22 = load double, double* %1
%23 = load double, double* %2
%24 = fadd double %22, %23
store double %24, double* %3
%25 = load double, double* %2
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), double %25)
%27 = load double, double* %3
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.9, i64 0, i64 0), double %27)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"cls\00"
@.str.1 = [26 x i8] c"Capital invertido \00"
@.str.2 = [4 x i8] c"%lf\00"
@.str.3 = [28 x i8] c"\0AA un %% anual del \00"
@.str.4 = [3 x i8] c"%f\00"
@.str.5 = [29 x i8] c"\0ADurante cu\C3\A1ntos d\C3\ADas \00"
@.str.6 = [3 x i8] c"%d\00"
@.str.8 = [31 x i8] c"Intereses producidos...%10.0f\0A\00"
@.str.9 = [31 x i8] c"Capital acumulado......%10.0f\0A\00"
@str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca float
%3 = alloca i32
%4 = bitcast double* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %1)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %2)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %3)
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%15 = load double, double* %1
%16 = load float, float* %2
%17 = fpext float %16 to double
%18 = fmul double %15, %17
%19 = load i32, i32* %3
%20 = sitofp i32 %19 to double
%21 = fmul double %18, %20
%22 = fdiv double %21, 3.600000e+04
%23 = fadd double %15, %22
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), double %22)
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.9, i64 0, i64 0), double %23)
ret i32 0
}