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

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
int /*<<< orphan*/ output_titlebits(char const *, char const *,
                                    int /*<<< orphan*/ *);
void output_titleinfo(const char *mainttl, const char *subttl, FILE *outptr,
                      const char *tag, int level) {
  if (mainttl || subttl) {
    fprintf(outptr, "<%s>", tag);
    output_titlebits(mainttl, subttl, outptr);
    fprintf(outptr, "</%s>\n", tag);
  }
}


x86 assembly (clang, -O0):
<output_titleinfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1152 <output_titleinfo+0x32>
cmpq   $0x0,-0x10(%rbp)
je     118b <output_titleinfo+0x6b>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    0xe9f(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <output_titlebits@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    0xe7f(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_titleinfo>:
mov    %rdi,%rax
or     %rsi,%rax
je     1179 <output_titleinfo+0x59>
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
lea    0xebd(%rip),%rsi
mov    %rdx,%rdi
mov    %rcx,%rdx
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
call   1030 <output_titlebits@plt>
lea    0xea2(%rip),%rsi
mov    %r15,%rdi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <fprintf@plt>
ret

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

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