#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 call_add_digit_strings(int, char const **, char const **, char const **);
int main(int argc, char **argv) {
  const char *input1[2] = {
      "754151235910659819650094859444579397904775501126316133079539102183576565"
      "601857903910638092736618329585888468047088676834353011805388800000000000"
      "00000000000",
      "848420140399492297106356716875151822642872438767105649714481489956523636"
      "302090141899467854328695620784124526552974761438647138281062400000000000"
      "000000000000"};
  const char *input2[2] = {
      "848420140399492297106356716875151822642872438767105649714481489956523636"
      "302090141899467854328695620784124526552974761438647138281",
      "754151235910659819650094859444579397904775501126316133079539102183576565"
      "6018579039106380927366183295858884680470886768343530118053888",
  };
  const char *output[2] = {
      "754151235910659819650094867928780801899698472189883301831057328612300953"
      "272914401055452992301854692606789887041767220121309219646634065529747614"
      "38647138281",
      "848420140399492297106364258387510929241068939715700095508460537711534899"
      "463420937290489690094351639363163632933902127621942997165742870886768343"
      "530118053888"};
  int status = call_add_digit_strings(0, input1, input2, output);
  if (!status)
    status = call_add_digit_strings(1, input1, input2, output);
  return (status);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2cc3(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cc0(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2cbd(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2cba(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2cb7(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0x2cb4(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    -0x20(%rbp),%rsi
lea    -0x30(%rbp),%rdx
lea    -0x40(%rbp),%rcx
xor    %edi,%edi
call   1030 <call_add_digit_strings@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
jne    11a1 <main+0x91>
lea    -0x20(%rbp),%rsi
lea    -0x30(%rbp),%rdx
lea    -0x40(%rbp),%rcx
mov    $0x1,%edi
call   1030 <call_add_digit_strings@plt>
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
movaps 0x2cd5(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0x2cd9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0x2cdd(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x20(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    %rsp,%rcx
xor    %edi,%edi
call   1030 <call_add_digit_strings@plt>
test   %eax,%eax
je     1154 <main+0x44>
add    $0x38,%rsp
ret
lea    0x20(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    %rsp,%rcx
mov    $0x1,%edi
call   1030 <call_add_digit_strings@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
@.str = [156 x i8] c"75415123591065981965009485944457939790477550112631613307953910218357656560185790391063809273661832958588846804708867683435301180538880000000000000000000000\00"
@.str.1 = [157 x i8] c"848420140399492297106356716875151822642872438767105649714481489956523636302090141899467854328695620784124526552974761438647138281062400000000000000000000000\00"
@__const.main.input1 = [2 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)]
@.str.2 = [130 x i8] c"848420140399492297106356716875151822642872438767105649714481489956523636302090141899467854328695620784124526552974761438647138281\00"
@.str.3 = [134 x i8] c"7541512359106598196500948594445793979047755011263161330795391021835765656018579039106380927366183295858884680470886768343530118053888\00"
@__const.main.input2 = [2 x i8*] [i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.3, i32 0, i32 0)]
@.str.4 = [156 x i8] c"75415123591065981965009486792878080189969847218988330183105732861230095327291440105545299230185469260678988704176722012130921964663406552974761438647138281\00"
@.str.5 = [157 x i8] c"848420140399492297106364258387510929241068939715700095508460537711534899463420937290489690094351639363163632933902127621942997165742870886768343530118053888\00"
@__const.main.output = [2 x i8*] [i8* getelementptr inbounds ([156 x i8], [156 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str.5, i32 0, i32 0)]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [2 x i8*]
%7 = alloca [2 x i8*]
%8 = alloca [2 x i8*]
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = bitcast [2 x i8*]* %6 to i8*
%11 = bitcast [2 x i8*]* %7 to i8*
%12 = bitcast [2 x i8*]* %8 to i8*
%13 = getelementptr inbounds [2 x i8*], [2 x i8*]* %6, i64 0, i64 0
%14 = getelementptr inbounds [2 x i8*], [2 x i8*]* %7, i64 0, i64 0
%15 = getelementptr inbounds [2 x i8*], [2 x i8*]* %8, i64 0, i64 0
%16 = call i32 @call_add_digit_strings(i32 0, i8** %13, i8** %14, i8** %15)
store i32 %16, i32* %9
%17 = load i32, i32* %9
%18 = icmp ne i32 %17, 0
br i1 %18, label %24, label %19
19: ; preds = %2
%20 = getelementptr inbounds [2 x i8*], [2 x i8*]* %6, i64 0, i64 0
%21 = getelementptr inbounds [2 x i8*], [2 x i8*]* %7, i64 0, i64 0
%22 = getelementptr inbounds [2 x i8*], [2 x i8*]* %8, i64 0, i64 0
%23 = call i32 @call_add_digit_strings(i32 1, i8** %20, i8** %21, i8** %22)
store i32 %23, i32* %9
br label %24
24: ; preds = %19, %2
%25 = load i32, i32* %9
ret i32 %25
}

LLVM IR (-O2):
@.str = [156 x i8] c"75415123591065981965009485944457939790477550112631613307953910218357656560185790391063809273661832958588846804708867683435301180538880000000000000000000000\00"
@.str.1 = [157 x i8] c"848420140399492297106356716875151822642872438767105649714481489956523636302090141899467854328695620784124526552974761438647138281062400000000000000000000000\00"
@__const.main.input1 = [2 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)]
@.str.2 = [130 x i8] c"848420140399492297106356716875151822642872438767105649714481489956523636302090141899467854328695620784124526552974761438647138281\00"
@.str.3 = [134 x i8] c"7541512359106598196500948594445793979047755011263161330795391021835765656018579039106380927366183295858884680470886768343530118053888\00"
@__const.main.input2 = [2 x i8*] [i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.3, i32 0, i32 0)]
@.str.4 = [156 x i8] c"75415123591065981965009486792878080189969847218988330183105732861230095327291440105545299230185469260678988704176722012130921964663406552974761438647138281\00"
@.str.5 = [157 x i8] c"848420140399492297106364258387510929241068939715700095508460537711534899463420937290489690094351639363163632933902127621942997165742870886768343530118053888\00"
@__const.main.output = [2 x i8*] [i8* getelementptr inbounds ([156 x i8], [156 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str.5, i32 0, i32 0)]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [2 x i8*]
%4 = alloca [2 x i8*]
%5 = alloca [2 x i8*]
%6 = bitcast [2 x i8*]* %3 to i8*
%7 = bitcast [2 x i8*]* %4 to i8*
%8 = bitcast [2 x i8*]* %5 to i8*
%9 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 0
%10 = getelementptr inbounds [2 x i8*], [2 x i8*]* %4, i64 0, i64 0
%11 = getelementptr inbounds [2 x i8*], [2 x i8*]* %5, i64 0, i64 0
%12 = call i32 @call_add_digit_strings(i32 0, i8** %9, i8** %10, i8** %11)
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %2
%15 = call i32 @call_add_digit_strings(i32 1, i8** %9, i8** %10, i8** %11)
br label %16
16: ; preds = %14, %2
%17 = phi i32 [ %12, %2 ], [ %15, %14 ]
ret i32 %17
}