#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, ...);
int *multiply(int *, int, int *, int);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  if (argc != 3) {
    printf("Usage- %s <number1> <number2>\n", argv[0]);
    exit(0);
  }
  FILE *file1;
  FILE *file2;
  int c1, c2, d1, d2;
  file1 = fopen(argv[1], "r");
  file2 = fopen(argv[2], "r");
  fscanf(file1, "%d\n", &d1);
  fscanf(file2, "%d\n", &d2);
  printf("Length of the first number- %d\n", d1);
  printf("Length of the second number- %d\n", d2);
  if (d1 < d2) {
    c1 = d2;
    c2 = d2;
  } else {
    c2 = d1;
    c1 = d1;
  }
  int n1[c1], n2[c2], i;
  printf("Number1- \t");
  for (i = 0; i < c1; i++) {
    if (i >= c1 - d1) {
      char c;
      fscanf(file1, "%c", &c);
      n1[i] = (int)(c - '0');
      printf("%d", n1[i]);
    } else {
      n1[i] = 0;
    }
  }
  printf("\n");
  printf("Number2- \t");
  for (i = 0; i < c2; i++) {
    if (i >= c2 - d2) {
      char c;
      fscanf(file2, "%c", &c);
      n2[i] = (int)(c - '0');
      printf("%d", n2[i]);
    } else {
      n2[i] = 0;
    }
  }
  printf("\n");
  int c = c1 + 1;
  int n[c];
  for (i = 0; i < c; i++) {
    n[i] = 0;
  }
  for (i = c - 1; i >= 0; i--) {
    int sum = n[i] + n1[i - 1] + n2[i - 1];
    n[i] = sum % 10;
    n[i - 1] = sum / 10;
  }
  printf("Sum-\t");
  for (i = 0; i < c; i++) {
    printf("%d", n[i]);
  }
  printf("\n");
  int *n3 = multiply(n1, c1, n2, c2);
  c = c1 + c2;
  printf("Product-\t");
  for (i = 0; i < c; i++) {
    printf("%d", *(n3 + i));
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     118f <main+0x3f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe81(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe69(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe94(%rip),%rsi
lea    -0x2c(%rbp),%rdx
mov    $0x0,%al
call   1050 <fscanf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe7e(%rip),%rsi
lea    -0x30(%rbp),%rdx
mov    $0x0,%al
call   1050 <fscanf@plt>
mov    -0x2c(%rbp),%esi
lea    0xe2c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%esi
lea    0xe3b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x2c(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    122a <main+0xda>
mov    -0x30(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x30(%rbp),%eax
mov    %eax,-0x28(%rbp)
jmp    1236 <main+0xe6>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x38(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x80(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x40(%rbp)
mov    -0x28(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x78(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x48(%rbp)
lea    0xdde(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1313 <main+0x1c3>
mov    -0x4c(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    -0x2c(%rbp),%ecx
cmp    %ecx,%eax
jl     12f1 <main+0x1a1>
mov    -0x18(%rbp),%rdi
lea    0xdb3(%rip),%rsi
lea    -0x4d(%rbp),%rdx
mov    $0x0,%al
call   1050 <fscanf@plt>
mov    -0x80(%rbp),%rax
movsbl -0x4d(%rbp),%edx
sub    $0x30,%edx
movslq -0x4c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xd8b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1300 <main+0x1b0>
mov    -0x80(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
jmp    1305 <main+0x1b5>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1292 <main+0x142>
lea    0xd03(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd4b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    13b7 <main+0x267>
mov    -0x4c(%rbp),%eax
mov    -0x28(%rbp),%ecx
sub    -0x30(%rbp),%ecx
cmp    %ecx,%eax
jl     1395 <main+0x245>
mov    -0x20(%rbp),%rdi
lea    0xd0f(%rip),%rsi
lea    -0x4e(%rbp),%rdx
mov    $0x0,%al
call   1050 <fscanf@plt>
mov    -0x78(%rbp),%rax
movsbl -0x4e(%rbp),%edx
sub    $0x30,%edx
movslq -0x4c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xce7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13a4 <main+0x254>
mov    -0x78(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
jmp    13a9 <main+0x259>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1336 <main+0x1e6>
lea    0xc5f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x88(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    1424 <main+0x2d4>
mov    -0x88(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    13f8 <main+0x2a8>
mov    -0x54(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4c(%rbp)
cmpl   $0x0,-0x4c(%rbp)
jl     14af <main+0x35f>
mov    -0x88(%rbp),%rax
mov    -0x78(%rbp),%rcx
mov    -0x80(%rbp),%rdx
movslq -0x4c(%rbp),%rsi
mov    (%rax,%rsi,4),%eax
mov    -0x4c(%rbp),%esi
sub    $0x1,%esi
movslq %esi,%rsi
add    (%rdx,%rsi,4),%eax
mov    -0x4c(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
add    (%rcx,%rdx,4),%eax
mov    %eax,-0x64(%rbp)
mov    -0x64(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x88(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x64(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
mov    -0x88(%rbp),%rax
mov    -0x4c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x4c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4c(%rbp)
jmp    142d <main+0x2dd>
lea    0xbc8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    14fa <main+0x3aa>
mov    -0x88(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xb8b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    14c4 <main+0x374>
lea    0xb1c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x80(%rbp),%rdi
mov    -0x78(%rbp),%rdx
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%ecx
call   1030 <multiply@plt>
mov    %rax,-0x70(%rbp)
mov    -0x24(%rbp),%eax
add    -0x28(%rbp),%eax
mov    %eax,-0x54(%rbp)
lea    0xb55(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    1570 <main+0x420>
mov    -0x70(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xb15(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    153d <main+0x3ed>
lea    0xaa6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%rbx
cmp    $0x3,%edi
jne    1496 <main+0x326>
mov    0x8(%rbx),%rdi
lea    0xe87(%rip),%r14
mov    %r14,%rsi
call   1080 <fopen@plt>
mov    %rax,%r13
mov    0x10(%rbx),%rdi
mov    %r14,%rsi
call   1080 <fopen@plt>
mov    %rax,%rbx
lea    0xea5(%rip),%r14
lea    -0x34(%rbp),%rdx
mov    %r13,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <fscanf@plt>
lea    -0x30(%rbp),%rdx
mov    %rbx,-0x50(%rbp)
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <fscanf@plt>
mov    -0x34(%rbp),%esi
lea    0xe38(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    -0x30(%rbp),%esi
lea    0xe47(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rsp,-0x48(%rbp)
mov    -0x34(%rbp),%r12d
mov    -0x30(%rbp),%eax
cmp    %eax,%r12d
cmovl  %eax,%r12d
lea    0xf(,%r12,4),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%r14
sub    %rax,%r14
mov    %r14,%rsp
mov    %rsp,%r15
sub    %rax,%r15
mov    %r15,%rsp
lea    0xe2a(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r12d,%r12d
jle    131d <main+0x1ad>
xor    %ebx,%ebx
jmp    1261 <main+0xf1>
nopl   0x0(%rax)
movl   $0x0,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r12
je     12a0 <main+0x130>
movslq -0x34(%rbp),%rax
movslq %r12d,%rcx
sub    %rax,%rcx
cmp    %rcx,%rbx
jl     1250 <main+0xe0>
mov    %r13,%rdi
lea    0xdf3(%rip),%rsi
lea    -0x2a(%rbp),%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
movsbl -0x2a(%rbp),%esi
add    $0xffffffd0,%esi
mov    %esi,(%r14,%rbx,4)
lea    0xdd9(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1258 <main+0xe8>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xdc2(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r12d,%r12d
jle    1335 <main+0x1c5>
lea    0xdac(%rip),%r13
xor    %ebx,%ebx
jmp    12e1 <main+0x171>
nopl   0x0(%rax,%rax,1)
movl   $0x0,(%r15,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r12
je     1335 <main+0x1c5>
movslq -0x30(%rbp),%rax
movslq %r12d,%rcx
sub    %rax,%rcx
cmp    %rcx,%rbx
jl     12d0 <main+0x160>
mov    -0x50(%rbp),%rdi
lea    0xd72(%rip),%rsi
lea    -0x29(%rbp),%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
movsbl -0x29(%rbp),%esi
add    $0xffffffd0,%esi
mov    %esi,(%r15,%rbx,4)
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    12d8 <main+0x168>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xd45(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%r12),%r13d
mov    %rsp,%rbx
lea    0xf(,%r13,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
test   %r12d,%r12d
mov    %r15,-0x40(%rbp)
js     13fd <main+0x28d>
lea    0x4(,%r12,4),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1060 <memset@plt>
mov    (%rbx,%r12,4),%eax
mov    %r12,%rdx
mov    %r12,%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    -0x4(%r14,%rdx,4),%eax
add    -0x4(%r15,%rdx,4),%eax
movslq %eax,%rsi
imul   $0x66666667,%rsi,%rax
mov    %rax,%rdi
shr    $0x3f,%rdi
sar    $0x22,%rax
add    %edi,%eax
lea    (%rax,%rax,1),%edi
lea    (%rdi,%rdi,4),%edi
sub    %edi,%esi
mov    %esi,(%rbx,%rdx,4)
mov    %eax,-0x4(%rbx,%rdx,4)
add    $0xffffffffffffffff,%rcx
mov    %rcx,%rdx
jb     1390 <main+0x220>
lea    0xcae(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r12d,%r12d
js     140b <main+0x29b>
xor    %r15d,%r15d
nop
mov    (%rbx,%r15,4),%esi
lea    0xc85(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%r15
cmp    %r15,%r13
jne    13e0 <main+0x270>
jmp    140b <main+0x29b>
lea    0xc7a(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
mov    %r12d,%esi
mov    -0x40(%rbp),%rdx
mov    %r12d,%ecx
call   1040 <multiply@plt>
mov    %rax,%r15
lea    0xc53(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r12d,%r12d
jle    1477 <main+0x307>
lea    (%r12,%r12,1),%eax
cmp    $0x2,%eax
mov    $0x1,%r12d
cmovge %eax,%r12d
lea    0xc1b(%rip),%r14
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1460 <main+0x2f0>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x48(%rbp),%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    (%rbx),%rsi
lea    0xb60(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %edi,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"Usage- %s <number1> <number2>\0A\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [4 x i8] c"%d\0A\00"
@.str.3 = [32 x i8] c"Length of the first number- %d\0A\00"
@.str.4 = [33 x i8] c"Length of the second number- %d\0A\00"
@.str.5 = [11 x i8] c"Number1- \09\00"
@.str.6 = [3 x i8] c"%c\00"
@.str.7 = [3 x i8] c"%d\00"
@.str.8 = [2 x i8] c"\0A\00"
@.str.9 = [11 x i8] c"Number2- \09\00"
@.str.10 = [6 x i8] c"Sum-\09\00"
@.str.11 = [10 x i8] c"Product-\09\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 i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i64
%15 = alloca i32
%16 = alloca i8
%17 = alloca i8
%18 = alloca i32
%19 = alloca i64
%20 = alloca i32
%21 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%22 = load i32, i32* %4
%23 = icmp ne i32 %22, 3
br i1 %23, label %24, label %30
24: ; preds = %2
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 0
%27 = load i8*, i8** %26
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %27)
%29 = call i32 @exit(i32 0)
unreachable
30: ; preds = %2
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 1
%33 = load i8*, i8** %32
%34 = call i32* @fopen(i8* %33, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %34, i32** %6
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 2
%37 = load i8*, i8** %36
%38 = call i32* @fopen(i8* %37, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %38, i32** %7
%39 = load i32*, i32** %6
%40 = call i32 (i32*, i8*, ...) @fscanf(i32* %39, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %10)
%41 = load i32*, i32** %7
%42 = call i32 (i32*, i8*, ...) @fscanf(i32* %41, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %11)
%43 = load i32, i32* %10
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 %43)
%45 = load i32, i32* %11
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i32 %45)
%47 = load i32, i32* %10
%48 = load i32, i32* %11
%49 = icmp slt i32 %47, %48
br i1 %49, label %50, label %53
50: ; preds = %30
%51 = load i32, i32* %11
store i32 %51, i32* %8
%52 = load i32, i32* %11
store i32 %52, i32* %9
br label %56
53: ; preds = %30
%54 = load i32, i32* %10
store i32 %54, i32* %9
%55 = load i32, i32* %10
store i32 %55, i32* %8
br label %56
56: ; preds = %53, %50
%57 = load i32, i32* %8
%58 = zext i32 %57 to i64
%59 = call i8* @llvm.stacksave()
store i8* %59, i8** %12
%60 = alloca i32, i64 %58
store i64 %58, i64* %13
%61 = load i32, i32* %9
%62 = zext i32 %61 to i64
%63 = alloca i32, i64 %62
store i64 %62, i64* %14
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %15
br label %65
65: ; preds = %94, %56
%66 = load i32, i32* %15
%67 = load i32, i32* %8
%68 = icmp slt i32 %66, %67
br i1 %68, label %69, label %97
69: ; preds = %65
%70 = load i32, i32* %15
%71 = load i32, i32* %8
%72 = load i32, i32* %10
%73 = sub nsw i32 %71, %72
%74 = icmp sge i32 %70, %73
br i1 %74, label %75, label %89
75: ; preds = %69
%76 = load i32*, i32** %6
%77 = call i32 (i32*, i8*, ...) @fscanf(i32* %76, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %16)
%78 = load i8, i8* %16
%79 = sext i8 %78 to i32
%80 = sub nsw i32 %79, 48
%81 = load i32, i32* %15
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds i32, i32* %60, i64 %82
store i32 %80, i32* %83
%84 = load i32, i32* %15
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds i32, i32* %60, i64 %85
%87 = load i32, i32* %86
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 %87)
br label %93
89: ; preds = %69
%90 = load i32, i32* %15
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds i32, i32* %60, i64 %91
store i32 0, i32* %92
br label %93
93: ; preds = %89, %75
br label %94
94: ; preds = %93
%95 = load i32, i32* %15
%96 = add nsw i32 %95, 1
store i32 %96, i32* %15
br label %65
97: ; preds = %65
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0))
store i32 0, i32* %15
br label %100
100: ; preds = %129, %97
%101 = load i32, i32* %15
%102 = load i32, i32* %9
%103 = icmp slt i32 %101, %102
br i1 %103, label %104, label %132
104: ; preds = %100
%105 = load i32, i32* %15
%106 = load i32, i32* %9
%107 = load i32, i32* %11
%108 = sub nsw i32 %106, %107
%109 = icmp sge i32 %105, %108
br i1 %109, label %110, label %124
110: ; preds = %104
%111 = load i32*, i32** %7
%112 = call i32 (i32*, i8*, ...) @fscanf(i32* %111, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %17)
%113 = load i8, i8* %17
%114 = sext i8 %113 to i32
%115 = sub nsw i32 %114, 48
%116 = load i32, i32* %15
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds i32, i32* %63, i64 %117
store i32 %115, i32* %118
%119 = load i32, i32* %15
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds i32, i32* %63, i64 %120
%122 = load i32, i32* %121
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 %122)
br label %128
124: ; preds = %104
%125 = load i32, i32* %15
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds i32, i32* %63, i64 %126
store i32 0, i32* %127
br label %128
128: ; preds = %124, %110
br label %129
129: ; preds = %128
%130 = load i32, i32* %15
%131 = add nsw i32 %130, 1
store i32 %131, i32* %15
br label %100
132: ; preds = %100
%133 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%134 = load i32, i32* %8
%135 = add nsw i32 %134, 1
store i32 %135, i32* %18
%136 = load i32, i32* %18
%137 = zext i32 %136 to i64
%138 = alloca i32, i64 %137
store i64 %137, i64* %19
store i32 0, i32* %15
br label %139
139: ; preds = %147, %132
%140 = load i32, i32* %15
%141 = load i32, i32* %18
%142 = icmp slt i32 %140, %141
br i1 %142, label %143, label %150
143: ; preds = %139
%144 = load i32, i32* %15
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds i32, i32* %138, i64 %145
store i32 0, i32* %146
br label %147
147: ; preds = %143
%148 = load i32, i32* %15
%149 = add nsw i32 %148, 1
store i32 %149, i32* %15
br label %139
150: ; preds = %139
%151 = load i32, i32* %18
%152 = sub nsw i32 %151, 1
store i32 %152, i32* %15
br label %153
153: ; preds = %184, %150
%154 = load i32, i32* %15
%155 = icmp sge i32 %154, 0
br i1 %155, label %156, label %187
156: ; preds = %153
%157 = load i32, i32* %15
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds i32, i32* %138, i64 %158
%160 = load i32, i32* %159
%161 = load i32, i32* %15
%162 = sub nsw i32 %161, 1
%163 = sext i32 %162 to i64
%164 = getelementptr inbounds i32, i32* %60, i64 %163
%165 = load i32, i32* %164
%166 = add nsw i32 %160, %165
%167 = load i32, i32* %15
%168 = sub nsw i32 %167, 1
%169 = sext i32 %168 to i64
%170 = getelementptr inbounds i32, i32* %63, i64 %169
%171 = load i32, i32* %170
%172 = add nsw i32 %166, %171
store i32 %172, i32* %20
%173 = load i32, i32* %20
%174 = srem i32 %173, 10
%175 = load i32, i32* %15
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds i32, i32* %138, i64 %176
store i32 %174, i32* %177
%178 = load i32, i32* %20
%179 = sdiv i32 %178, 10
%180 = load i32, i32* %15
%181 = sub nsw i32 %180, 1
%182 = sext i32 %181 to i64
%183 = getelementptr inbounds i32, i32* %138, i64 %182
store i32 %179, i32* %183
br label %184
184: ; preds = %156
%185 = load i32, i32* %15
%186 = add nsw i32 %185, -1
store i32 %186, i32* %15
br label %153
187: ; preds = %153
%188 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
store i32 0, i32* %15
br label %189
189: ; preds = %199, %187
%190 = load i32, i32* %15
%191 = load i32, i32* %18
%192 = icmp slt i32 %190, %191
br i1 %192, label %193, label %202
193: ; preds = %189
%194 = load i32, i32* %15
%195 = sext i32 %194 to i64
%196 = getelementptr inbounds i32, i32* %138, i64 %195
%197 = load i32, i32* %196
%198 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 %197)
br label %199
199: ; preds = %193
%200 = load i32, i32* %15
%201 = add nsw i32 %200, 1
store i32 %201, i32* %15
br label %189
202: ; preds = %189
%203 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%204 = load i32, i32* %8
%205 = load i32, i32* %9
%206 = call i32* @multiply(i32* %60, i32 %204, i32* %63, i32 %205)
store i32* %206, i32** %21
%207 = load i32, i32* %8
%208 = load i32, i32* %9
%209 = add nsw i32 %207, %208
store i32 %209, i32* %18
%210 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0))
store i32 0, i32* %15
br label %211
211: ; preds = %222, %202
%212 = load i32, i32* %15
%213 = load i32, i32* %18
%214 = icmp slt i32 %212, %213
br i1 %214, label %215, label %225
215: ; preds = %211
%216 = load i32*, i32** %21
%217 = load i32, i32* %15
%218 = sext i32 %217 to i64
%219 = getelementptr inbounds i32, i32* %216, i64 %218
%220 = load i32, i32* %219
%221 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 %220)
br label %222
222: ; preds = %215
%223 = load i32, i32* %15
%224 = add nsw i32 %223, 1
store i32 %224, i32* %15
br label %211
225: ; preds = %211
%226 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %3
%227 = load i8*, i8** %12
%228 = load i32, i32* %3
ret i32 %228
}

LLVM IR (-O2):
@.str = [31 x i8] c"Usage- %s <number1> <number2>\0A\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [4 x i8] c"%d\0A\00"
@.str.3 = [32 x i8] c"Length of the first number- %d\0A\00"
@.str.4 = [33 x i8] c"Length of the second number- %d\0A\00"
@.str.5 = [11 x i8] c"Number1- \09\00"
@.str.6 = [3 x i8] c"%c\00"
@.str.7 = [3 x i8] c"%d\00"
@.str.9 = [11 x i8] c"Number2- \09\00"
@.str.10 = [6 x i8] c"Sum-\09\00"
@.str.11 = [10 x i8] c"Product-\09\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
%6 = alloca i8
%7 = icmp eq i32 %0, 3
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = load i8*, i8** %1
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = tail call i32 @exit(i32 0)
unreachable
12: ; preds = %2
%13 = bitcast i32* %3 to i8*
%14 = bitcast i32* %4 to i8*
%15 = getelementptr inbounds i8*, i8** %1, i64 1
%16 = load i8*, i8** %15
%17 = tail call i32* @fopen(i8* %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%18 = getelementptr inbounds i8*, i8** %1, i64 2
%19 = load i8*, i8** %18
%20 = tail call i32* @fopen(i8* %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%21 = call i32 (i32*, i8*, ...) @fscanf(i32* %17, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%22 = call i32 (i32*, i8*, ...) @fscanf(i32* %20, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%23 = load i32, i32* %3
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 %23)
%25 = load i32, i32* %4
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i32 %25)
%27 = load i32, i32* %3
%28 = load i32, i32* %4
%29 = icmp slt i32 %27, %28
%30 = select i1 %29, i32 %28, i32 %27
%31 = zext i32 %30 to i64
%32 = call i8* @llvm.stacksave()
%33 = alloca i32, i64 %31
%34 = alloca i32, i64 %31
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%36 = icmp sgt i32 %30, 0
br i1 %36, label %37, label %76
37: ; preds = %12, %52
%38 = phi i64 [ %53, %52 ], [ 0, %12 ]
%39 = load i32, i32* %3
%40 = sub nsw i32 %30, %39
%41 = sext i32 %40 to i64
%42 = icmp slt i64 %38, %41
br i1 %42, label %50, label %43
43: ; preds = %37
%44 = call i32 (i32*, i8*, ...) @fscanf(i32* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %5)
%45 = load i8, i8* %5
%46 = sext i8 %45 to i32
%47 = add nsw i32 %46, -48
%48 = getelementptr inbounds i32, i32* %33, i64 %38
store i32 %47, i32* %48
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 %47)
br label %52
50: ; preds = %37
%51 = getelementptr inbounds i32, i32* %33, i64 %38
store i32 0, i32* %51
br label %52
52: ; preds = %43, %50
%53 = add nuw nsw i64 %38, 1
%54 = icmp eq i64 %53, %31
br i1 %54, label %55, label %37
55: ; preds = %52
%56 = call i32 @putchar(i32 10)
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0))
br i1 %36, label %58, label %79
58: ; preds = %55, %73
%59 = phi i64 [ %74, %73 ], [ 0, %55 ]
%60 = load i32, i32* %4
%61 = sub nsw i32 %30, %60
%62 = sext i32 %61 to i64
%63 = icmp slt i64 %59, %62
br i1 %63, label %71, label %64
64: ; preds = %58
%65 = call i32 (i32*, i8*, ...) @fscanf(i32* %20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %6)
%66 = load i8, i8* %6
%67 = sext i8 %66 to i32
%68 = add nsw i32 %67, -48
%69 = getelementptr inbounds i32, i32* %34, i64 %59
store i32 %68, i32* %69
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 %68)
br label %73
71: ; preds = %58
%72 = getelementptr inbounds i32, i32* %34, i64 %59
store i32 0, i32* %72
br label %73
73: ; preds = %64, %71
%74 = add nuw nsw i64 %59, 1
%75 = icmp eq i64 %74, %31
br i1 %75, label %79, label %58
76: ; preds = %12
%77 = call i32 @putchar(i32 10)
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0))
br label %79
79: ; preds = %73, %76, %55
%80 = call i32 @putchar(i32 10)
%81 = add i32 %30, 1
%82 = zext i32 %81 to i64
%83 = alloca i32, i64 %82
%84 = icmp slt i32 %30, 0
br i1 %84, label %85, label %87
85: ; preds = %79
%86 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
br label %118
87: ; preds = %79
%88 = bitcast i32* %83 to i8*
%89 = shl nuw nsw i64 %31, 2
%90 = add nuw nsw i64 %89, 4
%91 = zext i32 %30 to i64
%92 = getelementptr inbounds i32, i32* %83, i64 %91
%93 = load i32, i32* %92
br label %94
94: ; preds = %87, %94
%95 = phi i32 [ %93, %87 ], [ %106, %94 ]
%96 = phi i64 [ %91, %87 ], [ %98, %94 ]
%97 = getelementptr inbounds i32, i32* %83, i64 %96
%98 = add nsw i64 %96, -1
%99 = getelementptr inbounds i32, i32* %33, i64 %98
%100 = load i32, i32* %99
%101 = add nsw i32 %100, %95
%102 = getelementptr inbounds i32, i32* %34, i64 %98
%103 = load i32, i32* %102
%104 = add nsw i32 %101, %103
%105 = srem i32 %104, 10
store i32 %105, i32* %97
%106 = sdiv i32 %104, 10
%107 = getelementptr inbounds i32, i32* %83, i64 %98
store i32 %106, i32* %107
%108 = icmp eq i64 %96, 0
br i1 %108, label %109, label %94
109: ; preds = %94
%110 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
br i1 %84, label %118, label %111
111: ; preds = %109, %111
%112 = phi i64 [ %116, %111 ], [ 0, %109 ]
%113 = getelementptr inbounds i32, i32* %83, i64 %112
%114 = load i32, i32* %113
%115 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 %114)
%116 = add nuw nsw i64 %112, 1
%117 = icmp eq i64 %116, %82
br i1 %117, label %118, label %111
118: ; preds = %111, %85, %109
%119 = call i32 @putchar(i32 10)
%120 = call i32* @multiply(i32* %33, i32 %30, i32* %34, i32 %30)
%121 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0))
br i1 %36, label %122, label %133
122: ; preds = %118
%123 = shl nuw i32 %30, 1
%124 = call i32 @llvm.smax.i32(i32 %123, i32 1)
%125 = zext i32 %124 to i64
br label %126
126: ; preds = %122, %126
%127 = phi i64 [ 0, %122 ], [ %131, %126 ]
%128 = getelementptr inbounds i32, i32* %120, i64 %127
%129 = load i32, i32* %128
%130 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 %129)
%131 = add nuw nsw i64 %127, 1
%132 = icmp eq i64 %131, %125
br i1 %132, label %133, label %126
133: ; preds = %126, %118
%134 = call i32 @putchar(i32 10)
ret i32 0
}