#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 *);
void md_table_tr_end(FILE *fw, int term) {
  switch (term) {
  case 0:
    fprintf(fw, "\n");
    break;
  case 1:
    fprintf(fw, "</td></tr>\n");
    break;
  case 2:
    fprintf(fw, "\\\\ \n");
    break;
  }
}


x86 assembly (clang, -O0):
<md_table_tr_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     1154 <md_table_tr_end+0x44>
jmp    1132 <md_table_tr_end+0x22>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     1169 <md_table_tr_end+0x59>
jmp    1143 <md_table_tr_end+0x33>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     117e <md_table_tr_end+0x6e>
jmp    118e <md_table_tr_end+0x7e>
mov    -0x8(%rbp),%rdi
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
jmp    118e <md_table_tr_end+0x7e>
mov    -0x8(%rbp),%rdi
lea    0xe8c(%rip),%rsi
call   1030 <fprintf@plt>
jmp    118e <md_table_tr_end+0x7e>
mov    -0x8(%rbp),%rdi
lea    0xe83(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<md_table_tr_end>:
mov    %rdi,%rcx
cmp    $0x2,%esi
je     113e <md_table_tr_end+0x1e>
cmp    $0x1,%esi
je     1154 <md_table_tr_end+0x34>
test   %esi,%esi
jne    116a <md_table_tr_end+0x4a>
mov    $0xa,%edi
mov    %rcx,%rsi
jmp    1030 <fputc@plt>
lea    0xec7(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
jmp    1040 <fwrite@plt>
lea    0xea5(%rip),%rdi
mov    $0xb,%esi
mov    $0x1,%edx
jmp    1040 <fwrite@plt>
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [12 x i8] c"</td></tr>\0A\00"
@.str.2 = [5 x i8] c"\\\\ \0A\00"
define void @md_table_tr_end(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
switch i32 %5, label %15 [
i32 0, label %6
i32 1, label %9
i32 2, label %12
]
6: ; preds = %2
%7 = load i32*, i32** %3
%8 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %15
9: ; preds = %2
%10 = load i32*, i32** %3
%11 = call i32 @fprintf(i32* %10, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %15
12: ; preds = %2
%13 = load i32*, i32** %3
%14 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %15
15: ; preds = %2, %12, %9, %6
ret void
}

LLVM IR (-O2):
@.str.1 = [12 x i8] c"</td></tr>\0A\00"
@.str.2 = [5 x i8] c"\\\\ \0A\00"
define void @md_table_tr_end(i32* nocapture %0, i32 %1) {
switch i32 %1, label %9 [
i32 0, label %3
i32 1, label %5
i32 2, label %7
]
3: ; preds = %2
%4 = tail call i32 @fputc(i32 10, i32* %0)
br label %9
5: ; preds = %2
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i64 11, i64 1, i32* %0)
br label %9
7: ; preds = %2
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 4, i64 1, i32* %0)
br label %9
9: ; preds = %2, %7, %5, %3
ret void
}