#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*/ xprintf(int, char *);
void xml_markup_network(int tab, int action) {
  static int markup_state = 0;
  if (action == markup_state)
    return;
  markup_state = action;
  if (action == 1) {
    xprintf(tab, "<network per=\"second\">");
  } else {
    xprintf(--tab, "</network>");
  }
}


x86 assembly (clang, -O0):
<xml_markup_network>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    0x2f05(%rip),%eax
jne    1132 <xml_markup_network+0x22>
jmp    116e <xml_markup_network+0x5e>
mov    -0x8(%rbp),%eax
mov    %eax,0x2ef1(%rip)
cmpl   $0x1,-0x8(%rbp)
jne    1159 <xml_markup_network+0x49>
mov    -0x4(%rbp),%edi
lea    0xeb1(%rip),%rsi
call   1030 <xprintf@plt>
jmp    116e <xml_markup_network+0x5e>
mov    -0x4(%rbp),%edi
add    $0xffffffff,%edi
mov    %edi,-0x4(%rbp)
lea    0xeae(%rip),%rsi
call   1030 <xprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xml_markup_network>:
cmp    %esi,0x2f16(%rip)
jne    1119 <xml_markup_network+0x9>
ret
mov    %esi,0x2f0d(%rip)
cmp    $0x1,%esi
jne    1130 <xml_markup_network+0x20>
lea    0xed5(%rip),%rsi
jmp    1030 <xprintf@plt>
add    $0xffffffff,%edi
lea    0xedd(%rip),%rsi
jmp    1030 <xprintf@plt>

LLVM IR (-O0):
@xml_markup_network.markup_state = internal global i32 0
@.str = [23 x i8] c"<network per=\22second\22>\00"
@.str.1 = [11 x i8] c"</network>\00"
define void @xml_markup_network(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* @xml_markup_network.markup_state
%7 = icmp eq i32 %5, %6
br i1 %7, label %8, label %9
8: ; preds = %2
br label %20
9: ; preds = %2
%10 = load i32, i32* %4
store i32 %10, i32* @xml_markup_network.markup_state
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %16
13: ; preds = %9
%14 = load i32, i32* %3
%15 = call i32 @xprintf(i32 %14, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %20
16: ; preds = %9
%17 = load i32, i32* %3
%18 = add nsw i32 %17, -1
store i32 %18, i32* %3
%19 = call i32 @xprintf(i32 %18, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %20
20: ; preds = %8, %16, %13
ret void
}

LLVM IR (-O2):
@xml_markup_network.markup_state = internal unnamed_addr global i32 0
@.str = [23 x i8] c"<network per=\22second\22>\00"
@.str.1 = [11 x i8] c"</network>\00"
define void @xml_markup_network(i32 %0, i32 %1) {
%3 = load i32, i32* @xml_markup_network.markup_state
%4 = icmp eq i32 %3, %1
br i1 %4, label %12, label %5
5: ; preds = %2
store i32 %1, i32* @xml_markup_network.markup_state
%6 = icmp eq i32 %1, 1
br i1 %6, label %7, label %9
7: ; preds = %5
%8 = tail call i32 @xprintf(i32 %0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %12
9: ; preds = %5
%10 = add nsw i32 %0, -1
%11 = tail call i32 @xprintf(i32 %10, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %2, %9, %7
ret void
}