#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();
scalar_t__ g();
main() {
  int n = 5;
  int vla[n];
  vla[0] = 1;
  vla[1] = 2;
  vla[2] = 3;
  vla[3] = 4;
  {
    int x = 99;
    if (x != 99)
      abort();
    if (g())
      return 3;
    int y = 35;
    if (y != 35)
      abort();
    for (int i = 0; i < 10; i++)
      if (i == 5)
        break;
    if (vla[0] != 1)
      abort();
    if (vla[1] != 2)
      abort();
    if (vla[2] != 3)
      abort();
    if (vla[3] != 4)
      abort();
    if (sizeof vla != n * sizeof(int))
      abort();
    if (y != 35)
      abort();
    if (x != 99)
      abort();
  }
  if (vla[0] != 1)
    abort();
  if (vla[1] != 2)
    abort();
  if (vla[2] != 3)
    abort();
  if (vla[3] != 4)
    abort();
  if (sizeof vla != n * sizeof(int))
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
mov    %rcx,-0x38(%rbp)
mov    %rsp,%rax
mov    %rax,-0x10(%rbp)
lea    0xf(,%rcx,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rax
sub    %rdx,%rax
mov    %rax,-0x30(%rbp)
mov    %rax,%rsp
mov    %rcx,-0x18(%rbp)
movl   $0x1,(%rax)
movl   $0x2,0x4(%rax)
movl   $0x3,0x8(%rax)
movl   $0x4,0xc(%rax)
movl   $0x63,-0x1c(%rbp)
cmpl   $0x63,-0x1c(%rbp)
je     1196 <main+0x76>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x0,%al
call   1040 <g@plt>
cmp    $0x0,%rax
je     11ba <main+0x9a>
movl   $0x3,-0x4(%rbp)
movl   $0x1,-0x20(%rbp)
jmp    131b <main+0x1fb>
movl   $0x23,-0x24(%rbp)
cmpl   $0x23,-0x24(%rbp)
je     11d2 <main+0xb2>
mov    $0x0,%al
call   1030 <abort@plt>
movl   $0x0,-0x28(%rbp)
cmpl   $0xa,-0x28(%rbp)
jge    1205 <main+0xe5>
cmpl   $0x5,-0x28(%rbp)
jne    11f2 <main+0xd2>
jmp    1205 <main+0xe5>
jmp    11f7 <main+0xd7>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11d9 <main+0xb9>
mov    -0x30(%rbp),%rax
cmpl   $0x1,(%rax)
je     1219 <main+0xf9>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x30(%rbp),%rax
cmpl   $0x2,0x4(%rax)
je     122e <main+0x10e>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x30(%rbp),%rax
cmpl   $0x3,0x8(%rax)
je     1243 <main+0x123>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x30(%rbp),%rax
cmpl   $0x4,0xc(%rax)
je     1258 <main+0x138>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x38(%rbp),%rax
shl    $0x2,%rax
movslq -0x8(%rbp),%rcx
shl    $0x2,%rcx
cmp    %rcx,%rax
je     1278 <main+0x158>
mov    $0x0,%al
call   1030 <abort@plt>
cmpl   $0x23,-0x24(%rbp)
je     1289 <main+0x169>
mov    $0x0,%al
call   1030 <abort@plt>
cmpl   $0x63,-0x1c(%rbp)
je     129a <main+0x17a>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x30(%rbp),%rax
cmpl   $0x1,(%rax)
je     12ae <main+0x18e>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x30(%rbp),%rax
cmpl   $0x2,0x4(%rax)
je     12c3 <main+0x1a3>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x30(%rbp),%rax
cmpl   $0x3,0x8(%rax)
je     12d8 <main+0x1b8>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x30(%rbp),%rax
cmpl   $0x4,0xc(%rax)
je     12ed <main+0x1cd>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x38(%rbp),%rax
shl    $0x2,%rax
movslq -0x8(%rbp),%rcx
shl    $0x2,%rcx
cmp    %rcx,%rax
je     130d <main+0x1ed>
mov    $0x0,%al
call   1030 <abort@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <g@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
lea    (%rcx,%rcx,2),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %3
%12 = alloca i32, i64 %10
store i64 %10, i64* %4
%13 = getelementptr inbounds i32, i32* %12, i64 0
store i32 1, i32* %13
%14 = getelementptr inbounds i32, i32* %12, i64 1
store i32 2, i32* %14
%15 = getelementptr inbounds i32, i32* %12, i64 2
store i32 3, i32* %15
%16 = getelementptr inbounds i32, i32* %12, i64 3
store i32 4, i32* %16
store i32 99, i32* %5
%17 = load i32, i32* %5
%18 = icmp ne i32 %17, 99
br i1 %18, label %19, label %21
19: ; preds = %0
%20 = call i32 (...) @abort()
unreachable
21: ; preds = %0
%22 = call i64 (...) @g()
%23 = icmp ne i64 %22, 0
br i1 %23, label %24, label %25
24: ; preds = %21
store i32 3, i32* %1
store i32 1, i32* %6
br label %117
25: ; preds = %21
store i32 35, i32* %7
%26 = load i32, i32* %7
%27 = icmp ne i32 %26, 35
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = call i32 (...) @abort()
unreachable
30: ; preds = %25
store i32 0, i32* %8
br label %31
31: ; preds = %39, %30
%32 = load i32, i32* %8
%33 = icmp slt i32 %32, 10
br i1 %33, label %34, label %42
34: ; preds = %31
%35 = load i32, i32* %8
%36 = icmp eq i32 %35, 5
br i1 %36, label %37, label %38
37: ; preds = %34
br label %42
38: ; preds = %34
br label %39
39: ; preds = %38
%40 = load i32, i32* %8
%41 = add nsw i32 %40, 1
store i32 %41, i32* %8
br label %31
42: ; preds = %37, %31
%43 = getelementptr inbounds i32, i32* %12, i64 0
%44 = load i32, i32* %43
%45 = icmp ne i32 %44, 1
br i1 %45, label %46, label %48
46: ; preds = %42
%47 = call i32 (...) @abort()
unreachable
48: ; preds = %42
%49 = getelementptr inbounds i32, i32* %12, i64 1
%50 = load i32, i32* %49
%51 = icmp ne i32 %50, 2
br i1 %51, label %52, label %54
52: ; preds = %48
%53 = call i32 (...) @abort()
unreachable
54: ; preds = %48
%55 = getelementptr inbounds i32, i32* %12, i64 2
%56 = load i32, i32* %55
%57 = icmp ne i32 %56, 3
br i1 %57, label %58, label %60
58: ; preds = %54
%59 = call i32 (...) @abort()
unreachable
60: ; preds = %54
%61 = getelementptr inbounds i32, i32* %12, i64 3
%62 = load i32, i32* %61
%63 = icmp ne i32 %62, 4
br i1 %63, label %64, label %66
64: ; preds = %60
%65 = call i32 (...) @abort()
unreachable
66: ; preds = %60
%67 = mul nuw i64 4, %10
%68 = load i32, i32* %2
%69 = sext i32 %68 to i64
%70 = mul i64 %69, 4
%71 = icmp ne i64 %67, %70
br i1 %71, label %72, label %74
72: ; preds = %66
%73 = call i32 (...) @abort()
unreachable
74: ; preds = %66
%75 = load i32, i32* %7
%76 = icmp ne i32 %75, 35
br i1 %76, label %77, label %79
77: ; preds = %74
%78 = call i32 (...) @abort()
unreachable
79: ; preds = %74
%80 = load i32, i32* %5
%81 = icmp ne i32 %80, 99
br i1 %81, label %82, label %84
82: ; preds = %79
%83 = call i32 (...) @abort()
unreachable
84: ; preds = %79
%85 = getelementptr inbounds i32, i32* %12, i64 0
%86 = load i32, i32* %85
%87 = icmp ne i32 %86, 1
br i1 %87, label %88, label %90
88: ; preds = %84
%89 = call i32 (...) @abort()
unreachable
90: ; preds = %84
%91 = getelementptr inbounds i32, i32* %12, i64 1
%92 = load i32, i32* %91
%93 = icmp ne i32 %92, 2
br i1 %93, label %94, label %96
94: ; preds = %90
%95 = call i32 (...) @abort()
unreachable
96: ; preds = %90
%97 = getelementptr inbounds i32, i32* %12, i64 2
%98 = load i32, i32* %97
%99 = icmp ne i32 %98, 3
br i1 %99, label %100, label %102
100: ; preds = %96
%101 = call i32 (...) @abort()
unreachable
102: ; preds = %96
%103 = getelementptr inbounds i32, i32* %12, i64 3
%104 = load i32, i32* %103
%105 = icmp ne i32 %104, 4
br i1 %105, label %106, label %108
106: ; preds = %102
%107 = call i32 (...) @abort()
unreachable
108: ; preds = %102
%109 = mul nuw i64 4, %10
%110 = load i32, i32* %2
%111 = sext i32 %110 to i64
%112 = mul i64 %111, 4
%113 = icmp ne i64 %109, %112
br i1 %113, label %114, label %116
114: ; preds = %108
%115 = call i32 (...) @abort()
unreachable
116: ; preds = %108
store i32 0, i32* %1
store i32 1, i32* %6
br label %117
117: ; preds = %116, %24
%118 = load i8*, i8** %3
%119 = load i32, i32* %1
ret i32 %119
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @g()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i32 0, i32 3
ret i32 %3
}