#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 */
typedef int /*<<< orphan*/ argv;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int getMask(int);
int /*<<< orphan*/ printf(char *, char *, ...);
int main(int argc, char **argv) {
  int mask, bytes[4];
  if (argc < 2) {
    printf("Usage : %s <IP> [ Default Network Mask used ] \n\t%s <IP/Mask>\nEg "
           ": \t%s 52.5.25.103/09",
           argv[0], argv[0], argv[0]);
  } else {
    printf("%s, %d", argv[1], sizeof(argv[1]));
    if (argv[1][sizeof(argv[1]) - 2] == '/')
      exit(0);
    else
      mask = getMask(bytes[0]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1178 <main+0x48>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11bf <main+0x8f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xece(%rip),%rdi
mov    $0x8,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x6(%rax),%eax
cmp    $0x2f,%eax
jne    11af <main+0x7f>
xor    %edi,%edi
call   1050 <exit@plt>
mov    -0x30(%rbp),%edi
call   1040 <getMask@plt>
mov    %eax,-0x14(%rbp)
jmp    11bf <main+0x8f>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x1,%edi
jg     1152 <main+0x22>
mov    (%rbx),%rcx
lea    0xebd(%rip),%rdi
mov    %rcx,%rsi
mov    %rcx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
jmp    1178 <main+0x48>
mov    0x8(%rbx),%rsi
lea    0xef8(%rip),%rdi
mov    $0x8,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x8(%rbx),%rax
cmpb   $0x2f,0x6(%rax)
je     117c <main+0x4c>
call   1040 <getMask@plt>
xor    %eax,%eax
pop    %rbx
ret
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [85 x i8] c"Usage : %s <IP> [ Default Network Mask used ] \0A\09%s <IP/Mask>\0AEg : \09%s 52.5.25.103/09\00"
@.str.1 = [7 x i8] c"%s, %d\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [4 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 2
br i1 %9, label %10, label %21
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 0
%13 = load i8*, i8** %12
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 0
%16 = load i8*, i8** %15
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 0
%19 = load i8*, i8** %18
%20 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0), i8* %13, i8* %16, i8* %19)
br label %40
21: ; preds = %2
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
%25 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %24, i64 8)
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 1
%28 = load i8*, i8** %27
%29 = getelementptr inbounds i8, i8* %28, i64 6
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 47
br i1 %32, label %33, label %35
33: ; preds = %21
%34 = call i32 @exit(i32 0)
unreachable
35: ; preds = %21
%36 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 0
%37 = load i32, i32* %36
%38 = call i32 @getMask(i32 %37)
store i32 %38, i32* %6
br label %39
39: ; preds = %35
br label %40
40: ; preds = %39, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [85 x i8] c"Usage : %s <IP> [ Default Network Mask used ] \0A\09%s <IP/Mask>\0AEg : \09%s 52.5.25.103/09\00"
@.str.1 = [7 x i8] c"%s, %d\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %5, i8* %5)
br label %19
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %9, i64 8)
%11 = load i8*, i8** %8
%12 = getelementptr inbounds i8, i8* %11, i64 6
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 47
br i1 %14, label %15, label %17
15: ; preds = %7
%16 = tail call i32 @exit(i32 0)
unreachable
17: ; preds = %7
%18 = tail call i32 @getMask(i32 undef)
br label %19
19: ; preds = %17, %4
ret i32 0
}