#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*/ assume(int);
int /*<<< orphan*/ static_assert(int);
scalar_t__ unknown1();
int main(int argc, char *argv[]) {
  int i, n, a, b;
  assume(n >= 0);
  i = 0;
  a = 0;
  b = 0;
  while (i < n) {
    if (unknown1()) {
      a = a + 1;
      b = b + 2;
    } else {
      a = a + 2;
      b = b + 1;
    }
    i = i + 1;
  }
  static_assert(a + b == 3 * n);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x18(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assume@plt>
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    11c0 <main+0x90>
mov    $0x0,%al
call   1030 <unknown1@plt>
cmp    $0x0,%rax
je     11a0 <main+0x70>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x20(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x20(%rbp)
jmp    11b2 <main+0x82>
mov    -0x1c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    116c <main+0x3c>
mov    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
imul   $0x3,-0x18(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <static_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <assume@plt>
xor    %edi,%edi
call   1030 <static_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i32, i32* %7
%11 = icmp sge i32 %10, 0
%12 = zext i1 %11 to i32
%13 = call i32 @assume(i32 %12)
store i32 0, i32* %6
store i32 0, i32* %8
store i32 0, i32* %9
br label %14
14: ; preds = %31, %2
%15 = load i32, i32* %6
%16 = load i32, i32* %7
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %34
18: ; preds = %14
%19 = call i64 (...) @unknown1()
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %26
21: ; preds = %18
%22 = load i32, i32* %8
%23 = add nsw i32 %22, 1
store i32 %23, i32* %8
%24 = load i32, i32* %9
%25 = add nsw i32 %24, 2
store i32 %25, i32* %9
br label %31
26: ; preds = %18
%27 = load i32, i32* %8
%28 = add nsw i32 %27, 2
store i32 %28, i32* %8
%29 = load i32, i32* %9
%30 = add nsw i32 %29, 1
store i32 %30, i32* %9
br label %31
31: ; preds = %26, %21
%32 = load i32, i32* %6
%33 = add nsw i32 %32, 1
store i32 %33, i32* %6
br label %14
34: ; preds = %14
%35 = load i32, i32* %8
%36 = load i32, i32* %9
%37 = add nsw i32 %35, %36
%38 = load i32, i32* %7
%39 = mul nsw i32 3, %38
%40 = icmp eq i32 %37, %39
%41 = zext i1 %40 to i32
%42 = call i32 @static_assert(i32 %41)
%43 = load i32, i32* %3
ret i32 %43
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @assume(i32 1)
%4 = tail call i32 @static_assert(i32 0)
ret i32 0
}