#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 */
long get_num(char *, char *);
int /*<<< orphan*/ get_string(char *);
char *long2str(char *, long);
long tt_killRemark(int, long, int /*<<< orphan*/);
char *macttKillRemark(char *arg) {
  int tbl;
  long top;
  top = get_num("ttKillRemark", arg);
  tbl = (int)get_num("ttKillRemark", arg);
  if ((top = tt_killRemark(tbl, top, get_string(arg))) < 0)
    return long2str(arg, top);
  *arg = '\0';
  return arg;
}


x86 assembly (clang, -O0):
<macttKillRemark>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1030 <get_num@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe95(%rip),%rdi
call   1030 <get_num@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <get_string@plt>
mov    -0x2c(%rbp),%edi
mov    -0x28(%rbp),%rsi
mov    %eax,%edx
call   1040 <tt_killRemark@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jge    11bc <macttKillRemark+0x7c>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1060 <long2str@plt>
mov    %rax,-0x8(%rbp)
jmp    11cb <macttKillRemark+0x8b>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<macttKillRemark>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
lea    0xeb1(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <get_num@plt>
mov    %rax,%r15
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <get_num@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1050 <get_string@plt>
mov    %r14d,%edi
mov    %r15,%rsi
mov    %eax,%edx
call   1040 <tt_killRemark@plt>
test   %rax,%rax
js     1191 <macttKillRemark+0x51>
movb   $0x0,(%rbx)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1060 <long2str@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"ttKillRemark\00"
define i8* @macttKillRemark(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i64
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i64 @get_num(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %6)
store i64 %7, i64* %5
%8 = load i8*, i8** %3
%9 = call i64 @get_num(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = trunc i64 %9 to i32
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = load i64, i64* %5
%13 = load i8*, i8** %3
%14 = call i32 @get_string(i8* %13)
%15 = call i64 @tt_killRemark(i32 %11, i64 %12, i32 %14)
store i64 %15, i64* %5
%16 = icmp slt i64 %15, 0
br i1 %16, label %17, label %21
17: ; preds = %1
%18 = load i8*, i8** %3
%19 = load i64, i64* %5
%20 = call i8* @long2str(i8* %18, i64 %19)
store i8* %20, i8** %2
br label %24
21: ; preds = %1
%22 = load i8*, i8** %3
store i8 0, i8* %22
%23 = load i8*, i8** %3
store i8* %23, i8** %2
br label %24
24: ; preds = %21, %17
%25 = load i8*, i8** %2
ret i8* %25
}

LLVM IR (-O2):
@.str = [13 x i8] c"ttKillRemark\00"
define i8* @macttKillRemark(i8* %0) {
%2 = tail call i64 @get_num(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i64 @get_num(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = trunc i64 %3 to i32
%5 = tail call i32 @get_string(i8* %0)
%6 = tail call i64 @tt_killRemark(i32 %4, i64 %2, i32 %5)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = tail call i8* @long2str(i8* %0, i64 %6)
br label %11
10: ; preds = %1
store i8 0, i8* %0
br label %11
11: ; preds = %10, %8
%12 = phi i8* [ %9, %8 ], [ %0, %10 ]
ret i8* %12
}