#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*/ __VERIFIER_assert(int);
scalar_t__ __VERIFIER_nondet_int();
int main() {
  int in;
  int inlen;
  int bufferlen;
  int buf;
  int buflim;
  if (bufferlen > 1)
    ;
  else
    goto END;
  if (inlen > 0)
    ;
  else
    goto END;
  if (bufferlen < inlen)
    ;
  else
    goto END;
  buf = 0;
  in = 0;
  buflim = bufferlen - 2;
  while (__VERIFIER_nondet_int()) {
    if (buf == buflim)
      break;
    __VERIFIER_assert(0 <= buf);
    __VERIFIER_assert(buf < bufferlen);
    buf++;
  out:
    in++;
    __VERIFIER_assert(0 <= in);
    __VERIFIER_assert(in < inlen);
  }
  __VERIFIER_assert(0 <= buf);
  __VERIFIER_assert(buf < bufferlen);
  buf++;
  __VERIFIER_assert(0 <= buf);
  __VERIFIER_assert(buf < bufferlen);
  buf++;
END:
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x1,-0x10(%rbp)
jle    113e <main+0x1e>
jmp    1143 <main+0x23>
jmp    1263 <main+0x143>
cmpl   $0x0,-0xc(%rbp)
jle    1152 <main+0x32>
jmp    1157 <main+0x37>
jmp    1263 <main+0x143>
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1168 <main+0x48>
jmp    116d <main+0x4d>
jmp    1263 <main+0x143>
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%rax
je     1207 <main+0xe7>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jne    11a6 <main+0x86>
jmp    1207 <main+0xe7>
xor    %eax,%eax
cmp    -0x14(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
jmp    1184 <main+0x64>
xor    %eax,%eax
cmp    -0x14(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
cmp    -0x14(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %10
9: ; preds = %0
br label %11
10: ; preds = %0
br label %80
11: ; preds = %9
%12 = load i32, i32* %3
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %11
br label %16
15: ; preds = %11
br label %80
16: ; preds = %14
%17 = load i32, i32* %4
%18 = load i32, i32* %3
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %21
20: ; preds = %16
br label %22
21: ; preds = %16
br label %80
22: ; preds = %20
store i32 0, i32* %5
store i32 0, i32* %2
%23 = load i32, i32* %4
%24 = sub nsw i32 %23, 2
store i32 %24, i32* %6
br label %25
25: ; preds = %45, %22
%26 = call i64 (...) @__VERIFIER_nondet_int()
%27 = icmp ne i64 %26, 0
br i1 %27, label %28, label %57
28: ; preds = %25
%29 = load i32, i32* %5
%30 = load i32, i32* %6
%31 = icmp eq i32 %29, %30
br i1 %31, label %32, label %33
32: ; preds = %28
br label %57
33: ; preds = %28
%34 = load i32, i32* %5
%35 = icmp sle i32 0, %34
%36 = zext i1 %35 to i32
%37 = call i32 @__VERIFIER_assert(i32 %36)
%38 = load i32, i32* %5
%39 = load i32, i32* %4
%40 = icmp slt i32 %38, %39
%41 = zext i1 %40 to i32
%42 = call i32 @__VERIFIER_assert(i32 %41)
%43 = load i32, i32* %5
%44 = add nsw i32 %43, 1
store i32 %44, i32* %5
br label %45
45: ; preds = %33
%46 = load i32, i32* %2
%47 = add nsw i32 %46, 1
store i32 %47, i32* %2
%48 = load i32, i32* %2
%49 = icmp sle i32 0, %48
%50 = zext i1 %49 to i32
%51 = call i32 @__VERIFIER_assert(i32 %50)
%52 = load i32, i32* %2
%53 = load i32, i32* %3
%54 = icmp slt i32 %52, %53
%55 = zext i1 %54 to i32
%56 = call i32 @__VERIFIER_assert(i32 %55)
br label %25
57: ; preds = %32, %25
%58 = load i32, i32* %5
%59 = icmp sle i32 0, %58
%60 = zext i1 %59 to i32
%61 = call i32 @__VERIFIER_assert(i32 %60)
%62 = load i32, i32* %5
%63 = load i32, i32* %4
%64 = icmp slt i32 %62, %63
%65 = zext i1 %64 to i32
%66 = call i32 @__VERIFIER_assert(i32 %65)
%67 = load i32, i32* %5
%68 = add nsw i32 %67, 1
store i32 %68, i32* %5
%69 = load i32, i32* %5
%70 = icmp sle i32 0, %69
%71 = zext i1 %70 to i32
%72 = call i32 @__VERIFIER_assert(i32 %71)
%73 = load i32, i32* %5
%74 = load i32, i32* %4
%75 = icmp slt i32 %73, %74
%76 = zext i1 %75 to i32
%77 = call i32 @__VERIFIER_assert(i32 %76)
%78 = load i32, i32* %5
%79 = add nsw i32 %78, 1
store i32 %79, i32* %5
br label %80
80: ; preds = %57, %21, %15, %10
ret i32 0
}

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