#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*/ printf(char *);
void ParseSyntaxError(int commandType) {
  switch (commandType) {
  case 0:
    printf("The correct syntax should be - \"<Name> <ID> <Book Code> "
           "<Command>\"\n");
    return;
  case 1:
    printf("The correct syntax should be - \"<Command> <Name> <ID>\"\n");
    return;
  case 2:
    printf("The correct syntax should be - \"? <Query Variable>\"\n");
    return;
  default:
    return;
  }
}


x86 assembly (clang, -O0):
<ParseSyntaxError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
test   %eax,%eax
je     1150 <ParseSyntaxError+0x40>
jmp    112e <ParseSyntaxError+0x1e>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
je     1161 <ParseSyntaxError+0x51>
jmp    113f <ParseSyntaxError+0x2f>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
je     1172 <ParseSyntaxError+0x62>
jmp    1183 <ParseSyntaxError+0x73>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
jmp    1188 <ParseSyntaxError+0x78>
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
jmp    1188 <ParseSyntaxError+0x78>
lea    0xf03(%rip),%rdi
call   1030 <printf@plt>
jmp    1188 <ParseSyntaxError+0x78>
jmp    1188 <ParseSyntaxError+0x78>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ParseSyntaxError>:
cmp    $0x2,%edi
ja     112b <ParseSyntaxError+0x1b>
movslq %edi,%rax
lea    0xf91(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
jmp    1030 <puts@plt>
ret

LLVM IR (-O0):
@.str = [68 x i8] c"The correct syntax should be - \22<Name> <ID> <Book Code> <Command>\22\0A\00"
@.str.1 = [56 x i8] c"The correct syntax should be - \22<Command> <Name> <ID>\22\0A\00"
@.str.2 = [53 x i8] c"The correct syntax should be - \22? <Query Variable>\22\0A\00"
define void @ParseSyntaxError(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 %6
i32 2, label %8
]
4: ; preds = %1
%5 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0))
br label %11
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0))
br label %11
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0))
br label %11
10: ; preds = %1
br label %11
11: ; preds = %10, %8, %6, %4
ret void
}

LLVM IR (-O2):
@str = [52 x i8] c"The correct syntax should be - \22? <Query Variable>\22\00"
@str.3 = [55 x i8] c"The correct syntax should be - \22<Command> <Name> <ID>\22\00"
@str.4 = [67 x i8] c"The correct syntax should be - \22<Name> <ID> <Book Code> <Command>\22\00"
@reltable.ParseSyntaxError = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([67 x i8]* @str.4 to i64), i64 ptrtoint ([3 x i32]* @reltable.ParseSyntaxError to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([55 x i8]* @str.3 to i64), i64 ptrtoint ([3 x i32]* @reltable.ParseSyntaxError to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([52 x i8]* @str to i64), i64 ptrtoint ([3 x i32]* @reltable.ParseSyntaxError to i64)) to i32)]
define void @ParseSyntaxError(i32 %0) {
%2 = icmp ult i32 %0, 3
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = shl i64 %4, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.ParseSyntaxError to i8*), i64 %5)
%7 = tail call i32 @puts(i8* dereferenceable(1) %6)
br label %8
8: ; preds = %1, %3
ret void
}