#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 */
double powf(double, double);
int /*<<< orphan*/ printf(char *, double);
char *strdup(char *);
double strtod(char *, int /*<<< orphan*/ *);
char *strtok(char *, char *);
long strtol(char *, int /*<<< orphan*/ *, int /*<<< orphan*/);
int main(int argc, char **argv) {
  long int scales = strtol(argv[1], NULL, 0);
  long int orientations = strtol(argv[2], NULL, 0);
  char *f1 = strdup(argv[3]);
  char *f2 = strdup(argv[4]);
  double f1_vector[scales * orientations * 2];
  double f2_vector[scales * orientations * 2];
  char *f1_token = strtok(f1, ",");
  int f1_counter = 0;
  while (f1_token) {
    f1_vector[f1_counter] = strtod(f1_token, NULL);
    f1_token = strtok(NULL, ",");
    f1_counter++;
  }
  char *f2_token = strtok(f2, ",");
  int f2_counter = 0;
  while (f2_token) {
    f2_vector[f2_counter] = strtod(f2_token, NULL);
    f2_token = strtok(NULL, ",");
    f2_counter++;
  }
  double f1_mean_vector[scales * orientations];
  double f2_mean_vector[scales * orientations];
  double f1_stddev_vector[scales * orientations];
  double f2_stddev_vector[scales * orientations];
  int ii;
  int element_counter = 0;
  for (ii = 0; ii < scales * orientations * 2; ii = ii + 2) {
    f1_mean_vector[element_counter] = f1_vector[ii];
    f1_stddev_vector[element_counter] = f1_vector[ii + 1];
    f2_mean_vector[element_counter] = f2_vector[ii];
    f2_stddev_vector[element_counter] = f2_vector[ii + 1];
    element_counter++;
  }
  double total_d = 0.0;
  for (ii = 0; ii < scales * orientations; ii++) {
    total_d += powf((powf((f1_mean_vector[ii] - f2_mean_vector[ii]), 2) +
                     powf((f1_stddev_vector[ii] - f2_stddev_vector[ii]), 2)),
                    0.5);
  }
  printf("%f\n", total_d);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %edx,%edx
mov    %edx,-0xac(%rbp)
mov    %edx,%esi
mov    %rsi,-0xb8(%rbp)
call   1060 <strtol@plt>
mov    -0xb8(%rbp),%rsi
mov    -0xac(%rbp),%edx
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1060 <strtol@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1080 <strdup@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
call   1080 <strdup@plt>
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rax
imul   %rax,%rdx
mov    %rdx,%rax
add    %rax,%rax
mov    %rsp,%rcx
mov    %rcx,-0x38(%rbp)
shl    $0x4,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xa8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x40(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rax
imul   %rax,%rdx
mov    %rdx,%rax
add    %rax,%rax
shl    $0x4,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xa0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x48(%rbp)
mov    -0x28(%rbp),%rdi
lea    0xdcf(%rip),%rsi
call   1070 <strtok@plt>
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
cmpq   $0x0,-0x50(%rbp)
je     129b <main+0x13b>
mov    -0x50(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <strtod@plt>
mov    -0xa8(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
xor    %eax,%eax
mov    %eax,%edi
lea    0xd8c(%rip),%rsi
call   1070 <strtok@plt>
mov    %rax,-0x50(%rbp)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1251 <main+0xf1>
mov    -0x30(%rbp),%rdi
lea    0xd6a(%rip),%rsi
call   1070 <strtok@plt>
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x64(%rbp)
cmpq   $0x0,-0x60(%rbp)
je     1300 <main+0x1a0>
mov    -0x60(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <strtod@plt>
mov    -0xa0(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
xor    %eax,%eax
mov    %eax,%edi
lea    0xd27(%rip),%rsi
call   1070 <strtok@plt>
mov    %rax,-0x60(%rbp)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    12b6 <main+0x156>
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
imul   %rcx,%rax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xd8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x70(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
imul   %rcx,%rax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xd0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x78(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
imul   %rcx,%rax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xc8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x80(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
imul   %rcx,%rax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xc0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x88(%rbp)
movl   $0x0,-0x90(%rbp)
movl   $0x0,-0x8c(%rbp)
movslq -0x8c(%rbp),%rax
mov    -0x18(%rbp),%rcx
imul   -0x20(%rbp),%rcx
shl    $0x1,%rcx
cmp    %rcx,%rax
jge    14a0 <main+0x340>
mov    -0xc0(%rbp),%rax
mov    -0xa0(%rbp),%rcx
mov    -0xd0(%rbp),%rdx
mov    -0xc8(%rbp),%rsi
mov    -0xa8(%rbp),%rdi
mov    -0xd8(%rbp),%r8
movslq -0x8c(%rbp),%r9
movsd  (%rdi,%r9,8),%xmm0
movslq -0x90(%rbp),%r9
movsd  %xmm0,(%r8,%r9,8)
mov    -0x8c(%rbp),%r8d
add    $0x1,%r8d
movslq %r8d,%r8
movsd  (%rdi,%r8,8),%xmm0
movslq -0x90(%rbp),%rdi
movsd  %xmm0,(%rsi,%rdi,8)
movslq -0x8c(%rbp),%rsi
movsd  (%rcx,%rsi,8),%xmm0
movslq -0x90(%rbp),%rsi
movsd  %xmm0,(%rdx,%rsi,8)
mov    -0x8c(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
movsd  (%rcx,%rdx,8),%xmm0
movslq -0x90(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x90(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x90(%rbp)
mov    -0x8c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8c(%rbp)
jmp    13c7 <main+0x267>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movl   $0x0,-0x8c(%rbp)
movslq -0x8c(%rbp),%rax
mov    -0x18(%rbp),%rcx
imul   -0x20(%rbp),%rcx
cmp    %rcx,%rax
jge    157c <main+0x41c>
mov    -0xd0(%rbp),%rax
mov    -0xd8(%rbp),%rcx
movslq -0x8c(%rbp),%rdx
movsd  (%rcx,%rdx,8),%xmm0
movslq -0x8c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  0xb0c(%rip),%xmm1
call   1040 <powf@plt>
mov    -0xc8(%rbp),%rcx
mov    -0xc0(%rbp),%rax
movsd  %xmm0,-0xe0(%rbp)
ff
movslq -0x8c(%rbp),%rdx
movsd  (%rcx,%rdx,8),%xmm0
movslq -0x8c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  0xad1(%rip),%xmm1
call   1040 <powf@plt>
movaps %xmm0,%xmm1
movsd  -0xe0(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  0xaad(%rip),%xmm1
call   1040 <powf@plt>
addsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    14b5 <main+0x355>
movsd  -0x98(%rbp),%xmm0
ff
lea    0xa87(%rip),%rdi
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r14
mov    0x8(%rsi),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1060 <strtol@plt>
mov    %rax,%r12
mov    0x10(%r14),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1060 <strtol@plt>
mov    %rax,%rbx
mov    0x18(%r14),%rdi
call   1080 <strdup@plt>
mov    %rax,%r13
mov    0x20(%r14),%rdi
call   1080 <strdup@plt>
mov    %rax,-0x30(%rbp)
imul   %r12,%rbx
mov    %rbx,-0x48(%rbp)
shl    $0x4,%rbx
mov    %rsp,%r14
sub    %rbx,%r14
mov    %r14,%rsp
mov    %rsp,%r15
sub    %rbx,%r15
mov    %r15,%rsp
lea    0xe36(%rip),%rsi
mov    %r13,%rdi
call   1070 <strtok@plt>
test   %rax,%rax
je     1211 <main+0xb1>
lea    0xe22(%rip),%r12
mov    %r14,%rbx
nopl   0x0(%rax)
mov    %rax,%rdi
xor    %esi,%esi
call   1030 <strtod@plt>
movsd  %xmm0,(%rbx)
xor    %edi,%edi
mov    %r12,%rsi
call   1070 <strtok@plt>
add    $0x8,%rbx
test   %rax,%rax
jne    11f0 <main+0x90>
lea    0xdf0(%rip),%rsi
mov    -0x30(%rbp),%rdi
call   1070 <strtok@plt>
test   %rax,%rax
je     1251 <main+0xf1>
lea    0xddb(%rip),%r12
mov    %r15,%rbx
mov    %rax,%rdi
xor    %esi,%esi
call   1030 <strtod@plt>
movsd  %xmm0,(%rbx)
xor    %edi,%edi
mov    %r12,%rsi
call   1070 <strtok@plt>
add    $0x8,%rbx
test   %rax,%rax
jne    1230 <main+0xd0>
mov    %rsp,%rcx
mov    -0x48(%rbp),%r11
lea    0xf(,%r11,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rcx,%rsp
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rsp,%r13
sub    %rax,%r13
mov    %r13,%rsp
mov    %rsp,%r12
sub    %rax,%r12
mov    %r12,%rsp
xorpd  %xmm3,%xmm3
test   %r11,%r11
jle    158e <main+0x42e>
lea    (%r11,%r11,1),%rax
cmp    $0x3,%rax
mov    $0x2,%ecx
cmovge %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,%rax
shr    %rax
cmp    $0x1,%rcx
mov    %rbx,-0x40(%rbp)
jne    12c5 <main+0x165>
xor    %ecx,%ecx
xor    %r9d,%r9d
jmp    13f8 <main+0x298>
lea    0x1(%rax),%r8
movabs $0x7ffffffffffffffe,%r9
ff ff 7f
and    %r8,%r9
lea    -0x2(%r9),%rcx
mov    %rcx,%r10
shr    %r10
add    $0x1,%r10
test   %rcx,%rcx
je     15af <main+0x44f>
mov    %r10,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %edx,%edx
xor    %esi,%esi
mov    -0x38(%rbp),%rcx
nopl   0x0(%rax)
movaps (%r14,%rdx,2),%xmm0
movaps 0x10(%r14,%rdx,2),%xmm1
movaps %xmm0,%xmm2
movlhps %xmm1,%xmm2
unpckhpd %xmm1,%xmm0
movaps %xmm2,(%rcx,%rdx,1)
movaps %xmm0,0x0(%r13,%rdx,1)
movaps (%r15,%rdx,2),%xmm0
movaps 0x10(%r15,%rdx,2),%xmm1
movaps %xmm0,%xmm2
movlhps %xmm1,%xmm2
unpckhpd %xmm1,%xmm0
movaps %xmm2,(%rbx,%rdx,1)
movaps %xmm0,(%r12,%rdx,1)
movaps 0x20(%r14,%rdx,2),%xmm0
movaps 0x30(%r14,%rdx,2),%xmm1
movaps %xmm0,%xmm2
movlhps %xmm1,%xmm2
unpckhpd %xmm1,%xmm0
movaps %xmm2,0x10(%rcx,%rdx,1)
movaps %xmm0,0x10(%r13,%rdx,1)
movapd 0x20(%r15,%rdx,2),%xmm0
movapd 0x30(%r15,%rdx,2),%xmm1
movapd %xmm0,%xmm2
unpcklpd %xmm1,%xmm2
unpckhpd %xmm1,%xmm0
movapd %xmm2,0x10(%rbx,%rdx,1)
movapd %xmm0,0x10(%r12,%rdx,1)
add    $0x4,%rsi
add    $0x20,%rdx
add    $0xfffffffffffffffe,%rdi
jne    1300 <main+0x1a0>
test   $0x1,%r10b
je     13eb <main+0x28b>
mov    %rsi,%rcx
shl    $0x4,%rcx
movaps (%r14,%rcx,1),%xmm0
movaps 0x10(%r14,%rcx,1),%xmm1
movaps %xmm0,%xmm2
movlhps %xmm1,%xmm2
unpckhpd %xmm1,%xmm0
mov    -0x38(%rbp),%rdx
movaps %xmm2,(%rdx,%rsi,8)
movaps %xmm0,0x0(%r13,%rsi,8)
movapd (%r15,%rcx,1),%xmm0
movapd 0x10(%r15,%rcx,1),%xmm1
movapd %xmm0,%xmm2
unpcklpd %xmm1,%xmm2
unpckhpd %xmm1,%xmm0
movapd %xmm2,(%rbx,%rsi,8)
movapd %xmm0,(%r12,%rsi,8)
cmp    %r9,%r8
je     1466 <main+0x306>
lea    (%r9,%r9,1),%rcx
mov    -0x40(%rbp),%rbx
lea    (%r15,%rcx,8),%rdx
add    $0x8,%rdx
lea    (%r14,%rcx,8),%rsi
add    $0x8,%rsi
sub    %r9,%rax
add    $0x1,%rax
lea    (%r12,%r9,8),%r8
lea    (%rbx,%r9,8),%r10
lea    0x0(,%r9,8),%rcx
add    %r13,%rcx
mov    -0x38(%rbp),%rdi
lea    (%rdi,%r9,8),%rdi
xor    %ebx,%ebx
nopl   0x0(%rax)
movsd  -0x8(%rsi,%rbx,2),%xmm0
movsd  %xmm0,(%rdi,%rbx,1)
movsd  (%rsi,%rbx,2),%xmm0
movsd  %xmm0,(%rcx,%rbx,1)
movsd  -0x8(%rdx,%rbx,2),%xmm0
movsd  %xmm0,(%r10,%rbx,1)
movsd  (%rdx,%rbx,2),%xmm0
movsd  %xmm0,(%r8,%rbx,1)
add    $0x8,%rbx
add    $0xffffffffffffffff,%rax
jne    1430 <main+0x2d0>
test   %r11,%r11
mov    -0x38(%rbp),%r15
jle    158e <main+0x42e>
cmp    $0x1,%r11
jne    1484 <main+0x324>
xorpd  %xmm3,%xmm3
xor    %ebx,%ebx
jmp    153d <main+0x3dd>
and    $0xfffffffffffffffe,%r11
mov    %r11,-0x50(%rbp)
xorpd  %xmm3,%xmm3
xor    %ebx,%ebx
mov    -0x40(%rbp),%r14
cs nopw 0x0(%rax,%rax,1)
movsd  %xmm3,-0x30(%rbp)
movsd  (%r15,%rbx,8),%xmm1
movhpd 0x0(%r13,%rbx,8),%xmm1
movsd  (%r14,%rbx,8),%xmm0
movhpd (%r12,%rbx,8),%xmm0
subpd  %xmm0,%xmm1
mulpd  %xmm1,%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
addsd  %xmm1,%xmm0
movsd  0xb26(%rip),%xmm1
call   1040 <powf@plt>
movsd  0x8(%r15,%rbx,8),%xmm1
movhpd 0x8(%r13,%rbx,8),%xmm1
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0x8(%r14,%rbx,8),%xmm0
movhpd 0x8(%r12,%rbx,8),%xmm0
subpd  %xmm0,%xmm1
mulpd  %xmm1,%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
addsd  %xmm1,%xmm0
movsd  0xadf(%rip),%xmm1
call   1040 <powf@plt>
movapd %xmm0,%xmm3
addsd  -0x30(%rbp),%xmm3
add    $0x2,%rbx
cmp    %rbx,-0x50(%rbp)
jne    14a0 <main+0x340>
testb  $0x1,-0x48(%rbp)
je     158e <main+0x42e>
movsd  (%r15,%rbx,8),%xmm1
movhpd 0x0(%r13,%rbx,8),%xmm1
mov    -0x40(%rbp),%rax
movsd  (%rax,%rbx,8),%xmm0
movhpd (%r12,%rbx,8),%xmm0
subpd  %xmm0,%xmm1
mulpd  %xmm1,%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
addsd  %xmm1,%xmm0
movsd  0xa85(%rip),%xmm1
movsd  %xmm3,-0x30(%rbp)
call   1040 <powf@plt>
movsd  -0x30(%rbp),%xmm3
addsd  %xmm0,%xmm3
lea    0xa75(%rip),%rdi
movapd %xmm3,%xmm0
call   1050 <printf@plt>
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %esi,%esi
test   $0x1,%r10b
jne    139d <main+0x23d>
jmp    13eb <main+0x28b>

LLVM IR (-O0):
@.str = [2 x i8] c",\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i64
%13 = alloca i8*
%14 = alloca i32
%15 = alloca i8*
%16 = alloca i32
%17 = alloca i64
%18 = alloca i64
%19 = alloca i64
%20 = alloca i64
%21 = alloca i32
%22 = alloca i32
%23 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = call i64 @strtol(i8* %26, i32* null, i32 0)
store i64 %27, i64* %6
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 2
%30 = load i8*, i8** %29
%31 = call i64 @strtol(i8* %30, i32* null, i32 0)
store i64 %31, i64* %7
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 3
%34 = load i8*, i8** %33
%35 = call i8* @strdup(i8* %34)
store i8* %35, i8** %8
%36 = load i8**, i8*** %5
%37 = getelementptr inbounds i8*, i8** %36, i64 4
%38 = load i8*, i8** %37
%39 = call i8* @strdup(i8* %38)
store i8* %39, i8** %9
%40 = load i64, i64* %6
%41 = load i64, i64* %7
%42 = mul nsw i64 %40, %41
%43 = mul nsw i64 %42, 2
%44 = call i8* @llvm.stacksave()
store i8* %44, i8** %10
%45 = alloca double, i64 %43
store i64 %43, i64* %11
%46 = load i64, i64* %6
%47 = load i64, i64* %7
%48 = mul nsw i64 %46, %47
%49 = mul nsw i64 %48, 2
%50 = alloca double, i64 %49
store i64 %49, i64* %12
%51 = load i8*, i8** %8
%52 = call i8* @strtok(i8* %51, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %52, i8** %13
store i32 0, i32* %14
br label %53
53: ; preds = %56, %2
%54 = load i8*, i8** %13
%55 = icmp ne i8* %54, null
br i1 %55, label %56, label %65
56: ; preds = %53
%57 = load i8*, i8** %13
%58 = call double @strtod(i8* %57, i32* null)
%59 = load i32, i32* %14
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds double, double* %45, i64 %60
store double %58, double* %61
%62 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %62, i8** %13
%63 = load i32, i32* %14
%64 = add nsw i32 %63, 1
store i32 %64, i32* %14
br label %53
65: ; preds = %53
%66 = load i8*, i8** %9
%67 = call i8* @strtok(i8* %66, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %67, i8** %15
store i32 0, i32* %16
br label %68
68: ; preds = %71, %65
%69 = load i8*, i8** %15
%70 = icmp ne i8* %69, null
br i1 %70, label %71, label %80
71: ; preds = %68
%72 = load i8*, i8** %15
%73 = call double @strtod(i8* %72, i32* null)
%74 = load i32, i32* %16
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds double, double* %50, i64 %75
store double %73, double* %76
%77 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %77, i8** %15
%78 = load i32, i32* %16
%79 = add nsw i32 %78, 1
store i32 %79, i32* %16
br label %68
80: ; preds = %68
%81 = load i64, i64* %6
%82 = load i64, i64* %7
%83 = mul nsw i64 %81, %82
%84 = alloca double, i64 %83
store i64 %83, i64* %17
%85 = load i64, i64* %6
%86 = load i64, i64* %7
%87 = mul nsw i64 %85, %86
%88 = alloca double, i64 %87
store i64 %87, i64* %18
%89 = load i64, i64* %6
%90 = load i64, i64* %7
%91 = mul nsw i64 %89, %90
%92 = alloca double, i64 %91
store i64 %91, i64* %19
%93 = load i64, i64* %6
%94 = load i64, i64* %7
%95 = mul nsw i64 %93, %94
%96 = alloca double, i64 %95
store i64 %95, i64* %20
store i32 0, i32* %22
store i32 0, i32* %21
br label %97
97: ; preds = %138, %80
%98 = load i32, i32* %21
%99 = sext i32 %98 to i64
%100 = load i64, i64* %6
%101 = load i64, i64* %7
%102 = mul nsw i64 %100, %101
%103 = mul nsw i64 %102, 2
%104 = icmp slt i64 %99, %103
br i1 %104, label %105, label %141
105: ; preds = %97
%106 = load i32, i32* %21
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds double, double* %45, i64 %107
%109 = load double, double* %108
%110 = load i32, i32* %22
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds double, double* %84, i64 %111
store double %109, double* %112
%113 = load i32, i32* %21
%114 = add nsw i32 %113, 1
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds double, double* %45, i64 %115
%117 = load double, double* %116
%118 = load i32, i32* %22
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds double, double* %92, i64 %119
store double %117, double* %120
%121 = load i32, i32* %21
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds double, double* %50, i64 %122
%124 = load double, double* %123
%125 = load i32, i32* %22
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds double, double* %88, i64 %126
store double %124, double* %127
%128 = load i32, i32* %21
%129 = add nsw i32 %128, 1
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds double, double* %50, i64 %130
%132 = load double, double* %131
%133 = load i32, i32* %22
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds double, double* %96, i64 %134
store double %132, double* %135
%136 = load i32, i32* %22
%137 = add nsw i32 %136, 1
store i32 %137, i32* %22
br label %138
138: ; preds = %105
%139 = load i32, i32* %21
%140 = add nsw i32 %139, 2
store i32 %140, i32* %21
br label %97
141: ; preds = %97
store double 0.000000e+00, double* %23
store i32 0, i32* %21
br label %142
142: ; preds = %174, %141
%143 = load i32, i32* %21
%144 = sext i32 %143 to i64
%145 = load i64, i64* %6
%146 = load i64, i64* %7
%147 = mul nsw i64 %145, %146
%148 = icmp slt i64 %144, %147
br i1 %148, label %149, label %177
149: ; preds = %142
%150 = load i32, i32* %21
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds double, double* %84, i64 %151
%153 = load double, double* %152
%154 = load i32, i32* %21
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds double, double* %88, i64 %155
%157 = load double, double* %156
%158 = fsub double %153, %157
%159 = call double @powf(double %158, double 2.000000e+00)
%160 = load i32, i32* %21
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds double, double* %92, i64 %161
%163 = load double, double* %162
%164 = load i32, i32* %21
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds double, double* %96, i64 %165
%167 = load double, double* %166
%168 = fsub double %163, %167
%169 = call double @powf(double %168, double 2.000000e+00)
%170 = fadd double %159, %169
%171 = call double @powf(double %170, double 5.000000e-01)
%172 = load double, double* %23
%173 = fadd double %172, %171
store double %173, double* %23
br label %174
174: ; preds = %149
%175 = load i32, i32* %21
%176 = add nsw i32 %175, 1
store i32 %176, i32* %21
br label %142
177: ; preds = %142
%178 = load double, double* %23
%179 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %178)
store i32 0, i32* %3
%180 = load i8*, i8** %10
%181 = load i32, i32* %3
ret i32 %181
}

LLVM IR (-O2):
@.str = [2 x i8] c",\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i64 @strtol(i8* nocapture %4, i32* null, i32 0)
%6 = getelementptr inbounds i8*, i8** %1, i64 2
%7 = load i8*, i8** %6
%8 = tail call i64 @strtol(i8* nocapture %7, i32* null, i32 0)
%9 = getelementptr inbounds i8*, i8** %1, i64 3
%10 = load i8*, i8** %9
%11 = tail call i8* @strdup(i8* %10)
%12 = getelementptr inbounds i8*, i8** %1, i64 4
%13 = load i8*, i8** %12
%14 = tail call i8* @strdup(i8* %13)
%15 = mul i64 %8, %5
%16 = shl i64 %15, 1
%17 = alloca double, i64 %16
%18 = alloca double, i64 %16
%19 = tail call i8* @strtok(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%20 = icmp eq i8* %19, null
br i1 %20, label %29, label %21
21: ; preds = %2, %21
%22 = phi i64 [ %27, %21 ], [ 0, %2 ]
%23 = phi i8* [ %26, %21 ], [ %19, %2 ]
%24 = tail call double @strtod(i8* nocapture %23, i32* null)
%25 = getelementptr inbounds double, double* %17, i64 %22
store double %24, double* %25
%26 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%27 = add nuw i64 %22, 1
%28 = icmp eq i8* %26, null
br i1 %28, label %29, label %21
29: ; preds = %21, %2
%30 = tail call i8* @strtok(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%31 = icmp eq i8* %30, null
br i1 %31, label %40, label %32
32: ; preds = %29, %32
%33 = phi i64 [ %38, %32 ], [ 0, %29 ]
%34 = phi i8* [ %37, %32 ], [ %30, %29 ]
%35 = tail call double @strtod(i8* nocapture %34, i32* null)
%36 = getelementptr inbounds double, double* %18, i64 %33
store double %35, double* %36
%37 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%38 = add nuw i64 %33, 1
%39 = icmp eq i8* %37, null
br i1 %39, label %40, label %32
40: ; preds = %32, %29
%41 = alloca double, i64 %15
%42 = alloca double, i64 %15
%43 = alloca double, i64 %15
%44 = alloca double, i64 %15
%45 = icmp sgt i64 %15, 0
br i1 %45, label %46, label %231
46: ; preds = %40
%47 = call i64 @llvm.smax.i64(i64 %16, i64 2)
%48 = add nsw i64 %47, -1
%49 = lshr i64 %48, 1
%50 = add nuw nsw i64 %49, 1
%51 = icmp eq i64 %48, 1
br i1 %51, label %132, label %52
52: ; preds = %46
%53 = and i64 %50, 9223372036854775806
%54 = shl nuw i64 %53, 1
%55 = add nsw i64 %53, -2
%56 = lshr exact i64 %55, 1
%57 = add nuw i64 %56, 1
%58 = and i64 %57, 1
%59 = icmp eq i64 %55, 0
br i1 %59, label %107, label %60
60: ; preds = %52
%61 = and i64 %57, -2
br label %62
62: ; preds = %62, %60
%63 = phi i64 [ 0, %60 ], [ %104, %62 ]
%64 = phi i64 [ 0, %60 ], [ %105, %62 ]
%65 = shl i64 %63, 1
%66 = getelementptr inbounds double, double* %17, i64 %65
%67 = bitcast double* %66 to <4 x double>*
%68 = load <4 x double>, <4 x double>* %67
%69 = shufflevector <4 x double> %68, <4 x double> poison, <2 x i32> <i32 0, i32 2>
%70 = shufflevector <4 x double> %68, <4 x double> poison, <2 x i32> <i32 1, i32 3>
%71 = getelementptr inbounds double, double* %41, i64 %63
%72 = bitcast double* %71 to <2 x double>*
store <2 x double> %69, <2 x double>* %72
%73 = getelementptr inbounds double, double* %43, i64 %63
%74 = bitcast double* %73 to <2 x double>*
store <2 x double> %70, <2 x double>* %74
%75 = getelementptr inbounds double, double* %18, i64 %65
%76 = bitcast double* %75 to <4 x double>*
%77 = load <4 x double>, <4 x double>* %76
%78 = shufflevector <4 x double> %77, <4 x double> poison, <2 x i32> <i32 0, i32 2>
%79 = shufflevector <4 x double> %77, <4 x double> poison, <2 x i32> <i32 1, i32 3>
%80 = getelementptr inbounds double, double* %42, i64 %63
%81 = bitcast double* %80 to <2 x double>*
store <2 x double> %78, <2 x double>* %81
%82 = getelementptr inbounds double, double* %44, i64 %63
%83 = bitcast double* %82 to <2 x double>*
store <2 x double> %79, <2 x double>* %83
%84 = or i64 %63, 2
%85 = shl i64 %84, 1
%86 = getelementptr inbounds double, double* %17, i64 %85
%87 = bitcast double* %86 to <4 x double>*
%88 = load <4 x double>, <4 x double>* %87
%89 = shufflevector <4 x double> %88, <4 x double> poison, <2 x i32> <i32 0, i32 2>
%90 = shufflevector <4 x double> %88, <4 x double> poison, <2 x i32> <i32 1, i32 3>
%91 = getelementptr inbounds double, double* %41, i64 %84
%92 = bitcast double* %91 to <2 x double>*
store <2 x double> %89, <2 x double>* %92
%93 = getelementptr inbounds double, double* %43, i64 %84
%94 = bitcast double* %93 to <2 x double>*
store <2 x double> %90, <2 x double>* %94
%95 = getelementptr inbounds double, double* %18, i64 %85
%96 = bitcast double* %95 to <4 x double>*
%97 = load <4 x double>, <4 x double>* %96
%98 = shufflevector <4 x double> %97, <4 x double> poison, <2 x i32> <i32 0, i32 2>
%99 = shufflevector <4 x double> %97, <4 x double> poison, <2 x i32> <i32 1, i32 3>
%100 = getelementptr inbounds double, double* %42, i64 %84
%101 = bitcast double* %100 to <2 x double>*
store <2 x double> %98, <2 x double>* %101
%102 = getelementptr inbounds double, double* %44, i64 %84
%103 = bitcast double* %102 to <2 x double>*
store <2 x double> %99, <2 x double>* %103
%104 = add nuw i64 %63, 4
%105 = add nuw i64 %64, 2
%106 = icmp eq i64 %105, %61
br i1 %106, label %107, label %62
107: ; preds = %62, %52
%108 = phi i64 [ 0, %52 ], [ %104, %62 ]
%109 = icmp eq i64 %58, 0
br i1 %109, label %130, label %110
110: ; preds = %107
%111 = shl i64 %108, 1
%112 = getelementptr inbounds double, double* %17, i64 %111
%113 = bitcast double* %112 to <4 x double>*
%114 = load <4 x double>, <4 x double>* %113
%115 = shufflevector <4 x double> %114, <4 x double> poison, <2 x i32> <i32 0, i32 2>
%116 = shufflevector <4 x double> %114, <4 x double> poison, <2 x i32> <i32 1, i32 3>
%117 = getelementptr inbounds double, double* %41, i64 %108
%118 = bitcast double* %117 to <2 x double>*
store <2 x double> %115, <2 x double>* %118
%119 = getelementptr inbounds double, double* %43, i64 %108
%120 = bitcast double* %119 to <2 x double>*
store <2 x double> %116, <2 x double>* %120
%121 = getelementptr inbounds double, double* %18, i64 %111
%122 = bitcast double* %121 to <4 x double>*
%123 = load <4 x double>, <4 x double>* %122
%124 = shufflevector <4 x double> %123, <4 x double> poison, <2 x i32> <i32 0, i32 2>
%125 = shufflevector <4 x double> %123, <4 x double> poison, <2 x i32> <i32 1, i32 3>
%126 = getelementptr inbounds double, double* %42, i64 %108
%127 = bitcast double* %126 to <2 x double>*
store <2 x double> %124, <2 x double>* %127
%128 = getelementptr inbounds double, double* %44, i64 %108
%129 = bitcast double* %128 to <2 x double>*
store <2 x double> %125, <2 x double>* %129
br label %130
130: ; preds = %107, %110
%131 = icmp eq i64 %50, %53
br i1 %131, label %135, label %132
132: ; preds = %46, %130
%133 = phi i64 [ 0, %46 ], [ %54, %130 ]
%134 = phi i64 [ 0, %46 ], [ %53, %130 ]
br label %141
135: ; preds = %141, %130
br i1 %45, label %136, label %231
136: ; preds = %135
%137 = and i64 %15, 1
%138 = icmp eq i64 %15, 1
br i1 %138, label %206, label %139
139: ; preds = %136
%140 = and i64 %15, -2
br label %160
141: ; preds = %132, %141
%142 = phi i64 [ %158, %141 ], [ %133, %132 ]
%143 = phi i64 [ %157, %141 ], [ %134, %132 ]
%144 = getelementptr inbounds double, double* %17, i64 %142
%145 = load double, double* %144
%146 = getelementptr inbounds double, double* %41, i64 %143
store double %145, double* %146
%147 = or i64 %142, 1
%148 = getelementptr inbounds double, double* %17, i64 %147
%149 = load double, double* %148
%150 = getelementptr inbounds double, double* %43, i64 %143
store double %149, double* %150
%151 = getelementptr inbounds double, double* %18, i64 %142
%152 = load double, double* %151
%153 = getelementptr inbounds double, double* %42, i64 %143
store double %152, double* %153
%154 = getelementptr inbounds double, double* %18, i64 %147
%155 = load double, double* %154
%156 = getelementptr inbounds double, double* %44, i64 %143
store double %155, double* %156
%157 = add nuw nsw i64 %143, 1
%158 = add nuw nsw i64 %142, 2
%159 = icmp eq i64 %143, %49
br i1 %159, label %135, label %141
160: ; preds = %160, %139
%161 = phi i64 [ 0, %139 ], [ %203, %160 ]
%162 = phi double [ 0.000000e+00, %139 ], [ %202, %160 ]
%163 = phi i64 [ 0, %139 ], [ %204, %160 ]
%164 = getelementptr inbounds double, double* %41, i64 %161
%165 = load double, double* %164
%166 = getelementptr inbounds double, double* %42, i64 %161
%167 = load double, double* %166
%168 = getelementptr inbounds double, double* %43, i64 %161
%169 = load double, double* %168
%170 = getelementptr inbounds double, double* %44, i64 %161
%171 = load double, double* %170
%172 = insertelement <2 x double> poison, double %165, i64 0
%173 = insertelement <2 x double> %172, double %169, i64 1
%174 = insertelement <2 x double> poison, double %167, i64 0
%175 = insertelement <2 x double> %174, double %171, i64 1
%176 = fsub <2 x double> %173, %175
%177 = fmul <2 x double> %176, %176
%178 = shufflevector <2 x double> %177, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%179 = fadd <2 x double> %177, %178
%180 = extractelement <2 x double> %179, i64 0
%181 = tail call double @powf(double %180, double 5.000000e-01)
%182 = fadd double %162, %181
%183 = or i64 %161, 1
%184 = getelementptr inbounds double, double* %41, i64 %183
%185 = load double, double* %184
%186 = getelementptr inbounds double, double* %42, i64 %183
%187 = load double, double* %186
%188 = getelementptr inbounds double, double* %43, i64 %183
%189 = load double, double* %188
%190 = getelementptr inbounds double, double* %44, i64 %183
%191 = load double, double* %190
%192 = insertelement <2 x double> poison, double %185, i64 0
%193 = insertelement <2 x double> %192, double %189, i64 1
%194 = insertelement <2 x double> poison, double %187, i64 0
%195 = insertelement <2 x double> %194, double %191, i64 1
%196 = fsub <2 x double> %193, %195
%197 = fmul <2 x double> %196, %196
%198 = shufflevector <2 x double> %197, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%199 = fadd <2 x double> %197, %198
%200 = extractelement <2 x double> %199, i64 0
%201 = tail call double @powf(double %200, double 5.000000e-01)
%202 = fadd double %182, %201
%203 = add nuw nsw i64 %161, 2
%204 = add i64 %163, 2
%205 = icmp eq i64 %204, %140
br i1 %205, label %206, label %160
206: ; preds = %160, %136
%207 = phi double [ undef, %136 ], [ %202, %160 ]
%208 = phi i64 [ 0, %136 ], [ %203, %160 ]
%209 = phi double [ 0.000000e+00, %136 ], [ %202, %160 ]
%210 = icmp eq i64 %137, 0
br i1 %210, label %231, label %211
211: ; preds = %206
%212 = getelementptr inbounds double, double* %41, i64 %208
%213 = load double, double* %212
%214 = getelementptr inbounds double, double* %42, i64 %208
%215 = load double, double* %214
%216 = getelementptr inbounds double, double* %43, i64 %208
%217 = load double, double* %216
%218 = getelementptr inbounds double, double* %44, i64 %208
%219 = load double, double* %218
%220 = insertelement <2 x double> poison, double %213, i64 0
%221 = insertelement <2 x double> %220, double %217, i64 1
%222 = insertelement <2 x double> poison, double %215, i64 0
%223 = insertelement <2 x double> %222, double %219, i64 1
%224 = fsub <2 x double> %221, %223
%225 = fmul <2 x double> %224, %224
%226 = shufflevector <2 x double> %225, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%227 = fadd <2 x double> %225, %226
%228 = extractelement <2 x double> %227, i64 0
%229 = tail call double @powf(double %228, double 5.000000e-01)
%230 = fadd double %209, %229
br label %231
231: ; preds = %211, %206, %40, %135
%232 = phi double [ 0.000000e+00, %135 ], [ 0.000000e+00, %40 ], [ %207, %206 ], [ %230, %211 ]
%233 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %232)
ret i32 0
}