#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 */
void *malloc(int);
char **init_tab_rm() {
  char **tab5;
  if ((tab5 = malloc(sizeof(char *) * 4096)) == NULL)
    return (0);
  if ((tab5[0] = malloc(sizeof(char) * 4096)) == NULL)
    return (0);
  tab5[0] = "rm";
  if ((tab5[1] = malloc(sizeof(char) * 4096)) == NULL)
    return (0);
  tab5[1] = " ";
  return (tab5);
}


x86 assembly (clang, -O0):
<init_tab_rm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x8000,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    113d <init_tab_rm+0x2d>
movq   $0x0,-0x8(%rbp)
jmp    11b3 <init_tab_rm+0xa3>
mov    $0x1000,%edi
call   1030 <malloc@plt>
mov    -0x10(%rbp),%rcx
mov    %rax,(%rcx)
cmp    $0x0,%rax
jne    1165 <init_tab_rm+0x55>
movq   $0x0,-0x8(%rbp)
jmp    11b3 <init_tab_rm+0xa3>
mov    -0x10(%rbp),%rax
lea    0xe90(%rip),%rcx
mov    %rcx,(%rax)
mov    $0x1000,%edi
call   1030 <malloc@plt>
mov    -0x10(%rbp),%rcx
mov    %rax,0x8(%rcx)
cmp    $0x0,%rax
jne    119c <init_tab_rm+0x8c>
movq   $0x0,-0x8(%rbp)
jmp    11b3 <init_tab_rm+0xa3>
mov    -0x10(%rbp),%rax
lea    0xe5c(%rip),%rcx
mov    %rcx,0x8(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_tab_rm>:
push   %rbx
mov    $0x8000,%edi
call   1030 <malloc@plt>
test   %rax,%rax
je     114c <init_tab_rm+0x3c>
mov    %rax,%rbx
mov    $0x1000,%edi
call   1030 <malloc@plt>
mov    %rax,(%rbx)
test   %rax,%rax
je     114c <init_tab_rm+0x3c>
lea    0xec4(%rip),%rax
mov    %rax,(%rbx)
lea    0xebd(%rip),%rax
mov    %rax,0x8(%rbx)
jmp    114e <init_tab_rm+0x3e>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"rm\00"
@.str.1 = [2 x i8] c" \00"
define i8** @init_tab_rm() {
%1 = alloca i8**
%2 = alloca i8**
%3 = call i8* @malloc(i32 32768)
%4 = bitcast i8* %3 to i8**
store i8** %4, i8*** %2
%5 = icmp eq i8** %4, null
br i1 %5, label %6, label %7
6: ; preds = %0
store i8** null, i8*** %1
br label %25
7: ; preds = %0
%8 = call i8* @malloc(i32 4096)
%9 = load i8**, i8*** %2
%10 = getelementptr inbounds i8*, i8** %9, i64 0
store i8* %8, i8** %10
%11 = icmp eq i8* %8, null
br i1 %11, label %12, label %13
12: ; preds = %7
store i8** null, i8*** %1
br label %25
13: ; preds = %7
%14 = load i8**, i8*** %2
%15 = getelementptr inbounds i8*, i8** %14, i64 0
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %15
%16 = call i8* @malloc(i32 4096)
%17 = load i8**, i8*** %2
%18 = getelementptr inbounds i8*, i8** %17, i64 1
store i8* %16, i8** %18
%19 = icmp eq i8* %16, null
br i1 %19, label %20, label %21
20: ; preds = %13
store i8** null, i8*** %1
br label %25
21: ; preds = %13
%22 = load i8**, i8*** %2
%23 = getelementptr inbounds i8*, i8** %22, i64 1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %23
%24 = load i8**, i8*** %2
store i8** %24, i8*** %1
br label %25
25: ; preds = %21, %20, %12, %6
%26 = load i8**, i8*** %1
ret i8** %26
}

LLVM IR (-O2):
@.str = [3 x i8] c"rm\00"
@.str.1 = [2 x i8] c" \00"
define noalias i8** @init_tab_rm() {
%1 = tail call dereferenceable_or_null(32768) i8* @malloc(i32 32768)
%2 = bitcast i8* %1 to i8**
%3 = icmp eq i8* %1, null
br i1 %3, label %9, label %4
4: ; preds = %0
%5 = tail call dereferenceable_or_null(4096) i8* @malloc(i32 4096)
store i8* %5, i8** %2
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %4
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
%8 = getelementptr inbounds i8*, i8** %2, i64 1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %8
br label %9
9: ; preds = %7, %4, %0
%10 = phi i8** [ null, %0 ], [ null, %4 ], [ %2, %7 ]
ret i8** %10
}