#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 __VERIFIER_nondet_int();
scalar_t__ alloca(int);
int /*<<< orphan*/ cbzero(char *, int);
int main() {
  int length = __VERIFIER_nondet_int();
  int n = __VERIFIER_nondet_int();
  if (length < 1) {
    length = 1;
  }
  if (n < 1) {
    n = 1;
  }
  if (n > length)
    return 0;
  char *nondetArea = (char *)alloca(length * sizeof(char));
  cbzero(nondetArea, n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    1164 <main+0x34>
movl   $0x1,-0x8(%rbp)
cmpl   $0x1,-0xc(%rbp)
jge    1175 <main+0x45>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    118d <main+0x5d>
movl   $0x0,-0x4(%rbp)
jmp    11b3 <main+0x83>
movslq -0x8(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1030 <alloca@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <cbzero@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
test   %ebx,%ebx
mov    $0x1,%ebp
cmovle %ebp,%ebx
test   %eax,%eax
cmovg  %eax,%ebp
cmp    %ebx,%ebp
ja     1167 <main+0x37>
mov    %ebx,%edi
call   1030 <alloca@plt>
mov    %rax,%rdi
mov    %ebp,%esi
call   1050 <cbzero@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
store i32 0, i32* %1
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %2
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 1
br i1 %8, label %9, label %10
9: ; preds = %0
store i32 1, i32* %2
br label %10
10: ; preds = %9, %0
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 1
br i1 %12, label %13, label %14
13: ; preds = %10
store i32 1, i32* %3
br label %14
14: ; preds = %13, %10
%15 = load i32, i32* %3
%16 = load i32, i32* %2
%17 = icmp sgt i32 %15, %16
br i1 %17, label %18, label %19
18: ; preds = %14
store i32 0, i32* %1
br label %29
19: ; preds = %14
%20 = load i32, i32* %2
%21 = sext i32 %20 to i64
%22 = mul i64 %21, 1
%23 = trunc i64 %22 to i32
%24 = call i64 @alloca(i32 %23)
%25 = inttoptr i64 %24 to i8*
store i8* %25, i8** %4
%26 = load i8*, i8** %4
%27 = load i32, i32* %3
%28 = call i32 @cbzero(i8* %26, i32 %27)
store i32 0, i32* %1
br label %29
29: ; preds = %19, %18
%30 = load i32, i32* %1
ret i32 %30
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = icmp sgt i32 %1, 1
%4 = select i1 %3, i32 %1, i32 1
%5 = icmp sgt i32 %2, 1
%6 = select i1 %5, i32 %2, i32 1
%7 = icmp ugt i32 %6, %4
br i1 %7, label %12, label %8
8: ; preds = %0
%9 = tail call i64 @alloca(i32 %4)
%10 = inttoptr i64 %9 to i8*
%11 = tail call i32 @cbzero(i8* %10, i32 %6)
br label %12
12: ; preds = %0, %8
ret i32 0
}