#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*/ assert(int);
double atof(char *);
int /*<<< orphan*/ printf(char *, double, double);
int main(int argc, char **argv) {
  assert(argc == 2);
  double z = atof(argv[1]);
  double a = z / 3.0;
  double b = z / 5.0;
  double c = a + a + a;
  double d = b + b + b + b + b;
  double e = 1.0 - c;
  double f = 1.0 - d;
  double r = e / f;
  printf("%g %g\n", z, r);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xea1(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe83(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe38(%rip),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe26(%rip),%xmm0
subsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x40(%rbp),%xmm0
divsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    0xe14(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
xor    %eax,%eax
cmp    $0x2,%edi
sete   %al
mov    %eax,%edi
call   1050 <assert@plt>
mov    0x8(%rbx),%rdi
call   1030 <atof@plt>
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
divpd  0xea4(%rip),%xmm1
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
movapd %xmm2,%xmm3
addsd  %xmm2,%xmm3
addsd  %xmm2,%xmm3
movapd %xmm1,%xmm2
unpcklpd %xmm3,%xmm2
addpd  %xmm1,%xmm2
addpd  %xmm1,%xmm2
movapd 0xe88(%rip),%xmm1
subpd  %xmm2,%xmm1
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
divsd  %xmm2,%xmm1
lea    0xe81(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%g %g\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store i32 %0, i32* %3
store i8** %1, i8*** %4
%13 = load i32, i32* %3
%14 = icmp eq i32 %13, 2
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = load i8**, i8*** %4
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call double @atof(i8* %19)
store double %20, double* %5
%21 = load double, double* %5
%22 = fdiv double %21, 3.000000e+00
store double %22, double* %6
%23 = load double, double* %5
%24 = fdiv double %23, 5.000000e+00
store double %24, double* %7
%25 = load double, double* %6
%26 = load double, double* %6
%27 = fadd double %25, %26
%28 = load double, double* %6
%29 = fadd double %27, %28
store double %29, double* %8
%30 = load double, double* %7
%31 = load double, double* %7
%32 = fadd double %30, %31
%33 = load double, double* %7
%34 = fadd double %32, %33
%35 = load double, double* %7
%36 = fadd double %34, %35
%37 = load double, double* %7
%38 = fadd double %36, %37
store double %38, double* %9
%39 = load double, double* %8
%40 = fsub double 1.000000e+00, %39
store double %40, double* %10
%41 = load double, double* %9
%42 = fsub double 1.000000e+00, %41
store double %42, double* %11
%43 = load double, double* %10
%44 = load double, double* %11
%45 = fdiv double %43, %44
store double %45, double* %12
%46 = load double, double* %5
%47 = load double, double* %12
%48 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %46, double %47)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%g %g\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call double @atof(i8* %7)
%9 = insertelement <2 x double> poison, double %8, i64 0
%10 = shufflevector <2 x double> %9, <2 x double> poison, <2 x i32> zeroinitializer
%11 = fdiv <2 x double> %10, <double 3.000000e+00, double 5.000000e+00>
%12 = extractelement <2 x double> %11, i64 1
%13 = fadd double %12, %12
%14 = fadd double %12, %13
%15 = insertelement <2 x double> %11, double %14, i64 1
%16 = fadd <2 x double> %11, %15
%17 = fadd <2 x double> %11, %16
%18 = fsub <2 x double> <double 1.000000e+00, double 1.000000e+00>, %17
%19 = extractelement <2 x double> %18, i64 0
%20 = extractelement <2 x double> %18, i64 1
%21 = fdiv double %19, %20
%22 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %8, double %21)
ret i32 0
}