#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 atof(char *);
int /*<<< orphan*/ column(int, char *, int *, int *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ print_col(char *, int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ swap(char *, int, int);
double print_line(int print, char *line, double cfact) {
  int s, e;
  double ret = 0.0;
  if (print) {
    column(0, line, &s, &e);
    printf("\%\n\\benchmark{");
    print_col(line, s, e);
    printf("}\n");
  }
  printf(" & ");
  column(1, line, &s, &e);
  print_col(line, s, e);
  printf(" & ");
  column(5, line, &s, &e);
  print_col(line, s, e);
  printf(" & ");
  column(6, line, &s, &e);
  print_col(line, s, e);
  printf(" & ");
  column(8, line, &s, &e);
  swap(line, s, e);
  print_col(line, s, e);
  column(9, line, &s, &e);
  print_col(line, s, e);
  ret = atof(line + s);
  if (print) {
    printf("  & 1.00 ");
  } else {
    printf(" & %.2lf", ret / cfact);
  }
  printf("\\\\\n");
  fflush(stdout);
  return ret;
}


x86 assembly (clang, -O0):
<print_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     11c4 <print_line+0x64>
mov    -0x10(%rbp),%rsi
xor    %edi,%edi
lea    -0x1c(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1070 <column@plt>
lea    0xe60(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
call   1060 <print_col@plt>
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe46(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rsi
mov    $0x1,%edi
lea    -0x1c(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1070 <column@plt>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
call   1060 <print_col@plt>
lea    0xe13(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rsi
mov    $0x5,%edi
lea    -0x1c(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1070 <column@plt>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
call   1060 <print_col@plt>
lea    0xde0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rsi
mov    $0x6,%edi
lea    -0x1c(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1070 <column@plt>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
call   1060 <print_col@plt>
lea    0xdad(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rsi
mov    $0x8,%edi
lea    -0x1c(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1070 <column@plt>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
call   1080 <swap@plt>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
call   1060 <print_col@plt>
mov    -0x10(%rbp),%rsi
mov    $0x9,%edi
lea    -0x1c(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1070 <column@plt>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
call   1060 <print_col@plt>
mov    -0x10(%rbp),%rdi
movslq -0x1c(%rbp),%rax
add    %rax,%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x28(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     12f6 <print_line+0x196>
lea    0xd2b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    130e <print_line+0x1ae>
movsd  -0x28(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
lea    0xd18(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xd13(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2cbd(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_line>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x20,%rsp
movsd  %xmm0,0x10(%rsp)
mov    %rsi,%rbx
mov    %edi,%r14d
test   %edi,%edi
je     11ca <print_line+0x5a>
lea    0x8(%rsp),%rdx
lea    0xc(%rsp),%rcx
xor    %edi,%edi
mov    %rbx,%rsi
call   1080 <column@plt>
lea    0xe59(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%edx
mov    %rbx,%rdi
call   1070 <print_col@plt>
lea    0xe63(%rip),%rdi
call   1030 <puts@plt>
lea    0xe3d(%rip),%rbp
mov    %rbp,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x8(%rsp),%r12
lea    0xc(%rsp),%r15
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
call   1080 <column@plt>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%edx
mov    %rbx,%rdi
call   1070 <print_col@plt>
mov    %rbp,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x5,%edi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
call   1080 <column@plt>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%edx
mov    %rbx,%rdi
call   1070 <print_col@plt>
mov    %rbp,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x6,%edi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
call   1080 <column@plt>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%edx
mov    %rbx,%rdi
call   1070 <print_col@plt>
mov    %rbp,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x8,%edi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
call   1080 <column@plt>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%edx
mov    %rbx,%rdi
call   1090 <swap@plt>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%edx
mov    %rbx,%rdi
call   1070 <print_col@plt>
mov    $0x9,%edi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
call   1080 <column@plt>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%edx
mov    %rbx,%rdi
call   1070 <print_col@plt>
movslq 0x8(%rsp),%rdi
add    %rbx,%rdi
call   1040 <atof@plt>
test   %r14d,%r14d
movsd  %xmm0,0x18(%rsp)
je     12ea <print_line+0x17a>
lea    0xd31(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    12fe <print_line+0x18e>
divsd  0x10(%rsp),%xmm0
lea    0xd25(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xd20(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ccf(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
movsd  0x18(%rsp),%xmm0
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%\0A\\benchmark{\00"
@.str.1 = [3 x i8] c"}\0A\00"
@.str.2 = [4 x i8] c" & \00"
@.str.3 = [10 x i8] c" & 1.00 \00"
@.str.4 = [9 x i8] c" & %.2lf\00"
@.str.5 = [4 x i8] c"\\\\\0A\00"
@stdout = global i32 0
define double @print_line(i32 %0, i8* %1, double %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca double
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
store i32 %0, i32* %4
store i8* %1, i8** %5
store double %2, double* %6
store double 0.000000e+00, double* %9
%10 = load i32, i32* %4
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %21
12: ; preds = %3
%13 = load i8*, i8** %5
%14 = call i32 @column(i32 0, i8* %13, i32* %7, i32* %8)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%16 = load i8*, i8** %5
%17 = load i32, i32* %7
%18 = load i32, i32* %8
%19 = call i32 @print_col(i8* %16, i32 %17, i32 %18)
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %21
21: ; preds = %12, %3
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%23 = load i8*, i8** %5
%24 = call i32 @column(i32 1, i8* %23, i32* %7, i32* %8)
%25 = load i8*, i8** %5
%26 = load i32, i32* %7
%27 = load i32, i32* %8
%28 = call i32 @print_col(i8* %25, i32 %26, i32 %27)
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%30 = load i8*, i8** %5
%31 = call i32 @column(i32 5, i8* %30, i32* %7, i32* %8)
%32 = load i8*, i8** %5
%33 = load i32, i32* %7
%34 = load i32, i32* %8
%35 = call i32 @print_col(i8* %32, i32 %33, i32 %34)
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%37 = load i8*, i8** %5
%38 = call i32 @column(i32 6, i8* %37, i32* %7, i32* %8)
%39 = load i8*, i8** %5
%40 = load i32, i32* %7
%41 = load i32, i32* %8
%42 = call i32 @print_col(i8* %39, i32 %40, i32 %41)
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%44 = load i8*, i8** %5
%45 = call i32 @column(i32 8, i8* %44, i32* %7, i32* %8)
%46 = load i8*, i8** %5
%47 = load i32, i32* %7
%48 = load i32, i32* %8
%49 = call i32 @swap(i8* %46, i32 %47, i32 %48)
%50 = load i8*, i8** %5
%51 = load i32, i32* %7
%52 = load i32, i32* %8
%53 = call i32 @print_col(i8* %50, i32 %51, i32 %52)
%54 = load i8*, i8** %5
%55 = call i32 @column(i32 9, i8* %54, i32* %7, i32* %8)
%56 = load i8*, i8** %5
%57 = load i32, i32* %7
%58 = load i32, i32* %8
%59 = call i32 @print_col(i8* %56, i32 %57, i32 %58)
%60 = load i8*, i8** %5
%61 = load i32, i32* %7
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds i8, i8* %60, i64 %62
%64 = call double @atof(i8* %63)
store double %64, double* %9
%65 = load i32, i32* %4
%66 = icmp ne i32 %65, 0
br i1 %66, label %67, label %69
67: ; preds = %21
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
br label %74
69: ; preds = %21
%70 = load double, double* %9
%71 = load double, double* %6
%72 = fdiv double %70, %71
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), double %72)
br label %74
74: ; preds = %69, %67
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%76 = load i32, i32* @stdout
%77 = call i32 @fflush(i32 %76)
%78 = load double, double* %9
ret double %78
}

LLVM IR (-O2):
@.str = [14 x i8] c"%\0A\\benchmark{\00"
@.str.2 = [4 x i8] c" & \00"
@.str.3 = [10 x i8] c" & 1.00 \00"
@.str.4 = [9 x i8] c" & %.2lf\00"
@stdout = global i32 0
@str = [3 x i8] c"\\\\\00"
@str.6 = [2 x i8] c"}\00"
define double @print_line(i32 %0, i8* %1, double %2) {
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %4 to i8*
%7 = bitcast i32* %5 to i8*
%8 = icmp eq i32 %0, 0
br i1 %8, label %16, label %9
9: ; preds = %3
%10 = call i32 @column(i32 0, i8* %1, i32* %4, i32* %5)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = call i32 @print_col(i8* %1, i32 %12, i32 %13)
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.6, i64 0, i64 0))
br label %16
16: ; preds = %9, %3
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%18 = call i32 @column(i32 1, i8* %1, i32* %4, i32* %5)
%19 = load i32, i32* %4
%20 = load i32, i32* %5
%21 = call i32 @print_col(i8* %1, i32 %19, i32 %20)
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%23 = call i32 @column(i32 5, i8* %1, i32* %4, i32* %5)
%24 = load i32, i32* %4
%25 = load i32, i32* %5
%26 = call i32 @print_col(i8* %1, i32 %24, i32 %25)
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%28 = call i32 @column(i32 6, i8* %1, i32* %4, i32* %5)
%29 = load i32, i32* %4
%30 = load i32, i32* %5
%31 = call i32 @print_col(i8* %1, i32 %29, i32 %30)
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%33 = call i32 @column(i32 8, i8* %1, i32* %4, i32* %5)
%34 = load i32, i32* %4
%35 = load i32, i32* %5
%36 = call i32 @swap(i8* %1, i32 %34, i32 %35)
%37 = load i32, i32* %4
%38 = load i32, i32* %5
%39 = call i32 @print_col(i8* %1, i32 %37, i32 %38)
%40 = call i32 @column(i32 9, i8* %1, i32* %4, i32* %5)
%41 = load i32, i32* %4
%42 = load i32, i32* %5
%43 = call i32 @print_col(i8* %1, i32 %41, i32 %42)
%44 = load i32, i32* %4
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i8, i8* %1, i64 %45
%47 = call double @atof(i8* %46)
br i1 %8, label %50, label %48
48: ; preds = %16
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
br label %53
50: ; preds = %16
%51 = fdiv double %47, %2
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), double %51)
br label %53
53: ; preds = %50, %48
%54 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
%55 = load i32, i32* @stdout
%56 = call i32 @fflush(i32 %55)
ret double %47
}