#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*/ countLetters(int *, char *);
int /*<<< orphan*/ getLine(char *, int);
int /*<<< orphan*/ printResult(int *);
int /*<<< orphan*/ printf(char *);
int main() {
  int results[26] = {0};
  char line1[80], line2[80];
  printf("Enter line 1: ");
  getLine(line1, 80);
  printf("Enter line 2: ");
  getLine(line2, 80);
  countLetters(results, line1);
  countLetters(results, line2);
  printResult(results);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x68,%edx
call   1050 <memset@plt>
lea    0xe87(%rip),%rdi
call   1040 <printf@plt>
lea    -0xc0(%rbp),%rdi
mov    $0x50,%esi
call   1060 <getLine@plt>
lea    0xe79(%rip),%rdi
call   1040 <printf@plt>
lea    -0x110(%rbp),%rdi
mov    $0x50,%esi
call   1060 <getLine@plt>
lea    -0x70(%rbp),%rdi
lea    -0xc0(%rbp),%rsi
call   1070 <countLetters@plt>
lea    -0x70(%rbp),%rdi
lea    -0x110(%rbp),%rsi
call   1070 <countLetters@plt>
lea    -0x70(%rbp),%rdi
call   1030 <printResult@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x110,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movq   $0x0,0x60(%rsp)
lea    0xe84(%rip),%rdi
call   1040 <printf@plt>
lea    0xc0(%rsp),%r14
mov    %r14,%rdi
mov    $0x50,%esi
call   1050 <getLine@plt>
lea    0xe72(%rip),%rdi
call   1040 <printf@plt>
lea    0x70(%rsp),%r15
mov    %r15,%rdi
mov    $0x50,%esi
call   1050 <getLine@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <countLetters@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <countLetters@plt>
mov    %rbx,%rdi
call   1030 <printResult@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Enter line 1: \00"
@.str.1 = [15 x i8] c"Enter line 2: \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [26 x i32]
%3 = alloca [80 x i8]
%4 = alloca [80 x i8]
store i32 0, i32* %1
%5 = bitcast [26 x i32]* %2 to i8*
%6 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%8 = call i32 @getLine(i8* %7, i32 80)
%9 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%10 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%11 = call i32 @getLine(i8* %10, i32 80)
%12 = getelementptr inbounds [26 x i32], [26 x i32]* %2, i64 0, i64 0
%13 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%14 = call i32 @countLetters(i32* %12, i8* %13)
%15 = getelementptr inbounds [26 x i32], [26 x i32]* %2, i64 0, i64 0
%16 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%17 = call i32 @countLetters(i32* %15, i8* %16)
%18 = getelementptr inbounds [26 x i32], [26 x i32]* %2, i64 0, i64 0
%19 = call i32 @printResult(i32* %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Enter line 1: \00"
@.str.1 = [15 x i8] c"Enter line 2: \00"
define i32 @main() {
%1 = alloca [26 x i32]
%2 = alloca [80 x i8]
%3 = alloca [80 x i8]
%4 = bitcast [26 x i32]* %1 to i8*
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @getLine(i8* %5, i32 80)
%9 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @getLine(i8* %6, i32 80)
%11 = getelementptr inbounds [26 x i32], [26 x i32]* %1, i64 0, i64 0
%12 = call i32 @countLetters(i32* %11, i8* %5)
%13 = call i32 @countLetters(i32* %11, i8* %6)
%14 = call i32 @printResult(i32* %11)
ret i32 0
}