#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*/ EVP_F_RC2_MAGIC_TO_METH;
int /*<<< orphan*/ EVP_R_UNSUPPORTED_KEY_SIZE;
int /*<<< orphan*/ EVPerr(int /*<<< orphan*/, int /*<<< orphan*/);
int rc2_magic_to_meth(int i) {
  if (i == 0x3a)
    return 128;
  else if (i == 0x78)
    return 64;
  else if (i == 0xa0)
    return 40;
  else {
    EVPerr(EVP_F_RC2_MAGIC_TO_METH, EVP_R_UNSUPPORTED_KEY_SIZE);
    return (0);
  }
}


x86 assembly (clang, -O0):
<rc2_magic_to_meth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x3a,-0x8(%rbp)
jne    1131 <rc2_magic_to_meth+0x21>
movl   $0x80,-0x4(%rbp)
jmp    117e <rc2_magic_to_meth+0x6e>
cmpl   $0x78,-0x8(%rbp)
jne    1147 <rc2_magic_to_meth+0x37>
movl   $0x40,-0x4(%rbp)
jmp    117e <rc2_magic_to_meth+0x6e>
cmpl   $0xa0,-0x8(%rbp)
jne    1160 <rc2_magic_to_meth+0x50>
movl   $0x28,-0x4(%rbp)
jmp    117e <rc2_magic_to_meth+0x6e>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
mov    0x2e78(%rip),%rax
mov    (%rax),%esi
call   1030 <EVPerr@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rc2_magic_to_meth>:
cmp    $0x3a,%edi
je     1128 <rc2_magic_to_meth+0x18>
cmp    $0xa0,%edi
je     112e <rc2_magic_to_meth+0x1e>
cmp    $0x78,%edi
jne    1134 <rc2_magic_to_meth+0x24>
mov    $0x40,%eax
ret
mov    $0x80,%eax
ret
mov    $0x28,%eax
ret
push   %rax
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
mov    0x2ea3(%rip),%rax
mov    (%rax),%esi
call   1030 <EVPerr@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@EVP_F_RC2_MAGIC_TO_METH = global i32 0
@EVP_R_UNSUPPORTED_KEY_SIZE = global i32 0
define i32 @rc2_magic_to_meth(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 58
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 128, i32* %2
br label %19
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 120
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 64, i32* %2
br label %19
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 160
br i1 %13, label %14, label %15
14: ; preds = %11
store i32 40, i32* %2
br label %19
15: ; preds = %11
%16 = load i32, i32* @EVP_F_RC2_MAGIC_TO_METH
%17 = load i32, i32* @EVP_R_UNSUPPORTED_KEY_SIZE
%18 = call i32 @EVPerr(i32 %16, i32 %17)
store i32 0, i32* %2
br label %19
19: ; preds = %15, %14, %10, %6
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
@EVP_F_RC2_MAGIC_TO_METH = global i32 0
@EVP_R_UNSUPPORTED_KEY_SIZE = global i32 0
define i32 @rc2_magic_to_meth(i32 %0) {
switch i32 %0, label %4 [
i32 58, label %8
i32 120, label %2
i32 160, label %3
]
2: ; preds = %1
br label %8
3: ; preds = %1
br label %8
4: ; preds = %1
%5 = load i32, i32* @EVP_F_RC2_MAGIC_TO_METH
%6 = load i32, i32* @EVP_R_UNSUPPORTED_KEY_SIZE
%7 = tail call i32 @EVPerr(i32 %5, i32 %6)
br label %8
8: ; preds = %1, %4, %3, %2
%9 = phi i32 [ 64, %2 ], [ 40, %3 ], [ 0, %4 ], [ 128, %1 ]
ret i32 %9
}