#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void error(int no) {
  switch (no) {
  case 0:
    fprintf(stderr, "Error in rlxs_init\n");
    fprintf(stderr, "Arithmetic on this machine is not suitable for ranlxs\n");
    break;
  case 1:
    fprintf(stderr, "Error in subroutine rlxs_init\n");
    fprintf(stderr, "Bad choice of luxury level (should be 0,1 or 2)\n");
    break;
  case 2:
    fprintf(stderr, "Error in subroutine rlxs_init\n");
    fprintf(stderr, "Bad choice of seed (should be between 1 and 2^31-1)\n");
    break;
  case 3:
    fprintf(stderr, "Error in rlxs_get\n");
    fprintf(stderr, "Undefined state (ranlxs is not initialized)\n");
    break;
  case 4:
    fprintf(stderr, "Error in rlxs_reset\n");
    fprintf(stderr, "Arithmetic on this machine is not suitable for ranlxs\n");
    break;
  case 5:
    fprintf(stderr, "Error in rlxs_reset\n");
    fprintf(stderr, "Unexpected input data\n");
    break;
  }
  fprintf(stderr, "Program aborted\n");
  exit(0);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x5,%rax
ja     1265 <error+0x145>
mov    -0x10(%rbp),%rax
lea    0xeb9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
lea    0xeb7(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1265 <error+0x145>
mov    0x2e5a(%rip),%rax
mov    (%rax),%edi
lea    0xed4(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e45(%rip),%rax
mov    (%rax),%edi
lea    0xede(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1265 <error+0x145>
mov    0x2e2b(%rip),%rax
mov    (%rax),%edi
lea    0xea5(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e16(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1265 <error+0x145>
mov    0x2dfc(%rip),%rax
mov    (%rax),%edi
lea    0xefb(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2de7(%rip),%rax
mov    (%rax),%edi
lea    0xef9(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1265 <error+0x145>
mov    0x2dcd(%rip),%rax
mov    (%rax),%edi
lea    0xf0c(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2db8(%rip),%rax
mov    (%rax),%edi
lea    0xdfb(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1265 <error+0x145>
mov    0x2d9e(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2d89(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2d74(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %r14
push   %rbx
push   %rax
cmp    $0x5,%edi
ja     1162 <error+0x42>
movslq %edi,%rax
lea    0x101d(%rip),%rcx
movslq (%rcx,%rax,4),%rsi
add    %rcx,%rsi
lea    0x1027(%rip),%rcx
movslq (%rcx,%rax,4),%rbx
add    %rcx,%rbx
mov    0x2e91(%rip),%r14
mov    (%r14),%edi
call   1030 <fprintf@plt>
mov    (%r14),%edi
mov    %rbx,%rsi
call   1030 <fprintf@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%edi
lea    0xfca(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"Error in rlxs_init\0A\00"
@.str.1 = [55 x i8] c"Arithmetic on this machine is not suitable for ranlxs\0A\00"
@.str.2 = [31 x i8] c"Error in subroutine rlxs_init\0A\00"
@.str.3 = [49 x i8] c"Bad choice of luxury level (should be 0,1 or 2)\0A\00"
@.str.4 = [53 x i8] c"Bad choice of seed (should be between 1 and 2^31-1)\0A\00"
@.str.5 = [19 x i8] c"Error in rlxs_get\0A\00"
@.str.6 = [45 x i8] c"Undefined state (ranlxs is not initialized)\0A\00"
@.str.7 = [21 x i8] c"Error in rlxs_reset\0A\00"
@.str.8 = [23 x i8] c"Unexpected input data\0A\00"
@.str.9 = [17 x i8] c"Program aborted\0A\00"
define void @error(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %34 [
i32 0, label %4
i32 1, label %9
i32 2, label %14
i32 3, label %19
i32 4, label %24
i32 5, label %29
]
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
br label %34
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.3, i64 0, i64 0))
br label %34
14: ; preds = %1
%15 = load i32, i32* @stderr
%16 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
%17 = load i32, i32* @stderr
%18 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.4, i64 0, i64 0))
br label %34
19: ; preds = %1
%20 = load i32, i32* @stderr
%21 = call i32 @fprintf(i32 %20, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
%22 = load i32, i32* @stderr
%23 = call i32 @fprintf(i32 %22, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0))
br label %34
24: ; preds = %1
%25 = load i32, i32* @stderr
%26 = call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0))
%27 = load i32, i32* @stderr
%28 = call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
br label %34
29: ; preds = %1
%30 = load i32, i32* @stderr
%31 = call i32 @fprintf(i32 %30, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0))
%32 = load i32, i32* @stderr
%33 = call i32 @fprintf(i32 %32, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0))
br label %34
34: ; preds = %1, %29, %24, %19, %14, %9, %4
%35 = load i32, i32* @stderr
%36 = call i32 @fprintf(i32 %35, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0))
%37 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"Error in rlxs_init\0A\00"
@.str.1 = [55 x i8] c"Arithmetic on this machine is not suitable for ranlxs\0A\00"
@.str.2 = [31 x i8] c"Error in subroutine rlxs_init\0A\00"
@.str.3 = [49 x i8] c"Bad choice of luxury level (should be 0,1 or 2)\0A\00"
@.str.4 = [53 x i8] c"Bad choice of seed (should be between 1 and 2^31-1)\0A\00"
@.str.5 = [19 x i8] c"Error in rlxs_get\0A\00"
@.str.6 = [45 x i8] c"Undefined state (ranlxs is not initialized)\0A\00"
@.str.7 = [21 x i8] c"Error in rlxs_reset\0A\00"
@.str.8 = [23 x i8] c"Unexpected input data\0A\00"
@.str.9 = [17 x i8] c"Program aborted\0A\00"
@reltable.error = [6 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str to i64), i64 ptrtoint ([6 x i32]* @reltable.error to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([31 x i8]* @.str.2 to i64), i64 ptrtoint ([6 x i32]* @reltable.error to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([31 x i8]* @.str.2 to i64), i64 ptrtoint ([6 x i32]* @reltable.error to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.5 to i64), i64 ptrtoint ([6 x i32]* @reltable.error to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.7 to i64), i64 ptrtoint ([6 x i32]* @reltable.error to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.7 to i64), i64 ptrtoint ([6 x i32]* @reltable.error to i64)) to i32)]
@reltable.error.11 = [6 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([55 x i8]* @.str.1 to i64), i64 ptrtoint ([6 x i32]* @reltable.error.11 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([49 x i8]* @.str.3 to i64), i64 ptrtoint ([6 x i32]* @reltable.error.11 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([53 x i8]* @.str.4 to i64), i64 ptrtoint ([6 x i32]* @reltable.error.11 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([45 x i8]* @.str.6 to i64), i64 ptrtoint ([6 x i32]* @reltable.error.11 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([55 x i8]* @.str.1 to i64), i64 ptrtoint ([6 x i32]* @reltable.error.11 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([23 x i8]* @.str.8 to i64), i64 ptrtoint ([6 x i32]* @reltable.error.11 to i64)) to i32)]
define void @error(i32 %0) {
%2 = icmp ult i32 %0, 6
br i1 %2, label %3, label %14
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = shl i64 %4, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([6 x i32]* @reltable.error to i8*), i64 %5)
%7 = sext i32 %0 to i64
%8 = shl i64 %7, 2
%9 = call i8* @llvm.load.relative.i64(i8* bitcast ([6 x i32]* @reltable.error.11 to i8*), i64 %8)
%10 = load i32, i32* @stderr
%11 = tail call i32 @fprintf(i32 %10, i8* %6)
%12 = load i32, i32* @stderr
%13 = tail call i32 @fprintf(i32 %12, i8* %9)
br label %14
14: ; preds = %1, %3
%15 = load i32, i32* @stderr
%16 = tail call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0))
%17 = tail call i32 @exit(i32 0)
unreachable
}