#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*/ __ESBMC_assume(int);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main() {
  int m, n, k;
  char s1[100], s2[100], s3[200];
  __ESBMC_assume(m > 0);
  __ESBMC_assume(m < 100);
  s1[m - 1] = 0;
  s2[m - 1] = 0;
  strcpy(s3, s1);
  strcat(s3, s2);
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c0,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x8(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__ESBMC_assume@plt>
cmpl   $0x64,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__ESBMC_assume@plt>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,-0x80(%rbp,%rax,1)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,-0xf0(%rbp,%rax,1)
lea    -0x1c0(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x1c0(%rbp),%rdi
lea    -0xf0(%rbp),%rsi
call   1050 <strcat@plt>
mov    $0x1,%eax
add    $0x1c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x1b0,%rsp
xor    %edi,%edi
call   1040 <__ESBMC_assume@plt>
xor    %edi,%edi
call   1040 <__ESBMC_assume@plt>
movb   $0x0,0x70(%rsp)
movb   $0x0,(%rsp)
lea    0xe0(%rsp),%rbx
lea    0x70(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1050 <strcat@plt>
mov    $0x1,%eax
add    $0x1b0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [100 x i8]
%6 = alloca [100 x i8]
%7 = alloca [200 x i8]
store i32 0, i32* %1
%8 = load i32, i32* %2
%9 = icmp sgt i32 %8, 0
%10 = zext i1 %9 to i32
%11 = call i32 @__ESBMC_assume(i32 %10)
%12 = load i32, i32* %2
%13 = icmp slt i32 %12, 100
%14 = zext i1 %13 to i32
%15 = call i32 @__ESBMC_assume(i32 %14)
%16 = load i32, i32* %2
%17 = sub nsw i32 %16, 1
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 %18
store i8 0, i8* %19
%20 = load i32, i32* %2
%21 = sub nsw i32 %20, 1
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 %22
store i8 0, i8* %23
%24 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%25 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%26 = call i32 @strcpy(i8* %24, i8* %25)
%27 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%28 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%29 = call i32 @strcat(i8* %27, i8* %28)
ret i32 1
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [100 x i8]
%3 = alloca [200 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%7 = tail call i32 @__ESBMC_assume(i32 0)
%8 = tail call i32 @__ESBMC_assume(i32 0)
store i8 0, i8* %4
store i8 0, i8* %5
%9 = call i32 @strcpy(i8* %6, i8* %4)
%10 = call i32 @strcat(i8* %6, i8* %5)
ret i32 1
}