#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*/ control_tsung(char *, char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ parse_argv(int, char **, char **, int *);
int /*<<< orphan*/ print_help_for_start_or_stop();
int main(int argc, char **argv) {
  char *prefix;
  int ignore;
  if (!parse_argv(argc, argv, &prefix, &ignore)) {
    print_help_for_start_or_stop();
  }
  control_tsung("stop_recorder", prefix);
  if (prefix) {
    free(prefix);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x1c(%rbp),%rcx
call   1050 <parse_argv@plt>
cmp    $0x0,%eax
jne    117a <main+0x3a>
mov    $0x0,%al
call   1040 <print_help_for_start_or_stop@plt>
mov    -0x18(%rbp),%rsi
lea    0xe7b(%rip),%rdi
call   1060 <control_tsung@plt>
cmpq   $0x0,-0x18(%rbp)
je     119e <main+0x5e>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdx
lea    0x14(%rsp),%rcx
call   1050 <parse_argv@plt>
test   %eax,%eax
jne    115e <main+0x1e>
xor    %eax,%eax
call   1040 <print_help_for_start_or_stop@plt>
mov    0x8(%rsp),%rsi
lea    0xe96(%rip),%rdi
call   1060 <control_tsung@plt>
mov    0x8(%rsp),%rdi
test   %rdi,%rdi
je     117e <main+0x3e>
call   1030 <free@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"stop_recorder\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i32 @parse_argv(i32 %8, i8** %9, i8** %6, i32* %7)
%11 = icmp ne i32 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %2
%13 = call i32 (...) @print_help_for_start_or_stop()
br label %14
14: ; preds = %12, %2
%15 = load i8*, i8** %6
%16 = call i32 @control_tsung(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %15)
%17 = load i8*, i8** %6
%18 = icmp ne i8* %17, null
br i1 %18, label %19, label %22
19: ; preds = %14
%20 = load i8*, i8** %6
%21 = call i32 @free(i8* %20)
br label %22
22: ; preds = %19, %14
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"stop_recorder\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = bitcast i8** %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 @parse_argv(i32 %0, i8** %1, i8** %3, i32* %4)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 (...) @print_help_for_start_or_stop()
br label %11
11: ; preds = %9, %2
%12 = load i8*, i8** %3
%13 = call i32 @control_tsung(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = load i8*, i8** %3
%15 = icmp eq i8* %14, null
br i1 %15, label %18, label %16
16: ; preds = %11
%17 = call i32 @free(i8* %14)
br label %18
18: ; preds = %16, %11
ret i32 0
}