#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*/ bigdiv(int *, int, int *, int *);
int /*<<< orphan*/ bigdiv2(int *, int *, int *, int *);
int /*<<< orphan*/ bigmult(int *, int, int *);
int /*<<< orphan*/ bigmult2(int *, int *, int *);
int /*<<< orphan*/ bigplus(int *, int *, int *);
int /*<<< orphan*/ bigsub(int *, int *, int *);
int /*<<< orphan*/ getchar();
int main(const int argc, const char *argv[]) {
  int a[1000] = {10, 5, 4, 6, 5, 4, 3, 2, 1, 1, 1};
  int b[1000] = {7, 7, 6, 5, 4, 3, 2, 1};
  int c[1000], d[1000];
  int div = 1234;
  int k = 0;
  int *res = &k;
  bigplus(a, b, c);
  bigsub(a, b, c);
  bigmult(a, div, c);
  bigmult2(a, b, c);
  bigdiv(a, div, c, res);
  bigdiv2(a, b, c, d);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3ea0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xfb0(%rbp),%rdi
lea    0xe59(%rip),%rsi
mov    $0xfa0,%edx
call   1080 <memcpy@plt>
lea    -0x1f50(%rbp),%rdi
lea    0x1de1(%rip),%rsi
mov    $0xfa0,%edx
call   1080 <memcpy@plt>
movl   $0x4d2,-0x3e94(%rbp)
movl   $0x0,-0x3e98(%rbp)
lea    -0x3e98(%rbp),%rax
mov    %rax,-0x3ea0(%rbp)
lea    -0xfb0(%rbp),%rdi
lea    -0x1f50(%rbp),%rsi
lea    -0x2ef0(%rbp),%rdx
call   1040 <bigplus@plt>
lea    -0xfb0(%rbp),%rdi
lea    -0x1f50(%rbp),%rsi
lea    -0x2ef0(%rbp),%rdx
call   10a0 <bigsub@plt>
lea    -0xfb0(%rbp),%rdi
mov    -0x3e94(%rbp),%esi
lea    -0x2ef0(%rbp),%rdx
call   1060 <bigmult@plt>
lea    -0xfb0(%rbp),%rdi
lea    -0x1f50(%rbp),%rsi
lea    -0x2ef0(%rbp),%rdx
call   1030 <bigmult2@plt>
lea    -0xfb0(%rbp),%rdi
mov    -0x3e94(%rbp),%esi
lea    -0x2ef0(%rbp),%rdx
mov    -0x3ea0(%rbp),%rcx
call   1090 <bigdiv@plt>
lea    -0xfb0(%rbp),%rdi
lea    -0x1f50(%rbp),%rsi
lea    -0x2ef0(%rbp),%rdx
lea    -0x3e90(%rbp),%rcx
call   1050 <bigdiv2@plt>
mov    $0x0,%al
call   1070 <getchar@plt>
xor    %eax,%eax
add    $0x3ea0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x3e90,%rsp
lea    0xe6d(%rip),%rsi
lea    0x2ef0(%rsp),%r15
mov    $0xfa0,%edx
mov    %r15,%rdi
call   1080 <memcpy@plt>
lea    0x1df1(%rip),%rsi
lea    0x1f50(%rsp),%r14
mov    $0xfa0,%edx
mov    %r14,%rdi
call   1080 <memcpy@plt>
movl   $0x0,0xc(%rsp)
lea    0xfb0(%rsp),%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <bigplus@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   10a0 <bigsub@plt>
mov    %r15,%rdi
mov    $0x4d2,%esi
mov    %rbx,%rdx
call   1060 <bigmult@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <bigmult2@plt>
lea    0xc(%rsp),%rcx
mov    %r15,%rdi
mov    $0x4d2,%esi
mov    %rbx,%rdx
call   1090 <bigdiv@plt>
lea    0x10(%rsp),%rcx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <bigdiv2@plt>
xor    %eax,%eax
call   1070 <getchar@plt>
xor    %eax,%eax
add    $0x3e90,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.a = <{ [11 x i32], [989 x i32] }> <{ [11 x i32] [i32 10, i32 5, i32 4, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 1, i32 1], [989 x i32] zeroinitializer }>
@__const.main.b = <{ [8 x i32], [992 x i32] }> <{ [8 x i32] [i32 7, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1], [992 x i32] zeroinitializer }>
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [1000 x i32]
%7 = alloca [1000 x i32]
%8 = alloca [1000 x i32]
%9 = alloca [1000 x i32]
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = bitcast [1000 x i32]* %6 to i8*
%14 = bitcast [1000 x i32]* %7 to i8*
store i32 1234, i32* %10
store i32 0, i32* %11
store i32* %11, i32** %12
%15 = getelementptr inbounds [1000 x i32], [1000 x i32]* %6, i64 0, i64 0
%16 = getelementptr inbounds [1000 x i32], [1000 x i32]* %7, i64 0, i64 0
%17 = getelementptr inbounds [1000 x i32], [1000 x i32]* %8, i64 0, i64 0
%18 = call i32 @bigplus(i32* %15, i32* %16, i32* %17)
%19 = getelementptr inbounds [1000 x i32], [1000 x i32]* %6, i64 0, i64 0
%20 = getelementptr inbounds [1000 x i32], [1000 x i32]* %7, i64 0, i64 0
%21 = getelementptr inbounds [1000 x i32], [1000 x i32]* %8, i64 0, i64 0
%22 = call i32 @bigsub(i32* %19, i32* %20, i32* %21)
%23 = getelementptr inbounds [1000 x i32], [1000 x i32]* %6, i64 0, i64 0
%24 = load i32, i32* %10
%25 = getelementptr inbounds [1000 x i32], [1000 x i32]* %8, i64 0, i64 0
%26 = call i32 @bigmult(i32* %23, i32 %24, i32* %25)
%27 = getelementptr inbounds [1000 x i32], [1000 x i32]* %6, i64 0, i64 0
%28 = getelementptr inbounds [1000 x i32], [1000 x i32]* %7, i64 0, i64 0
%29 = getelementptr inbounds [1000 x i32], [1000 x i32]* %8, i64 0, i64 0
%30 = call i32 @bigmult2(i32* %27, i32* %28, i32* %29)
%31 = getelementptr inbounds [1000 x i32], [1000 x i32]* %6, i64 0, i64 0
%32 = load i32, i32* %10
%33 = getelementptr inbounds [1000 x i32], [1000 x i32]* %8, i64 0, i64 0
%34 = load i32*, i32** %12
%35 = call i32 @bigdiv(i32* %31, i32 %32, i32* %33, i32* %34)
%36 = getelementptr inbounds [1000 x i32], [1000 x i32]* %6, i64 0, i64 0
%37 = getelementptr inbounds [1000 x i32], [1000 x i32]* %7, i64 0, i64 0
%38 = getelementptr inbounds [1000 x i32], [1000 x i32]* %8, i64 0, i64 0
%39 = getelementptr inbounds [1000 x i32], [1000 x i32]* %9, i64 0, i64 0
%40 = call i32 @bigdiv2(i32* %36, i32* %37, i32* %38, i32* %39)
%41 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = <{ [11 x i32], [989 x i32] }> <{ [11 x i32] [i32 10, i32 5, i32 4, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 1, i32 1], [989 x i32] zeroinitializer }>
@__const.main.b = <{ [8 x i32], [992 x i32] }> <{ [8 x i32] [i32 7, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1], [992 x i32] zeroinitializer }>
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1000 x i32]
%4 = alloca [1000 x i32]
%5 = alloca [1000 x i32]
%6 = alloca [1000 x i32]
%7 = alloca i32
%8 = bitcast [1000 x i32]* %3 to i8*
%9 = bitcast [1000 x i32]* %4 to i8*
%10 = bitcast [1000 x i32]* %5 to i8*
%11 = bitcast [1000 x i32]* %6 to i8*
%12 = bitcast i32* %7 to i8*
store i32 0, i32* %7
%13 = getelementptr inbounds [1000 x i32], [1000 x i32]* %3, i64 0, i64 0
%14 = getelementptr inbounds [1000 x i32], [1000 x i32]* %4, i64 0, i64 0
%15 = getelementptr inbounds [1000 x i32], [1000 x i32]* %5, i64 0, i64 0
%16 = call i32 @bigplus(i32* %13, i32* %14, i32* %15)
%17 = call i32 @bigsub(i32* %13, i32* %14, i32* %15)
%18 = call i32 @bigmult(i32* %13, i32 1234, i32* %15)
%19 = call i32 @bigmult2(i32* %13, i32* %14, i32* %15)
%20 = call i32 @bigdiv(i32* %13, i32 1234, i32* %15, i32* %7)
%21 = getelementptr inbounds [1000 x i32], [1000 x i32]* %6, i64 0, i64 0
%22 = call i32 @bigdiv2(i32* %13, i32* %14, i32* %15, i32* %21)
%23 = call i32 (...) @getchar()
ret i32 0
}