#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*/ abort();
int icctoclrspc(int iccclrspc, int refflag) {
  if (refflag) {
    switch (iccclrspc) {
    case 0x58595a20:
      return (((1) << 8) | (1));
    case 0x4c616220:
      return (((2) << 8) | (1));
    default:
      abort();
      break;
    }
  } else {
    switch (iccclrspc) {
    case 0x59436272:
      return (((5) << 8) | (0));
    case 0x52474220:
      return (((4) << 8) | (0));
    case 0x47524159:
      return (((3) << 8) | (0));
    default:
      abort();
      break;
    }
  }
}


x86 assembly (clang, -O0):
<icctoclrspc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1170 <icctoclrspc+0x60>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x4c616220,%eax
je     115d <icctoclrspc+0x4d>
jmp    113e <icctoclrspc+0x2e>
mov    -0x10(%rbp),%eax
sub    $0x58595a20,%eax
jne    1169 <icctoclrspc+0x59>
jmp    1151 <icctoclrspc+0x41>
movl   $0x101,-0x4(%rbp)
jmp    11d7 <icctoclrspc+0xc7>
movl   $0x201,-0x4(%rbp)
jmp    11d7 <icctoclrspc+0xc7>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
sub    $0x47524159,%eax
je     11c4 <icctoclrspc+0xb4>
jmp    1186 <icctoclrspc+0x76>
mov    -0x14(%rbp),%eax
sub    $0x52474220,%eax
je     11b8 <icctoclrspc+0xa8>
jmp    1199 <icctoclrspc+0x89>
mov    -0x14(%rbp),%eax
sub    $0x59436272,%eax
jne    11d0 <icctoclrspc+0xc0>
jmp    11ac <icctoclrspc+0x9c>
movl   $0x500,-0x4(%rbp)
jmp    11d7 <icctoclrspc+0xc7>
movl   $0x400,-0x4(%rbp)
jmp    11d7 <icctoclrspc+0xc7>
movl   $0x300,-0x4(%rbp)
jmp    11d7 <icctoclrspc+0xc7>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<icctoclrspc>:
push   %rax
test   %esi,%esi
je     1131 <icctoclrspc+0x21>
mov    $0x101,%eax
cmp    $0x58595a20,%edi
je     115a <icctoclrspc+0x4a>
cmp    $0x4c616220,%edi
jne    115c <icctoclrspc+0x4c>
mov    $0x201,%eax
pop    %rcx
ret
cmp    $0x47524159,%edi
je     1155 <icctoclrspc+0x45>
mov    $0x500,%eax
cmp    $0x59436272,%edi
je     115a <icctoclrspc+0x4a>
cmp    $0x52474220,%edi
jne    115c <icctoclrspc+0x4c>
mov    $0x400,%eax
pop    %rcx
ret
mov    $0x300,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @icctoclrspc(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i32, i32* %4
switch i32 %9, label %12 [
i32 1482250784, label %10
i32 1281450528, label %11
]
10: ; preds = %8
store i32 257, i32* %3
br label %21
11: ; preds = %8
store i32 513, i32* %3
br label %21
12: ; preds = %8
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %2
%15 = load i32, i32* %4
switch i32 %15, label %19 [
i32 1497588338, label %16
i32 1380401696, label %17
i32 1196573017, label %18
]
16: ; preds = %14
store i32 1280, i32* %3
br label %21
17: ; preds = %14
store i32 1024, i32* %3
br label %21
18: ; preds = %14
store i32 768, i32* %3
br label %21
19: ; preds = %14
%20 = call i32 (...) @abort()
unreachable
21: ; preds = %18, %17, %16, %11, %10
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @icctoclrspc(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %8, label %4
4: ; preds = %2
switch i32 %0, label %6 [
i32 1482250784, label %13
i32 1281450528, label %5
]
5: ; preds = %4
br label %13
6: ; preds = %4
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %2
switch i32 %0, label %11 [
i32 1497588338, label %13
i32 1380401696, label %9
i32 1196573017, label %10
]
9: ; preds = %8
br label %13
10: ; preds = %8
br label %13
11: ; preds = %8
%12 = tail call i32 (...) @abort()
unreachable
13: ; preds = %8, %4, %10, %9, %5
%14 = phi i32 [ 513, %5 ], [ 768, %10 ], [ 1024, %9 ], [ 257, %4 ], [ 1280, %8 ]
ret i32 %14
}