#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 *genRootDesc(int *);
char *genWANCfg(int *);
char *genWANIPCn(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");
  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    0x2e4f(%rip),%rax
mov    (%rax),%edx
call   1050 <xml_pretty_print@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
lea    0xe58(%rip),%rdi
call   1070 <printf@plt>
lea    -0x2c(%rbp),%rdi
call   1080 <genWANIPCn@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    0x2e18(%rip),%rax
mov    (%rax),%edx
call   1050 <xml_pretty_print@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
lea    0xe21(%rip),%rdi
call   1070 <printf@plt>
lea    -0x2c(%rbp),%rdi
call   1060 <genWANCfg@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    0x2de1(%rip),%rax
mov    (%rax),%edx
call   1050 <xml_pretty_print@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
lea    0xdea(%rip),%rdi
call   1070 <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    0x2e60(%rip),%r12
mov    (%r12),%edx
mov    %rax,%rdi
call   1060 <xml_pretty_print@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
lea    0xe65(%rip),%r14
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %rsp,%r15
mov    %r15,%rdi
call   1080 <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   1070 <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>
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))
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@str.2 = [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.2, 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.2, 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.2, i64 0, i64 0))
ret i32 0
}