#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*/ primeFactorization(int, int *, int *, int *, int *, int *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char *argv[]) {
  int elements[10];
  int primes[1460], instancesCount[1460], primesUsed[1460];
  int maxPrimeDefined, primesUsedCount;
  int numberOfDivisors, loop;
  primes[0] = 2;
  primes[1] = 3;
  maxPrimeDefined = 1;
  primesUsedCount = 0;
  for (loop = 0; loop < 10; loop++) {
    scanf("%d", &elements[loop]);
    primeFactorization(elements[loop], primes, instancesCount, primesUsed,
                       &maxPrimeDefined, &primesUsedCount);
  }
  numberOfDivisors = 1;
  for (loop = 0; loop < primesUsedCount; loop++) {
    numberOfDivisors =
        numberOfDivisors * (instancesCount[primesUsed[loop]] + 1);
  }
  printf("%d\n", numberOfDivisors % 10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x44c0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2,-0x1710(%rbp)
movl   $0x3,-0x170c(%rbp)
movl   $0x1,-0x44b4(%rbp)
movl   $0x0,-0x44b8(%rbp)
movl   $0x0,-0x44c0(%rbp)
cmpl   $0xa,-0x44c0(%rbp)
jge    11ed <main+0xbd>
movslq -0x44c0(%rbp),%rax
lea    -0x40(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe5f(%rip),%rdi
call   1050 <scanf@plt>
movslq -0x44c0(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%edi
lea    -0x1710(%rbp),%rsi
lea    -0x2de0(%rbp),%rdx
lea    -0x44b0(%rbp),%rcx
lea    -0x44b4(%rbp),%r8
lea    -0x44b8(%rbp),%r9
call   1030 <primeFactorization@plt>
mov    -0x44c0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44c0(%rbp)
jmp    117b <main+0x4b>
movl   $0x1,-0x44bc(%rbp)
movl   $0x0,-0x44c0(%rbp)
mov    -0x44c0(%rbp),%eax
cmp    -0x44b8(%rbp),%eax
jge    124f <main+0x11f>
mov    -0x44bc(%rbp),%eax
movslq -0x44c0(%rbp),%rcx
movslq -0x44b0(%rbp,%rcx,4),%rcx
ff
mov    -0x2de0(%rbp,%rcx,4),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    %eax,-0x44bc(%rbp)
mov    -0x44c0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44c0(%rbp)
jmp    1201 <main+0xd1>
mov    -0x44bc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
lea    0xd9d(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x44c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x44b8,%rsp
movabs $0x300000002,%rax
mov    %rax,0x2de0(%rsp)
movl   $0x1,0x3c(%rsp)
movl   $0x0,0xc(%rsp)
lea    0xe96(%rip),%r14
lea    0x10(%rsp),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
mov    0x10(%rsp),%edi
lea    0x2de0(%rsp),%rbx
lea    0x1710(%rsp),%r15
lea    0x40(%rsp),%r12
lea    0x3c(%rsp),%r13
lea    0xc(%rsp),%rbp
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
mov    %r13,%r8
mov    %rbp,%r9
call   1030 <primeFactorization@plt>
lea    0x14(%rsp),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
mov    0x14(%rsp),%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
mov    %r13,%r8
mov    %rbp,%r9
call   1030 <primeFactorization@plt>
lea    0x18(%rsp),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
mov    0x18(%rsp),%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
mov    %r13,%r8
mov    %rbp,%r9
call   1030 <primeFactorization@plt>
lea    0x1c(%rsp),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
mov    0x1c(%rsp),%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
mov    %r13,%r8
mov    %rbp,%r9
call   1030 <primeFactorization@plt>
lea    0x20(%rsp),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
mov    0x20(%rsp),%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
mov    %r13,%r8
mov    %rbp,%r9
call   1030 <primeFactorization@plt>
lea    0x24(%rsp),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
mov    0x24(%rsp),%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
mov    %r13,%r8
mov    %rbp,%r9
call   1030 <primeFactorization@plt>
lea    0x28(%rsp),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
mov    0x28(%rsp),%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
mov    %r13,%r8
mov    %rbp,%r9
call   1030 <primeFactorization@plt>
lea    0x2c(%rsp),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
mov    0x2c(%rsp),%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
mov    %r13,%r8
mov    %rbp,%r9
call   1030 <primeFactorization@plt>
lea    0x30(%rsp),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
mov    0x30(%rsp),%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
mov    %r13,%r8
mov    %rbp,%r9
call   1030 <primeFactorization@plt>
lea    0x34(%rsp),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
mov    0x34(%rsp),%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
mov    %r13,%r8
mov    %rbp,%r9
call   1030 <primeFactorization@plt>
mov    0xc(%rsp),%edx
test   %edx,%edx
jle    131b <main+0x1eb>
lea    -0x1(%rdx),%rcx
mov    %edx,%eax
and    $0x3,%eax
cmp    $0x3,%rcx
jae    1325 <main+0x1f5>
mov    $0x1,%ecx
xor    %esi,%esi
jmp    1381 <main+0x251>
mov    $0x1,%esi
jmp    13c8 <main+0x298>
and    $0xfffffffc,%edx
mov    $0x1,%ecx
xor    %esi,%esi
nop
movslq 0x40(%rsp,%rsi,4),%rdi
mov    0x1710(%rsp,%rdi,4),%edi
add    $0x1,%edi
imul   %ecx,%edi
movslq 0x44(%rsp,%rsi,4),%rcx
mov    0x1710(%rsp,%rcx,4),%ecx
add    $0x1,%ecx
movslq 0x48(%rsp,%rsi,4),%rbp
mov    0x1710(%rsp,%rbp,4),%ebp
add    $0x1,%ebp
imul   %ecx,%ebp
imul   %edi,%ebp
movslq 0x4c(%rsp,%rsi,4),%rcx
mov    0x1710(%rsp,%rcx,4),%ecx
add    $0x1,%ecx
imul   %ebp,%ecx
add    $0x4,%rsi
cmp    %rsi,%rdx
jne    1330 <main+0x200>
test   %rax,%rax
je     13aa <main+0x27a>
lea    (%rsp,%rsi,4),%rdx
add    $0x40,%rdx
xor    %esi,%esi
movslq (%rdx,%rsi,4),%rdi
mov    0x1710(%rsp,%rdi,4),%edi
add    $0x1,%edi
imul   %edi,%ecx
add    $0x1,%rsi
cmp    %rsi,%rax
jne    1390 <main+0x260>
movslq %ecx,%rsi
imul   $0x66666667,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%esi
lea    0xc34(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x44b8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x i32]
%7 = alloca [1460 x i32]
%8 = alloca [1460 x i32]
%9 = alloca [1460 x i32]
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = getelementptr inbounds [1460 x i32], [1460 x i32]* %7, i64 0, i64 0
store i32 2, i32* %14
%15 = getelementptr inbounds [1460 x i32], [1460 x i32]* %7, i64 0, i64 1
store i32 3, i32* %15
store i32 1, i32* %10
store i32 0, i32* %11
store i32 0, i32* %13
br label %16
16: ; preds = %32, %2
%17 = load i32, i32* %13
%18 = icmp slt i32 %17, 10
br i1 %18, label %19, label %35
19: ; preds = %16
%20 = load i32, i32* %13
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 %21
%23 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %22)
%24 = load i32, i32* %13
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 %25
%27 = load i32, i32* %26
%28 = getelementptr inbounds [1460 x i32], [1460 x i32]* %7, i64 0, i64 0
%29 = getelementptr inbounds [1460 x i32], [1460 x i32]* %8, i64 0, i64 0
%30 = getelementptr inbounds [1460 x i32], [1460 x i32]* %9, i64 0, i64 0
%31 = call i32 @primeFactorization(i32 %27, i32* %28, i32* %29, i32* %30, i32* %10, i32* %11)
br label %32
32: ; preds = %19
%33 = load i32, i32* %13
%34 = add nsw i32 %33, 1
store i32 %34, i32* %13
br label %16
35: ; preds = %16
store i32 1, i32* %12
store i32 0, i32* %13
br label %36
36: ; preds = %51, %35
%37 = load i32, i32* %13
%38 = load i32, i32* %11
%39 = icmp slt i32 %37, %38
br i1 %39, label %40, label %54
40: ; preds = %36
%41 = load i32, i32* %12
%42 = load i32, i32* %13
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [1460 x i32], [1460 x i32]* %9, i64 0, i64 %43
%45 = load i32, i32* %44
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [1460 x i32], [1460 x i32]* %8, i64 0, i64 %46
%48 = load i32, i32* %47
%49 = add nsw i32 %48, 1
%50 = mul nsw i32 %41, %49
store i32 %50, i32* %12
br label %51
51: ; preds = %40
%52 = load i32, i32* %13
%53 = add nsw i32 %52, 1
store i32 %53, i32* %13
br label %36
54: ; preds = %36
%55 = load i32, i32* %12
%56 = srem i32 %55, 10
%57 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %56)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10 x i32]
%4 = alloca [1460 x i32]
%5 = alloca [1460 x i32]
%6 = alloca [1460 x i32]
%7 = alloca i32
%8 = alloca i32
%9 = bitcast [10 x i32]* %3 to i8*
%10 = bitcast [1460 x i32]* %4 to i8*
%11 = bitcast [1460 x i32]* %5 to i8*
%12 = bitcast [1460 x i32]* %6 to i8*
%13 = bitcast i32* %7 to i8*
%14 = bitcast i32* %8 to i8*
%15 = getelementptr inbounds [1460 x i32], [1460 x i32]* %4, i64 0, i64 0
store i32 2, i32* %15
%16 = getelementptr inbounds [1460 x i32], [1460 x i32]* %4, i64 0, i64 1
store i32 3, i32* %16
store i32 1, i32* %7
store i32 0, i32* %8
%17 = getelementptr inbounds [1460 x i32], [1460 x i32]* %5, i64 0, i64 0
%18 = getelementptr inbounds [1460 x i32], [1460 x i32]* %6, i64 0, i64 0
%19 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %19)
%21 = load i32, i32* %19
%22 = call i32 @primeFactorization(i32 %21, i32* %15, i32* %17, i32* %18, i32* %7, i32* %8)
%23 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 1
%24 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %23)
%25 = load i32, i32* %23
%26 = call i32 @primeFactorization(i32 %25, i32* %15, i32* %17, i32* %18, i32* %7, i32* %8)
%27 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 2
%28 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %27)
%29 = load i32, i32* %27
%30 = call i32 @primeFactorization(i32 %29, i32* %15, i32* %17, i32* %18, i32* %7, i32* %8)
%31 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 3
%32 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %31)
%33 = load i32, i32* %31
%34 = call i32 @primeFactorization(i32 %33, i32* %15, i32* %17, i32* %18, i32* %7, i32* %8)
%35 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 4
%36 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %35)
%37 = load i32, i32* %35
%38 = call i32 @primeFactorization(i32 %37, i32* %15, i32* %17, i32* %18, i32* %7, i32* %8)
%39 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 5
%40 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %39)
%41 = load i32, i32* %39
%42 = call i32 @primeFactorization(i32 %41, i32* %15, i32* %17, i32* %18, i32* %7, i32* %8)
%43 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 6
%44 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %43)
%45 = load i32, i32* %43
%46 = call i32 @primeFactorization(i32 %45, i32* %15, i32* %17, i32* %18, i32* %7, i32* %8)
%47 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 7
%48 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %47)
%49 = load i32, i32* %47
%50 = call i32 @primeFactorization(i32 %49, i32* %15, i32* %17, i32* %18, i32* %7, i32* %8)
%51 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 8
%52 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %51)
%53 = load i32, i32* %51
%54 = call i32 @primeFactorization(i32 %53, i32* %15, i32* %17, i32* %18, i32* %7, i32* %8)
%55 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 9
%56 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %55)
%57 = load i32, i32* %55
%58 = call i32 @primeFactorization(i32 %57, i32* %15, i32* %17, i32* %18, i32* %7, i32* %8)
%59 = load i32, i32* %8
%60 = icmp sgt i32 %59, 0
br i1 %60, label %61, label %128
61: ; preds = %2
%62 = zext i32 %59 to i64
%63 = add nsw i64 %62, -1
%64 = and i64 %62, 3
%65 = icmp ult i64 %63, 3
br i1 %65, label %106, label %66
66: ; preds = %61
%67 = and i64 %62, 4294967292
br label %68
68: ; preds = %68, %66
%69 = phi i64 [ 0, %66 ], [ %103, %68 ]
%70 = phi i32 [ 1, %66 ], [ %102, %68 ]
%71 = phi i64 [ 0, %66 ], [ %104, %68 ]
%72 = getelementptr inbounds [1460 x i32], [1460 x i32]* %6, i64 0, i64 %69
%73 = load i32, i32* %72
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [1460 x i32], [1460 x i32]* %5, i64 0, i64 %74
%76 = load i32, i32* %75
%77 = add nsw i32 %76, 1
%78 = mul nsw i32 %77, %70
%79 = or i64 %69, 1
%80 = getelementptr inbounds [1460 x i32], [1460 x i32]* %6, i64 0, i64 %79
%81 = load i32, i32* %80
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [1460 x i32], [1460 x i32]* %5, i64 0, i64 %82
%84 = load i32, i32* %83
%85 = add nsw i32 %84, 1
%86 = mul nsw i32 %85, %78
%87 = or i64 %69, 2
%88 = getelementptr inbounds [1460 x i32], [1460 x i32]* %6, i64 0, i64 %87
%89 = load i32, i32* %88
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [1460 x i32], [1460 x i32]* %5, i64 0, i64 %90
%92 = load i32, i32* %91
%93 = add nsw i32 %92, 1
%94 = mul nsw i32 %93, %86
%95 = or i64 %69, 3
%96 = getelementptr inbounds [1460 x i32], [1460 x i32]* %6, i64 0, i64 %95
%97 = load i32, i32* %96
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds [1460 x i32], [1460 x i32]* %5, i64 0, i64 %98
%100 = load i32, i32* %99
%101 = add nsw i32 %100, 1
%102 = mul nsw i32 %101, %94
%103 = add nuw nsw i64 %69, 4
%104 = add i64 %71, 4
%105 = icmp eq i64 %104, %67
br i1 %105, label %106, label %68
106: ; preds = %68, %61
%107 = phi i32 [ undef, %61 ], [ %102, %68 ]
%108 = phi i64 [ 0, %61 ], [ %103, %68 ]
%109 = phi i32 [ 1, %61 ], [ %102, %68 ]
%110 = icmp eq i64 %64, 0
br i1 %110, label %125, label %111
111: ; preds = %106, %111
%112 = phi i64 [ %122, %111 ], [ %108, %106 ]
%113 = phi i32 [ %121, %111 ], [ %109, %106 ]
%114 = phi i64 [ %123, %111 ], [ 0, %106 ]
%115 = getelementptr inbounds [1460 x i32], [1460 x i32]* %6, i64 0, i64 %112
%116 = load i32, i32* %115
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds [1460 x i32], [1460 x i32]* %5, i64 0, i64 %117
%119 = load i32, i32* %118
%120 = add nsw i32 %119, 1
%121 = mul nsw i32 %120, %113
%122 = add nuw nsw i64 %112, 1
%123 = add i64 %114, 1
%124 = icmp eq i64 %123, %64
br i1 %124, label %125, label %111
125: ; preds = %111, %106
%126 = phi i32 [ %107, %106 ], [ %121, %111 ]
%127 = srem i32 %126, 10
br label %128
128: ; preds = %125, %2
%129 = phi i32 [ 1, %2 ], [ %127, %125 ]
%130 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %129)
ret i32 0
}