#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*/ call_mul_digit_string(int, int const *, char const **,
                                         char const **);
int main() {
  const int scalars[4] = {9, 7, 1, 0};
  const char *numeric_input[4] = {
      "754151235910659819650094859444579397904775501126316133079539102183576565"
      "601857903910638092736618329585888468047088676834353011805388800000000000"
      "00000000000",
      "848420140399492297106356716875151822642872438767105649714481489956523636"
      "302090141899467854328695620784124526552974761438647138281062400000000000"
      "000000000000",
      "754151235910659819650094859444579397904775501126316133079539102183576565"
      "601857903910638092736618329585888468047088676834353011805388800000000000"
      "00000000000",
      "754151235910659819650094859444579397904775501126316133079539102183576565"
      "601857903910638092736618329585888468047088676834353011805388800000000000"
      "00000000000"};
  const char *numeric_output[4] = {
      "678736112319593837685085373500121458114297951013684519771585191965218909"
      "041672113519574283462956496627299621242379809150917710624849920000000000"
      "000000000000",
      "593894098279644607974449701812606275850010707136973954800137042969566545"
      "411463099329627498030086934548887168587082333007052996796743680000000000"
      "0000000000000",
      "754151235910659819650094859444579397904775501126316133079539102183576565"
      "601857903910638092736618329585888468047088676834353011805388800000000000"
      "00000000000",
      "0"};
  int i;
  for (i = 0; i < 4; ++i)
    call_mul_digit_string(i, scalars, numeric_input, numeric_output);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2ca4(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0x2ca1(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0x2c9e(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2c9b(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2c98(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0x2c95(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0x2c92(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0x2c8f(%rip),%rax
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x64(%rbp)
cmpl   $0x4,-0x64(%rbp)
jge    11c0 <main+0xb0>
mov    -0x64(%rbp),%edi
lea    -0x20(%rbp),%rsi
lea    -0x40(%rbp),%rdx
lea    -0x60(%rbp),%rcx
call   1030 <call_mul_digit_string@plt>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1194 <main+0x84>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x50,%rsp
movaps 0xee0(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0x2cc5(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0x2ca9(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0x2ccd(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0x2cb1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
mov    %rsp,%rbx
lea    0x30(%rsp),%r14
lea    0x10(%rsp),%r15
xor    %edi,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %r15,%rcx
call   1030 <call_mul_digit_string@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %r15,%rcx
call   1030 <call_mul_digit_string@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %r15,%rcx
call   1030 <call_mul_digit_string@plt>
mov    $0x3,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %r15,%rcx
call   1030 <call_mul_digit_string@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.scalars = [4 x i32] [i32 9, i32 7, i32 1, i32 0]
@.str = [156 x i8] c"75415123591065981965009485944457939790477550112631613307953910218357656560185790391063809273661832958588846804708867683435301180538880000000000000000000000\00"
@.str.1 = [157 x i8] c"848420140399492297106356716875151822642872438767105649714481489956523636302090141899467854328695620784124526552974761438647138281062400000000000000000000000\00"
@__const.main.numeric_input = [4 x i8*] [i8* getelementptr inbounds ([156 x i8], [156 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([156 x i8], [156 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([156 x i8], [156 x i8]* @.str, i32 0, i32 0)]
@.str.2 = [157 x i8] c"678736112319593837685085373500121458114297951013684519771585191965218909041672113519574283462956496627299621242379809150917710624849920000000000000000000000\00"
@.str.3 = [158 x i8] c"5938940982796446079744497018126062758500107071369739548001370429695665454114630993296274980300869345488871685870823330070529967967436800000000000000000000000\00"
@.str.4 = [2 x i8] c"0\00"
@__const.main.numeric_output = [4 x i8*] [i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([156 x i8], [156 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0)]
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i32]
%3 = alloca [4 x i8*]
%4 = alloca [4 x i8*]
%5 = alloca i32
store i32 0, i32* %1
%6 = bitcast [4 x i32]* %2 to i8*
%7 = bitcast [4 x i8*]* %3 to i8*
%8 = bitcast [4 x i8*]* %4 to i8*
store i32 0, i32* %5
br label %9
9: ; preds = %18, %0
%10 = load i32, i32* %5
%11 = icmp slt i32 %10, 4
br i1 %11, label %12, label %21
12: ; preds = %9
%13 = load i32, i32* %5
%14 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%15 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 0
%16 = getelementptr inbounds [4 x i8*], [4 x i8*]* %4, i64 0, i64 0
%17 = call i32 @call_mul_digit_string(i32 %13, i32* %14, i8** %15, i8** %16)
br label %18
18: ; preds = %12
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %9
21: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@__const.main.scalars = [4 x i32] [i32 9, i32 7, i32 1, i32 0]
@.str = [156 x i8] c"75415123591065981965009485944457939790477550112631613307953910218357656560185790391063809273661832958588846804708867683435301180538880000000000000000000000\00"
@.str.1 = [157 x i8] c"848420140399492297106356716875151822642872438767105649714481489956523636302090141899467854328695620784124526552974761438647138281062400000000000000000000000\00"
@__const.main.numeric_input = [4 x i8*] [i8* getelementptr inbounds ([156 x i8], [156 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([156 x i8], [156 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([156 x i8], [156 x i8]* @.str, i32 0, i32 0)]
@.str.2 = [157 x i8] c"678736112319593837685085373500121458114297951013684519771585191965218909041672113519574283462956496627299621242379809150917710624849920000000000000000000000\00"
@.str.3 = [158 x i8] c"5938940982796446079744497018126062758500107071369739548001370429695665454114630993296274980300869345488871685870823330070529967967436800000000000000000000000\00"
@.str.4 = [2 x i8] c"0\00"
@__const.main.numeric_output = [4 x i8*] [i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([156 x i8], [156 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0)]
define i32 @main() {
%1 = alloca [4 x i32]
%2 = alloca [4 x i8*]
%3 = alloca [4 x i8*]
%4 = bitcast [4 x i32]* %1 to i8*
%5 = bitcast [4 x i8*]* %2 to i8*
%6 = bitcast [4 x i8*]* %3 to i8*
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%8 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 0
%9 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 0
%10 = call i32 @call_mul_digit_string(i32 0, i32* %7, i8** %8, i8** %9)
%11 = call i32 @call_mul_digit_string(i32 1, i32* %7, i8** %8, i8** %9)
%12 = call i32 @call_mul_digit_string(i32 2, i32* %7, i8** %8, i8** %9)
%13 = call i32 @call_mul_digit_string(i32 3, i32* %7, i8** %8, i8** %9)
ret i32 0
}