#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
double atan(int);
double cos(int);
scalar_t__ exp(int);
double exp2(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, double, double,
                           int /*<<< orphan*/, scalar_t__);
int /*<<< orphan*/ hypot(int, int);
scalar_t__ sqrt(int);
double tan(double);
unsigned int _math(FILE *output) {
  fprintf(output, "%f%f%f%f", (exp2(10) + cos(90)), (atan(30) + tan(1.537475)),
          (hypot(13, 23)), (exp(5) - sqrt(255)));
  return 4;
}


x86 assembly (clang, -O0):
<_math>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    $0xa,%edi
call   1030 <exp2@plt>
movsd  %xmm0,-0x40(%rbp)
mov    $0x5a,%edi
call   1090 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    $0x1e,%edi
call   1050 <atan@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  0xe2b(%rip),%xmm0
call   1080 <tan@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0xd,%edi
mov    $0x17,%esi
call   1060 <hypot@plt>
mov    %eax,-0xc(%rbp)
mov    $0x5,%edi
call   1070 <exp@plt>
mov    %rax,-0x30(%rbp)
mov    $0xff,%edi
call   10a0 <sqrt@plt>
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rdi
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mov    -0xc(%rbp),%edx
sub    %rax,%rcx
lea    0xdd4(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x4,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_math>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%r14
mov    $0xa,%edi
call   1030 <exp2@plt>
movsd  %xmm0,(%rsp)
mov    $0x5a,%edi
call   1080 <cos@plt>
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    $0x1e,%edi
call   1050 <atan@plt>
addsd  0xe50(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    $0xd,%edi
mov    $0x17,%esi
call   1060 <hypot@plt>
mov    %eax,%ebp
mov    $0x5,%edi
call   1070 <exp@plt>
mov    %rax,%rbx
mov    $0xff,%edi
call   1090 <sqrt@plt>
sub    %rax,%rbx
lea    0xe20(%rip),%rsi
mov    %r14,%rdi
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mov    %ebp,%edx
mov    %rbx,%rcx
call   1040 <fprintf@plt>
mov    $0x4,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%f%f%f%f\00"
define i32 @_math(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call double @exp2(i32 10)
%5 = call double @cos(i32 90)
%6 = fadd double %4, %5
%7 = call double @atan(i32 30)
%8 = call double @tan(double 0x3FF8997F62B6AE7D)
%9 = fadd double %7, %8
%10 = call i32 @hypot(i32 13, i32 23)
%11 = call i64 @exp(i32 5)
%12 = call i64 @sqrt(i32 255)
%13 = sub nsw i64 %11, %12
%14 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double %6, double %9, i32 %10, i64 %13)
ret i32 4
}

LLVM IR (-O2):
@.str = [9 x i8] c"%f%f%f%f\00"
define i32 @_math(i32* nocapture %0) {
%2 = tail call double @exp2(i32 10)
%3 = tail call double @cos(i32 90)
%4 = fadd double %2, %3
%5 = tail call double @atan(i32 30)
%6 = fadd double %5, 0x403DFFEC75D2DE34
%7 = tail call i32 @hypot(i32 13, i32 23)
%8 = tail call i64 @exp(i32 5)
%9 = tail call i64 @sqrt(i32 255)
%10 = sub nsw i64 %8, %9
%11 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double %4, double %6, i32 %7, i64 %10)
ret i32 4
}