#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 */
typedef int /*<<< orphan*/ names;

/* Variables and functions */
int /*<<< orphan*/ memmove(char *, char *, int);
int strcmp(char const *, char *);
scalar_t__ strlen(char *);
scalar_t__ strncmp(char *, char *, int);
int /*<<< orphan*/ strncpy(char *, char const *, int);
int /*<<< orphan*/ to_lower(char *);
int get_barcode_name(const char *barcode_name) {
  struct name {
    const int symbology;
    const char *n;
  };
  static const struct name names[] = {
      {63, "auspost"},
      {68, "ausredirect"},
      {66, "ausreply"},
      {67, "ausroute"},
      {128, "azrune"},
      {92, "aztec"},
      {128, "aztecrune"},
      {128, "aztecrunes"},
      {4, "c25iata"},
      {7, "c25ind"},
      {3, "c25inter"},
      {6, "c25logic"},
      {2, "c25standard"},
      {140, "channel"},
      {18, "codabar"},
      {74, "codablockf"},
      {1, "code11"},
      {20, "code128"},
      {60, "code128b"},
      {23, "code16k"},
      {129, "code32"},
      {8, "code39"},
      {24, "code49"},
      {25, "code93"},
      {141, "codeone"},
      {93, "daft"},
      {71, "datamatrix"},
      {31, "dbarexp"},
      {134, "dbarexpcc"},
      {81, "dbarexpstk"},
      {139, "dbarexpstkcc"},
      {30, "dbarltd"},
      {133, "dbarltdcc"},
      {29, "dbaromn"},
      {132, "dbaromncc"},
      {80, "dbaromnstk"},
      {138, "dbaromnstkcc"},
      {79, "dbarstk"},
      {137, "dbarstkcc"},
      {115, "dotcode"},
      {96, "dpd"},
      {22, "dpident"},
      {21, "dpleit"},
      {13, "ean"},
      {72, "ean14"},
      {130, "eancc"},
      {14, "eanchk"},
      {13, "eanx"},
      {130, "eanxcc"},
      {14, "eanxchk"},
      {9, "excode39"},
      {49, "fim"},
      {28, "flat"},
      {142, "gridmatrix"},
      {16, "gs1128"},
      {131, "gs1128cc"},
      {116, "hanxin"},
      {98, "hibc128"},
      {99, "hibc39"},
      {112, "hibcaztec"},
      {110, "hibcblockf"},
      {110, "hibccodablockf"},
      {98, "hibccode128"},
      {99, "hibccode39"},
      {102, "hibcdatamatrix"},
      {102, "hibcdm"},
      {108, "hibcmicpdf"},
      {108, "hibcmicropdf"},
      {108, "hibcmicropdf417"},
      {106, "hibcpdf"},
      {106, "hibcpdf417"},
      {104, "hibcqr"},
      {104, "hibcqrcode"},
      {69, "isbnx"},
      {89, "itf14"},
      {76, "japanpost"},
      {90, "kix"},
      {77, "koreapost"},
      {50, "logmars"},
      {121, "mailmark"},
      {57, "maxicode"},
      {84, "micropdf417"},
      {97, "microqr"},
      {47, "msi"},
      {47, "msiplessey"},
      {75, "nve18"},
      {55, "pdf417"},
      {56, "pdf417comp"},
      {51, "pharma"},
      {53, "pharmatwo"},
      {82, "planet"},
      {86, "plessey"},
      {40, "postnet"},
      {52, "pzn"},
      {58, "qr"},
      {58, "qrcode"},
      {70, "rm4scc"},
      {145, "rmqr"},
      {32, "telepen"},
      {87, "telepennum"},
      {144, "ultra"},
      {144, "ultracode"},
      {34, "upca"},
      {135, "upcacc"},
      {35, "upcachk"},
      {37, "upce"},
      {136, "upcecc"},
      {38, "upcechk"},
      {143, "upnqr"},
      {143, "upnqrcode"},
      {85, "uspsimail"},
      {73, "vin"},
  };
  int s = 0, e = ((int)(sizeof(names) / sizeof((names)[0]))) - 1;
  char n[30] = {0};
  int i, j, length;
  strncpy(n, barcode_name, 29);
  to_lower(n);
  length = (int)strlen(n);
  if (strncmp(n, "barcode", 7) == 0) {
    memmove(n, n + 7, length - 7 + 1);
    length = (int)strlen(n);
  }
  for (i = 0, j = 0; i < length; i++) {
    if ((n[i] >= 'a' && n[i] <= 'z') || (n[i] >= '0' && n[i] <= '9')) {
      n[j++] = n[i];
    }
  }
  if (j == 0) {
    return 0;
  }
  n[j] = '\0';
  while (s <= e) {
    int m = (s + e) / 2;
    int cmp = strcmp(names[m].n, n);
    if (cmp < 0) {
      s = m + 1;
    } else if (cmp > 0) {
      e = m - 1;
    } else {
      return names[m].symbology;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<get_barcode_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x6f,-0x18(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x1e,%edx
call   2070 <memset@plt>
lea    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x1d,%edx
call   2030 <strncpy@plt>
lea    -0x40(%rbp),%rdi
call   2060 <to_lower@plt>
lea    -0x40(%rbp),%rdi
call   2050 <strlen@plt>
mov    %eax,-0x4c(%rbp)
lea    -0x40(%rbp),%rdi
lea    0x118b(%rip),%rsi
mov    $0x7,%edx
call   2040 <strncmp@plt>
cmp    $0x0,%rax
jne    2206 <get_barcode_name+0x96>
lea    -0x40(%rbp),%rdi
lea    -0x40(%rbp),%rsi
add    $0x7,%rsi
mov    -0x4c(%rbp),%edx
sub    $0x7,%edx
add    $0x1,%edx
call   2090 <memmove@plt>
lea    -0x40(%rbp),%rdi
call   2050 <strlen@plt>
mov    %eax,-0x4c(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jge    2294 <get_barcode_name+0x124>
movslq -0x44(%rbp),%rax
movsbl -0x40(%rbp,%rax,1),%eax
cmp    $0x61,%eax
jl     2244 <get_barcode_name+0xd4>
movslq -0x44(%rbp),%rax
movsbl -0x40(%rbp,%rax,1),%eax
cmp    $0x7a,%eax
jle    2268 <get_barcode_name+0xf8>
movslq -0x44(%rbp),%rax
movsbl -0x40(%rbp,%rax,1),%eax
cmp    $0x30,%eax
jl     2281 <get_barcode_name+0x111>
movslq -0x44(%rbp),%rax
movsbl -0x40(%rbp,%rax,1),%eax
cmp    $0x39,%eax
jg     2281 <get_barcode_name+0x111>
movslq -0x44(%rbp),%rax
mov    -0x40(%rbp,%rax,1),%cl
mov    -0x48(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x48(%rbp)
cltq
mov    %cl,-0x40(%rbp,%rax,1)
jmp    2286 <get_barcode_name+0x116>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    2214 <get_barcode_name+0xa4>
cmpl   $0x0,-0x48(%rbp)
jne    22aa <get_barcode_name+0x13a>
movl   $0x0,-0x4(%rbp)
jmp    234f <get_barcode_name+0x1df>
movslq -0x48(%rbp),%rax
movb   $0x0,-0x40(%rbp,%rax,1)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     2348 <get_barcode_name+0x1d8>
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x50(%rbp)
movslq -0x50(%rbp),%rcx
lea    0x2445(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    0x8(%rax),%rdi
lea    -0x40(%rbp),%rsi
call   2080 <strcmp@plt>
mov    %eax,-0x54(%rbp)
cmpl   $0x0,-0x54(%rbp)
jge    230a <get_barcode_name+0x19a>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    2343 <get_barcode_name+0x1d3>
cmpl   $0x0,-0x54(%rbp)
jle    2322 <get_barcode_name+0x1b2>
mov    -0x50(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    233e <get_barcode_name+0x1ce>
movslq -0x50(%rbp),%rcx
lea    0x23f3(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    234f <get_barcode_name+0x1df>
jmp    2343 <get_barcode_name+0x1d3>
jmp    22b3 <get_barcode_name+0x143>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_barcode_name>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdi,%rsi
xorps  %xmm0,%xmm0
movups %xmm0,0xe(%rsp)
movaps %xmm0,(%rsp)
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x1d,%edx
call   2030 <strncpy@plt>
mov    %r14,%rdi
call   2060 <to_lower@plt>
mov    %r14,%rdi
call   2050 <strlen@plt>
mov    %rax,%rbx
lea    0x11b0(%rip),%rsi
mov    %r14,%rdi
mov    $0x7,%edx
call   2040 <strncmp@plt>
test   %rax,%rax
je     21c2 <get_barcode_name+0x62>
test   %ebx,%ebx
jg     21ea <get_barcode_name+0x8a>
jmp    2301 <get_barcode_name+0x1a1>
lea    0x7(%rsp),%rsi
add    $0xfffffffa,%ebx
mov    %rsp,%r14
mov    %r14,%rdi
mov    %ebx,%edx
call   2080 <memmove@plt>
mov    %r14,%rdi
call   2050 <strlen@plt>
mov    %rax,%rbx
test   %ebx,%ebx
jle    2301 <get_barcode_name+0x1a1>
mov    %ebx,%ecx
cmp    $0x1,%ebx
jne    2287 <get_barcode_name+0x127>
xor    %edx,%edx
xor    %eax,%eax
test   $0x1,%cl
je     2219 <get_barcode_name+0xb9>
mov    (%rsp,%rdx,1),%cl
lea    -0x61(%rcx),%edx
cmp    $0x1a,%dl
jb     22f0 <get_barcode_name+0x190>
lea    -0x30(%rcx),%edx
cmp    $0x9,%dl
jbe    22f0 <get_barcode_name+0x190>
test   %eax,%eax
je     2301 <get_barcode_name+0x1a1>
cltq
movb   $0x0,(%rsp,%rax,1)
mov    $0x6f,%r13d
xor    %r12d,%r12d
lea    0x24e9(%rip),%r14
mov    %rsp,%r15
jmp    224f <get_barcode_name+0xef>
nopl   0x0(%rax)
add    $0x1,%ebp
mov    %ebp,%r12d
cmp    %r13d,%r12d
jg     2301 <get_barcode_name+0x1a1>
lea    (%r12,%r13,1),%eax
mov    %eax,%ebp
shr    $0x1f,%ebp
add    %eax,%ebp
sar    %ebp
movslq %ebp,%rbx
shl    $0x4,%rbx
mov    0x8(%rbx,%r14,1),%rdi
mov    %r15,%rsi
call   2070 <strcmp@plt>
test   %eax,%eax
js     2240 <get_barcode_name+0xe0>
je     2312 <get_barcode_name+0x1b2>
add    $0xffffffff,%ebp
mov    %ebp,%r13d
cmp    %r13d,%r12d
jle    224f <get_barcode_name+0xef>
jmp    2301 <get_barcode_name+0x1a1>
mov    %ecx,%esi
and    $0xfffffffe,%esi
xor    %edx,%edx
xor    %eax,%eax
jmp    22b7 <get_barcode_name+0x157>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movslq %eax,%rbp
add    $0x1,%eax
mov    %dil,(%rsp,%rbp,1)
add    $0x2,%rdx
cmp    %rdx,%rsi
je     21f9 <get_barcode_name+0x99>
movzbl (%rsp,%rdx,1),%edi
lea    -0x61(%rdi),%ebp
cmp    $0x1a,%bpl
jb     22cd <get_barcode_name+0x16d>
lea    -0x30(%rdi),%ebp
cmp    $0x9,%bpl
ja     22d7 <get_barcode_name+0x177>
movslq %eax,%rbp
add    $0x1,%eax
mov    %dil,(%rsp,%rbp,1)
movzbl 0x1(%rsp,%rdx,1),%edi
lea    -0x61(%rdi),%ebp
cmp    $0x1a,%bpl
jb     22a0 <get_barcode_name+0x140>
lea    -0x30(%rdi),%ebp
cmp    $0x9,%bpl
ja     22aa <get_barcode_name+0x14a>
jmp    22a0 <get_barcode_name+0x140>
movslq %eax,%rdx
add    $0x1,%eax
mov    %cl,(%rsp,%rdx,1)
test   %eax,%eax
jne    2221 <get_barcode_name+0xc1>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    (%rbx,%r14,1),%eax
jmp    2303 <get_barcode_name+0x1a3>

LLVM IR (-O0):
%struct.name = type { i32, i8* }
@get_barcode_name.names = internal constant [112 x %struct.name] [%struct.name { i32 63, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0) }, %struct.name { i32 68, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i32 0, i32 0) }, %struct.name { i32 66, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i32 0, i32 0) }, %struct.name { i32 67, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i32 0, i32 0) }, %struct.name { i32 128, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i32 0, i32 0) }, %struct.name { i32 92, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i32 0, i32 0) }, %struct.name { i32 128, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i32 0, i32 0) }, %struct.name { i32 128, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i32 0, i32 0) }, %struct.name { i32 4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i32 0, i32 0) }, %struct.name { i32 7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i32 0, i32 0) }, %struct.name { i32 3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i32 0, i32 0) }, %struct.name { i32 6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i32 0, i32 0) }, %struct.name { i32 2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i32 0, i32 0) }, %struct.name { i32 140, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i32 0, i32 0) }, %struct.name { i32 18, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i32 0, i32 0) }, %struct.name { i32 74, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i32 0, i32 0) }, %struct.name { i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i32 0, i32 0) }, %struct.name { i32 20, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i32 0, i32 0) }, %struct.name { i32 60, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.18, i32 0, i32 0) }, %struct.name { i32 23, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.19, i32 0, i32 0) }, %struct.name { i32 129, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i32 0, i32 0) }, %struct.name { i32 8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.21, i32 0, i32 0) }, %struct.name { i32 24, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.22, i32 0, i32 0) }, %struct.name { i32 25, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.23, i32 0, i32 0) }, %struct.name { i32 141, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.24, i32 0, i32 0) }, %struct.name { i32 93, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.25, i32 0, i32 0) }, %struct.name { i32 71, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.26, i32 0, i32 0) }, %struct.name { i32 31, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.27, i32 0, i32 0) }, %struct.name { i32 134, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.28, i32 0, i32 0) }, %struct.name { i32 81, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.29, i32 0, i32 0) }, %struct.name { i32 139, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.30, i32 0, i32 0) }, %struct.name { i32 30, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.31, i32 0, i32 0) }, %struct.name { i32 133, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.32, i32 0, i32 0) }, %struct.name { i32 29, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.33, i32 0, i32 0) }, %struct.name { i32 132, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.34, i32 0, i32 0) }, %struct.name { i32 80, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.35, i32 0, i32 0) }, %struct.name { i32 138, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.36, i32 0, i32 0) }, %struct.name { i32 79, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.37, i32 0, i32 0) }, %struct.name { i32 137, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.38, i32 0, i32 0) }, %struct.name { i32 115, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.39, i32 0, i32 0) }, %struct.name { i32 96, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.40, i32 0, i32 0) }, %struct.name { i32 22, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.41, i32 0, i32 0) }, %struct.name { i32 21, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.42, i32 0, i32 0) }, %struct.name { i32 13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.43, i32 0, i32 0) }, %struct.name { i32 72, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.44, i32 0, i32 0) }, %struct.name { i32 130, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.45, i32 0, i32 0) }, %struct.name { i32 14, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.46, i32 0, i32 0) }, %struct.name { i32 13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.47, i32 0, i32 0) }, %struct.name { i32 130, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.48, i32 0, i32 0) }, %struct.name { i32 14, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.49, i32 0, i32 0) }, %struct.name { i32 9, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.50, i32 0, i32 0) }, %struct.name { i32 49, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.51, i32 0, i32 0) }, %struct.name { i32 28, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.52, i32 0, i32 0) }, %struct.name { i32 142, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.53, i32 0, i32 0) }, %struct.name { i32 16, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.54, i32 0, i32 0) }, %struct.name { i32 131, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.55, i32 0, i32 0) }, %struct.name { i32 116, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.56, i32 0, i32 0) }, %struct.name { i32 98, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.57, i32 0, i32 0) }, %struct.name { i32 99, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.58, i32 0, i32 0) }, %struct.name { i32 112, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.59, i32 0, i32 0) }, %struct.name { i32 110, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.60, i32 0, i32 0) }, %struct.name { i32 110, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.61, i32 0, i32 0) }, %struct.name { i32 98, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.62, i32 0, i32 0) }, %struct.name { i32 99, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.63, i32 0, i32 0) }, %struct.name { i32 102, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.64, i32 0, i32 0) }, %struct.name { i32 102, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.65, i32 0, i32 0) }, %struct.name { i32 108, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.66, i32 0, i32 0) }, %struct.name { i32 108, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.67, i32 0, i32 0) }, %struct.name { i32 108, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.68, i32 0, i32 0) }, %struct.name { i32 106, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.69, i32 0, i32 0) }, %struct.name { i32 106, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.70, i32 0, i32 0) }, %struct.name { i32 104, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.71, i32 0, i32 0) }, %struct.name { i32 104, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.72, i32 0, i32 0) }, %struct.name { i32 69, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.73, i32 0, i32 0) }, %struct.name { i32 89, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.74, i32 0, i32 0) }, %struct.name { i32 76, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.75, i32 0, i32 0) }, %struct.name { i32 90, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.76, i32 0, i32 0) }, %struct.name { i32 77, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.77, i32 0, i32 0) }, %struct.name { i32 50, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.78, i32 0, i32 0) }, %struct.name { i32 121, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.79, i32 0, i32 0) }, %struct.name { i32 57, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.80, i32 0, i32 0) }, %struct.name { i32 84, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.81, i32 0, i32 0) }, %struct.name { i32 97, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.82, i32 0, i32 0) }, %struct.name { i32 47, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.83, i32 0, i32 0) }, %struct.name { i32 47, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.84, i32 0, i32 0) }, %struct.name { i32 75, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.85, i32 0, i32 0) }, %struct.name { i32 55, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.86, i32 0, i32 0) }, %struct.name { i32 56, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.87, i32 0, i32 0) }, %struct.name { i32 51, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.88, i32 0, i32 0) }, %struct.name { i32 53, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.89, i32 0, i32 0) }, %struct.name { i32 82, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.90, i32 0, i32 0) }, %struct.name { i32 86, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.91, i32 0, i32 0) }, %struct.name { i32 40, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.92, i32 0, i32 0) }, %struct.name { i32 52, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.93, i32 0, i32 0) }, %struct.name { i32 58, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.94, i32 0, i32 0) }, %struct.name { i32 58, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.95, i32 0, i32 0) }, %struct.name { i32 70, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.96, i32 0, i32 0) }, %struct.name { i32 145, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.97, i32 0, i32 0) }, %struct.name { i32 32, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.98, i32 0, i32 0) }, %struct.name { i32 87, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.99, i32 0, i32 0) }, %struct.name { i32 144, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.100, i32 0, i32 0) }, %struct.name { i32 144, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.101, i32 0, i32 0) }, %struct.name { i32 34, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.102, i32 0, i32 0) }, %struct.name { i32 135, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.103, i32 0, i32 0) }, %struct.name { i32 35, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.104, i32 0, i32 0) }, %struct.name { i32 37, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.105, i32 0, i32 0) }, %struct.name { i32 136, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.106, i32 0, i32 0) }, %struct.name { i32 38, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.107, i32 0, i32 0) }, %struct.name { i32 143, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.108, i32 0, i32 0) }, %struct.name { i32 143, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.109, i32 0, i32 0) }, %struct.name { i32 85, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.110, i32 0, i32 0) }, %struct.name { i32 73, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.111, i32 0, i32 0) }]
@.str = [8 x i8] c"auspost\00"
@.str.1 = [12 x i8] c"ausredirect\00"
@.str.2 = [9 x i8] c"ausreply\00"
@.str.3 = [9 x i8] c"ausroute\00"
@.str.4 = [7 x i8] c"azrune\00"
@.str.5 = [6 x i8] c"aztec\00"
@.str.6 = [10 x i8] c"aztecrune\00"
@.str.7 = [11 x i8] c"aztecrunes\00"
@.str.8 = [8 x i8] c"c25iata\00"
@.str.9 = [7 x i8] c"c25ind\00"
@.str.10 = [9 x i8] c"c25inter\00"
@.str.11 = [9 x i8] c"c25logic\00"
@.str.12 = [12 x i8] c"c25standard\00"
@.str.13 = [8 x i8] c"channel\00"
@.str.14 = [8 x i8] c"codabar\00"
@.str.15 = [11 x i8] c"codablockf\00"
@.str.16 = [7 x i8] c"code11\00"
@.str.17 = [8 x i8] c"code128\00"
@.str.18 = [9 x i8] c"code128b\00"
@.str.19 = [8 x i8] c"code16k\00"
@.str.20 = [7 x i8] c"code32\00"
@.str.21 = [7 x i8] c"code39\00"
@.str.22 = [7 x i8] c"code49\00"
@.str.23 = [7 x i8] c"code93\00"
@.str.24 = [8 x i8] c"codeone\00"
@.str.25 = [5 x i8] c"daft\00"
@.str.26 = [11 x i8] c"datamatrix\00"
@.str.27 = [8 x i8] c"dbarexp\00"
@.str.28 = [10 x i8] c"dbarexpcc\00"
@.str.29 = [11 x i8] c"dbarexpstk\00"
@.str.30 = [13 x i8] c"dbarexpstkcc\00"
@.str.31 = [8 x i8] c"dbarltd\00"
@.str.32 = [10 x i8] c"dbarltdcc\00"
@.str.33 = [8 x i8] c"dbaromn\00"
@.str.34 = [10 x i8] c"dbaromncc\00"
@.str.35 = [11 x i8] c"dbaromnstk\00"
@.str.36 = [13 x i8] c"dbaromnstkcc\00"
@.str.37 = [8 x i8] c"dbarstk\00"
@.str.38 = [10 x i8] c"dbarstkcc\00"
@.str.39 = [8 x i8] c"dotcode\00"
@.str.40 = [4 x i8] c"dpd\00"
@.str.41 = [8 x i8] c"dpident\00"
@.str.42 = [7 x i8] c"dpleit\00"
@.str.43 = [4 x i8] c"ean\00"
@.str.44 = [6 x i8] c"ean14\00"
@.str.45 = [6 x i8] c"eancc\00"
@.str.46 = [7 x i8] c"eanchk\00"
@.str.47 = [5 x i8] c"eanx\00"
@.str.48 = [7 x i8] c"eanxcc\00"
@.str.49 = [8 x i8] c"eanxchk\00"
@.str.50 = [9 x i8] c"excode39\00"
@.str.51 = [4 x i8] c"fim\00"
@.str.52 = [5 x i8] c"flat\00"
@.str.53 = [11 x i8] c"gridmatrix\00"
@.str.54 = [7 x i8] c"gs1128\00"
@.str.55 = [9 x i8] c"gs1128cc\00"
@.str.56 = [7 x i8] c"hanxin\00"
@.str.57 = [8 x i8] c"hibc128\00"
@.str.58 = [7 x i8] c"hibc39\00"
@.str.59 = [10 x i8] c"hibcaztec\00"
@.str.60 = [11 x i8] c"hibcblockf\00"
@.str.61 = [15 x i8] c"hibccodablockf\00"
@.str.62 = [12 x i8] c"hibccode128\00"
@.str.63 = [11 x i8] c"hibccode39\00"
@.str.64 = [15 x i8] c"hibcdatamatrix\00"
@.str.65 = [7 x i8] c"hibcdm\00"
@.str.66 = [11 x i8] c"hibcmicpdf\00"
@.str.67 = [13 x i8] c"hibcmicropdf\00"
@.str.68 = [16 x i8] c"hibcmicropdf417\00"
@.str.69 = [8 x i8] c"hibcpdf\00"
@.str.70 = [11 x i8] c"hibcpdf417\00"
@.str.71 = [7 x i8] c"hibcqr\00"
@.str.72 = [11 x i8] c"hibcqrcode\00"
@.str.73 = [6 x i8] c"isbnx\00"
@.str.74 = [6 x i8] c"itf14\00"
@.str.75 = [10 x i8] c"japanpost\00"
@.str.76 = [4 x i8] c"kix\00"
@.str.77 = [10 x i8] c"koreapost\00"
@.str.78 = [8 x i8] c"logmars\00"
@.str.79 = [9 x i8] c"mailmark\00"
@.str.80 = [9 x i8] c"maxicode\00"
@.str.81 = [12 x i8] c"micropdf417\00"
@.str.82 = [8 x i8] c"microqr\00"
@.str.83 = [4 x i8] c"msi\00"
@.str.84 = [11 x i8] c"msiplessey\00"
@.str.85 = [6 x i8] c"nve18\00"
@.str.86 = [7 x i8] c"pdf417\00"
@.str.87 = [11 x i8] c"pdf417comp\00"
@.str.88 = [7 x i8] c"pharma\00"
@.str.89 = [10 x i8] c"pharmatwo\00"
@.str.90 = [7 x i8] c"planet\00"
@.str.91 = [8 x i8] c"plessey\00"
@.str.92 = [8 x i8] c"postnet\00"
@.str.93 = [4 x i8] c"pzn\00"
@.str.94 = [3 x i8] c"qr\00"
@.str.95 = [7 x i8] c"qrcode\00"
@.str.96 = [7 x i8] c"rm4scc\00"
@.str.97 = [5 x i8] c"rmqr\00"
@.str.98 = [8 x i8] c"telepen\00"
@.str.99 = [11 x i8] c"telepennum\00"
@.str.100 = [6 x i8] c"ultra\00"
@.str.101 = [10 x i8] c"ultracode\00"
@.str.102 = [5 x i8] c"upca\00"
@.str.103 = [7 x i8] c"upcacc\00"
@.str.104 = [8 x i8] c"upcachk\00"
@.str.105 = [5 x i8] c"upce\00"
@.str.106 = [7 x i8] c"upcecc\00"
@.str.107 = [8 x i8] c"upcechk\00"
@.str.108 = [6 x i8] c"upnqr\00"
@.str.109 = [10 x i8] c"upnqrcode\00"
@.str.110 = [10 x i8] c"uspsimail\00"
@.str.111 = [4 x i8] c"vin\00"
@.str.112 = [8 x i8] c"barcode\00"
define i32 @get_barcode_name(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca [30 x i8]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
store i32 111, i32* %5
%12 = bitcast [30 x i8]* %6 to i8*
%13 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%14 = load i8*, i8** %3
%15 = call i32 @strncpy(i8* %13, i8* %14, i32 29)
%16 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%17 = call i32 @to_lower(i8* %16)
%18 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%19 = call i64 @strlen(i8* %18)
%20 = trunc i64 %19 to i32
store i32 %20, i32* %9
%21 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%22 = call i64 @strncmp(i8* %21, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.112, i64 0, i64 0), i32 7)
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %35
24: ; preds = %1
%25 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%26 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%27 = getelementptr inbounds i8, i8* %26, i64 7
%28 = load i32, i32* %9
%29 = sub nsw i32 %28, 7
%30 = add nsw i32 %29, 1
%31 = call i32 @memmove(i8* %25, i8* %27, i32 %30)
%32 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%33 = call i64 @strlen(i8* %32)
%34 = trunc i64 %33 to i32
store i32 %34, i32* %9
br label %35
35: ; preds = %24, %1
store i32 0, i32* %7
store i32 0, i32* %8
br label %36
36: ; preds = %78, %35
%37 = load i32, i32* %7
%38 = load i32, i32* %9
%39 = icmp slt i32 %37, %38
br i1 %39, label %40, label %81
40: ; preds = %36
%41 = load i32, i32* %7
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 %42
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = icmp sge i32 %45, 97
br i1 %46, label %47, label %54
47: ; preds = %40
%48 = load i32, i32* %7
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 %49
%51 = load i8, i8* %50
%52 = sext i8 %51 to i32
%53 = icmp sle i32 %52, 122
br i1 %53, label %68, label %54
54: ; preds = %47, %40
%55 = load i32, i32* %7
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 %56
%58 = load i8, i8* %57
%59 = sext i8 %58 to i32
%60 = icmp sge i32 %59, 48
br i1 %60, label %61, label %77
61: ; preds = %54
%62 = load i32, i32* %7
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 %63
%65 = load i8, i8* %64
%66 = sext i8 %65 to i32
%67 = icmp sle i32 %66, 57
br i1 %67, label %68, label %77
68: ; preds = %61, %47
%69 = load i32, i32* %7
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 %70
%72 = load i8, i8* %71
%73 = load i32, i32* %8
%74 = add nsw i32 %73, 1
store i32 %74, i32* %8
%75 = sext i32 %73 to i64
%76 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 %75
store i8 %72, i8* %76
br label %77
77: ; preds = %68, %61, %54
br label %78
78: ; preds = %77
%79 = load i32, i32* %7
%80 = add nsw i32 %79, 1
store i32 %80, i32* %7
br label %36
81: ; preds = %36
%82 = load i32, i32* %8
%83 = icmp eq i32 %82, 0
br i1 %83, label %84, label %85
84: ; preds = %81
store i32 0, i32* %2
br label %125
85: ; preds = %81
%86 = load i32, i32* %8
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 %87
store i8 0, i8* %88
br label %89
89: ; preds = %123, %85
%90 = load i32, i32* %4
%91 = load i32, i32* %5
%92 = icmp sle i32 %90, %91
br i1 %92, label %93, label %124
93: ; preds = %89
%94 = load i32, i32* %4
%95 = load i32, i32* %5
%96 = add nsw i32 %94, %95
%97 = sdiv i32 %96, 2
store i32 %97, i32* %10
%98 = load i32, i32* %10
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds [112 x %struct.name], [112 x %struct.name]* @get_barcode_name.names, i64 0, i64 %99
%101 = getelementptr inbounds %struct.name, %struct.name* %100, i32 0, i32 1
%102 = load i8*, i8** %101
%103 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%104 = call i32 @strcmp(i8* %102, i8* %103)
store i32 %104, i32* %11
%105 = load i32, i32* %11
%106 = icmp slt i32 %105, 0
br i1 %106, label %107, label %110
107: ; preds = %93
%108 = load i32, i32* %10
%109 = add nsw i32 %108, 1
store i32 %109, i32* %4
br label %123
110: ; preds = %93
%111 = load i32, i32* %11
%112 = icmp sgt i32 %111, 0
br i1 %112, label %113, label %116
113: ; preds = %110
%114 = load i32, i32* %10
%115 = sub nsw i32 %114, 1
store i32 %115, i32* %5
br label %122
116: ; preds = %110
%117 = load i32, i32* %10
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds [112 x %struct.name], [112 x %struct.name]* @get_barcode_name.names, i64 0, i64 %118
%120 = getelementptr inbounds %struct.name, %struct.name* %119, i32 0, i32 0
%121 = load i32, i32* %120
store i32 %121, i32* %2
br label %125
122: ; preds = %113
br label %123
123: ; preds = %122, %107
br label %89
124: ; preds = %89
store i32 0, i32* %2
br label %125
125: ; preds = %124, %116, %84
%126 = load i32, i32* %2
ret i32 %126
}

LLVM IR (-O2):
%struct.name = type { i32, i8* }
@get_barcode_name.names = internal unnamed_addr constant [112 x %struct.name] [%struct.name { i32 63, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0) }, %struct.name { i32 68, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i32 0, i32 0) }, %struct.name { i32 66, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i32 0, i32 0) }, %struct.name { i32 67, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i32 0, i32 0) }, %struct.name { i32 128, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i32 0, i32 0) }, %struct.name { i32 92, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i32 0, i32 0) }, %struct.name { i32 128, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i32 0, i32 0) }, %struct.name { i32 128, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i32 0, i32 0) }, %struct.name { i32 4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i32 0, i32 0) }, %struct.name { i32 7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i32 0, i32 0) }, %struct.name { i32 3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i32 0, i32 0) }, %struct.name { i32 6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i32 0, i32 0) }, %struct.name { i32 2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i32 0, i32 0) }, %struct.name { i32 140, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i32 0, i32 0) }, %struct.name { i32 18, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i32 0, i32 0) }, %struct.name { i32 74, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i32 0, i32 0) }, %struct.name { i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i32 0, i32 0) }, %struct.name { i32 20, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i32 0, i32 0) }, %struct.name { i32 60, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.18, i32 0, i32 0) }, %struct.name { i32 23, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.19, i32 0, i32 0) }, %struct.name { i32 129, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i32 0, i32 0) }, %struct.name { i32 8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.21, i32 0, i32 0) }, %struct.name { i32 24, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.22, i32 0, i32 0) }, %struct.name { i32 25, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.23, i32 0, i32 0) }, %struct.name { i32 141, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.24, i32 0, i32 0) }, %struct.name { i32 93, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.25, i32 0, i32 0) }, %struct.name { i32 71, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.26, i32 0, i32 0) }, %struct.name { i32 31, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.27, i32 0, i32 0) }, %struct.name { i32 134, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.28, i32 0, i32 0) }, %struct.name { i32 81, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.29, i32 0, i32 0) }, %struct.name { i32 139, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.30, i32 0, i32 0) }, %struct.name { i32 30, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.31, i32 0, i32 0) }, %struct.name { i32 133, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.32, i32 0, i32 0) }, %struct.name { i32 29, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.33, i32 0, i32 0) }, %struct.name { i32 132, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.34, i32 0, i32 0) }, %struct.name { i32 80, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.35, i32 0, i32 0) }, %struct.name { i32 138, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.36, i32 0, i32 0) }, %struct.name { i32 79, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.37, i32 0, i32 0) }, %struct.name { i32 137, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.38, i32 0, i32 0) }, %struct.name { i32 115, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.39, i32 0, i32 0) }, %struct.name { i32 96, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.40, i32 0, i32 0) }, %struct.name { i32 22, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.41, i32 0, i32 0) }, %struct.name { i32 21, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.42, i32 0, i32 0) }, %struct.name { i32 13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.43, i32 0, i32 0) }, %struct.name { i32 72, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.44, i32 0, i32 0) }, %struct.name { i32 130, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.45, i32 0, i32 0) }, %struct.name { i32 14, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.46, i32 0, i32 0) }, %struct.name { i32 13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.47, i32 0, i32 0) }, %struct.name { i32 130, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.48, i32 0, i32 0) }, %struct.name { i32 14, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.49, i32 0, i32 0) }, %struct.name { i32 9, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.50, i32 0, i32 0) }, %struct.name { i32 49, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.51, i32 0, i32 0) }, %struct.name { i32 28, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.52, i32 0, i32 0) }, %struct.name { i32 142, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.53, i32 0, i32 0) }, %struct.name { i32 16, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.54, i32 0, i32 0) }, %struct.name { i32 131, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.55, i32 0, i32 0) }, %struct.name { i32 116, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.56, i32 0, i32 0) }, %struct.name { i32 98, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.57, i32 0, i32 0) }, %struct.name { i32 99, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.58, i32 0, i32 0) }, %struct.name { i32 112, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.59, i32 0, i32 0) }, %struct.name { i32 110, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.60, i32 0, i32 0) }, %struct.name { i32 110, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.61, i32 0, i32 0) }, %struct.name { i32 98, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.62, i32 0, i32 0) }, %struct.name { i32 99, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.63, i32 0, i32 0) }, %struct.name { i32 102, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.64, i32 0, i32 0) }, %struct.name { i32 102, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.65, i32 0, i32 0) }, %struct.name { i32 108, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.66, i32 0, i32 0) }, %struct.name { i32 108, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.67, i32 0, i32 0) }, %struct.name { i32 108, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.68, i32 0, i32 0) }, %struct.name { i32 106, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.69, i32 0, i32 0) }, %struct.name { i32 106, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.70, i32 0, i32 0) }, %struct.name { i32 104, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.71, i32 0, i32 0) }, %struct.name { i32 104, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.72, i32 0, i32 0) }, %struct.name { i32 69, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.73, i32 0, i32 0) }, %struct.name { i32 89, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.74, i32 0, i32 0) }, %struct.name { i32 76, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.75, i32 0, i32 0) }, %struct.name { i32 90, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.76, i32 0, i32 0) }, %struct.name { i32 77, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.77, i32 0, i32 0) }, %struct.name { i32 50, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.78, i32 0, i32 0) }, %struct.name { i32 121, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.79, i32 0, i32 0) }, %struct.name { i32 57, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.80, i32 0, i32 0) }, %struct.name { i32 84, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.81, i32 0, i32 0) }, %struct.name { i32 97, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.82, i32 0, i32 0) }, %struct.name { i32 47, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.83, i32 0, i32 0) }, %struct.name { i32 47, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.84, i32 0, i32 0) }, %struct.name { i32 75, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.85, i32 0, i32 0) }, %struct.name { i32 55, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.86, i32 0, i32 0) }, %struct.name { i32 56, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.87, i32 0, i32 0) }, %struct.name { i32 51, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.88, i32 0, i32 0) }, %struct.name { i32 53, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.89, i32 0, i32 0) }, %struct.name { i32 82, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.90, i32 0, i32 0) }, %struct.name { i32 86, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.91, i32 0, i32 0) }, %struct.name { i32 40, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.92, i32 0, i32 0) }, %struct.name { i32 52, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.93, i32 0, i32 0) }, %struct.name { i32 58, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.94, i32 0, i32 0) }, %struct.name { i32 58, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.95, i32 0, i32 0) }, %struct.name { i32 70, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.96, i32 0, i32 0) }, %struct.name { i32 145, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.97, i32 0, i32 0) }, %struct.name { i32 32, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.98, i32 0, i32 0) }, %struct.name { i32 87, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.99, i32 0, i32 0) }, %struct.name { i32 144, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.100, i32 0, i32 0) }, %struct.name { i32 144, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.101, i32 0, i32 0) }, %struct.name { i32 34, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.102, i32 0, i32 0) }, %struct.name { i32 135, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.103, i32 0, i32 0) }, %struct.name { i32 35, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.104, i32 0, i32 0) }, %struct.name { i32 37, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.105, i32 0, i32 0) }, %struct.name { i32 136, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.106, i32 0, i32 0) }, %struct.name { i32 38, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.107, i32 0, i32 0) }, %struct.name { i32 143, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.108, i32 0, i32 0) }, %struct.name { i32 143, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.109, i32 0, i32 0) }, %struct.name { i32 85, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.110, i32 0, i32 0) }, %struct.name { i32 73, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.111, i32 0, i32 0) }]
@.str = [8 x i8] c"auspost\00"
@.str.1 = [12 x i8] c"ausredirect\00"
@.str.2 = [9 x i8] c"ausreply\00"
@.str.3 = [9 x i8] c"ausroute\00"
@.str.4 = [7 x i8] c"azrune\00"
@.str.5 = [6 x i8] c"aztec\00"
@.str.6 = [10 x i8] c"aztecrune\00"
@.str.7 = [11 x i8] c"aztecrunes\00"
@.str.8 = [8 x i8] c"c25iata\00"
@.str.9 = [7 x i8] c"c25ind\00"
@.str.10 = [9 x i8] c"c25inter\00"
@.str.11 = [9 x i8] c"c25logic\00"
@.str.12 = [12 x i8] c"c25standard\00"
@.str.13 = [8 x i8] c"channel\00"
@.str.14 = [8 x i8] c"codabar\00"
@.str.15 = [11 x i8] c"codablockf\00"
@.str.16 = [7 x i8] c"code11\00"
@.str.17 = [8 x i8] c"code128\00"
@.str.18 = [9 x i8] c"code128b\00"
@.str.19 = [8 x i8] c"code16k\00"
@.str.20 = [7 x i8] c"code32\00"
@.str.21 = [7 x i8] c"code39\00"
@.str.22 = [7 x i8] c"code49\00"
@.str.23 = [7 x i8] c"code93\00"
@.str.24 = [8 x i8] c"codeone\00"
@.str.25 = [5 x i8] c"daft\00"
@.str.26 = [11 x i8] c"datamatrix\00"
@.str.27 = [8 x i8] c"dbarexp\00"
@.str.28 = [10 x i8] c"dbarexpcc\00"
@.str.29 = [11 x i8] c"dbarexpstk\00"
@.str.30 = [13 x i8] c"dbarexpstkcc\00"
@.str.31 = [8 x i8] c"dbarltd\00"
@.str.32 = [10 x i8] c"dbarltdcc\00"
@.str.33 = [8 x i8] c"dbaromn\00"
@.str.34 = [10 x i8] c"dbaromncc\00"
@.str.35 = [11 x i8] c"dbaromnstk\00"
@.str.36 = [13 x i8] c"dbaromnstkcc\00"
@.str.37 = [8 x i8] c"dbarstk\00"
@.str.38 = [10 x i8] c"dbarstkcc\00"
@.str.39 = [8 x i8] c"dotcode\00"
@.str.40 = [4 x i8] c"dpd\00"
@.str.41 = [8 x i8] c"dpident\00"
@.str.42 = [7 x i8] c"dpleit\00"
@.str.43 = [4 x i8] c"ean\00"
@.str.44 = [6 x i8] c"ean14\00"
@.str.45 = [6 x i8] c"eancc\00"
@.str.46 = [7 x i8] c"eanchk\00"
@.str.47 = [5 x i8] c"eanx\00"
@.str.48 = [7 x i8] c"eanxcc\00"
@.str.49 = [8 x i8] c"eanxchk\00"
@.str.50 = [9 x i8] c"excode39\00"
@.str.51 = [4 x i8] c"fim\00"
@.str.52 = [5 x i8] c"flat\00"
@.str.53 = [11 x i8] c"gridmatrix\00"
@.str.54 = [7 x i8] c"gs1128\00"
@.str.55 = [9 x i8] c"gs1128cc\00"
@.str.56 = [7 x i8] c"hanxin\00"
@.str.57 = [8 x i8] c"hibc128\00"
@.str.58 = [7 x i8] c"hibc39\00"
@.str.59 = [10 x i8] c"hibcaztec\00"
@.str.60 = [11 x i8] c"hibcblockf\00"
@.str.61 = [15 x i8] c"hibccodablockf\00"
@.str.62 = [12 x i8] c"hibccode128\00"
@.str.63 = [11 x i8] c"hibccode39\00"
@.str.64 = [15 x i8] c"hibcdatamatrix\00"
@.str.65 = [7 x i8] c"hibcdm\00"
@.str.66 = [11 x i8] c"hibcmicpdf\00"
@.str.67 = [13 x i8] c"hibcmicropdf\00"
@.str.68 = [16 x i8] c"hibcmicropdf417\00"
@.str.69 = [8 x i8] c"hibcpdf\00"
@.str.70 = [11 x i8] c"hibcpdf417\00"
@.str.71 = [7 x i8] c"hibcqr\00"
@.str.72 = [11 x i8] c"hibcqrcode\00"
@.str.73 = [6 x i8] c"isbnx\00"
@.str.74 = [6 x i8] c"itf14\00"
@.str.75 = [10 x i8] c"japanpost\00"
@.str.76 = [4 x i8] c"kix\00"
@.str.77 = [10 x i8] c"koreapost\00"
@.str.78 = [8 x i8] c"logmars\00"
@.str.79 = [9 x i8] c"mailmark\00"
@.str.80 = [9 x i8] c"maxicode\00"
@.str.81 = [12 x i8] c"micropdf417\00"
@.str.82 = [8 x i8] c"microqr\00"
@.str.83 = [4 x i8] c"msi\00"
@.str.84 = [11 x i8] c"msiplessey\00"
@.str.85 = [6 x i8] c"nve18\00"
@.str.86 = [7 x i8] c"pdf417\00"
@.str.87 = [11 x i8] c"pdf417comp\00"
@.str.88 = [7 x i8] c"pharma\00"
@.str.89 = [10 x i8] c"pharmatwo\00"
@.str.90 = [7 x i8] c"planet\00"
@.str.91 = [8 x i8] c"plessey\00"
@.str.92 = [8 x i8] c"postnet\00"
@.str.93 = [4 x i8] c"pzn\00"
@.str.94 = [3 x i8] c"qr\00"
@.str.95 = [7 x i8] c"qrcode\00"
@.str.96 = [7 x i8] c"rm4scc\00"
@.str.97 = [5 x i8] c"rmqr\00"
@.str.98 = [8 x i8] c"telepen\00"
@.str.99 = [11 x i8] c"telepennum\00"
@.str.100 = [6 x i8] c"ultra\00"
@.str.101 = [10 x i8] c"ultracode\00"
@.str.102 = [5 x i8] c"upca\00"
@.str.103 = [7 x i8] c"upcacc\00"
@.str.104 = [8 x i8] c"upcachk\00"
@.str.105 = [5 x i8] c"upce\00"
@.str.106 = [7 x i8] c"upcecc\00"
@.str.107 = [8 x i8] c"upcechk\00"
@.str.108 = [6 x i8] c"upnqr\00"
@.str.109 = [10 x i8] c"upnqrcode\00"
@.str.110 = [10 x i8] c"uspsimail\00"
@.str.111 = [4 x i8] c"vin\00"
@.str.112 = [8 x i8] c"barcode\00"
define i32 @get_barcode_name(i8* %0) {
%2 = alloca [30 x i8]
%3 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%4 = call i32 @strncpy(i8* %3, i8* %0, i32 29)
%5 = call i32 @to_lower(i8* %3)
%6 = call i64 @strlen(i8* %3)
%7 = trunc i64 %6 to i32
%8 = call i64 @strncmp(i8* %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.112, i64 0, i64 0), i32 7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %1
%11 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 7
%12 = add nsw i32 %7, -6
%13 = call i32 @memmove(i8* %3, i8* %11, i32 %12)
%14 = call i64 @strlen(i8* %3)
%15 = trunc i64 %14 to i32
br label %16
16: ; preds = %10, %1
%17 = phi i32 [ %15, %10 ], [ %7, %1 ]
%18 = icmp sgt i32 %17, 0
br i1 %18, label %19, label %105
19: ; preds = %16
%20 = zext i32 %17 to i64
%21 = and i64 %20, 1
%22 = icmp eq i32 %17, 1
br i1 %22, label %59, label %23
23: ; preds = %19
%24 = and i64 %20, 4294967294
br label %25
25: ; preds = %54, %23
%26 = phi i64 [ 0, %23 ], [ %56, %54 ]
%27 = phi i32 [ 0, %23 ], [ %55, %54 ]
%28 = phi i64 [ 0, %23 ], [ %57, %54 ]
%29 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 %26
%30 = load i8, i8* %29
%31 = add i8 %30, -97
%32 = icmp ult i8 %31, 26
%33 = add i8 %30, -48
%34 = icmp ult i8 %33, 10
%35 = or i1 %32, %34
br i1 %35, label %36, label %40
36: ; preds = %25
%37 = add nsw i32 %27, 1
%38 = sext i32 %27 to i64
%39 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 %38
store i8 %30, i8* %39
br label %40
40: ; preds = %25, %36
%41 = phi i32 [ %37, %36 ], [ %27, %25 ]
%42 = or i64 %26, 1
%43 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 %42
%44 = load i8, i8* %43
%45 = add i8 %44, -97
%46 = icmp ult i8 %45, 26
%47 = add i8 %44, -48
%48 = icmp ult i8 %47, 10
%49 = or i1 %46, %48
br i1 %49, label %50, label %54
50: ; preds = %40
%51 = add nsw i32 %41, 1
%52 = sext i32 %41 to i64
%53 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 %52
store i8 %44, i8* %53
br label %54
54: ; preds = %50, %40
%55 = phi i32 [ %51, %50 ], [ %41, %40 ]
%56 = add nuw nsw i64 %26, 2
%57 = add i64 %28, 2
%58 = icmp eq i64 %57, %24
br i1 %58, label %59, label %25
59: ; preds = %54, %19
%60 = phi i32 [ undef, %19 ], [ %55, %54 ]
%61 = phi i64 [ 0, %19 ], [ %56, %54 ]
%62 = phi i32 [ 0, %19 ], [ %55, %54 ]
%63 = icmp eq i64 %21, 0
br i1 %63, label %76, label %64
64: ; preds = %59
%65 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 %61
%66 = load i8, i8* %65
%67 = add i8 %66, -97
%68 = icmp ult i8 %67, 26
%69 = add i8 %66, -48
%70 = icmp ult i8 %69, 10
%71 = or i1 %68, %70
br i1 %71, label %72, label %76
72: ; preds = %64
%73 = add nsw i32 %62, 1
%74 = sext i32 %62 to i64
%75 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 %74
store i8 %66, i8* %75
br label %76
76: ; preds = %64, %72, %59
%77 = phi i32 [ %60, %59 ], [ %73, %72 ], [ %62, %64 ]
%78 = icmp eq i32 %77, 0
br i1 %78, label %105, label %79
79: ; preds = %76
%80 = sext i32 %77 to i64
%81 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 %80
store i8 0, i8* %81
br label %82
82: ; preds = %79, %101
%83 = phi i32 [ 0, %79 ], [ %103, %101 ]
%84 = phi i32 [ 111, %79 ], [ %102, %101 ]
%85 = add nsw i32 %83, %84
%86 = sdiv i32 %85, 2
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [112 x %struct.name], [112 x %struct.name]* @get_barcode_name.names, i64 0, i64 %87, i32 1
%89 = load i8*, i8** %88
%90 = call i32 @strcmp(i8* dereferenceable(1) %89, i8* %3)
%91 = icmp slt i32 %90, 0
br i1 %91, label %92, label %94
92: ; preds = %82
%93 = add nsw i32 %86, 1
br label %101
94: ; preds = %82
%95 = icmp eq i32 %90, 0
br i1 %95, label %98, label %96
96: ; preds = %94
%97 = add nsw i32 %86, -1
br label %101
98: ; preds = %94
%99 = getelementptr inbounds [112 x %struct.name], [112 x %struct.name]* @get_barcode_name.names, i64 0, i64 %87, i32 0
%100 = load i32, i32* %99
br label %105
101: ; preds = %92, %96
%102 = phi i32 [ %84, %92 ], [ %97, %96 ]
%103 = phi i32 [ %93, %92 ], [ %83, %96 ]
%104 = icmp sgt i32 %103, %102
br i1 %104, label %105, label %82
105: ; preds = %101, %16, %98, %76
%106 = phi i32 [ 0, %76 ], [ %100, %98 ], [ 0, %16 ], [ 0, %101 ]
ret i32 %106
}