#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 isLetter(char const *, char *);
int isSpecialInitial(char const *, char *);
int isInitial(const char *c, char *value) {
  char letter = '\0';
  const int LETTER_RETURN = isLetter(c, &letter);
  char special = '\0';
  const int SPECIAL_RETURN = isSpecialInitial(c, &special);
  if (c == NULL)
    return 0;
  if (LETTER_RETURN > 0) {
    if (value != NULL)
      *value = letter;
    return 1;
  } else if (SPECIAL_RETURN > 0) {
    if (value != NULL)
      *value = special;
    return 1;
  } else
    return 0;
}


x86 assembly (clang, -O0):
<isInitial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movb   $0x0,-0x19(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x19(%rbp),%rsi
call   1040 <isLetter@plt>
mov    %eax,-0x20(%rbp)
movb   $0x0,-0x21(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x21(%rbp),%rsi
call   1030 <isSpecialInitial@plt>
mov    %eax,-0x28(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116f <isInitial+0x4f>
movl   $0x0,-0x4(%rbp)
jmp    11ca <isInitial+0xaa>
cmpl   $0x0,-0x20(%rbp)
jle    1199 <isInitial+0x79>
cmpq   $0x0,-0x18(%rbp)
je     118d <isInitial+0x6d>
mov    -0x19(%rbp),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    11ca <isInitial+0xaa>
cmpl   $0x0,-0x28(%rbp)
jle    11c3 <isInitial+0xa3>
cmpq   $0x0,-0x18(%rbp)
je     11b7 <isInitial+0x97>
mov    -0x21(%rbp),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    11ca <isInitial+0xaa>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isInitial>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %rdi,%rbp
movb   $0x0,0xf(%rsp)
lea    0xf(%rsp),%rbx
mov    %rbx,%rsi
call   1040 <isLetter@plt>
mov    %eax,%r12d
movb   $0x0,0xe(%rsp)
lea    0xe(%rsp),%r15
mov    %rbp,%rdi
mov    %r15,%rsi
call   1030 <isSpecialInitial@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %rbp,%rbp
je     1179 <isInitial+0x59>
test   %r12d,%r12d
jle    1186 <isInitial+0x66>
test   %r14,%r14
je     1174 <isInitial+0x54>
mov    (%rbx),%al
mov    %al,(%r14)
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
test   %ecx,%ecx
jle    1179 <isInitial+0x59>
mov    %r15,%rbx
test   %r14,%r14
jne    116f <isInitial+0x4f>
jmp    1174 <isInitial+0x54>

LLVM IR (-O0):
define i32 @isInitial(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i32
%8 = alloca i8
%9 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8 0, i8* %6
%10 = load i8*, i8** %4
%11 = call i32 @isLetter(i8* %10, i8* %6)
store i32 %11, i32* %7
store i8 0, i8* %8
%12 = load i8*, i8** %4
%13 = call i32 @isSpecialInitial(i8* %12, i8* %8)
store i32 %13, i32* %9
%14 = load i8*, i8** %4
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %17
16: ; preds = %2
store i32 0, i32* %3
br label %38
17: ; preds = %2
%18 = load i32, i32* %7
%19 = icmp sgt i32 %18, 0
br i1 %19, label %20, label %27
20: ; preds = %17
%21 = load i8*, i8** %5
%22 = icmp ne i8* %21, null
br i1 %22, label %23, label %26
23: ; preds = %20
%24 = load i8, i8* %6
%25 = load i8*, i8** %5
store i8 %24, i8* %25
br label %26
26: ; preds = %23, %20
store i32 1, i32* %3
br label %38
27: ; preds = %17
%28 = load i32, i32* %9
%29 = icmp sgt i32 %28, 0
br i1 %29, label %30, label %37
30: ; preds = %27
%31 = load i8*, i8** %5
%32 = icmp ne i8* %31, null
br i1 %32, label %33, label %36
33: ; preds = %30
%34 = load i8, i8* %8
%35 = load i8*, i8** %5
store i8 %34, i8* %35
br label %36
36: ; preds = %33, %30
store i32 1, i32* %3
br label %38
37: ; preds = %27
store i32 0, i32* %3
br label %38
38: ; preds = %37, %36, %26, %16
%39 = load i32, i32* %3
ret i32 %39
}

LLVM IR (-O2):
define i32 @isInitial(i8* %0, i8* writeonly %1) {
%3 = alloca i8
%4 = alloca i8
store i8 0, i8* %3
%5 = call i32 @isLetter(i8* %0, i8* %3)
store i8 0, i8* %4
%6 = call i32 @isSpecialInitial(i8* %0, i8* %4)
%7 = icmp eq i8* %0, null
br i1 %7, label %19, label %8
8: ; preds = %2
%9 = icmp sgt i32 %5, 0
br i1 %9, label %10, label %12
10: ; preds = %8
%11 = icmp eq i8* %1, null
br i1 %11, label %19, label %16
12: ; preds = %8
%13 = icmp sgt i32 %6, 0
br i1 %13, label %14, label %19
14: ; preds = %12
%15 = icmp eq i8* %1, null
br i1 %15, label %19, label %16
16: ; preds = %14, %10
%17 = phi i8* [ %3, %10 ], [ %4, %14 ]
%18 = load i8, i8* %17
store i8 %18, i8* %1
br label %19
19: ; preds = %16, %12, %14, %10, %2
%20 = phi i32 [ 0, %2 ], [ 1, %10 ], [ 1, %14 ], [ 0, %12 ], [ 1, %16 ]
ret i32 %20
}