#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 scalar_t__ time_t;

/* Variables and functions */
int /*<<< orphan*/ memset(char *, int, int);
int /*<<< orphan*/ printf(char *, char *, char *, char *);
int rand();
int /*<<< orphan*/ srand(unsigned int);
int /*<<< orphan*/ time(scalar_t__ *);
int main() {
  char n1[100 + 1] = {};
  char n2[100 + 1] = {};
  char m[100 + 2] = {};
  time_t t;
  int e = 0;
  int k = 100;
  int r = 0;
  time(&t);
  srand((unsigned int)t);
  memset(m, 0x20, 100 + 1);
  for (int i = 0; i < 100; i++) {
    n1[i] = (rand() % 9) + 0x30;
    n2[i] = (rand() % 9) + 0x30;
  }
  for (int i = 100 - 1; i >= 0; i--) {
    int a = n1[i] - 0x30, b = n2[i] - 0x30;
    int multi = a * b + r;
    e = multi % 10;
    r = multi / 10;
    m[k] = e + 0x30;
    --k;
  }
  if (r)
    m[k] = r + 0x30;
  printf("%101s\n%101s\n%101s\n", n1, n2, m);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x65,%edx
call   1040 <memset@plt>
lea    -0xe0(%rbp),%rdi
xor    %esi,%esi
mov    $0x65,%edx
call   1040 <memset@plt>
lea    -0x150(%rbp),%rdi
xor    %esi,%esi
mov    $0x66,%edx
call   1040 <memset@plt>
movl   $0x0,-0x15c(%rbp)
movl   $0x64,-0x160(%rbp)
movl   $0x0,-0x164(%rbp)
lea    -0x158(%rbp),%rdi
call   1060 <time@plt>
mov    -0x158(%rbp),%rax
mov    %eax,%edi
call   1050 <srand@plt>
lea    -0x150(%rbp),%rdi
mov    $0x20,%esi
mov    $0x65,%edx
call   1040 <memset@plt>
movl   $0x0,-0x168(%rbp)
cmpl   $0x64,-0x168(%rbp)
jge    1252 <main+0x102>
mov    $0x0,%al
call   1070 <rand@plt>
mov    $0x9,%ecx
cltd
idiv   %ecx
add    $0x30,%edx
mov    %dl,%cl
movslq -0x168(%rbp),%rax
mov    %cl,-0x70(%rbp,%rax,1)
mov    $0x0,%al
call   1070 <rand@plt>
mov    $0x9,%ecx
cltd
idiv   %ecx
add    $0x30,%edx
mov    %dl,%cl
movslq -0x168(%rbp),%rax
mov    %cl,-0xe0(%rbp,%rax,1)
mov    -0x168(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x168(%rbp)
jmp    11f0 <main+0xa0>
movl   $0x63,-0x16c(%rbp)
cmpl   $0x0,-0x16c(%rbp)
jl     1313 <main+0x1c3>
movslq -0x16c(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
sub    $0x30,%eax
mov    %eax,-0x170(%rbp)
movslq -0x16c(%rbp),%rax
movsbl -0xe0(%rbp,%rax,1),%eax
ff
sub    $0x30,%eax
mov    %eax,-0x174(%rbp)
mov    -0x170(%rbp),%eax
imul   -0x174(%rbp),%eax
add    -0x164(%rbp),%eax
mov    %eax,-0x178(%rbp)
mov    -0x178(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x15c(%rbp)
mov    -0x178(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x164(%rbp)
mov    -0x15c(%rbp),%eax
add    $0x30,%eax
mov    %al,%cl
movslq -0x160(%rbp),%rax
mov    %cl,-0x150(%rbp,%rax,1)
mov    -0x160(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x160(%rbp)
mov    -0x16c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x16c(%rbp)
jmp    125c <main+0x10c>
cmpl   $0x0,-0x164(%rbp)
je     1339 <main+0x1e9>
mov    -0x164(%rbp),%eax
add    $0x30,%eax
mov    %al,%cl
movslq -0x160(%rbp),%rax
mov    %cl,-0x150(%rbp,%rax,1)
lea    -0x70(%rbp),%rsi
lea    -0xe0(%rbp),%rdx
lea    -0x150(%rbp),%rcx
lea    0xcae(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x180,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x160,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x140(%rsp)
movaps %xmm0,0x130(%rsp)
movaps %xmm0,0x120(%rsp)
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0xf0(%rsp)
movq   $0x0,0x14d(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movq   $0x0,0xdd(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movq   $0x0,0x6e(%rsp)
lea    0x8(%rsp),%rdi
call   1060 <time@plt>
mov    0x8(%rsp),%edi
call   1050 <srand@plt>
lea    0x10(%rsp),%rdi
mov    $0x20,%esi
mov    $0x65,%edx
call   1040 <memset@plt>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x38e38e39,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,8),%ecx
sub    %ecx,%eax
add    $0x30,%al
mov    %al,0xf0(%rsp,%rbx,1)
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x38e38e39,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,8),%ecx
sub    %ecx,%eax
add    $0x30,%al
mov    %al,0x80(%rsp,%rbx,1)
add    $0x1,%rbx
cmp    $0x64,%rbx
jne    1230 <main+0xe0>
xor    %eax,%eax
mov    $0x64,%ecx
nopw   0x0(%rax,%rax,1)
movsbl 0xef(%rsp,%rcx,1),%esi
add    $0xffffffd0,%esi
movsbl 0x7f(%rsp,%rcx,1),%edx
add    $0xffffffd0,%edx
imul   %esi,%edx
add    %eax,%edx
movslq %edx,%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
add    $0x30,%sil
mov    %sil,0x10(%rsp,%rcx,1)
add    $0xffffffffffffffff,%rcx
jne    12a0 <main+0x150>
add    $0x9,%edx
cmp    $0x13,%edx
jb     12f4 <main+0x1a4>
add    $0x30,%al
mov    %al,0x10(%rsp)
lea    0xd05(%rip),%rdi
lea    0xf0(%rsp),%rsi
lea    0x80(%rsp),%rdx
lea    0x10(%rsp),%rcx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x160,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"%101s\0A%101s\0A%101s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [101 x i8]
%3 = alloca [101 x i8]
%4 = alloca [102 x i8]
%5 = alloca i64
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %1
%14 = bitcast [101 x i8]* %2 to i8*
%15 = bitcast [101 x i8]* %3 to i8*
%16 = bitcast [102 x i8]* %4 to i8*
store i32 0, i32* %6
store i32 100, i32* %7
store i32 0, i32* %8
%17 = call i32 @time(i64* %5)
%18 = load i64, i64* %5
%19 = trunc i64 %18 to i32
%20 = call i32 @srand(i32 %19)
%21 = getelementptr inbounds [102 x i8], [102 x i8]* %4, i64 0, i64 0
%22 = call i32 @memset(i8* %21, i32 32, i32 101)
store i32 0, i32* %9
br label %23
23: ; preds = %41, %0
%24 = load i32, i32* %9
%25 = icmp slt i32 %24, 100
br i1 %25, label %26, label %44
26: ; preds = %23
%27 = call i32 (...) @rand()
%28 = srem i32 %27, 9
%29 = add nsw i32 %28, 48
%30 = trunc i32 %29 to i8
%31 = load i32, i32* %9
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 %32
store i8 %30, i8* %33
%34 = call i32 (...) @rand()
%35 = srem i32 %34, 9
%36 = add nsw i32 %35, 48
%37 = trunc i32 %36 to i8
%38 = load i32, i32* %9
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [101 x i8], [101 x i8]* %3, i64 0, i64 %39
store i8 %37, i8* %40
br label %41
41: ; preds = %26
%42 = load i32, i32* %9
%43 = add nsw i32 %42, 1
store i32 %43, i32* %9
br label %23
44: ; preds = %23
store i32 99, i32* %10
br label %45
45: ; preds = %78, %44
%46 = load i32, i32* %10
%47 = icmp sge i32 %46, 0
br i1 %47, label %48, label %81
48: ; preds = %45
%49 = load i32, i32* %10
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 %50
%52 = load i8, i8* %51
%53 = sext i8 %52 to i32
%54 = sub nsw i32 %53, 48
store i32 %54, i32* %11
%55 = load i32, i32* %10
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [101 x i8], [101 x i8]* %3, i64 0, i64 %56
%58 = load i8, i8* %57
%59 = sext i8 %58 to i32
%60 = sub nsw i32 %59, 48
store i32 %60, i32* %12
%61 = load i32, i32* %11
%62 = load i32, i32* %12
%63 = mul nsw i32 %61, %62
%64 = load i32, i32* %8
%65 = add nsw i32 %63, %64
store i32 %65, i32* %13
%66 = load i32, i32* %13
%67 = srem i32 %66, 10
store i32 %67, i32* %6
%68 = load i32, i32* %13
%69 = sdiv i32 %68, 10
store i32 %69, i32* %8
%70 = load i32, i32* %6
%71 = add nsw i32 %70, 48
%72 = trunc i32 %71 to i8
%73 = load i32, i32* %7
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [102 x i8], [102 x i8]* %4, i64 0, i64 %74
store i8 %72, i8* %75
%76 = load i32, i32* %7
%77 = add nsw i32 %76, -1
store i32 %77, i32* %7
br label %78
78: ; preds = %48
%79 = load i32, i32* %10
%80 = add nsw i32 %79, -1
store i32 %80, i32* %10
br label %45
81: ; preds = %45
%82 = load i32, i32* %8
%83 = icmp ne i32 %82, 0
br i1 %83, label %84, label %91
84: ; preds = %81
%85 = load i32, i32* %8
%86 = add nsw i32 %85, 48
%87 = trunc i32 %86 to i8
%88 = load i32, i32* %7
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds [102 x i8], [102 x i8]* %4, i64 0, i64 %89
store i8 %87, i8* %90
br label %91
91: ; preds = %84, %81
%92 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 0
%93 = getelementptr inbounds [101 x i8], [101 x i8]* %3, i64 0, i64 0
%94 = getelementptr inbounds [102 x i8], [102 x i8]* %4, i64 0, i64 0
%95 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %92, i8* %93, i8* %94)
%96 = load i32, i32* %1
ret i32 %96
}

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