#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*/ atol(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_press_mpt(int /*<<< orphan*/, int /*<<< orphan*/,
                                  int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  if (argc == 1 + 3) {
    test_press_mpt(atol(argv[1]), atol(argv[2]), atol(argv[3]));
  } else {
    printf("USAGE : test_press_mpt processes threads count\n");
    return 7;
  }
  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)
cmpl   $0x4,-0x8(%rbp)
jne    118f <main+0x5f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atol@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1040 <atol@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1040 <atol@plt>
mov    -0x18(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    %eax,%edx
call   1050 <test_press_mpt@plt>
jmp    11a7 <main+0x77>
lea    0xe6a(%rip),%rdi
call   1030 <printf@plt>
movl   $0x7,-0x4(%rbp)
jmp    11ae <main+0x7e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x4,%edi
jne    116c <main+0x3c>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1040 <atol@plt>
mov    %eax,%r14d
mov    0x10(%rbx),%rdi
call   1040 <atol@plt>
mov    %eax,%ebp
mov    0x18(%rbx),%rdi
call   1040 <atol@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %eax,%edx
call   1050 <test_press_mpt@plt>
xor    %eax,%eax
jmp    117d <main+0x4d>
lea    0xe8d(%rip),%rdi
call   1030 <puts@plt>
mov    $0x7,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [48 x i8] c"USAGE : test_press_mpt processes threads count\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 eq i32 %6, 4
br i1 %7, label %8, label %22
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @atol(i8* %11)
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 2
%15 = load i8*, i8** %14
%16 = call i32 @atol(i8* %15)
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 3
%19 = load i8*, i8** %18
%20 = call i32 @atol(i8* %19)
%21 = call i32 @test_press_mpt(i32 %12, i32 %16, i32 %20)
br label %24
22: ; preds = %2
%23 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
store i32 7, i32* %3
br label %25
24: ; preds = %8
store i32 0, i32* %3
br label %25
25: ; preds = %24, %22
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
@str = [47 x i8] c"USAGE : test_press_mpt processes threads count\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 4
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atol(i8* %6)
%8 = getelementptr inbounds i8*, i8** %1, i64 2
%9 = load i8*, i8** %8
%10 = tail call i32 @atol(i8* %9)
%11 = getelementptr inbounds i8*, i8** %1, i64 3
%12 = load i8*, i8** %11
%13 = tail call i32 @atol(i8* %12)
%14 = tail call i32 @test_press_mpt(i32 %7, i32 %10, i32 %13)
br label %17
15: ; preds = %2
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
br label %17
17: ; preds = %4, %15
%18 = phi i32 [ 0, %4 ], [ 7, %15 ]
ret i32 %18
}