#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 pow(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *, double *);
int /*<<< orphan*/ system(char *);
void main() {
  int m, y;
  double r, s;
  printf("请输入贷款数、年数及贷款年利率\n");
  scanf("%d%d%lf", &m, &y, &r);
  s = pow(1 + r, y) * m;
  printf("总额为：%f\n", s);
  system("pause");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeda(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1050 <scanf@plt>
movsd  0xe8a(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%edi
mov    -0x8(%rbp),%esi
call   1060 <pow@plt>
imul   -0x4(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xe9f(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xea1(%rip),%rdi
call   1030 <system@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
lea    0xea1(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x10(%rsp),%rcx
call   1060 <scanf@plt>
movsd  0x10(%rsp),%xmm0
addsd  0xe77(%rip),%xmm0
cvttsd2si %xmm0,%edi
mov    0x8(%rsp),%esi
call   1070 <pow@plt>
imul   0xc(%rsp),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
lea    0xe67(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xe69(%rip),%rdi
call   1040 <system@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [47 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\E8\B4\B7\E6\AC\BE\E6\95\B0\E3\80\81\E5\B9\B4\E6\95\B0\E5\8F\8A\E8\B4\B7\E6\AC\BE\E5\B9\B4\E5\88\A9\E7\8E\87\0A\00"
@.str.1 = [8 x i8] c"%d%d%lf\00"
@.str.2 = [16 x i8] c"\E6\80\BB\E9\A2\9D\E4\B8\BA\EF\BC\9A%f\0A\00"
@.str.3 = [6 x i8] c"pause\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = alloca double
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, double* %3)
%7 = load double, double* %3
%8 = fadd double 1.000000e+00, %7
%9 = fptosi double %8 to i32
%10 = load i32, i32* %2
%11 = call i32 @pow(i32 %9, i32 %10)
%12 = load i32, i32* %1
%13 = mul nsw i32 %11, %12
%14 = sitofp i32 %13 to double
store double %14, double* %4
%15 = load double, double* %4
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), double %15)
%17 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [8 x i8] c"%d%d%lf\00"
@.str.2 = [16 x i8] c"\E6\80\BB\E9\A2\9D\E4\B8\BA\EF\BC\9A%f\0A\00"
@.str.3 = [6 x i8] c"pause\00"
@str = [46 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\E8\B4\B7\E6\AC\BE\E6\95\B0\E3\80\81\E5\B9\B4\E6\95\B0\E5\8F\8A\E8\B4\B7\E6\AC\BE\E5\B9\B4\E5\88\A9\E7\8E\87\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, double* %3)
%9 = load double, double* %3
%10 = fadd double %9, 1.000000e+00
%11 = fptosi double %10 to i32
%12 = load i32, i32* %2
%13 = call i32 @pow(i32 %11, i32 %12)
%14 = load i32, i32* %1
%15 = mul nsw i32 %14, %13
%16 = sitofp i32 %15 to double
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), double %16)
%18 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret void
}