#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*/ affiche_xml_texte(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ indent();
int /*<<< orphan*/ stdout;
void affiche_element(char *fct_, char *texte_, int trace_xml) {
  if (trace_xml) {
    indent();
    fprintf(stdout, "<%s>", fct_);
    affiche_xml_texte(texte_);
    fprintf(stdout, "</%s>\n", fct_);
  }
}


x86 assembly (clang, -O0):
<affiche_element>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     118f <affiche_element+0x5f>
mov    $0x0,%al
call   1040 <indent@plt>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe98(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <affiche_xml_texte@plt>
mov    0x2e63(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe7b(%rip),%rsi
call   1050 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<affiche_element>:
test   %edx,%edx
je     117e <affiche_element+0x4e>
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <indent@plt>
mov    0x2e93(%rip),%r15
mov    (%r15),%edi
lea    0xea9(%rip),%rsi
mov    %rbx,%rdx
call   1050 <fprintf@plt>
mov    %r14,%rdi
call   1030 <affiche_xml_texte@plt>
mov    (%r15),%edi
lea    0xe94(%rip),%rsi
mov    %rbx,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <fprintf@plt>
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [5 x i8] c"<%s>\00"
@.str.1 = [7 x i8] c"</%s>\0A\00"
define void @affiche_element(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %19
9: ; preds = %3
%10 = call i32 (...) @indent()
%11 = load i32, i32* @stdout
%12 = load i8*, i8** %4
%13 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = load i8*, i8** %5
%15 = call i32 @affiche_xml_texte(i8* %14)
%16 = load i32, i32* @stdout
%17 = load i8*, i8** %4
%18 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %17)
br label %19
19: ; preds = %9, %3
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [5 x i8] c"<%s>\00"
@.str.1 = [7 x i8] c"</%s>\0A\00"
define void @affiche_element(i8* %0, i8* %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %12, label %5
5: ; preds = %3
%6 = tail call i32 (...) @indent()
%7 = load i32, i32* @stdout
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
%9 = tail call i32 @affiche_xml_texte(i8* %1)
%10 = load i32, i32* @stdout
%11 = tail call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %12
12: ; preds = %5, %3
ret void
}