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

/* Variables and functions */
int /*<<< orphan*/ do_xml_unparse_tree(
    int /*<<< orphan*/, int /*<<< orphan*/ *, struct xml_tree const *,
    char const *const *, char const *const *,
    int (*)(int /*<<< orphan*/ *, struct xml_tree const *),
    int (*)(int /*<<< orphan*/ *, struct xml_attn const *),
    void (*)(int /*<<< orphan*/ *, struct xml_tree const *, int, int));
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void xml_unparse_tree(FILE *out, struct xml_tree const *tree,
                      char const *const *tag_map, char const *const *attn_map,
                      int (*tag_print)(FILE *, struct xml_tree const *),
                      int (*attn_print)(FILE *, struct xml_attn const *),
                      void (*fmt_print)(FILE *, struct xml_tree const *, int,
                                        int)) {
  fprintf(out, "<?xml version=\"1.0\" encoding=\"%s\"?>\n", "UTF-8");
  do_xml_unparse_tree(0, out, tree, tag_map, attn_map, tag_print, attn_print,
                      fmt_print);
}


x86 assembly (clang, -O0):
<xml_unparse_tree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb1(%rip),%rsi
lea    0xecf(%rip),%rdx
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x30(%rbp),%r10
mov    0x10(%rbp),%rax
xor    %edi,%edi
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <do_xml_unparse_tree@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xml_unparse_tree>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r14
mov    %r8,%r15
mov    %rcx,%r12
mov    %rdx,%r13
mov    %rsi,%rbx
mov    %rdi,%rbp
lea    0xebc(%rip),%rsi
lea    0xeda(%rip),%rdx
call   1040 <fprintf@plt>
xor    %edi,%edi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    %r13,%rcx
mov    %r12,%r8
mov    %r15,%r9
push   0x40(%rsp)
push   %r14
call   1030 <do_xml_unparse_tree@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.xml_tree = type { i32 }
%struct.xml_attn = type opaque
%struct.xml_attn.0 = type opaque
@.str = [37 x i8] c"<?xml version=\221.0\22 encoding=\22%s\22?>\0A\00"
@.str.1 = [6 x i8] c"UTF-8\00"
define void @xml_unparse_tree(i32* %0, %struct.xml_tree* %1, i8** %2, i8** %3, i32 (i32*, %struct.xml_tree*)* %4, i32 (i32*, %struct.xml_attn*)* %5, void (i32*, %struct.xml_tree*, i32, i32)* %6) {
%8 = alloca i32*
%9 = alloca %struct.xml_tree*
%10 = alloca i8**
%11 = alloca i8**
%12 = alloca i32 (i32*, %struct.xml_tree*)*
%13 = alloca i32 (i32*, %struct.xml_attn*)*
%14 = alloca void (i32*, %struct.xml_tree*, i32, i32)*
store i32* %0, i32** %8
store %struct.xml_tree* %1, %struct.xml_tree** %9
store i8** %2, i8*** %10
store i8** %3, i8*** %11
store i32 (i32*, %struct.xml_tree*)* %4, i32 (i32*, %struct.xml_tree*)** %12
store i32 (i32*, %struct.xml_attn*)* %5, i32 (i32*, %struct.xml_attn*)** %13
store void (i32*, %struct.xml_tree*, i32, i32)* %6, void (i32*, %struct.xml_tree*, i32, i32)** %14
%15 = load i32*, i32** %8
%16 = call i32 @fprintf(i32* %15, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%17 = load i32*, i32** %8
%18 = load %struct.xml_tree*, %struct.xml_tree** %9
%19 = load i8**, i8*** %10
%20 = load i8**, i8*** %11
%21 = load i32 (i32*, %struct.xml_tree*)*, i32 (i32*, %struct.xml_tree*)** %12
%22 = load i32 (i32*, %struct.xml_attn*)*, i32 (i32*, %struct.xml_attn*)** %13
%23 = bitcast i32 (i32*, %struct.xml_attn*)* %22 to i32 (i32*, %struct.xml_attn.0*)*
%24 = load void (i32*, %struct.xml_tree*, i32, i32)*, void (i32*, %struct.xml_tree*, i32, i32)** %14
%25 = call i32 @do_xml_unparse_tree(i32 0, i32* %17, %struct.xml_tree* %18, i8** %19, i8** %20, i32 (i32*, %struct.xml_tree*)* %21, i32 (i32*, %struct.xml_attn.0*)* %23, void (i32*, %struct.xml_tree*, i32, i32)* %24)
ret void
}

LLVM IR (-O2):
%struct.xml_tree = type { i32 }
%struct.xml_attn = type opaque
%struct.xml_attn.0 = type opaque
@.str = [37 x i8] c"<?xml version=\221.0\22 encoding=\22%s\22?>\0A\00"
@.str.1 = [6 x i8] c"UTF-8\00"
define void @xml_unparse_tree(i32* %0, %struct.xml_tree* %1, i8** %2, i8** %3, i32 (i32*, %struct.xml_tree*)* %4, i32 (i32*, %struct.xml_attn*)* %5, void (i32*, %struct.xml_tree*, i32, i32)* %6) {
%8 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%9 = bitcast i32 (i32*, %struct.xml_attn*)* %5 to i32 (i32*, %struct.xml_attn.0*)*
%10 = tail call i32 @do_xml_unparse_tree(i32 0, i32* %0, %struct.xml_tree* %1, i8** %2, i8** %3, i32 (i32*, %struct.xml_tree*)* %4, i32 (i32*, %struct.xml_attn.0*)* %9, void (i32*, %struct.xml_tree*, i32, i32)* %6)
ret void
}