#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();
int main1() {
  int A[16] = {36, 39, 42, 45, 43, 32, 21, 12, 23, 34, 45, 56, 67, 78, 89, 11};
  int i, j;
  for (i = 0; i < 16; i++) {
    j = A[i];
    A[i] = (j >= 42 ? 42 : 0);
  }
  for (i = 0; i < 16; i++) {
    if (A[i] > 42)
      abort();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x40(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0x44(%rbp)
cmpl   $0x10,-0x44(%rbp)
jge    117f <main1+0x5f>
movslq -0x44(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%eax
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%edx
xor    %ecx,%ecx
mov    $0x2a,%eax
cmp    $0x2a,%edx
cmovge %eax,%ecx
movslq -0x44(%rbp),%rax
mov    %ecx,-0x40(%rbp,%rax,4)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1144 <main1+0x24>
movl   $0x0,-0x44(%rbp)
cmpl   $0x10,-0x44(%rbp)
jge    11b9 <main1+0x99>
movslq -0x44(%rbp),%rax
cmpl   $0x2a,-0x40(%rbp,%rax,4)
jle    11a6 <main1+0x86>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    11ab <main1+0x8b>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1186 <main1+0x66>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main1>:
xor    %eax,%eax
ret

LLVM IR (-O0):
@__const.main1.A = [16 x i32] [i32 36, i32 39, i32 42, i32 45, i32 43, i32 32, i32 21, i32 12, i32 23, i32 34, i32 45, i32 56, i32 67, i32 78, i32 89, i32 11]
define i32 @main1() {
%1 = alloca [16 x i32]
%2 = alloca i32
%3 = alloca i32
%4 = bitcast [16 x i32]* %1 to i8*
store i32 0, i32* %2
br label %5
5: ; preds = %20, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 16
br i1 %7, label %8, label %23
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 %10
%12 = load i32, i32* %11
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = icmp sge i32 %13, 42
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 42, i32 0
%17 = load i32, i32* %2
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 %18
store i32 %16, i32* %19
br label %20
20: ; preds = %8
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 1
store i32 %22, i32* %2
br label %5
23: ; preds = %5
store i32 0, i32* %2
br label %24
24: ; preds = %36, %23
%25 = load i32, i32* %2
%26 = icmp slt i32 %25, 16
br i1 %26, label %27, label %39
27: ; preds = %24
%28 = load i32, i32* %2
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 %29
%31 = load i32, i32* %30
%32 = icmp sgt i32 %31, 42
br i1 %32, label %33, label %35
33: ; preds = %27
%34 = call i32 (...) @abort()
unreachable
35: ; preds = %27
br label %36
36: ; preds = %35
%37 = load i32, i32* %2
%38 = add nsw i32 %37, 1
store i32 %38, i32* %2
br label %24
39: ; preds = %24
ret i32 0
}

LLVM IR (-O2):
define i32 @main1() {
ret i32 0
}