#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*/ PrintIndent(int);
int /*<<< orphan*/ print_spec_indented_and_max_length(char const *, int, int);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ strcmp(char const *, char *);
void eca_opt_print_option_xml(const char *shortopt, const char *longopt,
                              const char *args, const char *short_comment,
                              const char *long_comment, int __END_OF_OPTS,
                              int indent_level) {
  PrintIndent(indent_level);
  printf("<option>\n");
  if (strcmp(shortopt, "-") != 0) {
    PrintIndent(indent_level + 1);
    printf("<single_dash_tag>%s</single_dash_tag>\n", shortopt);
  }
  if (strcmp(longopt, "--") != 0) {
    PrintIndent(indent_level + 1);
    printf("<double_dash_tag>%s</double_dash_tag>\n", longopt);
  }
  if (strcmp(args, "") != 0) {
    PrintIndent(indent_level + 1);
    printf("<args>%s</args>\n", args);
  }
  if (strcmp(short_comment, "") != 0) {
    PrintIndent(indent_level + 1);
    printf("<short_help>%s</short_help>\n", short_comment);
  }
  if (strcmp(long_comment, "") != 0) {
    PrintIndent(indent_level + 1);
    printf("<long_help>\n");
    print_spec_indented_and_max_length(long_comment, 70, indent_level + 2);
    PrintIndent(indent_level + 1);
    printf("</long_help>\n");
  }
  PrintIndent(indent_level);
  printf("</option>\n");
}


x86 assembly (clang, -O0):
<eca_opt_print_option_xml>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    0x10(%rbp),%edi
call   1040 <PrintIndent@plt>
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeae(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     11b0 <eca_opt_print_option_xml+0x70>
mov    0x10(%rbp),%edi
add    $0x1,%edi
call   1040 <PrintIndent@plt>
mov    -0x8(%rbp),%rsi
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
lea    0xe76(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     11e7 <eca_opt_print_option_xml+0xa7>
mov    0x10(%rbp),%edi
add    $0x1,%edi
call   1040 <PrintIndent@plt>
mov    -0x10(%rbp),%rsi
lea    0xe54(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rdi
lea    0xe68(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     121e <eca_opt_print_option_xml+0xde>
mov    0x10(%rbp),%edi
add    $0x1,%edi
call   1040 <PrintIndent@plt>
mov    -0x18(%rbp),%rsi
lea    0xe44(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe31(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     1255 <eca_opt_print_option_xml+0x115>
mov    0x10(%rbp),%edi
add    $0x1,%edi
call   1040 <PrintIndent@plt>
mov    -0x20(%rbp),%rsi
lea    0xe1e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rdi
lea    0xdfa(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     12b5 <eca_opt_print_option_xml+0x175>
mov    0x10(%rbp),%edi
add    $0x1,%edi
call   1040 <PrintIndent@plt>
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rdi
mov    0x10(%rbp),%edx
add    $0x2,%edx
mov    $0x46,%esi
call   1060 <print_spec_indented_and_max_length@plt>
mov    0x10(%rbp),%edi
add    $0x1,%edi
call   1040 <PrintIndent@plt>
lea    0xde8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x10(%rbp),%edi
call   1040 <PrintIndent@plt>
lea    0xde0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eca_opt_print_option_xml>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%r13
mov    %rdi,%rbp
mov    0x40(%rsp),%ebx
mov    %ebx,%edi
call   1050 <PrintIndent@plt>
lea    0xf03(%rip),%rdi
call   1030 <puts@plt>
lea    0xea0(%rip),%rsi
mov    %rbp,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     11ae <eca_opt_print_option_xml+0x5e>
lea    0x1(%rbx),%edi
call   1050 <PrintIndent@plt>
lea    0xe5c(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe72(%rip),%rsi
mov    %r13,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     11db <eca_opt_print_option_xml+0x8b>
lea    0x1(%rbx),%edi
call   1050 <PrintIndent@plt>
lea    0xe59(%rip),%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe6e(%rip),%rsi
mov    %r12,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1208 <eca_opt_print_option_xml+0xb8>
lea    0x1(%rbx),%edi
call   1050 <PrintIndent@plt>
lea    0xe53(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe41(%rip),%rsi
mov    %r15,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1235 <eca_opt_print_option_xml+0xe5>
lea    0x1(%rbx),%edi
call   1050 <PrintIndent@plt>
lea    0xe37(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe14(%rip),%rsi
mov    %r14,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1282 <eca_opt_print_option_xml+0x132>
lea    0x1(%rbx),%ebp
mov    %ebp,%edi
call   1050 <PrintIndent@plt>
lea    0xe38(%rip),%rdi
call   1030 <puts@plt>
lea    0x2(%rbx),%edx
mov    %r14,%rdi
mov    $0x46,%esi
call   1070 <print_spec_indented_and_max_length@plt>
mov    %ebp,%edi
call   1050 <PrintIndent@plt>
lea    0xe21(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1050 <PrintIndent@plt>
lea    0xdf8(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"<option>\0A\00"
@.str.1 = [2 x i8] c"-\00"
@.str.2 = [39 x i8] c"<single_dash_tag>%s</single_dash_tag>\0A\00"
@.str.3 = [3 x i8] c"--\00"
@.str.4 = [39 x i8] c"<double_dash_tag>%s</double_dash_tag>\0A\00"
@.str.5 = [1 x i8] zeroinitializer
@.str.6 = [17 x i8] c"<args>%s</args>\0A\00"
@.str.7 = [29 x i8] c"<short_help>%s</short_help>\0A\00"
@.str.8 = [13 x i8] c"<long_help>\0A\00"
@.str.9 = [14 x i8] c"</long_help>\0A\00"
@.str.10 = [11 x i8] c"</option>\0A\00"
define void @eca_opt_print_option_xml(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i32 %5, i32 %6) {
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32
store i8* %0, i8** %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i8* %4, i8** %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load i32, i32* %14
%16 = call i32 @PrintIndent(i32 %15)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%18 = load i8*, i8** %8
%19 = call i64 @strcmp(i8* %18, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %27
21: ; preds = %7
%22 = load i32, i32* %14
%23 = add nsw i32 %22, 1
%24 = call i32 @PrintIndent(i32 %23)
%25 = load i8*, i8** %8
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i8* %25)
br label %27
27: ; preds = %21, %7
%28 = load i8*, i8** %9
%29 = call i64 @strcmp(i8* %28, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%30 = icmp ne i64 %29, 0
br i1 %30, label %31, label %37
31: ; preds = %27
%32 = load i32, i32* %14
%33 = add nsw i32 %32, 1
%34 = call i32 @PrintIndent(i32 %33)
%35 = load i8*, i8** %9
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0), i8* %35)
br label %37
37: ; preds = %31, %27
%38 = load i8*, i8** %10
%39 = call i64 @strcmp(i8* %38, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0))
%40 = icmp ne i64 %39, 0
br i1 %40, label %41, label %47
41: ; preds = %37
%42 = load i32, i32* %14
%43 = add nsw i32 %42, 1
%44 = call i32 @PrintIndent(i32 %43)
%45 = load i8*, i8** %10
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i8* %45)
br label %47
47: ; preds = %41, %37
%48 = load i8*, i8** %11
%49 = call i64 @strcmp(i8* %48, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0))
%50 = icmp ne i64 %49, 0
br i1 %50, label %51, label %57
51: ; preds = %47
%52 = load i32, i32* %14
%53 = add nsw i32 %52, 1
%54 = call i32 @PrintIndent(i32 %53)
%55 = load i8*, i8** %11
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0), i8* %55)
br label %57
57: ; preds = %51, %47
%58 = load i8*, i8** %12
%59 = call i64 @strcmp(i8* %58, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0))
%60 = icmp ne i64 %59, 0
br i1 %60, label %61, label %74
61: ; preds = %57
%62 = load i32, i32* %14
%63 = add nsw i32 %62, 1
%64 = call i32 @PrintIndent(i32 %63)
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%66 = load i8*, i8** %12
%67 = load i32, i32* %14
%68 = add nsw i32 %67, 2
%69 = call i32 @print_spec_indented_and_max_length(i8* %66, i32 70, i32 %68)
%70 = load i32, i32* %14
%71 = add nsw i32 %70, 1
%72 = call i32 @PrintIndent(i32 %71)
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
br label %74
74: ; preds = %61, %57
%75 = load i32, i32* %14
%76 = call i32 @PrintIndent(i32 %75)
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [2 x i8] c"-\00"
@.str.2 = [39 x i8] c"<single_dash_tag>%s</single_dash_tag>\0A\00"
@.str.3 = [3 x i8] c"--\00"
@.str.4 = [39 x i8] c"<double_dash_tag>%s</double_dash_tag>\0A\00"
@.str.5 = [1 x i8] zeroinitializer
@.str.6 = [17 x i8] c"<args>%s</args>\0A\00"
@.str.7 = [29 x i8] c"<short_help>%s</short_help>\0A\00"
@str = [9 x i8] c"<option>\00"
@str.11 = [10 x i8] c"</option>\00"
@str.12 = [12 x i8] c"<long_help>\00"
@str.13 = [13 x i8] c"</long_help>\00"
define void @eca_opt_print_option_xml(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i32 %5, i32 %6) {
%8 = tail call i32 @PrintIndent(i32 %6)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%10 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %16, label %12
12: ; preds = %7
%13 = add nsw i32 %6, 1
%14 = tail call i32 @PrintIndent(i32 %13)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i8* %0)
br label %16
16: ; preds = %12, %7
%17 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %23, label %19
19: ; preds = %16
%20 = add nsw i32 %6, 1
%21 = tail call i32 @PrintIndent(i32 %20)
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0), i8* %1)
br label %23
23: ; preds = %19, %16
%24 = tail call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %30, label %26
26: ; preds = %23
%27 = add nsw i32 %6, 1
%28 = tail call i32 @PrintIndent(i32 %27)
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i8* %2)
br label %30
30: ; preds = %26, %23
%31 = tail call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0))
%32 = icmp eq i64 %31, 0
br i1 %32, label %37, label %33
33: ; preds = %30
%34 = add nsw i32 %6, 1
%35 = tail call i32 @PrintIndent(i32 %34)
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0), i8* %3)
br label %37
37: ; preds = %33, %30
%38 = tail call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
br i1 %39, label %48, label %40
40: ; preds = %37
%41 = add nsw i32 %6, 1
%42 = tail call i32 @PrintIndent(i32 %41)
%43 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.12, i64 0, i64 0))
%44 = add nsw i32 %6, 2
%45 = tail call i32 @print_spec_indented_and_max_length(i8* %4, i32 70, i32 %44)
%46 = tail call i32 @PrintIndent(i32 %41)
%47 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.13, i64 0, i64 0))
br label %48
48: ; preds = %40, %37
%49 = tail call i32 @PrintIndent(i32 %6)
%50 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.11, i64 0, i64 0))
ret void
}