#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 */
double compute(double, double);
double input(char *);
int /*<<< orphan*/ printf(char *, ...);
main() {
  double x, y;
  printf("本程序从标准输入获取x和y的值并显示x的y次方.\n");
  x = input("请输入x的值：");
  y = input("请输入y的值：");
  printf("x的y次方是:%6.3f\n", compute(x, y));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xef3(%rip),%rdi
call   1030 <input@plt>
movsd  %xmm0,-0x8(%rbp)
lea    0xef6(%rip),%rdi
call   1030 <input@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1050 <compute@plt>
lea    0xeea(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef6(%rip),%rdi
call   1040 <puts@plt>
lea    0xeac(%rip),%rdi
call   1030 <input@plt>
movsd  %xmm0,(%rsp)
lea    0xeaf(%rip),%rdi
call   1030 <input@plt>
movaps %xmm0,%xmm1
movsd  (%rsp),%xmm0
call   1060 <compute@plt>
lea    0xeaa(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [64 x i8] c"\E6\9C\AC\E7\A8\8B\E5\BA\8F\E4\BB\8E\E6\A0\87\E5\87\86\E8\BE\93\E5\85\A5\E8\8E\B7\E5\8F\96x\E5\92\8Cy\E7\9A\84\E5\80\BC\E5\B9\B6\E6\98\BE\E7\A4\BAx\E7\9A\84y\E6\AC\A1\E6\96\B9.\0A\00"
@.str.1 = [20 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5x\E7\9A\84\E5\80\BC\EF\BC\9A\00"
@.str.2 = [20 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5y\E7\9A\84\E5\80\BC\EF\BC\9A\00"
@.str.3 = [22 x i8] c"x\E7\9A\84y\E6\AC\A1\E6\96\B9\E6\98\AF:%6.3f\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
%4 = call double @input(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
store double %4, double* %1
%5 = call double @input(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
store double %5, double* %2
%6 = load double, double* %1
%7 = load double, double* %2
%8 = call double @compute(double %6, double %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), double %8)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [20 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5x\E7\9A\84\E5\80\BC\EF\BC\9A\00"
@.str.2 = [20 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5y\E7\9A\84\E5\80\BC\EF\BC\9A\00"
@.str.3 = [22 x i8] c"x\E7\9A\84y\E6\AC\A1\E6\96\B9\E6\98\AF:%6.3f\0A\00"
@str = [63 x i8] c"\E6\9C\AC\E7\A8\8B\E5\BA\8F\E4\BB\8E\E6\A0\87\E5\87\86\E8\BE\93\E5\85\A5\E8\8E\B7\E5\8F\96x\E5\92\8Cy\E7\9A\84\E5\80\BC\E5\B9\B6\E6\98\BE\E7\A4\BAx\E7\9A\84y\E6\AC\A1\E6\96\B9.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 0))
%2 = tail call double @input(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call double @input(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call double @compute(double %2, double %3)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), double %4)
ret i32 0
}