#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*/ cstpcpy(char *, char *);
int main() {
  int length1 = __VERIFIER_nondet_int();
  int length2 = __VERIFIER_nondet_int();
  if (length1 < 1) {
    length1 = 1;
  }
  if (length2 < 1) {
    length2 = 1;
  }
  if (length1 < length2)
    return 0;
  char *nondetArea = (char *)alloca(length1 * sizeof(char));
  char *nondetString = (char *)alloca(length2 * sizeof(char));
  nondetString[length2 - 1] = '\0';
  cstpcpy(nondetArea, nondetString);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <__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    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    118d <main+0x5d>
movl   $0x0,-0x4(%rbp)
jmp    11d8 <main+0xa8>
movslq -0x8(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1040 <alloca@plt>
mov    %rax,-0x18(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1040 <alloca@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <cstpcpy@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   1050 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <__VERIFIER_nondet_int@plt>
test   %ebp,%ebp
mov    $0x1,%ebx
cmovle %ebx,%ebp
test   %eax,%eax
cmovg  %eax,%ebx
cmp    %ebx,%ebp
jb     1179 <main+0x49>
mov    %ebp,%edi
call   1040 <alloca@plt>
mov    %rax,%rbp
mov    %ebx,%edi
call   1040 <alloca@plt>
add    $0xffffffff,%ebx
movb   $0x0,(%rax,%rbx,1)
mov    %rbp,%rdi
mov    %rax,%rsi
call   1030 <cstpcpy@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*
%5 = alloca i8*
store i32 0, i32* %1
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %2
%7 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 1
br i1 %9, label %10, label %11
10: ; preds = %0
store i32 1, i32* %2
br label %11
11: ; preds = %10, %0
%12 = load i32, i32* %3
%13 = icmp slt i32 %12, 1
br i1 %13, label %14, label %15
14: ; preds = %11
store i32 1, i32* %3
br label %15
15: ; preds = %14, %11
%16 = load i32, i32* %2
%17 = load i32, i32* %3
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %20
19: ; preds = %15
store i32 0, i32* %1
br label %41
20: ; preds = %15
%21 = load i32, i32* %2
%22 = sext i32 %21 to i64
%23 = mul i64 %22, 1
%24 = trunc i64 %23 to i32
%25 = call i64 @alloca(i32 %24)
%26 = inttoptr i64 %25 to i8*
store i8* %26, i8** %4
%27 = load i32, i32* %3
%28 = sext i32 %27 to i64
%29 = mul i64 %28, 1
%30 = trunc i64 %29 to i32
%31 = call i64 @alloca(i32 %30)
%32 = inttoptr i64 %31 to i8*
store i8* %32, i8** %5
%33 = load i8*, i8** %5
%34 = load i32, i32* %3
%35 = sub nsw i32 %34, 1
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds i8, i8* %33, i64 %36
store i8 0, i8* %37
%38 = load i8*, i8** %4
%39 = load i8*, i8** %5
%40 = call i32 @cstpcpy(i8* %38, i8* %39)
store i32 0, i32* %1
br label %41
41: ; preds = %20, %19
%42 = load i32, i32* %1
ret i32 %42
}

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 ult i32 %4, %6
br i1 %7, label %17, label %8
8: ; preds = %0
%9 = tail call i64 @alloca(i32 %4)
%10 = inttoptr i64 %9 to i8*
%11 = tail call i64 @alloca(i32 %6)
%12 = inttoptr i64 %11 to i8*
%13 = add nsw i32 %6, -1
%14 = zext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
store i8 0, i8* %15
%16 = tail call i32 @cstpcpy(i8* %10, i8* %12)
br label %17
17: ; preds = %0, %8
ret i32 0
}