#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 */
char *OC_mkDotStr(char *, char *);
char *OC_mkVarDef(char *, char *);
char *UTIL_mallocStr(size_t);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *OC_mkTabInit() {
  char *init;
  char *emptyTab = OC_mkDotStr("Table", "SymbolTable.empty");
  size_t length = strlen(emptyTab) + 10;
  char *def = UTIL_mallocStr(length + 1);
  strcpy(def, emptyTab);
  free(emptyTab);
  strcat(def, " in\n  ");
  init = OC_mkVarDef("t", def);
  free(def);
  return init;
}


x86 assembly (clang, -O0):
<OC_mkTabInit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xe81(%rip),%rdi
lea    0xe80(%rip),%rsi
call   1090 <OC_mkDotStr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
add    $0xa,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
call   1070 <UTIL_mallocStr@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rdi
lea    0xe45(%rip),%rsi
call   1080 <strcat@plt>
mov    -0x20(%rbp),%rsi
lea    0xe3c(%rip),%rdi
call   1060 <OC_mkVarDef@plt>
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OC_mkTabInit>:
push   %r14
push   %rbx
push   %rax
lea    0xe85(%rip),%rdi
lea    0xe84(%rip),%rsi
call   1090 <OC_mkDotStr@plt>
mov    %rax,%r14
mov    %rax,%rdi
call   1050 <strlen@plt>
movslq %eax,%rdi
add    $0xb,%rdi
call   1070 <UTIL_mallocStr@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1040 <strcpy@plt>
mov    %r14,%rdi
call   1030 <free@plt>
lea    0xe5d(%rip),%rsi
mov    %rbx,%rdi
call   1080 <strcat@plt>
lea    0xe55(%rip),%rdi
mov    %rbx,%rsi
call   1060 <OC_mkVarDef@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [6 x i8] c"Table\00"
@.str.1 = [18 x i8] c"SymbolTable.empty\00"
@.str.2 = [7 x i8] c" in\0A \00"
@.str.3 = [2 x i8] c"t\00"
define i8* @OC_mkTabInit() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
%5 = call i8* @OC_mkDotStr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
store i8* %5, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @strlen(i8* %6)
%8 = add nsw i32 %7, 10
%9 = sext i32 %8 to i64
store i64 %9, i64* %3
%10 = load i64, i64* %3
%11 = add i64 %10, 1
%12 = call i8* @UTIL_mallocStr(i64 %11)
store i8* %12, i8** %4
%13 = load i8*, i8** %4
%14 = load i8*, i8** %2
%15 = call i32 @strcpy(i8* %13, i8* %14)
%16 = load i8*, i8** %2
%17 = call i32 @free(i8* %16)
%18 = load i8*, i8** %4
%19 = call i32 @strcat(i8* %18, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%20 = load i8*, i8** %4
%21 = call i8* @OC_mkVarDef(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* %20)
store i8* %21, i8** %1
%22 = load i8*, i8** %4
%23 = call i32 @free(i8* %22)
%24 = load i8*, i8** %1
ret i8* %24
}

LLVM IR (-O2):
@.str = [6 x i8] c"Table\00"
@.str.1 = [18 x i8] c"SymbolTable.empty\00"
@.str.2 = [7 x i8] c" in\0A \00"
@.str.3 = [2 x i8] c"t\00"
define i8* @OC_mkTabInit() {
%1 = tail call i8* @OC_mkDotStr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @strlen(i8* %1)
%3 = sext i32 %2 to i64
%4 = add nsw i64 %3, 11
%5 = tail call i8* @UTIL_mallocStr(i64 %4)
%6 = tail call i32 @strcpy(i8* %5, i8* %1)
%7 = tail call i32 @free(i8* %1)
%8 = tail call i32 @strcat(i8* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%9 = tail call i8* @OC_mkVarDef(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* %5)
%10 = tail call i32 @free(i8* %5)
ret i8* %9
}