#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*/ atan(double);
int /*<<< orphan*/ ceil(double);
int /*<<< orphan*/ cos(double);
int /*<<< orphan*/ floor(double);
int /*<<< orphan*/ log(double);
int /*<<< orphan*/ pow(double, double);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, double *, double *);
int /*<<< orphan*/ sin(double);
int /*<<< orphan*/ sqrt(double);
int /*<<< orphan*/ tan(double);
int main(int argc, const char *argv[]) {
  double x, y;
  scanf("%lf%lf", &x, &y);
  printf("sin(degree x) = %lf\n", sin(x * 3.14159265 / 180));
  printf("cos(degree x) = %lf\n", cos(x * 3.14159265 / 180));
  printf("tan(degree x) = %lf\n", tan(x * 3.14159265 / 180));
  printf("atan(degree x) = %lf\n", atan(x * 3.14159265 / 180));
  printf("sqrt(y) = %lf\n", sqrt(y));
  printf("x^y = %lf\n", pow(x, y));
  printf("log(y) = %lf\n", log(y));
  printf("floor(y) = %lf\n", floor(y));
  printf("ceil(y) = %lf\n", ceil(y));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe43(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1080 <scanf@plt>
movsd  0xe26(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xe11(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <sin@plt>
mov    %eax,%esi
lea    0xe16(%rip),%rdi
call   1040 <printf@plt>
movsd  0xdfa(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xde5(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1090 <cos@plt>
mov    %eax,%esi
lea    0xdff(%rip),%rdi
call   1040 <printf@plt>
movsd  0xdce(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xdb9(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1070 <tan@plt>
mov    %eax,%esi
lea    0xde9(%rip),%rdi
call   1040 <printf@plt>
movsd  0xda2(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xd8d(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1060 <atan@plt>
mov    %eax,%esi
lea    0xdbc(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x20(%rbp),%xmm0
call   10c0 <sqrt@plt>
mov    %eax,%esi
lea    0xdba(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   10b0 <pow@plt>
mov    %eax,%esi
lea    0xdac(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x20(%rbp),%xmm0
call   10a0 <log@plt>
mov    %eax,%esi
lea    0xd9f(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x20(%rbp),%xmm0
call   10d0 <floor@plt>
mov    %eax,%esi
lea    0xd95(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x20(%rbp),%xmm0
call   1030 <ceil@plt>
mov    %eax,%esi
lea    0xd8d(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xe55(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1080 <scanf@plt>
movsd  0x10(%rsp),%xmm0
mulsd  0xe28(%rip),%xmm0
divsd  0xe28(%rip),%xmm0
call   1050 <sin@plt>
lea    0xe2b(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
movsd  0x10(%rsp),%xmm0
mulsd  0xdff(%rip),%xmm0
divsd  0xdff(%rip),%xmm0
call   1090 <cos@plt>
lea    0xe17(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
movsd  0x10(%rsp),%xmm0
mulsd  0xdd6(%rip),%xmm0
divsd  0xdd6(%rip),%xmm0
call   1070 <tan@plt>
lea    0xe04(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
movsd  0xdb3(%rip),%xmm0
mulsd  0x10(%rsp),%xmm0
divsd  0xdad(%rip),%xmm0
call   1060 <atan@plt>
lea    0xdda(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
call   10c0 <sqrt@plt>
lea    0xdd7(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   10b0 <pow@plt>
lea    0xdc7(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
call   10a0 <log@plt>
lea    0xdb9(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
call   10d0 <floor@plt>
lea    0xdae(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
call   1030 <ceil@plt>
lea    0xda5(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

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