#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 */
struct ssds_item {
  int dummy;
};
struct ssds_class {
  int dummy;
};

/* Variables and functions */
struct ssds_class *get_action_class(char *);
scalar_t__ isdigit(char);
int sscanf(char *, char *, int *);
struct ssds_item *ssds_find_item(struct ssds_class *, char *);
struct ssds_item *ssds_get_item_id(struct ssds_class *, int);
struct ssds_item *ssds_get_item_num(struct ssds_class *, int);
int strlen(char *);
struct ssds_item *get_action_item(struct ssds_class *pclass, char *saction,
                                  int num) {
  int ret;
  int res;
  int id;
  int inum;
  struct ssds_item *pitem;
  char *sp;
  char *spn;
  char name[32];
  pitem = NULL;
  name[0] = 0;
  spn = name;
  if (!pclass) {
    pclass = get_action_class(saction);
  }
  if (pclass) {
    sp = saction;
    inum = num;
    while (inum--) {
      while (*sp && (*sp != '.'))
        sp++;
      if (*sp == '.')
        sp++;
    }
    while (*sp && (*sp != '.') && (*sp != '=') && (*sp != '&')) {
      *spn++ = *sp++;
    }
    *spn = 0;
    sp = name;
    ret = -1;
    if ((*sp == '0') && (strlen(name) == 1)) {
      ret = 0;
      pitem = ssds_get_item_num(pclass, ret);
    } else if (*sp == '0' && *(sp + 1) && (isdigit(*(sp + 1)))) {
      res = sscanf(sp, "0%d", &ret);
      if (res)
        pitem = ssds_get_item_num(pclass, ret);
    } else if (isdigit(*sp)) {
      res = sscanf(sp, "%d", &id);
      if (res)
        pitem = ssds_get_item_id(pclass, id);
    } else {
      if (strlen(name) > 0)
        pitem = ssds_find_item(pclass, name);
    }
  }
  return pitem;
}


x86 assembly (clang, -O0):
<get_action_item>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movq   $0x0,-0x30(%rbp)
movb   $0x0,-0x60(%rbp)
lea    -0x60(%rbp),%rax
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    11af <get_action_item+0x3f>
mov    -0x10(%rbp),%rdi
call   1070 <get_action_class@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1418 <get_action_item+0x2a8>
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x24(%rbp)
cmp    $0x0,%eax
je     1248 <get_action_item+0xd8>
jmp    11e1 <get_action_item+0x71>
mov    -0x38(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x61(%rbp)
je     1206 <get_action_item+0x96>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
setne  %al
mov    %al,-0x61(%rbp)
mov    -0x61(%rbp),%al
test   $0x1,%al
jne    1216 <get_action_item+0xa6>
jmp    1227 <get_action_item+0xb7>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    11e1 <get_action_item+0x71>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    1243 <get_action_item+0xd3>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    11c8 <get_action_item+0x58>
jmp    124d <get_action_item+0xdd>
mov    -0x38(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x62(%rbp)
je     129c <get_action_item+0x12c>
mov    -0x38(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x2e,%ecx
mov    %al,-0x62(%rbp)
je     129c <get_action_item+0x12c>
mov    -0x38(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x3d,%ecx
mov    %al,-0x62(%rbp)
je     129c <get_action_item+0x12c>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x26,%eax
setne  %al
mov    %al,-0x62(%rbp)
mov    -0x62(%rbp),%al
test   $0x1,%al
jne    12ac <get_action_item+0x13c>
jmp    12d3 <get_action_item+0x163>
mov    -0x38(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x38(%rbp)
mov    (%rax),%cl
mov    -0x40(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x40(%rbp)
mov    %cl,(%rax)
jmp    124d <get_action_item+0xdd>
mov    -0x40(%rbp),%rax
movb   $0x0,(%rax)
lea    -0x60(%rbp),%rax
mov    %rax,-0x38(%rbp)
movl   $0xffffffff,-0x18(%rbp)
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    1327 <get_action_item+0x1b7>
lea    -0x60(%rbp),%rdi
call   1050 <strlen@plt>
cmp    $0x1,%eax
jne    1327 <get_action_item+0x1b7>
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%esi
call   1080 <ssds_get_item_num@plt>
mov    %rax,-0x30(%rbp)
jmp    1413 <get_action_item+0x2a3>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    1395 <get_action_item+0x225>
mov    -0x38(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
je     1395 <get_action_item+0x225>
mov    -0x38(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1040 <isdigit@plt>
cmp    $0x0,%rax
je     1395 <get_action_item+0x225>
mov    -0x38(%rbp),%rdi
lea    0xc96(%rip),%rsi
lea    -0x18(%rbp),%rdx
call   1090 <sscanf@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1390 <get_action_item+0x220>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%esi
call   1080 <ssds_get_item_num@plt>
mov    %rax,-0x30(%rbp)
jmp    140e <get_action_item+0x29e>
mov    -0x38(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isdigit@plt>
cmp    $0x0,%rax
je     13e1 <get_action_item+0x271>
mov    -0x38(%rbp),%rdi
lea    0xc4b(%rip),%rsi
lea    -0x20(%rbp),%rdx
call   1090 <sscanf@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     13dc <get_action_item+0x26c>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%esi
call   1060 <ssds_get_item_id@plt>
mov    %rax,-0x30(%rbp)
jmp    1409 <get_action_item+0x299>
lea    -0x60(%rbp),%rdi
call   1050 <strlen@plt>
cmp    $0x0,%eax
jle    1404 <get_action_item+0x294>
mov    -0x8(%rbp),%rdi
lea    -0x60(%rbp),%rsi
call   1030 <ssds_find_item@plt>
mov    %rax,-0x30(%rbp)
jmp    1409 <get_action_item+0x299>
jmp    140e <get_action_item+0x29e>
jmp    1413 <get_action_item+0x2a3>
jmp    1418 <get_action_item+0x2a8>
mov    -0x30(%rbp),%rax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_action_item>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
mov    %edx,%r15d
mov    %rsi,%rbx
mov    %rdi,%r14
movb   $0x0,0x10(%rsp)
test   %rdi,%rdi
jne    11a0 <get_action_item+0x30>
mov    %rbx,%rdi
call   1070 <get_action_class@plt>
mov    %rax,%r14
test   %rax,%rax
je     135a <get_action_item+0x1ea>
test   %r15d,%r15d
je     1260 <get_action_item+0xf0>
test   $0x1,%r15b
jne    11bd <get_action_item+0x4d>
mov    %r15d,%eax
cmp    $0x1,%r15d
jne    1210 <get_action_item+0xa0>
jmp    1260 <get_action_item+0xf0>
lea    -0x1(%r15),%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl (%rbx),%ecx
cmp    $0x2e,%cl
je     11e2 <get_action_item+0x72>
test   %cl,%cl
je     11e2 <get_action_item+0x72>
add    $0x1,%rbx
jmp    11d0 <get_action_item+0x60>
xor    %edx,%edx
cmp    $0x2e,%cl
sete   %dl
add    %rdx,%rbx
cmp    $0x1,%r15d
jne    1210 <get_action_item+0xa0>
jmp    1260 <get_action_item+0xf0>
xor    %ebx,%ebx
cmp    $0x2e,%dl
sete   %bl
add    %rcx,%rbx
test   %eax,%eax
je     1252 <get_action_item+0xe2>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%rbx),%cl
test   %cl,%cl
je     1221 <get_action_item+0xb1>
cmp    $0x2e,%cl
je     1221 <get_action_item+0xb1>
add    $0x1,%rbx
jmp    1210 <get_action_item+0xa0>
xor    %edx,%edx
cmp    $0x2e,%cl
sete   %dl
add    %rdx,%rbx
add    $0xfffffffe,%eax
mov    %rbx,%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rcx),%edx
cmp    $0x2e,%dl
je     11f5 <get_action_item+0x85>
test   %dl,%dl
je     11f5 <get_action_item+0x85>
add    $0x1,%rcx
jmp    1240 <get_action_item+0xd0>
xor    %eax,%eax
cmp    $0x2e,%dl
sete   %al
add    %rax,%rcx
mov    %rcx,%rbx
xor    %eax,%eax
movabs $0x2000404000000001,%rcx
jmp    1278 <get_action_item+0x108>
xchg   %ax,%ax
mov    %dl,0x10(%rsp,%rax,1)
add    $0x1,%rax
movzbl (%rbx,%rax,1),%edx
cmp    $0x3d,%rdx
ja     1270 <get_action_item+0x100>
bt     %rdx,%rcx
jae    1270 <get_action_item+0x100>
movb   $0x0,0x10(%rsp,%rax,1)
movl   $0xffffffff,0x8(%rsp)
ff
mov    0x10(%rsp),%al
cmp    $0x30,%al
jne    1308 <get_action_item+0x198>
lea    0x10(%rsp),%rdi
call   1050 <strlen@plt>
cmp    $0x1,%eax
jne    12bb <get_action_item+0x14b>
mov    %r14,%rdi
xor    %esi,%esi
call   1080 <ssds_get_item_num@plt>
jmp    135c <get_action_item+0x1ec>
mov    0x10(%rsp),%al
cmp    $0x30,%al
jne    1308 <get_action_item+0x198>
mov    0x11(%rsp),%al
test   %al,%al
je     1300 <get_action_item+0x190>
movsbl %al,%edi
call   1040 <isdigit@plt>
test   %rax,%rax
je     1304 <get_action_item+0x194>
lea    0xd21(%rip),%rsi
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rdx
call   1090 <sscanf@plt>
test   %eax,%eax
je     135a <get_action_item+0x1ea>
mov    0x8(%rsp),%esi
mov    %r14,%rdi
call   1080 <ssds_get_item_num@plt>
jmp    135c <get_action_item+0x1ec>
mov    $0x30,%al
jmp    1308 <get_action_item+0x198>
mov    0x10(%rsp),%al
movsbl %al,%edi
call   1040 <isdigit@plt>
test   %rax,%rax
je     133d <get_action_item+0x1cd>
lea    0xce5(%rip),%rsi
lea    0x10(%rsp),%rdi
lea    0xc(%rsp),%rdx
call   1090 <sscanf@plt>
test   %eax,%eax
je     135a <get_action_item+0x1ea>
mov    0xc(%rsp),%esi
mov    %r14,%rdi
call   1060 <ssds_get_item_id@plt>
jmp    135c <get_action_item+0x1ec>
lea    0x10(%rsp),%rdi
call   1050 <strlen@plt>
test   %eax,%eax
jle    135a <get_action_item+0x1ea>
lea    0x10(%rsp),%rsi
mov    %r14,%rdi
call   1030 <ssds_find_item@plt>
jmp    135c <get_action_item+0x1ec>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.ssds_item = type { i32 }
%struct.ssds_class = type { i32 }
@.str = [4 x i8] c"0%d\00"
@.str.1 = [3 x i8] c"%d\00"
define %struct.ssds_item* @get_action_item(%struct.ssds_class* %0, i8* %1, i32 %2) {
%4 = alloca %struct.ssds_class*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca %struct.ssds_item*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca [32 x i8]
store %struct.ssds_class* %0, %struct.ssds_class** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
store %struct.ssds_item* null, %struct.ssds_item** %11
%15 = getelementptr inbounds [32 x i8], [32 x i8]* %14, i64 0, i64 0
store i8 0, i8* %15
%16 = getelementptr inbounds [32 x i8], [32 x i8]* %14, i64 0, i64 0
store i8* %16, i8** %13
%17 = load %struct.ssds_class*, %struct.ssds_class** %4
%18 = icmp ne %struct.ssds_class* %17, null
br i1 %18, label %22, label %19
19: ; preds = %3
%20 = load i8*, i8** %5
%21 = call %struct.ssds_class* @get_action_class(i8* %20)
store %struct.ssds_class* %21, %struct.ssds_class** %4
br label %22
22: ; preds = %19, %3
%23 = load %struct.ssds_class*, %struct.ssds_class** %4
%24 = icmp ne %struct.ssds_class* %23, null
br i1 %24, label %25, label %155
25: ; preds = %22
%26 = load i8*, i8** %5
store i8* %26, i8** %12
%27 = load i32, i32* %6
store i32 %27, i32* %10
br label %28
28: ; preds = %56, %25
%29 = load i32, i32* %10
%30 = add nsw i32 %29, -1
store i32 %30, i32* %10
%31 = icmp ne i32 %29, 0
br i1 %31, label %32, label %57
32: ; preds = %28
br label %33
33: ; preds = %45, %32
%34 = load i8*, i8** %12
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = icmp ne i32 %36, 0
br i1 %37, label %38, label %43
38: ; preds = %33
%39 = load i8*, i8** %12
%40 = load i8, i8* %39
%41 = sext i8 %40 to i32
%42 = icmp ne i32 %41, 46
br label %43
43: ; preds = %38, %33
%44 = phi i1 [ false, %33 ], [ %42, %38 ]
br i1 %44, label %45, label %48
45: ; preds = %43
%46 = load i8*, i8** %12
%47 = getelementptr inbounds i8, i8* %46, i32 1
store i8* %47, i8** %12
br label %33
48: ; preds = %43
%49 = load i8*, i8** %12
%50 = load i8, i8* %49
%51 = sext i8 %50 to i32
%52 = icmp eq i32 %51, 46
br i1 %52, label %53, label %56
53: ; preds = %48
%54 = load i8*, i8** %12
%55 = getelementptr inbounds i8, i8* %54, i32 1
store i8* %55, i8** %12
br label %56
56: ; preds = %53, %48
br label %28
57: ; preds = %28
br label %58
58: ; preds = %80, %57
%59 = load i8*, i8** %12
%60 = load i8, i8* %59
%61 = sext i8 %60 to i32
%62 = icmp ne i32 %61, 0
br i1 %62, label %63, label %78
63: ; preds = %58
%64 = load i8*, i8** %12
%65 = load i8, i8* %64
%66 = sext i8 %65 to i32
%67 = icmp ne i32 %66, 46
br i1 %67, label %68, label %78
68: ; preds = %63
%69 = load i8*, i8** %12
%70 = load i8, i8* %69
%71 = sext i8 %70 to i32
%72 = icmp ne i32 %71, 61
br i1 %72, label %73, label %78
73: ; preds = %68
%74 = load i8*, i8** %12
%75 = load i8, i8* %74
%76 = sext i8 %75 to i32
%77 = icmp ne i32 %76, 38
br label %78
78: ; preds = %73, %68, %63, %58
%79 = phi i1 [ false, %68 ], [ false, %63 ], [ false, %58 ], [ %77, %73 ]
br i1 %79, label %80, label %86
80: ; preds = %78
%81 = load i8*, i8** %12
%82 = getelementptr inbounds i8, i8* %81, i32 1
store i8* %82, i8** %12
%83 = load i8, i8* %81
%84 = load i8*, i8** %13
%85 = getelementptr inbounds i8, i8* %84, i32 1
store i8* %85, i8** %13
store i8 %83, i8* %84
br label %58
86: ; preds = %78
%87 = load i8*, i8** %13
store i8 0, i8* %87
%88 = getelementptr inbounds [32 x i8], [32 x i8]* %14, i64 0, i64 0
store i8* %88, i8** %12
store i32 -1, i32* %7
%89 = load i8*, i8** %12
%90 = load i8, i8* %89
%91 = sext i8 %90 to i32
%92 = icmp eq i32 %91, 48
br i1 %92, label %93, label %101
93: ; preds = %86
%94 = getelementptr inbounds [32 x i8], [32 x i8]* %14, i64 0, i64 0
%95 = call i32 @strlen(i8* %94)
%96 = icmp eq i32 %95, 1
br i1 %96, label %97, label %101
97: ; preds = %93
store i32 0, i32* %7
%98 = load %struct.ssds_class*, %struct.ssds_class** %4
%99 = load i32, i32* %7
%100 = call %struct.ssds_item* @ssds_get_item_num(%struct.ssds_class* %98, i32 %99)
store %struct.ssds_item* %100, %struct.ssds_item** %11
br label %154
101: ; preds = %93, %86
%102 = load i8*, i8** %12
%103 = load i8, i8* %102
%104 = sext i8 %103 to i32
%105 = icmp eq i32 %104, 48
br i1 %105, label %106, label %128
106: ; preds = %101
%107 = load i8*, i8** %12
%108 = getelementptr inbounds i8, i8* %107, i64 1
%109 = load i8, i8* %108
%110 = sext i8 %109 to i32
%111 = icmp ne i32 %110, 0
br i1 %111, label %112, label %128
112: ; preds = %106
%113 = load i8*, i8** %12
%114 = getelementptr inbounds i8, i8* %113, i64 1
%115 = load i8, i8* %114
%116 = call i64 @isdigit(i8 signext %115)
%117 = icmp ne i64 %116, 0
br i1 %117, label %118, label %128
118: ; preds = %112
%119 = load i8*, i8** %12
%120 = call i32 @sscanf(i8* %119, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %7)
store i32 %120, i32* %8
%121 = load i32, i32* %8
%122 = icmp ne i32 %121, 0
br i1 %122, label %123, label %127
123: ; preds = %118
%124 = load %struct.ssds_class*, %struct.ssds_class** %4
%125 = load i32, i32* %7
%126 = call %struct.ssds_item* @ssds_get_item_num(%struct.ssds_class* %124, i32 %125)
store %struct.ssds_item* %126, %struct.ssds_item** %11
br label %127
127: ; preds = %123, %118
br label %153
128: ; preds = %112, %106, %101
%129 = load i8*, i8** %12
%130 = load i8, i8* %129
%131 = call i64 @isdigit(i8 signext %130)
%132 = icmp ne i64 %131, 0
br i1 %132, label %133, label %143
133: ; preds = %128
%134 = load i8*, i8** %12
%135 = call i32 @sscanf(i8* %134, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %9)
store i32 %135, i32* %8
%136 = load i32, i32* %8
%137 = icmp ne i32 %136, 0
br i1 %137, label %138, label %142
138: ; preds = %133
%139 = load %struct.ssds_class*, %struct.ssds_class** %4
%140 = load i32, i32* %9
%141 = call %struct.ssds_item* @ssds_get_item_id(%struct.ssds_class* %139, i32 %140)
store %struct.ssds_item* %141, %struct.ssds_item** %11
br label %142
142: ; preds = %138, %133
br label %152
143: ; preds = %128
%144 = getelementptr inbounds [32 x i8], [32 x i8]* %14, i64 0, i64 0
%145 = call i32 @strlen(i8* %144)
%146 = icmp sgt i32 %145, 0
br i1 %146, label %147, label %151
147: ; preds = %143
%148 = load %struct.ssds_class*, %struct.ssds_class** %4
%149 = getelementptr inbounds [32 x i8], [32 x i8]* %14, i64 0, i64 0
%150 = call %struct.ssds_item* @ssds_find_item(%struct.ssds_class* %148, i8* %149)
store %struct.ssds_item* %150, %struct.ssds_item** %11
br label %151
151: ; preds = %147, %143
br label %152
152: ; preds = %151, %142
br label %153
153: ; preds = %152, %127
br label %154
154: ; preds = %153, %97
br label %155
155: ; preds = %154, %22
%156 = load %struct.ssds_item*, %struct.ssds_item** %11
ret %struct.ssds_item* %156
}

LLVM IR (-O2):
%struct.ssds_item = type { i32 }
%struct.ssds_class = type { i32 }
@.str = [4 x i8] c"0%d\00"
@.str.1 = [3 x i8] c"%d\00"
define %struct.ssds_item* @get_action_item(%struct.ssds_class* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca [32 x i8]
%7 = bitcast i32* %4 to i8*
%8 = bitcast i32* %5 to i8*
%9 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
store i8 0, i8* %9
%10 = icmp eq %struct.ssds_class* %0, null
br i1 %10, label %11, label %14
11: ; preds = %3
%12 = tail call %struct.ssds_class* @get_action_class(i8* %1)
%13 = icmp eq %struct.ssds_class* %12, null
br i1 %13, label %109, label %14
14: ; preds = %3, %11
%15 = phi %struct.ssds_class* [ %12, %11 ], [ %0, %3 ]
%16 = icmp eq i32 %2, 0
br i1 %16, label %59, label %17
17: ; preds = %14
%18 = and i32 %2, 1
%19 = icmp eq i32 %18, 0
br i1 %19, label %31, label %20
20: ; preds = %17
%21 = add nsw i32 %2, -1
br label %22
22: ; preds = %29, %20
%23 = phi i8* [ %30, %29 ], [ %1, %20 ]
%24 = load i8, i8* %23
switch i8 %24, label %29 [
i8 0, label %25
i8 46, label %25
]
25: ; preds = %22, %22
%26 = icmp eq i8 %24, 46
%27 = zext i1 %26 to i64
%28 = getelementptr i8, i8* %23, i64 %27
br label %31
29: ; preds = %22
%30 = getelementptr inbounds i8, i8* %23, i64 1
br label %22
31: ; preds = %25, %17
%32 = phi i8* [ undef, %17 ], [ %28, %25 ]
%33 = phi i32 [ %2, %17 ], [ %21, %25 ]
%34 = phi i8* [ %1, %17 ], [ %28, %25 ]
%35 = icmp eq i32 %2, 1
br i1 %35, label %59, label %36
36: ; preds = %31, %52
%37 = phi i32 [ %48, %52 ], [ %33, %31 ]
%38 = phi i8* [ %55, %52 ], [ %34, %31 ]
br label %39
39: ; preds = %36, %42
%40 = phi i8* [ %43, %42 ], [ %38, %36 ]
%41 = load i8, i8* %40
switch i8 %41, label %42 [
i8 0, label %44
i8 46, label %44
]
42: ; preds = %39
%43 = getelementptr inbounds i8, i8* %40, i64 1
br label %39
44: ; preds = %39, %39
%45 = icmp eq i8 %41, 46
%46 = zext i1 %45 to i64
%47 = getelementptr i8, i8* %40, i64 %46
%48 = add nsw i32 %37, -2
br label %49
49: ; preds = %57, %44
%50 = phi i8* [ %58, %57 ], [ %47, %44 ]
%51 = load i8, i8* %50
switch i8 %51, label %57 [
i8 0, label %52
i8 46, label %52
]
52: ; preds = %49, %49
%53 = icmp eq i8 %51, 46
%54 = zext i1 %53 to i64
%55 = getelementptr i8, i8* %50, i64 %54
%56 = icmp eq i32 %48, 0
br i1 %56, label %59, label %36
57: ; preds = %49
%58 = getelementptr inbounds i8, i8* %50, i64 1
br label %49
59: ; preds = %31, %52, %14
%60 = phi i8* [ %1, %14 ], [ %32, %31 ], [ %55, %52 ]
br label %61
61: ; preds = %59, %65
%62 = phi i8* [ %66, %65 ], [ %60, %59 ]
%63 = phi i8* [ %67, %65 ], [ %9, %59 ]
%64 = load i8, i8* %62
switch i8 %64, label %65 [
i8 0, label %68
i8 46, label %68
i8 61, label %68
i8 38, label %68
]
65: ; preds = %61
%66 = getelementptr inbounds i8, i8* %62, i64 1
%67 = getelementptr inbounds i8, i8* %63, i64 1
store i8 %64, i8* %63
br label %61
68: ; preds = %61, %61, %61, %61
store i8 0, i8* %63
store i32 -1, i32* %4
%69 = load i8, i8* %9
%70 = icmp eq i8 %69, 48
br i1 %70, label %71, label %94
71: ; preds = %68
%72 = call i32 @strlen(i8* %9)
%73 = icmp eq i32 %72, 1
br i1 %73, label %74, label %76
74: ; preds = %71
%75 = call %struct.ssds_item* @ssds_get_item_num(%struct.ssds_class* %15, i32 0)
br label %109
76: ; preds = %71
%77 = load i8, i8* %9
%78 = icmp eq i8 %77, 48
br i1 %78, label %79, label %94
79: ; preds = %76
%80 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 1
%81 = load i8, i8* %80
%82 = icmp eq i8 %81, 0
br i1 %82, label %94, label %83
83: ; preds = %79
%84 = call i64 @isdigit(i8 signext %81)
%85 = icmp eq i64 %84, 0
br i1 %85, label %86, label %88
86: ; preds = %83
%87 = load i8, i8* %9
br label %94
88: ; preds = %83
%89 = call i32 @sscanf(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %4)
%90 = icmp eq i32 %89, 0
br i1 %90, label %109, label %91
91: ; preds = %88
%92 = load i32, i32* %4
%93 = call %struct.ssds_item* @ssds_get_item_num(%struct.ssds_class* %15, i32 %92)
br label %109
94: ; preds = %86, %68, %79, %76
%95 = phi i8 [ %87, %86 ], [ %69, %68 ], [ 48, %79 ], [ %77, %76 ]
%96 = call i64 @isdigit(i8 signext %95)
%97 = icmp eq i64 %96, 0
br i1 %97, label %104, label %98
98: ; preds = %94
%99 = call i32 @sscanf(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%100 = icmp eq i32 %99, 0
br i1 %100, label %109, label %101
101: ; preds = %98
%102 = load i32, i32* %5
%103 = call %struct.ssds_item* @ssds_get_item_id(%struct.ssds_class* %15, i32 %102)
br label %109
104: ; preds = %94
%105 = call i32 @strlen(i8* %9)
%106 = icmp sgt i32 %105, 0
br i1 %106, label %107, label %109
107: ; preds = %104
%108 = call %struct.ssds_item* @ssds_find_item(%struct.ssds_class* %15, i8* %9)
br label %109
109: ; preds = %74, %101, %98, %107, %104, %88, %91, %11
%110 = phi %struct.ssds_item* [ %75, %74 ], [ %93, %91 ], [ null, %88 ], [ %103, %101 ], [ null, %98 ], [ %108, %107 ], [ null, %104 ], [ null, %11 ]
ret %struct.ssds_item* %110
}