#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*/ fmea(long long, long long, long long);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
long long strtoll(char *, int /*<<< orphan*/ *, int);
int main(int argc, char **argv) {
  long long int a, b, n;
  a = strtoll(argv[1], NULL, 10);
  b = strtoll(argv[2], NULL, 10);
  n = strtoll(argv[3], NULL, 10);
  printf("\n------\n%lld\n------\n", fmea(a, b, n));
  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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1040 <strtoll@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1040 <strtoll@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1040 <strtoll@plt>
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1050 <fmea@plt>
mov    %eax,%esi
lea    0xe52(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <strtoll@plt>
mov    %rax,%r14
mov    0x10(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <strtoll@plt>
mov    %rax,%r15
mov    0x18(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <strtoll@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rax,%rdx
call   1050 <fmea@plt>
lea    0xe7d(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [21 x i8] c"\0A------\0A%lld\0A------\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i64 @strtoll(i8* %11, i32* null, i32 10)
store i64 %12, i64* %6
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 2
%15 = load i8*, i8** %14
%16 = call i64 @strtoll(i8* %15, i32* null, i32 10)
store i64 %16, i64* %7
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 3
%19 = load i8*, i8** %18
%20 = call i64 @strtoll(i8* %19, i32* null, i32 10)
store i64 %20, i64* %8
%21 = load i64, i64* %6
%22 = load i64, i64* %7
%23 = load i64, i64* %8
%24 = call i32 @fmea(i64 %21, i64 %22, i64 %23)
%25 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %24)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"\0A------\0A%lld\0A------\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i64 @strtoll(i8* nocapture %4, i32* null, i32 10)
%6 = getelementptr inbounds i8*, i8** %1, i64 2
%7 = load i8*, i8** %6
%8 = tail call i64 @strtoll(i8* nocapture %7, i32* null, i32 10)
%9 = getelementptr inbounds i8*, i8** %1, i64 3
%10 = load i8*, i8** %9
%11 = tail call i64 @strtoll(i8* nocapture %10, i32* null, i32 10)
%12 = tail call i32 @fmea(i64 %5, i64 %8, i64 %11)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i32 0
}