#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*/ diagnostics(int, char *);
int /*<<< orphan*/ maybeFieldScript(int);
int /*<<< orphan*/ simpleRTFScript(int);
void CmdSuperscript(int code) {
  switch (code) {
  case 0:
    diagnostics(4, "CmdSuperscript() code==0, equation ");
    maybeFieldScript(1);
    break;
  case 1:
    diagnostics(4, "CmdSuperscript() code==1, \\textsuperscript ");
    simpleRTFScript(1);
    break;
  }
}


x86 assembly (clang, -O0):
<CmdSuperscript>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
test   %eax,%eax
je     115f <CmdSuperscript+0x2f>
jmp    114e <CmdSuperscript+0x1e>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
je     117f <CmdSuperscript+0x4f>
jmp    119a <CmdSuperscript+0x6a>
mov    $0x4,%edi
lea    0xe95(%rip),%rsi
call   1050 <diagnostics@plt>
mov    $0x1,%edi
call   1030 <maybeFieldScript@plt>
jmp    119a <CmdSuperscript+0x6a>
mov    $0x4,%edi
lea    0xe99(%rip),%rsi
call   1050 <diagnostics@plt>
mov    $0x1,%edi
call   1040 <simpleRTFScript@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmdSuperscript>:
push   %rax
cmp    $0x1,%edi
je     1156 <CmdSuperscript+0x26>
test   %edi,%edi
jne    1172 <CmdSuperscript+0x42>
lea    0xebf(%rip),%rsi
mov    $0x4,%edi
call   1050 <diagnostics@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <maybeFieldScript@plt>
lea    0xec7(%rip),%rsi
mov    $0x4,%edi
call   1050 <diagnostics@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <simpleRTFScript@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [36 x i8] c"CmdSuperscript() code==0, equation \00"
@.str.1 = [44 x i8] c"CmdSuperscript() code==1, \\textsuperscript \00"
define void @CmdSuperscript(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %10 [
i32 0, label %4
i32 1, label %7
]
4: ; preds = %1
%5 = call i32 @diagnostics(i32 4, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @maybeFieldScript(i32 1)
br label %10
7: ; preds = %1
%8 = call i32 @diagnostics(i32 4, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @simpleRTFScript(i32 1)
br label %10
10: ; preds = %1, %7, %4
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"CmdSuperscript() code==0, equation \00"
@.str.1 = [44 x i8] c"CmdSuperscript() code==1, \\textsuperscript \00"
define void @CmdSuperscript(i32 %0) {
switch i32 %0, label %8 [
i32 0, label %2
i32 1, label %5
]
2: ; preds = %1
%3 = tail call i32 @diagnostics(i32 4, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @maybeFieldScript(i32 1)
br label %8
5: ; preds = %1
%6 = tail call i32 @diagnostics(i32 4, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @simpleRTFScript(i32 1)
br label %8
8: ; preds = %1, %5, %2
ret void
}