#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*/ printf(char *, ...);
int readArgs(int **, int *, int *);
int sumVeryLongIntegers(int, int **, int *, int *, int);
int main(int argc, char *argv[]) {
  int n, maxLength, loop;
  int integersLengths[102];
  int veryLongIntegers[102][102];
  int result[102];
  n = readArgs(veryLongIntegers, integersLengths, &maxLength);
  n = sumVeryLongIntegers(n, veryLongIntegers, integersLengths, result,
                          maxLength);
  for (loop = n - 1; loop >= 0; loop--)
    printf("%d", result[loop]);
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa5f0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xa450(%rbp),%rdi
lea    -0x1c0(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1050 <readArgs@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
lea    -0xa450(%rbp),%rsi
lea    -0x1c0(%rbp),%rdx
lea    -0xa5f0(%rbp),%rcx
mov    -0x18(%rbp),%r8d
call   1040 <sumVeryLongIntegers@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jl     11c1 <main+0x91>
movslq -0x1c(%rbp),%rax
mov    -0xa5f0(%rbp,%rax,4),%esi
lea    0xe54(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    1190 <main+0x60>
lea    0xe3b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xa5f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xa5e8,%rsp
lea    0x350(%rsp),%rbx
lea    0x1b0(%rsp),%r14
lea    0xc(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <readArgs@plt>
mov    0xc(%rsp),%r8d
lea    0x10(%rsp),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1050 <sumVeryLongIntegers@plt>
test   %eax,%eax
jle    11bb <main+0x7b>
mov    %eax,%ebx
add    $0x1,%rbx
lea    0xe6e(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0x2(%rbx),%eax
mov    0x10(%rsp,%rax,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     11a0 <main+0x60>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0xa5e8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [2 x i8] c"\0A\00"
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 [102 x i32]
%10 = alloca [102 x [102 x i32]]
%11 = alloca [102 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = getelementptr inbounds [102 x [102 x i32]], [102 x [102 x i32]]* %10, i64 0, i64 0
%13 = bitcast [102 x i32]* %12 to i32**
%14 = getelementptr inbounds [102 x i32], [102 x i32]* %9, i64 0, i64 0
%15 = call i32 @readArgs(i32** %13, i32* %14, i32* %7)
store i32 %15, i32* %6
%16 = load i32, i32* %6
%17 = getelementptr inbounds [102 x [102 x i32]], [102 x [102 x i32]]* %10, i64 0, i64 0
%18 = bitcast [102 x i32]* %17 to i32**
%19 = getelementptr inbounds [102 x i32], [102 x i32]* %9, i64 0, i64 0
%20 = getelementptr inbounds [102 x i32], [102 x i32]* %11, i64 0, i64 0
%21 = load i32, i32* %7
%22 = call i32 @sumVeryLongIntegers(i32 %16, i32** %18, i32* %19, i32* %20, i32 %21)
store i32 %22, i32* %6
%23 = load i32, i32* %6
%24 = sub nsw i32 %23, 1
store i32 %24, i32* %8
br label %25
25: ; preds = %34, %2
%26 = load i32, i32* %8
%27 = icmp sge i32 %26, 0
br i1 %27, label %28, label %37
28: ; preds = %25
%29 = load i32, i32* %8
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [102 x i32], [102 x i32]* %11, i64 0, i64 %30
%32 = load i32, i32* %31
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %32)
br label %34
34: ; preds = %28
%35 = load i32, i32* %8
%36 = add nsw i32 %35, -1
store i32 %36, i32* %8
br label %25
37: ; preds = %25
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca [102 x i32]
%5 = alloca [102 x [102 x i32]]
%6 = alloca [102 x i32]
%7 = bitcast i32* %3 to i8*
%8 = bitcast [102 x i32]* %4 to i8*
%9 = bitcast [102 x [102 x i32]]* %5 to i8*
%10 = bitcast [102 x i32]* %6 to i8*
%11 = bitcast [102 x [102 x i32]]* %5 to i32**
%12 = getelementptr inbounds [102 x i32], [102 x i32]* %4, i64 0, i64 0
%13 = call i32 @readArgs(i32** %11, i32* %12, i32* %3)
%14 = getelementptr inbounds [102 x i32], [102 x i32]* %6, i64 0, i64 0
%15 = load i32, i32* %3
%16 = call i32 @sumVeryLongIntegers(i32 %13, i32** %11, i32* %12, i32* %14, i32 %15)
%17 = icmp sgt i32 %16, 0
br i1 %17, label %18, label %28
18: ; preds = %2
%19 = zext i32 %16 to i64
br label %20
20: ; preds = %18, %20
%21 = phi i64 [ %19, %18 ], [ %22, %20 ]
%22 = add nsw i64 %21, -1
%23 = and i64 %22, 4294967295
%24 = getelementptr inbounds [102 x i32], [102 x i32]* %6, i64 0, i64 %23
%25 = load i32, i32* %24
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %25)
%27 = icmp ugt i64 %21, 1
br i1 %27, label %20, label %28
28: ; preds = %20, %2
%29 = call i32 @putchar(i32 10)
ret i32 0
}