#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 */
char *ceil(double);
char *cos(double);
char *exp(double);
char *fabs(double);
char *floor(double);
char *fmod(double, double);
char *log(double);
char *log10(double);
char *pow(double, double);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, double *, double *);
char *sin(double);
char *sqrt(double);
char *tan(double);
int main(void) {
  double x, y;
  printf("%s\n", "X: Y:");
  scanf("%lf %lf", &x, &y);
  printf("%lf\n", sqrt(x));
  printf("%lf\n", exp(x));
  printf("%lf\n", log(x));
  printf("%lf\n", log10(x));
  printf("%lf\n", fabs(x));
  printf("%lf\n", ceil(x));
  printf("%lf\n", floor(x));
  printf("%lf\n", pow(x, y));
  printf("%lf\n", fmod(x, y));
  printf("%lf\n", sin(x));
  printf("%lf\n", cos(x));
  printf("%lf\n", tan(x));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe11(%rip),%rdi
lea    0xe0e(%rip),%rsi
call   1040 <printf@plt>
lea    0xe08(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   10a0 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
call   10f0 <sqrt@plt>
mov    %rax,%rsi
lea    0xdef(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
call   1080 <exp@plt>
mov    %rax,%rsi
lea    0xdd6(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
call   10c0 <log@plt>
mov    %rax,%rsi
lea    0xdbd(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
call   10e0 <log10@plt>
mov    %rax,%rsi
lea    0xda4(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
call   1060 <fabs@plt>
mov    %rax,%rsi
lea    0xd8b(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
call   1030 <ceil@plt>
mov    %rax,%rsi
lea    0xd72(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
call   1100 <floor@plt>
mov    %rax,%rsi
lea    0xd59(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   10d0 <pow@plt>
mov    %rax,%rsi
lea    0xd3b(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1050 <fmod@plt>
mov    %rax,%rsi
lea    0xd1d(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
call   1070 <sin@plt>
mov    %rax,%rsi
lea    0xd04(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
call   10b0 <cos@plt>
mov    %rax,%rsi
lea    0xceb(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
call   1090 <tan@plt>
mov    %rax,%rsi
lea    0xcd2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xe14(%rip),%rdi
lea    0xe11(%rip),%rsi
call   1040 <printf@plt>
lea    0xe0b(%rip),%rdi
mov    %rsp,%rsi
lea    0x8(%rsp),%rdx
call   10a0 <scanf@plt>
movsd  (%rsp),%xmm0
call   10f0 <sqrt@plt>
lea    0xdf5(%rip),%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
call   1080 <exp@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
call   10c0 <log@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
call   10e0 <log10@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
call   1060 <fabs@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
call   1030 <ceil@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
call   1100 <floor@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   10d0 <pow@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1050 <fmod@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
call   1070 <sin@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
call   10b0 <cos@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
call   1090 <tan@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [6 x i8] c"X: Y:\00"
@.str.2 = [8 x i8] c"%lf %lf\00"
@.str.3 = [5 x i8] c"%lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double* %1, double* %2)
%5 = load double, double* %1
%6 = call i8* @sqrt(double %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%8 = load double, double* %1
%9 = call i8* @exp(double %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %9)
%11 = load double, double* %1
%12 = call i8* @log(double %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %12)
%14 = load double, double* %1
%15 = call i8* @log10(double %14)
%16 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %15)
%17 = load double, double* %1
%18 = call i8* @fabs(double %17)
%19 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %18)
%20 = load double, double* %1
%21 = call i8* @ceil(double %20)
%22 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %21)
%23 = load double, double* %1
%24 = call i8* @floor(double %23)
%25 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %24)
%26 = load double, double* %1
%27 = load double, double* %2
%28 = call i8* @pow(double %26, double %27)
%29 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %28)
%30 = load double, double* %1
%31 = load double, double* %2
%32 = call i8* @fmod(double %30, double %31)
%33 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %32)
%34 = load double, double* %1
%35 = call i8* @sin(double %34)
%36 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %35)
%37 = load double, double* %1
%38 = call i8* @cos(double %37)
%39 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %38)
%40 = load double, double* %1
%41 = call i8* @tan(double %40)
%42 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %41)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [6 x i8] c"X: Y:\00"
@.str.2 = [8 x i8] c"%lf %lf\00"
@.str.3 = [5 x i8] c"%lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double* %1, double* %2)
%7 = load double, double* %1
%8 = call i8* @sqrt(double %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %8)
%10 = load double, double* %1
%11 = call i8* @exp(double %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %11)
%13 = load double, double* %1
%14 = call i8* @log(double %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %14)
%16 = load double, double* %1
%17 = call i8* @log10(double %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %17)
%19 = load double, double* %1
%20 = call i8* @fabs(double %19)
%21 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %20)
%22 = load double, double* %1
%23 = call i8* @ceil(double %22)
%24 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %23)
%25 = load double, double* %1
%26 = call i8* @floor(double %25)
%27 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %26)
%28 = load double, double* %1
%29 = load double, double* %2
%30 = call i8* @pow(double %28, double %29)
%31 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %30)
%32 = load double, double* %1
%33 = load double, double* %2
%34 = call i8* @fmod(double %32, double %33)
%35 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %34)
%36 = load double, double* %1
%37 = call i8* @sin(double %36)
%38 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %37)
%39 = load double, double* %1
%40 = call i8* @cos(double %39)
%41 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %40)
%42 = load double, double* %1
%43 = call i8* @tan(double %42)
%44 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %43)
ret i32 0
}