#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 /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ rSendFile(char *, char *, int /*<<< orphan*/, char *);
int main(int argc, char *argv[]) {
  if (argc < 5) {
    printf("Dette programet kopierer lotfiler over nettet\n\n\tcpLotFile "
           "SOURCE DEST lotnr host\n\n");
    exit(0);
  }
  rSendFile(argv[1], argv[2], atoi(argv[3]), argv[4]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    116c <main+0x2c>
lea    0xea0(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1050 <atoi@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rcx
call   1030 <rSendFile@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x4,%edi
jle    1177 <main+0x37>
mov    %rsi,%rbx
mov    0x8(%rsi),%r14
mov    0x10(%rsi),%r15
mov    0x18(%rsi),%rdi
call   1050 <atoi@plt>
mov    0x20(%rbx),%rcx
mov    %r14,%rdi
mov    %r15,%rsi
mov    %eax,%edx
call   1040 <rSendFile@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret
lea    0xe82(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [83 x i8] c"Dette programet kopierer lotfiler over nettet\0A\0A\09cpLotFile SOURCE DEST lotnr host\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 5
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = call i32 @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @exit(i32 0)
unreachable
10: ; preds = %2
%11 = load i8**, i8*** %4
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = load i8**, i8*** %4
%15 = getelementptr inbounds i8*, i8** %14, i64 2
%16 = load i8*, i8** %15
%17 = load i8**, i8*** %4
%18 = getelementptr inbounds i8*, i8** %17, i64 3
%19 = load i8*, i8** %18
%20 = call i32 @atoi(i8* %19)
%21 = load i8**, i8*** %4
%22 = getelementptr inbounds i8*, i8** %21, i64 4
%23 = load i8*, i8** %22
%24 = call i32 @rSendFile(i8* %13, i8* %16, i32 %20, i8* %23)
ret i32 0
}

LLVM IR (-O2):
@str = [82 x i8] c"Dette programet kopierer lotfiler over nettet\0A\0A\09cpLotFile SOURCE DEST lotnr host\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 5
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
%12 = getelementptr inbounds i8*, i8** %1, i64 3
%13 = load i8*, i8** %12
%14 = tail call i32 @atoi(i8* %13)
%15 = getelementptr inbounds i8*, i8** %1, i64 4
%16 = load i8*, i8** %15
%17 = tail call i32 @rSendFile(i8* %9, i8* %11, i32 %14, i8* %16)
ret i32 0
}