#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*/ cleanupDCOP(int, int);
scalar_t__ strcmp(char *, char *);
int main(int argc, char **argv) {
  int dont_kill_dcop = (argc == 2) && (strcmp(argv[1], "--nokill") == 0);
  int wait_for_exit = (argc == 2) && (strcmp(argv[1], "--wait") == 0);
  cleanupDCOP(dont_kill_dcop, wait_for_exit);
  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)
xor    %eax,%eax
cmpl   $0x2,-0x8(%rbp)
mov    %al,-0x19(%rbp)
jne    1163 <main+0x43>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xeac(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
cmpl   $0x2,-0x8(%rbp)
mov    %al,-0x1a(%rbp)
jne    119b <main+0x7b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe7d(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0x1a(%rbp)
mov    -0x1a(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1040 <cleanupDCOP@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
xor    %ebx,%ebx
mov    $0x0,%esi
cmp    $0x2,%edi
jne    1164 <main+0x44>
mov    0x8(%r14),%rdi
lea    0xec2(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ebx,%ebx
test   %rax,%rax
sete   %bl
mov    0x8(%r14),%rdi
lea    0xeb3(%rip),%rsi
call   1030 <strcmp@plt>
xor    %esi,%esi
test   %rax,%rax
sete   %sil
mov    %ebx,%edi
call   1040 <cleanupDCOP@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [9 x i8] c"--nokill\00"
@.str.1 = [7 x i8] c"--wait\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 2
br i1 %9, label %10, label %16
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br label %16
16: ; preds = %10, %2
%17 = phi i1 [ false, %2 ], [ %15, %10 ]
%18 = zext i1 %17 to i32
store i32 %18, i32* %6
%19 = load i32, i32* %4
%20 = icmp eq i32 %19, 2
br i1 %20, label %21, label %27
21: ; preds = %16
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
%25 = call i64 @strcmp(i8* %24, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br label %27
27: ; preds = %21, %16
%28 = phi i1 [ false, %16 ], [ %26, %21 ]
%29 = zext i1 %28 to i32
store i32 %29, i32* %7
%30 = load i32, i32* %6
%31 = load i32, i32* %7
%32 = call i32 @cleanupDCOP(i32 %30, i32 %31)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"--nokill\00"
@.str.1 = [7 x i8] c"--wait\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
%10 = load i8*, i8** %5
%11 = tail call i64 @strcmp(i8* %10, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %2, %4
%15 = phi i32 [ %9, %4 ], [ 0, %2 ]
%16 = phi i32 [ %13, %4 ], [ 0, %2 ]
%17 = tail call i32 @cleanupDCOP(i32 %15, i32 %16)
ret i32 0
}