#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*/ a_receiver(char *);
int /*<<< orphan*/ a_sender(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  if (argc != 3) {
    printf("2 Command Line Arguments Required.......!!\nAborting......!!\n");
    exit(-1);
  } else if (argv[1][0] == '1')
    a_sender(argv[2]);
  else if (argv[1][0] == '2')
    a_receiver(argv[2]);
  else {
    printf("Invalid Commandline Agruments.......!!\nAborting......!!\n");
    exit(-1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     1176 <main+0x36>
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x31,%eax
jne    119c <main+0x5c>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1030 <a_sender@plt>
jmp    11dd <main+0x9d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x32,%eax
jne    11c2 <main+0x82>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1050 <a_receiver@plt>
jmp    11d8 <main+0x98>
lea    0xe74(%rip),%rdi
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>
jmp    11dd <main+0x9d>
jmp    11e2 <main+0xa2>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x3,%edi
jne    116c <main+0x2c>
mov    0x8(%rsi),%rax
mov    (%rax),%al
cmp    $0x32,%al
je     115f <main+0x1f>
cmp    $0x31,%al
jne    1175 <main+0x35>
mov    0x10(%rsi),%rdi
call   1040 <a_sender@plt>
jmp    1168 <main+0x28>
mov    0x10(%rsi),%rdi
call   1050 <a_receiver@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xec5(%rip),%rdi
jmp    117c <main+0x3c>
lea    0xe84(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [61 x i8] c"2 Command Line Arguments Required.......!!\0AAborting......!!\0A\00"
@.str.1 = [57 x i8] c"Invalid Commandline Agruments.......!!\0AAborting......!!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 3
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 -1)
unreachable
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = getelementptr inbounds i8, i8* %14, i64 0
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 49
br i1 %18, label %19, label %24
19: ; preds = %11
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 2
%22 = load i8*, i8** %21
%23 = call i32 @a_sender(i8* %22)
br label %41
24: ; preds = %11
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = getelementptr inbounds i8, i8* %27, i64 0
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = icmp eq i32 %30, 50
br i1 %31, label %32, label %37
32: ; preds = %24
%33 = load i8**, i8*** %5
%34 = getelementptr inbounds i8*, i8** %33, i64 2
%35 = load i8*, i8** %34
%36 = call i32 @a_receiver(i8* %35)
br label %40
37: ; preds = %24
%38 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
%39 = call i32 @exit(i32 -1)
unreachable
40: ; preds = %32
br label %41
41: ; preds = %40, %19
br label %42
42: ; preds = %41
ret i32 0
}

LLVM IR (-O2):
@str = [56 x i8] c"Invalid Commandline Agruments.......!!\0AAborting......!!\00"
@str.2 = [60 x i8] c"2 Command Line Arguments Required.......!!\0AAborting......!!\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.2, i64 0, i64 0))
%6 = tail call i32 @exit(i32 -1)
unreachable
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = load i8, i8* %9
switch i8 %10, label %19 [
i8 49, label %11
i8 50, label %15
]
11: ; preds = %7
%12 = getelementptr inbounds i8*, i8** %1, i64 2
%13 = load i8*, i8** %12
%14 = tail call i32 @a_sender(i8* %13)
br label %22
15: ; preds = %7
%16 = getelementptr inbounds i8*, i8** %1, i64 2
%17 = load i8*, i8** %16
%18 = tail call i32 @a_receiver(i8* %17)
br label %22
19: ; preds = %7
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str, i64 0, i64 0))
%21 = tail call i32 @exit(i32 -1)
unreachable
22: ; preds = %11, %15
ret i32 0
}