#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*/ recurse_process(int /*<<< orphan*/ *, char *, char ***,
                                   int *);
scalar_t__ strlen(char *);
char **letterCombinations(char *digits, int *returnSize) {
  char **result = NULL;
  *returnSize = 0;
  if (!digits || strlen(digits) == 0)
    return NULL;
  int num = 0;
  recurse_process(NULL, digits, &result, &num);
  *returnSize = num;
  return result;
}


x86 assembly (clang, -O0):
<letterCombinations>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     1160 <letterCombinations+0x40>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%rax
jne    116d <letterCombinations+0x4d>
movq   $0x0,-0x8(%rbp)
jmp    119a <letterCombinations+0x7a>
movl   $0x0,-0x24(%rbp)
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
lea    -0x20(%rbp),%rdx
lea    -0x24(%rbp),%rcx
call   1040 <recurse_process@plt>
mov    -0x24(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<letterCombinations>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
movq   $0x0,0x8(%rsp)
movl   $0x0,(%rsi)
test   %rdi,%rdi
je     115a <letterCombinations+0x4a>
mov    %rdi,%rsi
cmpb   $0x0,(%rdi)
je     115a <letterCombinations+0x4a>
movl   $0x0,0x4(%rsp)
lea    0x8(%rsp),%rdx
lea    0x4(%rsp),%rcx
xor    %edi,%edi
call   1030 <recurse_process@plt>
mov    0x4(%rsp),%eax
mov    %eax,(%rbx)
mov    0x8(%rsp),%rax
jmp    115c <letterCombinations+0x4c>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8** @letterCombinations(i8* %0, i32* %1) {
%3 = alloca i8**
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i8**
%7 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
store i8** null, i8*** %6
%8 = load i32*, i32** %5
store i32 0, i32* %8
%9 = load i8*, i8** %4
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i8*, i8** %4
%13 = call i64 @strlen(i8* %12)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %11, %2
store i8** null, i8*** %3
br label %22
16: ; preds = %11
store i32 0, i32* %7
%17 = load i8*, i8** %4
%18 = call i32 @recurse_process(i32* null, i8* %17, i8*** %6, i32* %7)
%19 = load i32, i32* %7
%20 = load i32*, i32** %5
store i32 %19, i32* %20
%21 = load i8**, i8*** %6
store i8** %21, i8*** %3
br label %22
22: ; preds = %16, %15
%23 = load i8**, i8*** %3
ret i8** %23
}

LLVM IR (-O2):
define i8** @letterCombinations(i8* %0, i32* nocapture writeonly %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = bitcast i8*** %3 to i8*
store i8** null, i8*** %3
store i32 0, i32* %1
%6 = icmp eq i8* %0, null
br i1 %6, label %15, label %7
7: ; preds = %2
%8 = load i8, i8* %0
%9 = icmp eq i8 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %7
%11 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%12 = call i32 @recurse_process(i32* null, i8* %0, i8*** %3, i32* %4)
%13 = load i32, i32* %4
store i32 %13, i32* %1
%14 = load i8**, i8*** %3
br label %15
15: ; preds = %2, %7, %10
%16 = phi i8** [ %14, %10 ], [ null, %7 ], [ null, %2 ]
ret i8** %16
}