#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);
int unknown1();
int unknown2();
int main(int argc, char *argv[]) {
  int c1 = 4;
  int c2 = 2;
  int n, v;
  int i, k, j;
  n = unknown1();
  assume(n > 0);
  k = 0;
  i = 0;
  while (i < n) {
    i++;
    if (unknown2() % 2 == 0)
      v = 0;
    else
      v = 1;
    if (v == 0)
      k += c1;
    else
      k += c2;
  }
  static_assert(k > n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
movl   $0x2,-0x18(%rbp)
mov    $0x0,%al
call   1030 <unknown1@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assume@plt>
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    11f3 <main+0xb3>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1040 <unknown2@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11c6 <main+0x86>
movl   $0x0,-0x20(%rbp)
jmp    11cd <main+0x8d>
movl   $0x1,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jne    11e5 <main+0xa5>
mov    -0x14(%rbp),%eax
add    -0x28(%rbp),%eax
mov    %eax,-0x28(%rbp)
jmp    11ee <main+0xae>
mov    -0x18(%rbp),%eax
add    -0x28(%rbp),%eax
mov    %eax,-0x28(%rbp)
jmp    118d <main+0x4d>
mov    -0x28(%rbp),%eax
cmp    -0x1c(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <static_assert@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <unknown1@plt>
mov    %eax,%r14d
xor    %edi,%edi
test   %eax,%eax
setg   %dil
call   1060 <assume@plt>
test   %r14d,%r14d
jle    1189 <main+0x49>
mov    %r14d,%ebp
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <unknown2@plt>
xor    %ecx,%ecx
test   $0x1,%al
sete   %cl
lea    (%rbx,%rcx,2),%ebx
add    $0x2,%ebx
add    $0xffffffff,%ebp
jne    1170 <main+0x30>
xor    %edi,%edi
cmp    %r14d,%ebx
setg   %dil
call   1050 <static_assert@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
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
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 4, i32* %6
store i32 2, i32* %7
%13 = call i32 (...) @unknown1()
store i32 %13, i32* %8
%14 = load i32, i32* %8
%15 = icmp sgt i32 %14, 0
%16 = zext i1 %15 to i32
%17 = call i32 @assume(i32 %16)
store i32 0, i32* %11
store i32 0, i32* %10
br label %18
18: ; preds = %41, %2
%19 = load i32, i32* %10
%20 = load i32, i32* %8
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %42
22: ; preds = %18
%23 = load i32, i32* %10
%24 = add nsw i32 %23, 1
store i32 %24, i32* %10
%25 = call i32 (...) @unknown2()
%26 = srem i32 %25, 2
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %29
28: ; preds = %22
store i32 0, i32* %9
br label %30
29: ; preds = %22
store i32 1, i32* %9
br label %30
30: ; preds = %29, %28
%31 = load i32, i32* %9
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %37
33: ; preds = %30
%34 = load i32, i32* %6
%35 = load i32, i32* %11
%36 = add nsw i32 %35, %34
store i32 %36, i32* %11
br label %41
37: ; preds = %30
%38 = load i32, i32* %7
%39 = load i32, i32* %11
%40 = add nsw i32 %39, %38
store i32 %40, i32* %11
br label %41
41: ; preds = %37, %33
br label %18
42: ; preds = %18
%43 = load i32, i32* %11
%44 = load i32, i32* %8
%45 = icmp sgt i32 %43, %44
%46 = zext i1 %45 to i32
%47 = call i32 @static_assert(i32 %46)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @unknown1()
%4 = icmp sgt i32 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @assume(i32 %5)
br i1 %4, label %7, label %17
7: ; preds = %2, %7
%8 = phi i32 [ %15, %7 ], [ 0, %2 ]
%9 = phi i32 [ %10, %7 ], [ 0, %2 ]
%10 = add nuw nsw i32 %9, 1
%11 = tail call i32 (...) @unknown2()
%12 = and i32 %11, 1
%13 = icmp eq i32 %12, 0
%14 = select i1 %13, i32 4, i32 2
%15 = add nuw nsw i32 %14, %8
%16 = icmp eq i32 %10, %3
br i1 %16, label %17, label %7
17: ; preds = %7, %2
%18 = phi i32 [ 0, %2 ], [ %15, %7 ]
%19 = icmp sgt i32 %18, %3
%20 = zext i1 %19 to i32
%21 = tail call i32 @static_assert(i32 %20)
ret i32 0
}