#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 Node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ node_to_html(struct Node *);
struct Node *parse_files(int, char **);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  struct Node *nlist;
  argc--;
  argv++;
  nlist = parse_files(argc, argv);
  printf("<html>\n<head>\n</head>\n<body>\n");
  node_to_html(nlist);
  printf("\n</body></html>\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <parse_files@plt>
mov    %rax,-0x18(%rbp)
lea    0xe8e(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1050 <node_to_html@plt>
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
add    $0xffffffff,%edi
add    $0x8,%rsi
call   1030 <parse_files@plt>
mov    %rax,%rbx
lea    0xeb9(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1050 <node_to_html@plt>
lea    0xec2(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.Node = type { i32 }
@.str = [30 x i8] c"<html>\0A<head>\0A</head>\0A<body>\0A\00"
@.str.1 = [17 x i8] c"\0A</body></html>\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.Node*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = add nsw i32 %7, -1
store i32 %8, i32* %4
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i32 1
store i8** %10, i8*** %5
%11 = load i32, i32* %4
%12 = load i8**, i8*** %5
%13 = call %struct.Node* @parse_files(i32 %11, i8** %12)
store %struct.Node* %13, %struct.Node** %6
%14 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%15 = load %struct.Node*, %struct.Node** %6
%16 = call i32 @node_to_html(%struct.Node* %15)
%17 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%struct.Node = type { i32 }
@str = [29 x i8] c"<html>\0A<head>\0A</head>\0A<body>\00"
@str.2 = [16 x i8] c"\0A</body></html>\00"
define i32 @main(i32 %0, i8** %1) {
%3 = add nsw i32 %0, -1
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = tail call %struct.Node* @parse_files(i32 %3, i8** %4)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @node_to_html(%struct.Node* %5)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}