#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*/ free(char *);
char *genL3F(int *);
char *genRootDesc(int *);
char *genWANCfg(int *);
char *genWANIPCn(int *);
char *getVarsL3F(int *);
char *getVarsWANCfg(int *);
char *getVarsWANIPCn(int *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ xml_pretty_print(char *, int, int /*<<< orphan*/);
int main(int argc, char **argv) {
  char *rootDesc;
  int rootDescLen;
  char *s;
  int l;
  rootDesc = genRootDesc(&rootDescLen);
  xml_pretty_print(rootDesc, rootDescLen, stdout);
  free(rootDesc);
  printf("\n-------------\n");
  s = genWANIPCn(&l);
  xml_pretty_print(s, l, stdout);
  free(s);
  printf("\n-------------\n");
  s = genWANCfg(&l);
  xml_pretty_print(s, l, stdout);
  free(s);
  printf("\n-------------\n");
  s = genL3F(&l);
  xml_pretty_print(s, l, stdout);
  free(s);
  printf("\n-------------\n");
  s = getVarsWANIPCn(&l);
  xml_pretty_print(s, l, stdout);
  free(s);
  printf("\n-------------\n");
  s = getVarsWANCfg(&l);
  xml_pretty_print(s, l, stdout);
  free(s);
  printf("\n-------------\n");
  s = getVarsL3F(&l);
  xml_pretty_print(s, l, stdout);
  free(s);
  printf("\n-------------\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1c(%rbp),%rdi
call   1040 <genRootDesc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    0x2e0f(%rip),%rax
mov    (%rax),%edx
call   1050 <xml_pretty_print@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
lea    0xe18(%rip),%rdi
call   1080 <printf@plt>
lea    -0x2c(%rbp),%rdi
call   10b0 <genWANIPCn@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    0x2dd8(%rip),%rax
mov    (%rax),%edx
call   1050 <xml_pretty_print@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
lea    0xde1(%rip),%rdi
call   1080 <printf@plt>
lea    -0x2c(%rbp),%rdi
call   1070 <genWANCfg@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    0x2da1(%rip),%rax
mov    (%rax),%edx
call   1050 <xml_pretty_print@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
lea    0xdaa(%rip),%rdi
call   1080 <printf@plt>
lea    -0x2c(%rbp),%rdi
call   1090 <genL3F@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    0x2d6a(%rip),%rax
mov    (%rax),%edx
call   1050 <xml_pretty_print@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
lea    0xd73(%rip),%rdi
call   1080 <printf@plt>
lea    -0x2c(%rbp),%rdi
call   10a0 <getVarsWANIPCn@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    0x2d33(%rip),%rax
mov    (%rax),%edx
call   1050 <xml_pretty_print@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
lea    0xd3c(%rip),%rdi
call   1080 <printf@plt>
lea    -0x2c(%rbp),%rdi
call   1060 <getVarsWANCfg@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    0x2cfc(%rip),%rax
mov    (%rax),%edx
call   1050 <xml_pretty_print@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
lea    0xd05(%rip),%rdi
call   1080 <printf@plt>
lea    -0x2c(%rbp),%rdi
call   10c0 <getVarsL3F@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    0x2cc5(%rip),%rax
mov    (%rax),%edx
call   1050 <xml_pretty_print@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
lea    0xcce(%rip),%rdi
call   1080 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0x4(%rsp),%rdi
call   1050 <genRootDesc@plt>
mov    %rax,%rbx
mov    0x4(%rsp),%esi
mov    0x2e20(%rip),%r12
mov    (%r12),%edx
mov    %rax,%rdi
call   1060 <xml_pretty_print@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
lea    0xe25(%rip),%r14
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %rsp,%r15
mov    %r15,%rdi
call   10b0 <genWANIPCn@plt>
mov    %rax,%rbx
mov    (%rsp),%esi
mov    (%r12),%edx
mov    %rax,%rdi
call   1060 <xml_pretty_print@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
call   1080 <genWANCfg@plt>
mov    %rax,%rbx
mov    (%rsp),%esi
mov    (%r12),%edx
mov    %rax,%rdi
call   1060 <xml_pretty_print@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
call   1090 <genL3F@plt>
mov    %rax,%rbx
mov    (%rsp),%esi
mov    (%r12),%edx
mov    %rax,%rdi
call   1060 <xml_pretty_print@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
call   10a0 <getVarsWANIPCn@plt>
mov    %rax,%rbx
mov    (%rsp),%esi
mov    (%r12),%edx
mov    %rax,%rdi
call   1060 <xml_pretty_print@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
call   1070 <getVarsWANCfg@plt>
mov    %rax,%rbx
mov    (%rsp),%esi
mov    (%r12),%edx
mov    %rax,%rdi
call   1060 <xml_pretty_print@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
call   10c0 <getVarsL3F@plt>
mov    %rax,%rbx
mov    (%rsp),%esi
mov    (%r12),%edx
mov    %rax,%rdi
call   1060 <xml_pretty_print@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [16 x i8] c"\0A-------------\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = call i8* @genRootDesc(i32* %7)
store i8* %10, i8** %6
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i32, i32* @stdout
%14 = call i32 @xml_pretty_print(i8* %11, i32 %12, i32 %13)
%15 = load i8*, i8** %6
%16 = call i32 @free(i8* %15)
%17 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%18 = call i8* @genWANIPCn(i32* %9)
store i8* %18, i8** %8
%19 = load i8*, i8** %8
%20 = load i32, i32* %9
%21 = load i32, i32* @stdout
%22 = call i32 @xml_pretty_print(i8* %19, i32 %20, i32 %21)
%23 = load i8*, i8** %8
%24 = call i32 @free(i8* %23)
%25 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%26 = call i8* @genWANCfg(i32* %9)
store i8* %26, i8** %8
%27 = load i8*, i8** %8
%28 = load i32, i32* %9
%29 = load i32, i32* @stdout
%30 = call i32 @xml_pretty_print(i8* %27, i32 %28, i32 %29)
%31 = load i8*, i8** %8
%32 = call i32 @free(i8* %31)
%33 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%34 = call i8* @genL3F(i32* %9)
store i8* %34, i8** %8
%35 = load i8*, i8** %8
%36 = load i32, i32* %9
%37 = load i32, i32* @stdout
%38 = call i32 @xml_pretty_print(i8* %35, i32 %36, i32 %37)
%39 = load i8*, i8** %8
%40 = call i32 @free(i8* %39)
%41 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%42 = call i8* @getVarsWANIPCn(i32* %9)
store i8* %42, i8** %8
%43 = load i8*, i8** %8
%44 = load i32, i32* %9
%45 = load i32, i32* @stdout
%46 = call i32 @xml_pretty_print(i8* %43, i32 %44, i32 %45)
%47 = load i8*, i8** %8
%48 = call i32 @free(i8* %47)
%49 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%50 = call i8* @getVarsWANCfg(i32* %9)
store i8* %50, i8** %8
%51 = load i8*, i8** %8
%52 = load i32, i32* %9
%53 = load i32, i32* @stdout
%54 = call i32 @xml_pretty_print(i8* %51, i32 %52, i32 %53)
%55 = load i8*, i8** %8
%56 = call i32 @free(i8* %55)
%57 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%58 = call i8* @getVarsL3F(i32* %9)
store i8* %58, i8** %8
%59 = load i8*, i8** %8
%60 = load i32, i32* %9
%61 = load i32, i32* @stdout
%62 = call i32 @xml_pretty_print(i8* %59, i32 %60, i32 %61)
%63 = load i8*, i8** %8
%64 = call i32 @free(i8* %63)
%65 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@str.6 = [15 x i8] c"\0A-------------\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i8* @genRootDesc(i32* %3)
%8 = load i32, i32* %3
%9 = load i32, i32* @stdout
%10 = call i32 @xml_pretty_print(i8* %7, i32 %8, i32 %9)
%11 = call i32 @free(i8* %7)
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.6, i64 0, i64 0))
%13 = call i8* @genWANIPCn(i32* %4)
%14 = load i32, i32* %4
%15 = load i32, i32* @stdout
%16 = call i32 @xml_pretty_print(i8* %13, i32 %14, i32 %15)
%17 = call i32 @free(i8* %13)
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.6, i64 0, i64 0))
%19 = call i8* @genWANCfg(i32* %4)
%20 = load i32, i32* %4
%21 = load i32, i32* @stdout
%22 = call i32 @xml_pretty_print(i8* %19, i32 %20, i32 %21)
%23 = call i32 @free(i8* %19)
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.6, i64 0, i64 0))
%25 = call i8* @genL3F(i32* %4)
%26 = load i32, i32* %4
%27 = load i32, i32* @stdout
%28 = call i32 @xml_pretty_print(i8* %25, i32 %26, i32 %27)
%29 = call i32 @free(i8* %25)
%30 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.6, i64 0, i64 0))
%31 = call i8* @getVarsWANIPCn(i32* %4)
%32 = load i32, i32* %4
%33 = load i32, i32* @stdout
%34 = call i32 @xml_pretty_print(i8* %31, i32 %32, i32 %33)
%35 = call i32 @free(i8* %31)
%36 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.6, i64 0, i64 0))
%37 = call i8* @getVarsWANCfg(i32* %4)
%38 = load i32, i32* %4
%39 = load i32, i32* @stdout
%40 = call i32 @xml_pretty_print(i8* %37, i32 %38, i32 %39)
%41 = call i32 @free(i8* %37)
%42 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.6, i64 0, i64 0))
%43 = call i8* @getVarsL3F(i32* %4)
%44 = load i32, i32* %4
%45 = load i32, i32* @stdout
%46 = call i32 @xml_pretty_print(i8* %43, i32 %44, i32 %45)
%47 = call i32 @free(i8* %43)
%48 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.6, i64 0, i64 0))
ret i32 0
}