#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*/ commonfactors();
int /*<<< orphan*/ findprime(int *, int);
int main(int argc, char **argv) {
  int p, i, j, k = 0;
  int x;
  int mf[100], nf[100], m, n;
  m = atoi(argv[1]);
  n = atoi(argv[2]);
  findprime(mf, m);
  findprime(nf, n);
  commonfactors();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x360,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x354(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x358(%rbp)
lea    -0x1c0(%rbp),%rdi
mov    -0x354(%rbp),%esi
call   1040 <findprime@plt>
lea    -0x350(%rbp),%rdi
mov    -0x358(%rbp),%esi
call   1040 <findprime@plt>
mov    $0x0,%al
call   1030 <commonfactors@plt>
xor    %eax,%eax
add    $0x360,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x328,%rsp
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebx
lea    0x190(%rsp),%rdi
mov    %ebp,%esi
call   1040 <findprime@plt>
mov    %rsp,%rdi
mov    %ebx,%esi
call   1040 <findprime@plt>
xor    %eax,%eax
call   1030 <commonfactors@plt>
xor    %eax,%eax
add    $0x328,%rsp
pop    %rbx
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
%10 = alloca i32
%11 = alloca [100 x i32]
%12 = alloca [100 x i32]
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %9
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = call i32 @atoi(i8* %17)
store i32 %18, i32* %13
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 2
%21 = load i8*, i8** %20
%22 = call i32 @atoi(i8* %21)
store i32 %22, i32* %14
%23 = getelementptr inbounds [100 x i32], [100 x i32]* %11, i64 0, i64 0
%24 = load i32, i32* %13
%25 = call i32 @findprime(i32* %23, i32 %24)
%26 = getelementptr inbounds [100 x i32], [100 x i32]* %12, i64 0, i64 0
%27 = load i32, i32* %14
%28 = call i32 @findprime(i32* %26, i32 %27)
%29 = call i32 (...) @commonfactors()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [100 x i32]
%4 = alloca [100 x i32]
%5 = bitcast [100 x i32]* %3 to i8*
%6 = bitcast [100 x i32]* %4 to i8*
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @atoi(i8* %8)
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
%12 = tail call i32 @atoi(i8* %11)
%13 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 0
%14 = call i32 @findprime(i32* %13, i32 %9)
%15 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 0
%16 = call i32 @findprime(i32* %15, i32 %12)
%17 = call i32 (...) @commonfactors()
ret i32 0
}