#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*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  int i, x = 100 + 1;
  float a[100];
  for (i = 0; i < 100; i++)
    a[i] = i;
#pragma omp parallel for reduction(min : x)
  for (i = 0; i < 100; i++) {
    x = a[i] < x ? a[i] : x;
  }
  if (x != 0) {
    fprintf(stderr, " x = %d\n", x);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x65,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jge    1161 <main+0x51>
cvtsi2ssl -0x14(%rbp),%xmm0
movslq -0x14(%rbp),%rax
movss  %xmm0,-0x1b0(%rbp,%rax,4)
ff ff
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1137 <main+0x27>
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jge    11d1 <main+0xc1>
movslq -0x14(%rbp),%rax
movss  -0x1b0(%rbp,%rax,4),%xmm1
ff ff
cvtsi2ssl -0x18(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    11a7 <main+0x97>
movslq -0x14(%rbp),%rax
movss  -0x1b0(%rbp,%rax,4),%xmm0
ff ff
movss  %xmm0,-0x1b4(%rbp)
ff
jmp    11b4 <main+0xa4>
cvtsi2ssl -0x18(%rbp),%xmm0
movss  %xmm0,-0x1b4(%rbp)
ff
movss  -0x1b4(%rbp),%xmm0
ff
cvttss2si %xmm0,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1168 <main+0x58>
cmpl   $0x0,-0x18(%rbp)
je     11f3 <main+0xe3>
mov    0x2dfe(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%edx
lea    0xe12(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x1c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x198,%rsp
movaps 0xee2(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xee7(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeeb(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeef(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xef3(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xef7(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xefb(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xeff(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xf03(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xf04(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xf05(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xf06(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0xf07(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0xf08(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps 0xf09(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0xf0a(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0xf0b(%rip),%xmm0
movaps %xmm0,0x100(%rsp)
movaps 0xf0c(%rip),%xmm0
movaps %xmm0,0x110(%rsp)
movaps 0xf0d(%rip),%xmm0
movaps %xmm0,0x120(%rsp)
movaps 0xf0e(%rip),%xmm0
movaps %xmm0,0x130(%rsp)
movaps 0xf0f(%rip),%xmm0
movaps %xmm0,0x140(%rsp)
movaps 0xf10(%rip),%xmm0
movaps %xmm0,0x150(%rsp)
movaps 0xf11(%rip),%xmm0
movaps %xmm0,0x160(%rsp)
movaps 0xf12(%rip),%xmm0
movaps %xmm0,0x170(%rsp)
movaps 0xf13(%rip),%xmm0
movaps %xmm0,0x180(%rsp)
mov    $0x65,%edx
mov    $0x3,%eax
nop
xorps  %xmm0,%xmm0
cvtsi2ss %edx,%xmm0
movss  -0xc(%rsp,%rax,4),%xmm1
movss  -0x8(%rsp,%rax,4),%xmm2
minss  %xmm0,%xmm1
cvttps2dq %xmm1,%xmm0
cvtdq2ps %xmm0,%xmm0
minss  %xmm0,%xmm2
movss  -0x4(%rsp,%rax,4),%xmm0
cvttps2dq %xmm2,%xmm1
cvtdq2ps %xmm1,%xmm1
minss  %xmm1,%xmm0
movss  (%rsp,%rax,4),%xmm1
cvttps2dq %xmm0,%xmm0
cvtdq2ps %xmm0,%xmm0
minss  %xmm0,%xmm1
cvttss2si %xmm1,%edx
add    $0x4,%rax
cmp    $0x67,%rax
jne    1280 <main+0x170>
test   %edx,%edx
je     12ea <main+0x1da>
mov    0x2d04(%rip),%rax
mov    (%rax),%edi
lea    0xeab(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x198,%rsp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [9 x i8] c" x = %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca [100 x float]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 101, i32* %7
store i32 0, i32* %6
br label %9
9: ; preds = %18, %2
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, 100
br i1 %11, label %12, label %21
12: ; preds = %9
%13 = load i32, i32* %6
%14 = sitofp i32 %13 to float
%15 = load i32, i32* %6
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [100 x float], [100 x float]* %8, i64 0, i64 %16
store float %14, float* %17
br label %18
18: ; preds = %12
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
br label %9
21: ; preds = %9
store i32 0, i32* %6
br label %22
22: ; preds = %44, %21
%23 = load i32, i32* %6
%24 = icmp slt i32 %23, 100
br i1 %24, label %25, label %47
25: ; preds = %22
%26 = load i32, i32* %6
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [100 x float], [100 x float]* %8, i64 0, i64 %27
%29 = load float, float* %28
%30 = load i32, i32* %7
%31 = sitofp i32 %30 to float
%32 = fcmp olt float %29, %31
br i1 %32, label %33, label %38
33: ; preds = %25
%34 = load i32, i32* %6
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [100 x float], [100 x float]* %8, i64 0, i64 %35
%37 = load float, float* %36
br label %41
38: ; preds = %25
%39 = load i32, i32* %7
%40 = sitofp i32 %39 to float
br label %41
41: ; preds = %38, %33
%42 = phi float [ %37, %33 ], [ %40, %38 ]
%43 = fptosi float %42 to i32
store i32 %43, i32* %7
br label %44
44: ; preds = %41
%45 = load i32, i32* %6
%46 = add nsw i32 %45, 1
store i32 %46, i32* %6
br label %22
47: ; preds = %22
%48 = load i32, i32* %7
%49 = icmp ne i32 %48, 0
br i1 %49, label %50, label %54
50: ; preds = %47
%51 = load i32, i32* @stderr
%52 = load i32, i32* %7
%53 = call i32 @fprintf(i32 %51, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %52)
br label %54
54: ; preds = %50, %47
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [9 x i8] c" x = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [100 x float]
%4 = bitcast [100 x float]* %3 to i8*
%5 = bitcast [100 x float]* %3 to <4 x float>*
store <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, <4 x float>* %5
%6 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 4
%7 = bitcast float* %6 to <4 x float>*
store <4 x float> <float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00>, <4 x float>* %7
%8 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 8
%9 = bitcast float* %8 to <4 x float>*
store <4 x float> <float 8.000000e+00, float 9.000000e+00, float 1.000000e+01, float 1.100000e+01>, <4 x float>* %9
%10 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 12
%11 = bitcast float* %10 to <4 x float>*
store <4 x float> <float 1.200000e+01, float 1.300000e+01, float 1.400000e+01, float 1.500000e+01>, <4 x float>* %11
%12 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 16
%13 = bitcast float* %12 to <4 x float>*
store <4 x float> <float 1.600000e+01, float 1.700000e+01, float 1.800000e+01, float 1.900000e+01>, <4 x float>* %13
%14 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 20
%15 = bitcast float* %14 to <4 x float>*
store <4 x float> <float 2.000000e+01, float 2.100000e+01, float 2.200000e+01, float 2.300000e+01>, <4 x float>* %15
%16 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 24
%17 = bitcast float* %16 to <4 x float>*
store <4 x float> <float 2.400000e+01, float 2.500000e+01, float 2.600000e+01, float 2.700000e+01>, <4 x float>* %17
%18 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 28
%19 = bitcast float* %18 to <4 x float>*
store <4 x float> <float 2.800000e+01, float 2.900000e+01, float 3.000000e+01, float 3.100000e+01>, <4 x float>* %19
%20 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 32
%21 = bitcast float* %20 to <4 x float>*
store <4 x float> <float 3.200000e+01, float 3.300000e+01, float 3.400000e+01, float 3.500000e+01>, <4 x float>* %21
%22 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 36
%23 = bitcast float* %22 to <4 x float>*
store <4 x float> <float 3.600000e+01, float 3.700000e+01, float 3.800000e+01, float 3.900000e+01>, <4 x float>* %23
%24 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 40
%25 = bitcast float* %24 to <4 x float>*
store <4 x float> <float 4.000000e+01, float 4.100000e+01, float 4.200000e+01, float 4.300000e+01>, <4 x float>* %25
%26 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 44
%27 = bitcast float* %26 to <4 x float>*
store <4 x float> <float 4.400000e+01, float 4.500000e+01, float 4.600000e+01, float 4.700000e+01>, <4 x float>* %27
%28 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 48
%29 = bitcast float* %28 to <4 x float>*
store <4 x float> <float 4.800000e+01, float 4.900000e+01, float 5.000000e+01, float 5.100000e+01>, <4 x float>* %29
%30 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 52
%31 = bitcast float* %30 to <4 x float>*
store <4 x float> <float 5.200000e+01, float 5.300000e+01, float 5.400000e+01, float 5.500000e+01>, <4 x float>* %31
%32 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 56
%33 = bitcast float* %32 to <4 x float>*
store <4 x float> <float 5.600000e+01, float 5.700000e+01, float 5.800000e+01, float 5.900000e+01>, <4 x float>* %33
%34 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 60
%35 = bitcast float* %34 to <4 x float>*
store <4 x float> <float 6.000000e+01, float 6.100000e+01, float 6.200000e+01, float 6.300000e+01>, <4 x float>* %35
%36 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 64
%37 = bitcast float* %36 to <4 x float>*
store <4 x float> <float 6.400000e+01, float 6.500000e+01, float 6.600000e+01, float 6.700000e+01>, <4 x float>* %37
%38 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 68
%39 = bitcast float* %38 to <4 x float>*
store <4 x float> <float 6.800000e+01, float 6.900000e+01, float 7.000000e+01, float 7.100000e+01>, <4 x float>* %39
%40 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 72
%41 = bitcast float* %40 to <4 x float>*
store <4 x float> <float 7.200000e+01, float 7.300000e+01, float 7.400000e+01, float 7.500000e+01>, <4 x float>* %41
%42 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 76
%43 = bitcast float* %42 to <4 x float>*
store <4 x float> <float 7.600000e+01, float 7.700000e+01, float 7.800000e+01, float 7.900000e+01>, <4 x float>* %43
%44 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 80
%45 = bitcast float* %44 to <4 x float>*
store <4 x float> <float 8.000000e+01, float 8.100000e+01, float 8.200000e+01, float 8.300000e+01>, <4 x float>* %45
%46 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 84
%47 = bitcast float* %46 to <4 x float>*
store <4 x float> <float 8.400000e+01, float 8.500000e+01, float 8.600000e+01, float 8.700000e+01>, <4 x float>* %47
%48 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 88
%49 = bitcast float* %48 to <4 x float>*
store <4 x float> <float 8.800000e+01, float 8.900000e+01, float 9.000000e+01, float 9.100000e+01>, <4 x float>* %49
%50 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 92
%51 = bitcast float* %50 to <4 x float>*
store <4 x float> <float 9.200000e+01, float 9.300000e+01, float 9.400000e+01, float 9.500000e+01>, <4 x float>* %51
%52 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 96
%53 = bitcast float* %52 to <4 x float>*
store <4 x float> <float 9.600000e+01, float 9.700000e+01, float 9.800000e+01, float 9.900000e+01>, <4 x float>* %53
br label %54
54: ; preds = %54, %2
%55 = phi i64 [ 0, %2 ], [ %84, %54 ]
%56 = phi i32 [ 101, %2 ], [ %83, %54 ]
%57 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 %55
%58 = load float, float* %57
%59 = sitofp i32 %56 to float
%60 = fcmp olt float %58, %59
%61 = select i1 %60, float %58, float %59
%62 = fptosi float %61 to i32
%63 = or i64 %55, 1
%64 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 %63
%65 = load float, float* %64
%66 = sitofp i32 %62 to float
%67 = fcmp olt float %65, %66
%68 = select i1 %67, float %65, float %66
%69 = fptosi float %68 to i32
%70 = or i64 %55, 2
%71 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 %70
%72 = load float, float* %71
%73 = sitofp i32 %69 to float
%74 = fcmp olt float %72, %73
%75 = select i1 %74, float %72, float %73
%76 = fptosi float %75 to i32
%77 = or i64 %55, 3
%78 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 %77
%79 = load float, float* %78
%80 = sitofp i32 %76 to float
%81 = fcmp olt float %79, %80
%82 = select i1 %81, float %79, float %80
%83 = fptosi float %82 to i32
%84 = add nuw nsw i64 %55, 4
%85 = icmp eq i64 %84, 100
br i1 %85, label %86, label %54
86: ; preds = %54
%87 = icmp eq i32 %83, 0
br i1 %87, label %91, label %88
88: ; preds = %86
%89 = load i32, i32* @stderr
%90 = tail call i32 @fprintf(i32 %89, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %83)
br label %91
91: ; preds = %88, %86
ret i32 0
}