#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 atoi(char *);
int /*<<< orphan*/ sleep(int);
int main(int argc, char **argv) {
  int core = 0;
  int seconds = 10;
  int seconds_before = 0;
  int num_sockets = 1;
  if (argc > 1) {
    seconds = atoi(argv[1]);
  }
  if (argc > 2) {
    seconds_before = atoi(argv[2]);
  }
  if (argc > 3) {
    num_sockets = atoi(argv[3]);
  }
  sleep(seconds_before);
  if (num_sockets > 1) {
    ;
    ;
    sleep(seconds);
    ;
  } else {
    ;
    ;
    sleep(seconds);
    ;
  };
  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)
movl   $0x0,-0x14(%rbp)
movl   $0xa,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x1,-0x20(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    116c <main+0x4c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x2,-0x8(%rbp)
jle    1186 <main+0x66>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x3,-0x8(%rbp)
jle    11a0 <main+0x80>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%edi
call   1040 <sleep@plt>
cmpl   $0x1,-0x20(%rbp)
jle    11bf <main+0x9f>
mov    -0x18(%rbp),%edi
call   1040 <sleep@plt>
jmp    11c7 <main+0xa7>
mov    -0x18(%rbp),%edi
call   1040 <sleep@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0xa,%ebx
xor    %r15d,%r15d
cmp    $0x2,%edi
jl     1155 <main+0x35>
mov    %rsi,%r14
mov    %edi,%ebp
mov    0x8(%rsi),%rdi
call   1030 <atoi@plt>
mov    %eax,%ebx
cmp    $0x2,%ebp
je     1155 <main+0x35>
mov    0x10(%r14),%rdi
call   1030 <atoi@plt>
mov    %eax,%r15d
mov    %r15d,%edi
call   1040 <sleep@plt>
mov    %ebx,%edi
call   1040 <sleep@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 10, i32* %7
store i32 0, i32* %8
store i32 1, i32* %9
%10 = load i32, i32* %4
%11 = icmp sgt i32 %10, 1
br i1 %11, label %12, label %17
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @atoi(i8* %15)
store i32 %16, i32* %7
br label %17
17: ; preds = %12, %2
%18 = load i32, i32* %4
%19 = icmp sgt i32 %18, 2
br i1 %19, label %20, label %25
20: ; preds = %17
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 2
%23 = load i8*, i8** %22
%24 = call i32 @atoi(i8* %23)
store i32 %24, i32* %8
br label %25
25: ; preds = %20, %17
%26 = load i32, i32* %4
%27 = icmp sgt i32 %26, 3
br i1 %27, label %28, label %33
28: ; preds = %25
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 3
%31 = load i8*, i8** %30
%32 = call i32 @atoi(i8* %31)
store i32 %32, i32* %9
br label %33
33: ; preds = %28, %25
%34 = load i32, i32* %8
%35 = call i32 @sleep(i32 %34)
%36 = load i32, i32* %9
%37 = icmp sgt i32 %36, 1
br i1 %37, label %38, label %41
38: ; preds = %33
%39 = load i32, i32* %7
%40 = call i32 @sleep(i32 %39)
br label %44
41: ; preds = %33
%42 = load i32, i32* %7
%43 = call i32 @sleep(i32 %42)
br label %44
44: ; preds = %41, %38
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = icmp eq i32 %0, 2
br i1 %8, label %13, label %9
9: ; preds = %4
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
%12 = tail call i32 @atoi(i8* %11)
br label %13
13: ; preds = %9, %4, %2
%14 = phi i32 [ %12, %9 ], [ 0, %4 ], [ 0, %2 ]
%15 = phi i32 [ %7, %9 ], [ %7, %4 ], [ 10, %2 ]
%16 = tail call i32 @sleep(i32 %14)
%17 = tail call i32 @sleep(i32 %15)
ret i32 0
}