#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 *, ...);
int /*<<< orphan*/ output_tab0(int /*<<< orphan*/ *, int);
void output_tab2(FILE *outptr, int level, char *tag, char *data, int cr) {
  output_tab0(outptr, level);
  fprintf(outptr, "<%s>%s</%s>", tag, data, tag);
  if (cr)
    fprintf(outptr, "\n");
}


x86 assembly (clang, -O0):
<output_tab2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <output_tab0@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%r8
lea    0xea2(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
cmpl   $0x0,-0x24(%rbp)
je     1181 <output_tab2+0x61>
mov    -0x8(%rbp),%rdi
lea    0xe92(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_tab2>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %r8d,%r14d
mov    %rcx,%r15
mov    %rdx,%rbp
mov    %rdi,%rbx
call   1030 <output_tab0@plt>
lea    0xeb1(%rip),%rsi
mov    %rbx,%rdi
mov    %rbp,%rdx
mov    %r15,%rcx
mov    %rbp,%r8
xor    %eax,%eax
call   1050 <fprintf@plt>
test   %r14d,%r14d
je     117e <output_tab2+0x4e>
mov    $0xa,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <fputc@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

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