#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*/ log(double);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/);
int /*<<< orphan*/ sqrt(double);
int /*<<< orphan*/ sscanf(char *, char *, double *);
int main(int argc, char **argv) {
  double v;
  sscanf(argv[1], "%lf", &v);
  printf("%lf, %lf, %lf\n", log(v), sqrt(v), atan(v));
  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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe8b(%rip),%rsi
lea    -0x18(%rbp),%rdx
call   1050 <sscanf@plt>
movsd  -0x18(%rbp),%xmm0
call   1060 <log@plt>
mov    %eax,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1070 <sqrt@plt>
mov    %eax,-0x1c(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <atan@plt>
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    %eax,%ecx
lea    0xe53(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    0x8(%rsi),%rdi
lea    0xea2(%rip),%rsi
mov    %rsp,%rdx
call   1050 <sscanf@plt>
movsd  (%rsp),%xmm0
call   1060 <log@plt>
mov    %eax,%ebx
movsd  (%rsp),%xmm0
call   1070 <sqrt@plt>
mov    %eax,%ebp
movsd  (%rsp),%xmm0
call   1040 <atan@plt>
lea    0xe75(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %eax,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [15 x i8] c"%lf, %lf, %lf\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = call i32 @sscanf(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %6)
%11 = load double, double* %6
%12 = call i32 @log(double %11)
%13 = load double, double* %6
%14 = call i32 @sqrt(double %13)
%15 = load double, double* %6
%16 = call i32 @atan(double %15)
%17 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %12, i32 %14, i32 %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [15 x i8] c"%lf, %lf, %lf\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca double
%4 = bitcast double* %3 to i8*
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = call i32 @sscanf(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %3)
%8 = load double, double* %3
%9 = call i32 @log(double %8)
%10 = load double, double* %3
%11 = call i32 @sqrt(double %10)
%12 = load double, double* %3
%13 = call i32 @atan(double %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32 %11, i32 %13)
ret i32 0
}