#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 */
struct treenode {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ vroom(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                         struct treenode *);
void main() {
  struct treenode *root;
  FILE *ifp, *ofp;
  ifp = fopen("party.txt", "r");
  ofp = fopen("partyout.txt", "w");
  root = NULL;
  vroom(ifp, ofp, root);
  fclose(ifp);
  fclose(ofp);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xec1(%rip),%rdi
lea    0xec4(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
lea    0xeb6(%rip),%rdi
lea    0xebc(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x8(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rdx
call   1040 <vroom@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%rdi
lea    0xec8(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%r14
lea    0xebb(%rip),%rdi
lea    0xec1(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
xor    %edx,%edx
call   1040 <vroom@plt>
mov    %r14,%rdi
call   1030 <fclose@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fclose@plt>

LLVM IR (-O0):
%struct.treenode = type { i32 }
@.str = [10 x i8] c"party.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [13 x i8] c"partyout.txt\00"
@.str.3 = [2 x i8] c"w\00"
define void @main() {
%1 = alloca %struct.treenode*
%2 = alloca i32*
%3 = alloca i32*
%4 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %4, i32** %2
%5 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %5, i32** %3
store %struct.treenode* null, %struct.treenode** %1
%6 = load i32*, i32** %2
%7 = load i32*, i32** %3
%8 = load %struct.treenode*, %struct.treenode** %1
%9 = call i32 @vroom(i32* %6, i32* %7, %struct.treenode* %8)
%10 = load i32*, i32** %2
%11 = call i32 @fclose(i32* %10)
%12 = load i32*, i32** %3
%13 = call i32 @fclose(i32* %12)
ret void
}

LLVM IR (-O2):
%struct.treenode = type { i32 }
@.str = [10 x i8] c"party.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [13 x i8] c"partyout.txt\00"
@.str.3 = [2 x i8] c"w\00"
define void @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 @vroom(i32* %1, i32* %2, %struct.treenode* null)
%4 = tail call i32 @fclose(i32* %1)
%5 = tail call i32 @fclose(i32* %2)
ret void
}