#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*/ abort();
__attribute__((no)) int main1(float x, float max_result) {
  int i;
  float b[16] = {0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45};
  float c[16] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
  float diff = 2;
  float max = x;
  float min = 10;
  for (i = 0; i < 16; i++) {
    diff += (b[i] - c[i]);
  }
  for (i = 0; i < 16; i++) {
    max = max < c[i] ? c[i] : max;
  }
  for (i = 0; i < 16; i++) {
    min = min > c[i] ? c[i] : min;
  }
  if (diff != 242)
    abort();
  if (max != max_result)
    abort();
  if (min != 0)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main1>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xed0(%rip),%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
lea    -0x90(%rbp),%rdi
lea    0xef8(%rip),%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
movss  0xe9a(%rip),%xmm0
movss  %xmm0,-0x94(%rbp)
ff
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x98(%rbp)
ff
movss  0xe79(%rip),%xmm0
movss  %xmm0,-0x9c(%rbp)
ff
movl   $0x0,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jge    11d5 <main1+0xb5>
movslq -0xc(%rbp),%rax
movss  -0x50(%rbp,%rax,4),%xmm0
movslq -0xc(%rbp),%rax
subss  -0x90(%rbp,%rax,4),%xmm0
ff ff
addss  -0x94(%rbp),%xmm0
ff
movss  %xmm0,-0x94(%rbp)
ff
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1196 <main1+0x76>
movl   $0x0,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jge    124c <main1+0x12c>
movss  -0x98(%rbp),%xmm1
ff
movslq -0xc(%rbp),%rax
movss  -0x90(%rbp,%rax,4),%xmm0
ff ff
ucomiss %xmm1,%xmm0
jbe    121e <main1+0xfe>
movslq -0xc(%rbp),%rax
movss  -0x90(%rbp,%rax,4),%xmm0
ff ff
movss  %xmm0,-0xa0(%rbp)
ff
jmp    122e <main1+0x10e>
movss  -0x98(%rbp),%xmm0
ff
movss  %xmm0,-0xa0(%rbp)
ff
movss  -0xa0(%rbp),%xmm0
ff
movss  %xmm0,-0x98(%rbp)
ff
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11dc <main1+0xbc>
movl   $0x0,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jge    12bf <main1+0x19f>
movss  -0x9c(%rbp),%xmm0
ff
movslq -0xc(%rbp),%rax
ucomiss -0x90(%rbp,%rax,4),%xmm0
ff
jbe    1291 <main1+0x171>
movslq -0xc(%rbp),%rax
movss  -0x90(%rbp,%rax,4),%xmm0
ff ff
movss  %xmm0,-0xa4(%rbp)
ff
jmp    12a1 <main1+0x181>
movss  -0x9c(%rbp),%xmm0
ff
movss  %xmm0,-0xa4(%rbp)
ff
movss  -0xa4(%rbp),%xmm0
ff
movss  %xmm0,-0x9c(%rbp)
ff
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1253 <main1+0x133>
movss  -0x94(%rbp),%xmm0
ff
movss  0xd39(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    12e3 <main1+0x1c3>
jp     12e3 <main1+0x1c3>
jmp    12ea <main1+0x1ca>
mov    $0x0,%al
call   1030 <abort@plt>
movss  -0x98(%rbp),%xmm0
ff
ucomiss -0x8(%rbp),%xmm0
jne    1307 <main1+0x1e7>
jp     1307 <main1+0x1e7>
jmp    130e <main1+0x1ee>
mov    $0x0,%al
call   1030 <abort@plt>
movss  -0x9c(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    132d <main1+0x20d>
jp     132d <main1+0x20d>
jmp    1334 <main1+0x214>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main1>:
push   %rax
xorps  %xmm2,%xmm2
maxss  %xmm0,%xmm2
movss  0xee0(%rip),%xmm0
maxss  %xmm2,%xmm0
movss  0xed8(%rip),%xmm2
maxss  %xmm0,%xmm2
movss  0xed0(%rip),%xmm0
maxss  %xmm2,%xmm0
movss  0xec8(%rip),%xmm2
maxss  %xmm0,%xmm2
movss  0xec0(%rip),%xmm0
maxss  %xmm2,%xmm0
movss  0xeb8(%rip),%xmm2
maxss  %xmm0,%xmm2
movss  0xeb0(%rip),%xmm0
maxss  %xmm2,%xmm0
movss  0xea8(%rip),%xmm2
maxss  %xmm0,%xmm2
movss  0xea0(%rip),%xmm0
maxss  %xmm2,%xmm0
movss  0xe98(%rip),%xmm2
maxss  %xmm0,%xmm2
movss  0xe90(%rip),%xmm0
maxss  %xmm2,%xmm0
movss  0xe88(%rip),%xmm2
maxss  %xmm0,%xmm2
movss  0xe80(%rip),%xmm0
maxss  %xmm2,%xmm0
movss  0xe78(%rip),%xmm2
maxss  %xmm0,%xmm2
movss  0xe70(%rip),%xmm0
maxss  %xmm2,%xmm0
ucomiss %xmm1,%xmm0
jne    11d7 <main1+0xc7>
jp     11d7 <main1+0xc7>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@__const.main1.b = [16 x float] [float 0.000000e+00, float 3.000000e+00, float 6.000000e+00, float 9.000000e+00, float 1.200000e+01, float 1.500000e+01, float 1.800000e+01, float 2.100000e+01, float 2.400000e+01, float 2.700000e+01, float 3.000000e+01, float 3.300000e+01, float 3.600000e+01, float 3.900000e+01, float 4.200000e+01, float 4.500000e+01]
@__const.main1.c = [16 x float] [float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00, float 9.000000e+00, float 1.000000e+01, float 1.100000e+01, float 1.200000e+01, float 1.300000e+01, float 1.400000e+01, float 1.500000e+01]
define i32 @main1(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca i32
%6 = alloca [16 x float]
%7 = alloca [16 x float]
%8 = alloca float
%9 = alloca float
%10 = alloca float
store float %0, float* %3
store float %1, float* %4
%11 = bitcast [16 x float]* %6 to i8*
%12 = bitcast [16 x float]* %7 to i8*
store float 2.000000e+00, float* %8
%13 = load float, float* %3
store float %13, float* %9
store float 1.000000e+01, float* %10
store i32 0, i32* %5
br label %14
14: ; preds = %29, %2
%15 = load i32, i32* %5
%16 = icmp slt i32 %15, 16
br i1 %16, label %17, label %32
17: ; preds = %14
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [16 x float], [16 x float]* %6, i64 0, i64 %19
%21 = load float, float* %20
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 %23
%25 = load float, float* %24
%26 = fsub float %21, %25
%27 = load float, float* %8
%28 = fadd float %27, %26
store float %28, float* %8
br label %29
29: ; preds = %17
%30 = load i32, i32* %5
%31 = add nsw i32 %30, 1
store i32 %31, i32* %5
br label %14
32: ; preds = %14
store i32 0, i32* %5
br label %33
33: ; preds = %52, %32
%34 = load i32, i32* %5
%35 = icmp slt i32 %34, 16
br i1 %35, label %36, label %55
36: ; preds = %33
%37 = load float, float* %9
%38 = load i32, i32* %5
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 %39
%41 = load float, float* %40
%42 = fcmp olt float %37, %41
br i1 %42, label %43, label %48
43: ; preds = %36
%44 = load i32, i32* %5
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 %45
%47 = load float, float* %46
br label %50
48: ; preds = %36
%49 = load float, float* %9
br label %50
50: ; preds = %48, %43
%51 = phi float [ %47, %43 ], [ %49, %48 ]
store float %51, float* %9
br label %52
52: ; preds = %50
%53 = load i32, i32* %5
%54 = add nsw i32 %53, 1
store i32 %54, i32* %5
br label %33
55: ; preds = %33
store i32 0, i32* %5
br label %56
56: ; preds = %75, %55
%57 = load i32, i32* %5
%58 = icmp slt i32 %57, 16
br i1 %58, label %59, label %78
59: ; preds = %56
%60 = load float, float* %10
%61 = load i32, i32* %5
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 %62
%64 = load float, float* %63
%65 = fcmp ogt float %60, %64
br i1 %65, label %66, label %71
66: ; preds = %59
%67 = load i32, i32* %5
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 %68
%70 = load float, float* %69
br label %73
71: ; preds = %59
%72 = load float, float* %10
br label %73
73: ; preds = %71, %66
%74 = phi float [ %70, %66 ], [ %72, %71 ]
store float %74, float* %10
br label %75
75: ; preds = %73
%76 = load i32, i32* %5
%77 = add nsw i32 %76, 1
store i32 %77, i32* %5
br label %56
78: ; preds = %56
%79 = load float, float* %8
%80 = fcmp une float %79, 2.420000e+02
br i1 %80, label %81, label %83
81: ; preds = %78
%82 = call i32 (...) @abort()
unreachable
83: ; preds = %78
%84 = load float, float* %9
%85 = load float, float* %4
%86 = fcmp une float %84, %85
br i1 %86, label %87, label %89
87: ; preds = %83
%88 = call i32 (...) @abort()
unreachable
89: ; preds = %83
%90 = load float, float* %10
%91 = fcmp une float %90, 0.000000e+00
br i1 %91, label %92, label %94
92: ; preds = %89
%93 = call i32 (...) @abort()
unreachable
94: ; preds = %89
ret i32 0
}

LLVM IR (-O2):
define i32 @main1(float %0, float %1) {
%3 = fcmp olt float %0, 0.000000e+00
%4 = select i1 %3, float 0.000000e+00, float %0
%5 = fcmp olt float %4, 1.000000e+00
%6 = select i1 %5, float 1.000000e+00, float %4
%7 = fcmp olt float %6, 2.000000e+00
%8 = select i1 %7, float 2.000000e+00, float %6
%9 = fcmp olt float %8, 3.000000e+00
%10 = select i1 %9, float 3.000000e+00, float %8
%11 = fcmp olt float %10, 4.000000e+00
%12 = select i1 %11, float 4.000000e+00, float %10
%13 = fcmp olt float %12, 5.000000e+00
%14 = select i1 %13, float 5.000000e+00, float %12
%15 = fcmp olt float %14, 6.000000e+00
%16 = select i1 %15, float 6.000000e+00, float %14
%17 = fcmp olt float %16, 7.000000e+00
%18 = select i1 %17, float 7.000000e+00, float %16
%19 = fcmp olt float %18, 8.000000e+00
%20 = select i1 %19, float 8.000000e+00, float %18
%21 = fcmp olt float %20, 9.000000e+00
%22 = select i1 %21, float 9.000000e+00, float %20
%23 = fcmp olt float %22, 1.000000e+01
%24 = select i1 %23, float 1.000000e+01, float %22
%25 = fcmp olt float %24, 1.100000e+01
%26 = select i1 %25, float 1.100000e+01, float %24
%27 = fcmp olt float %26, 1.200000e+01
%28 = select i1 %27, float 1.200000e+01, float %26
%29 = fcmp olt float %28, 1.300000e+01
%30 = select i1 %29, float 1.300000e+01, float %28
%31 = fcmp olt float %30, 1.400000e+01
%32 = select i1 %31, float 1.400000e+01, float %30
%33 = fcmp olt float %32, 1.500000e+01
%34 = select i1 %33, float 1.500000e+01, float %32
%35 = fcmp une float %34, %1
br i1 %35, label %36, label %38
36: ; preds = %2
%37 = tail call i32 (...) @abort()
unreachable
38: ; preds = %2
ret i32 0
}