#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*/ asciiNumAdd_aDecimal(char, char, char *, char *, char);
void ascStrAdd(char *a, char *b, char *sum) {
  int i;
  char Lcarry = 0x30;
  for (i = 63; i >= 0; i--) {
    asciiNumAdd_aDecimal(a[i], b[i], &sum[i], &Lcarry, Lcarry);
  }
}


x86 assembly (clang, -O0):
<ascStrAdd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movb   $0x30,-0x1d(%rbp)
movl   $0x3f,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jl     117e <ascStrAdd+0x6e>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,1),%sil
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    -0x18(%rbp),%rdx
movslq -0x1c(%rbp),%rcx
add    %rcx,%rdx
lea    -0x1d(%rbp),%rcx
movsbl %sil,%edi
movsbl %al,%esi
movsbl -0x1d(%rbp),%r8d
call   1030 <asciiNumAdd_aDecimal@plt>
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    112f <ascStrAdd+0x1f>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ascStrAdd>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r13
movb   $0x30,0xf(%rsp)
movsbl 0x3f(%rdi),%edi
movsbl 0x3f(%rsi),%esi
add    $0x3f,%rdx
lea    0xf(%rsp),%r12
mov    %r12,%rcx
mov    $0x30,%r8d
call   1030 <asciiNumAdd_aDecimal@plt>
mov    $0x3e,%ebx
nop
movsbl 0xf(%rsp),%r8d
movsbl 0x0(%r13,%rbx,1),%edi
movsbl (%r15,%rbx,1),%esi
lea    (%r14,%rbx,1),%rdx
mov    %r12,%rcx
call   1030 <asciiNumAdd_aDecimal@plt>
add    $0xffffffffffffffff,%rbx
jb     1150 <ascStrAdd+0x40>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @ascStrAdd(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
store i8 48, i8* %8
store i32 63, i32* %7
br label %9
9: ; preds = %29, %3
%10 = load i32, i32* %7
%11 = icmp sge i32 %10, 0
br i1 %11, label %12, label %32
12: ; preds = %9
%13 = load i8*, i8** %4
%14 = load i32, i32* %7
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = load i8*, i8** %5
%19 = load i32, i32* %7
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
%22 = load i8, i8* %21
%23 = load i8*, i8** %6
%24 = load i32, i32* %7
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8, i8* %23, i64 %25
%27 = load i8, i8* %8
%28 = call i32 @asciiNumAdd_aDecimal(i8 signext %17, i8 signext %22, i8* %26, i8* %8, i8 signext %27)
br label %29
29: ; preds = %12
%30 = load i32, i32* %7
%31 = add nsw i32 %30, -1
store i32 %31, i32* %7
br label %9
32: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @ascStrAdd(i8* nocapture %0, i8* nocapture %1, i8* %2) {
%4 = alloca i8
store i8 48, i8* %4
%5 = getelementptr inbounds i8, i8* %0, i64 63
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %1, i64 63
%8 = load i8, i8* %7
%9 = getelementptr inbounds i8, i8* %2, i64 63
%10 = call i32 @asciiNumAdd_aDecimal(i8 signext %6, i8 signext %8, i8* %9, i8* %4, i8 signext 48)
br label %11
11: ; preds = %3, %11
%12 = phi i64 [ 63, %3 ], [ %13, %11 ]
%13 = add nsw i64 %12, -1
%14 = load i8, i8* %4
%15 = getelementptr inbounds i8, i8* %0, i64 %13
%16 = load i8, i8* %15
%17 = getelementptr inbounds i8, i8* %1, i64 %13
%18 = load i8, i8* %17
%19 = getelementptr inbounds i8, i8* %2, i64 %13
%20 = call i32 @asciiNumAdd_aDecimal(i8 signext %16, i8 signext %18, i8* %19, i8* %4, i8 signext %14)
%21 = icmp eq i64 %13, 0
br i1 %21, label %22, label %11
22: ; preds = %11
ret void
}