#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *openUserFile(char *, char *);
int /*<<< orphan*/ outputMadlibs(int /*<<< orphan*/ *, char *, char *, char *,
                                 char *);
int /*<<< orphan*/ readWord(char **, char **, char **, char **);
int main(int argc, const char *argv[]) {
  char *verb, *sameVerb, *adjective, *pluralNoun;
  FILE *infile;
  infile = openUserFile("Input File: ", "r");
  readWord(&verb, &sameVerb, &adjective, &pluralNoun);
  outputMadlibs(infile, verb, sameVerb, adjective, pluralNoun);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
lea    0xeb9(%rip),%rsi
call   1030 <openUserFile@plt>
mov    %rax,-0x38(%rbp)
lea    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
lea    -0x28(%rbp),%rdx
lea    -0x30(%rbp),%rcx
call   1040 <readWord@plt>
mov    -0x38(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
call   1050 <outputMadlibs@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xec4(%rip),%rdi
lea    0xeca(%rip),%rsi
call   1030 <openUserFile@plt>
mov    %rax,%rbx
lea    0x18(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
call   1040 <readWord@plt>
mov    0x18(%rsp),%rsi
mov    0x10(%rsp),%rdx
mov    0x8(%rsp),%rcx
mov    (%rsp),%r8
mov    %rbx,%rdi
call   1050 <outputMadlibs@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Input File: \00"
@.str.1 = [2 x i8] c"r\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = call i32* @openUserFile(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %11, i32** %10
%12 = call i32 @readWord(i8** %6, i8** %7, i8** %8, i8** %9)
%13 = load i32*, i32** %10
%14 = load i8*, i8** %6
%15 = load i8*, i8** %7
%16 = load i8*, i8** %8
%17 = load i8*, i8** %9
%18 = call i32 @outputMadlibs(i32* %13, i8* %14, i8* %15, i8* %16, i8* %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Input File: \00"
@.str.1 = [2 x i8] c"r\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = bitcast i8** %3 to i8*
%8 = bitcast i8** %4 to i8*
%9 = bitcast i8** %5 to i8*
%10 = bitcast i8** %6 to i8*
%11 = tail call i32* @openUserFile(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @readWord(i8** %3, i8** %4, i8** %5, i8** %6)
%13 = load i8*, i8** %3
%14 = load i8*, i8** %4
%15 = load i8*, i8** %5
%16 = load i8*, i8** %6
%17 = call i32 @outputMadlibs(i32* %11, i8* %13, i8* %14, i8* %15, i8* %16)
ret i32 0
}