#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 getLine(char *);
int parse(char *, int, char *);
int /*<<< orphan*/ printLine(char *, int);
int /*<<< orphan*/ printf(char *);
int main() {
  char input[80];
  char output[80];
  int inputSize = 0;
  int outputSize = 0;
  printf("Input:\t");
  inputSize = getLine(input);
  outputSize = parse(input, inputSize, output);
  printf("Output:\t");
  printLine(output, outputSize);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xb4(%rbp)
movl   $0x0,-0xb8(%rbp)
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
lea    -0x60(%rbp),%rdi
call   1040 <getLine@plt>
mov    %eax,-0xb4(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0xb4(%rbp),%esi
lea    -0xb0(%rbp),%rdx
call   1060 <parse@plt>
mov    %eax,-0xb8(%rbp)
lea    0xe64(%rip),%rdi
call   1030 <printf@plt>
lea    -0xb0(%rbp),%rdi
mov    -0xb8(%rbp),%esi
call   1050 <printLine@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xa8,%rsp
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
lea    0x50(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <getLine@plt>
mov    %rsp,%r14
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r14,%rdx
call   1060 <parse@plt>
mov    %eax,%ebx
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1050 <printLine@plt>
xor    %eax,%eax
add    $0xa8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Input:\09\00"
@.str.1 = [9 x i8] c"Output:\09\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [80 x i8]
%3 = alloca [80 x i8]
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
store i32 0, i32* %5
%6 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%7 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%8 = call i32 @getLine(i8* %7)
store i32 %8, i32* %4
%9 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%10 = load i32, i32* %4
%11 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%12 = call i32 @parse(i8* %9, i32 %10, i8* %11)
store i32 %12, i32* %5
%13 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%14 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%15 = load i32, i32* %5
%16 = call i32 @printLine(i8* %14, i32 %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"Input:\09\00"
@.str.1 = [9 x i8] c"Output:\09\00"
define i32 @main() {
%1 = alloca [80 x i8]
%2 = alloca [80 x i8]
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @getLine(i8* %3)
%7 = call i32 @parse(i8* %3, i32 %6, i8* %4)
%8 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @printLine(i8* %4, i32 %7)
ret i32 0
}