#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*/ atoi(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ setbuf(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ stdout;
int test_client(char *, int /*<<< orphan*/, int /*<<< orphan*/,
                int /*<<< orphan*/);
int /*<<< orphan*/ usage();
int main(int argc, char *argv[]) {
  if (argc != 1 + 4) {
    usage();
    exit(7);
  }
  setbuf(stdout, NULL);
  return -test_client(argv[1], atoi(argv[2]), atoi(argv[3]), atoi(argv[4]));
}


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   $0x5,-0x8(%rbp)
je     1181 <main+0x31>
mov    $0x0,%al
call   1040 <usage@plt>
mov    $0x7,%edi
call   1060 <exit@plt>
mov    0x2e58(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <setbuf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
call   1050 <atoi@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    %eax,%ecx
call   1070 <test_client@plt>
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    $0x5,%edi
jne    11af <main+0x5f>
mov    %rsi,%rbx
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <setbuf@plt>
mov    0x8(%rbx),%r14
mov    0x10(%rbx),%rdi
call   1050 <atoi@plt>
mov    %eax,%r15d
mov    0x18(%rbx),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebp
mov    0x20(%rbx),%rdi
call   1050 <atoi@plt>
mov    %r14,%rdi
mov    %r15d,%esi
mov    %ebp,%edx
mov    %eax,%ecx
call   1070 <test_client@plt>
neg    %eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
call   1040 <usage@plt>
mov    $0x7,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
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, 5
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = call i32 (...) @usage()
%10 = call i32 @exit(i32 7)
unreachable
11: ; preds = %2
%12 = load i32, i32* @stdout
%13 = call i32 @setbuf(i32 %12, i32* null)
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 2
%19 = load i8*, i8** %18
%20 = call i32 @atoi(i8* %19)
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 3
%23 = load i8*, i8** %22
%24 = call i32 @atoi(i8* %23)
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 4
%27 = load i8*, i8** %26
%28 = call i32 @atoi(i8* %27)
%29 = call i32 @test_client(i8* %16, i32 %20, i32 %24, i32 %28)
%30 = sub nsw i32 0, %29
ret i32 %30
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 5
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 (...) @usage()
%6 = tail call i32 @exit(i32 7)
unreachable
7: ; preds = %2
%8 = load i32, i32* @stdout
%9 = tail call i32 @setbuf(i32 %8, i32* null)
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = getelementptr inbounds i8*, i8** %1, i64 2
%13 = load i8*, i8** %12
%14 = tail call i32 @atoi(i8* %13)
%15 = getelementptr inbounds i8*, i8** %1, i64 3
%16 = load i8*, i8** %15
%17 = tail call i32 @atoi(i8* %16)
%18 = getelementptr inbounds i8*, i8** %1, i64 4
%19 = load i8*, i8** %18
%20 = tail call i32 @atoi(i8* %19)
%21 = tail call i32 @test_client(i8* %11, i32 %14, i32 %17, i32 %20)
%22 = sub nsw i32 0, %21
ret i32 %22
}