#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 */
size_t get_char_position(char pos_char) {
  size_t result;
  if (pos_char >= '2' && pos_char <= '7') {
    result = 25 + (pos_char - '2');
  } else if (pos_char >= 'a' && pos_char <= 'z') {
    result = (pos_char - 'a');
  } else {
    result = 260;
  }
  return result;
}


x86 assembly (clang, -O0):
<get_char_position>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x32,%eax
jl     1139 <get_char_position+0x39>
movsbl -0x1(%rbp),%eax
cmp    $0x37,%eax
jg     1139 <get_char_position+0x39>
movsbl -0x1(%rbp),%eax
sub    $0x32,%eax
add    $0x19,%eax
cltq
mov    %rax,-0x10(%rbp)
jmp    1172 <get_char_position+0x72>
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1165 <get_char_position+0x65>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
jg     1165 <get_char_position+0x65>
movsbl -0x1(%rbp),%eax
sub    $0x61,%eax
cltq
mov    %rax,-0x10(%rbp)
jmp    116d <get_char_position+0x6d>
movq   $0x104,-0x10(%rbp)
jmp    1172 <get_char_position+0x72>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_char_position>:
lea    -0x32(%rdi),%eax
cmp    $0x5,%al
ja     110d <get_char_position+0xd>
add    $0xffffffe7,%edi
mov    %edi,%eax
ret
lea    -0x61(%rdi),%eax
add    $0xffffff9f,%edi
cmp    $0x1a,%al
mov    $0x104,%eax
cmovb  %edi,%eax
mov    %eax,%edi
mov    %edi,%eax
ret

LLVM IR (-O0):
define i64 @get_char_position(i8 signext %0) {
%2 = alloca i8
%3 = alloca i64
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 50
br i1 %6, label %7, label %17
7: ; preds = %1
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 55
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 50
%15 = add nsw i32 25, %14
%16 = sext i32 %15 to i64
store i64 %16, i64* %3
br label %32
17: ; preds = %7, %1
%18 = load i8, i8* %2
%19 = sext i8 %18 to i32
%20 = icmp sge i32 %19, 97
br i1 %20, label %21, label %30
21: ; preds = %17
%22 = load i8, i8* %2
%23 = sext i8 %22 to i32
%24 = icmp sle i32 %23, 122
br i1 %24, label %25, label %30
25: ; preds = %21
%26 = load i8, i8* %2
%27 = sext i8 %26 to i32
%28 = sub nsw i32 %27, 97
%29 = sext i32 %28 to i64
store i64 %29, i64* %3
br label %31
30: ; preds = %21, %17
store i64 260, i64* %3
br label %31
31: ; preds = %30, %25
br label %32
32: ; preds = %31, %11
%33 = load i64, i64* %3
ret i64 %33
}

LLVM IR (-O2):
define i64 @get_char_position(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add i8 %0, -50
%4 = icmp ult i8 %3, 6
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = add nsw i32 %2, -25
br label %12
7: ; preds = %1
%8 = add i8 %0, -97
%9 = icmp ult i8 %8, 26
%10 = add nsw i32 %2, -97
%11 = select i1 %9, i32 %10, i32 260
br label %12
12: ; preds = %7, %5
%13 = phi i32 [ %6, %5 ], [ %11, %7 ]
%14 = zext i32 %13 to i64
ret i64 %14
}