#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ isspace(char);
int sscanf(char *, char *, ...);
int /*<<< orphan*/ stderr;
char *strchr(char *, char);
short read_rules(int gcode, char *str, short *prule, float *pval, short *pcap,
                 int linenum) {
  short ret = -1;
  char *p = str;
  char *q;
  if (str && prule && pval) {
    switch (*p) {
    case '\0':
      *prule = -1;
      *pval = 0;
      ret = 0;
      break;
    case '+':
    case '-':
    case '*':
      *prule = (*p == '+' ? 16 : (*p == '-' ? 4 : 1));
      if (*(p + 1) == *p) {
        *prule = (2 * (*prule));
        p++;
      }
      p++;
      if (sscanf(p, "%f", pval) != 1) {
        fprintf(stderr, "Missing value in configuration file line %d\n",
                linenum);
      } else {
        ret = 0;
        if ((*prule == 32) || (*prule == 8) || (*prule == 2)) {
          if ((q = strchr(p, '|')) != NULL) {
            q++;
            if (sscanf(q, "%hd", pcap) != 1) {
              fprintf(stderr,
                      "Invalid limit \"%s\" in configuration file line %d\n", q,
                      linenum);
              ret = -1;
              *pcap = (short)999;
            }
          } else {
            *pcap = (short)999;
          }
        }
      }
      break;
    default:
      while (isspace(*p)) {
        p++;
      }
      if (*p == '\0') {
        *prule = -1;
        *pval = 0;
        ret = 0;
      } else {
        if (gcode == 16) {
          *prule = -1;
          if (sscanf(p, "%f", pval) != 1) {
            fprintf(stderr, "Missing value in configuration file line %d\n",
                    linenum);
          } else {
            ret = 0;
          }
        } else {
          fprintf(stderr, "Invalid rule \"%s\" in configuration file line %d\n",
                  p, linenum);
        }
      }
      break;
    }
  }
  return ret;
}


x86 assembly (clang, -O0):
<read_rules>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
movw   $0xffff,-0x2e(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1458 <read_rules+0x318>
cmpq   $0x0,-0x18(%rbp)
je     1458 <read_rules+0x318>
cmpq   $0x0,-0x20(%rbp)
je     1458 <read_rules+0x318>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x44(%rbp)
test   %eax,%eax
je     11ca <read_rules+0x8a>
jmp    11a5 <read_rules+0x65>
mov    -0x44(%rbp),%eax
add    $0xffffffd6,%eax
sub    $0x2,%eax
jb     11e9 <read_rules+0xa9>
jmp    11b9 <read_rules+0x79>
mov    -0x44(%rbp),%eax
sub    $0x2d,%eax
je     11e9 <read_rules+0xa9>
jmp    1375 <read_rules+0x235>
mov    -0x18(%rbp),%rax
movw   $0xffff,(%rax)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
movw   $0x0,-0x2e(%rbp)
jmp    1453 <read_rules+0x313>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
jne    1206 <read_rules+0xc6>
mov    $0x10,%eax
mov    %eax,-0x48(%rbp)
jmp    1220 <read_rules+0xe0>
mov    -0x38(%rbp),%rax
movsbl (%rax),%edx
mov    $0x1,%eax
mov    $0x4,%ecx
cmp    $0x2d,%edx
cmove  %ecx,%eax
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%eax
mov    %ax,%cx
mov    -0x18(%rbp),%rax
mov    %cx,(%rax)
mov    -0x38(%rbp),%rax
movsbl 0x1(%rax),%eax
mov    -0x38(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1264 <read_rules+0x124>
mov    -0x18(%rbp),%rax
movswl (%rax),%eax
shl    $0x1,%eax
mov    %ax,%cx
mov    -0x18(%rbp),%rax
mov    %cx,(%rax)
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    0xd81(%rip),%rsi
mov    $0x0,%al
call   1060 <sscanf@plt>
cmp    $0x1,%eax
je     12ae <read_rules+0x16e>
mov    0x2d4a(%rip),%rax
mov    (%rax),%edi
mov    -0x2c(%rbp),%edx
lea    0xd61(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1370 <read_rules+0x230>
movw   $0x0,-0x2e(%rbp)
mov    -0x18(%rbp),%rax
movswl (%rax),%eax
cmp    $0x20,%eax
je     12e4 <read_rules+0x1a4>
mov    -0x18(%rbp),%rax
movswl (%rax),%eax
cmp    $0x8,%eax
je     12e4 <read_rules+0x1a4>
mov    -0x18(%rbp),%rax
movswl (%rax),%eax
cmp    $0x2,%eax
jne    136b <read_rules+0x22b>
mov    -0x38(%rbp),%rdi
mov    $0x7c,%esi
call   1030 <strchr@plt>
mov    %rax,-0x40(%rbp)
cmp    $0x0,%rax
je     135d <read_rules+0x21d>
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0x28(%rbp),%rdx
lea    0xd15(%rip),%rsi
mov    $0x0,%al
call   1060 <sscanf@plt>
cmp    $0x1,%eax
je     1358 <read_rules+0x218>
mov    0x2cae(%rip),%rax
mov    (%rax),%edi
mov    -0x40(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
lea    0xcf2(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movw   $0xffff,-0x2e(%rbp)
mov    -0x28(%rbp),%rax
movw   $0x3e7,(%rax)
jmp    1366 <read_rules+0x226>
mov    -0x28(%rbp),%rax
movw   $0x3e7,(%rax)
jmp    136b <read_rules+0x22b>
jmp    1370 <read_rules+0x230>
jmp    1453 <read_rules+0x313>
jmp    137a <read_rules+0x23a>
mov    -0x38(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isspace@plt>
cmp    $0x0,%eax
je     13a0 <read_rules+0x260>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    137a <read_rules+0x23a>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    13cf <read_rules+0x28f>
mov    -0x18(%rbp),%rax
movw   $0xffff,(%rax)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
movw   $0x0,-0x2e(%rbp)
jmp    144e <read_rules+0x30e>
cmpl   $0x10,-0x4(%rbp)
jne    142b <read_rules+0x2eb>
mov    -0x18(%rbp),%rax
movw   $0xffff,(%rax)
mov    -0x38(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    0xc0f(%rip),%rsi
mov    $0x0,%al
call   1060 <sscanf@plt>
cmp    $0x1,%eax
je     1420 <read_rules+0x2e0>
mov    0x2bd8(%rip),%rax
mov    (%rax),%edi
mov    -0x2c(%rbp),%edx
lea    0xbef(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1426 <read_rules+0x2e6>
movw   $0x0,-0x2e(%rbp)
jmp    1449 <read_rules+0x309>
mov    0x2bae(%rip),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
lea    0xc24(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    144e <read_rules+0x30e>
jmp    1453 <read_rules+0x313>
jmp    1458 <read_rules+0x318>
movswl -0x2e(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_rules>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0xffff,%r12w
test   %rsi,%rsi
je     1340 <read_rules+0x200>
mov    %rdx,%rbp
test   %rdx,%rdx
je     1340 <read_rules+0x200>
mov    %rcx,%r13
test   %rcx,%rcx
je     1340 <read_rules+0x200>
mov    %r8,%r15
mov    %rsi,%rbx
mov    %edi,%r14d
mov    (%rsi),%al
movsbl %al,%edi
lea    -0x2a(%rdi),%ecx
cmp    $0x2,%ecx
jb     1198 <read_rules+0x58>
test   %edi,%edi
je     1305 <read_rules+0x1c5>
cmp    $0x2d,%edi
jne    129e <read_rules+0x15e>
xor    %ecx,%ecx
cmp    $0x2d,%al
sete   %cl
cmp    $0x2b,%al
lea    0x1(%rcx,%rcx,2),%ecx
mov    $0x10,%eax
cmovne %ecx,%eax
mov    %ax,0x0(%rbp)
mov    0x1(%rbx),%cl
cmp    (%rbx),%cl
jne    11c7 <read_rules+0x87>
mov    %r9d,%r14d
add    $0x1,%rbx
add    %eax,%eax
mov    %ax,0x0(%rbp)
jmp    11ca <read_rules+0x8a>
mov    %r9d,%r14d
add    $0x1,%rbx
lea    0xe2b(%rip),%rsi
mov    %rbx,%rdi
mov    %r13,%rdx
xor    %eax,%eax
call   1060 <sscanf@plt>
cmp    $0x1,%eax
jne    127a <read_rules+0x13a>
movzwl 0x0(%rbp),%eax
xor    %r12d,%r12d
cmp    $0x20,%rax
ja     1340 <read_rules+0x200>
movabs $0x100000104,%rcx
bt     %rax,%rcx
jae    1340 <read_rules+0x200>
mov    %rbx,%rdi
mov    $0x7c,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1318 <read_rules+0x1d8>
mov    %rax,%rbx
add    $0x1,%rbx
lea    0xdfc(%rip),%rsi
xor    %r12d,%r12d
mov    %rbx,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1060 <sscanf@plt>
cmp    $0x1,%eax
je     1340 <read_rules+0x200>
mov    0x2d8c(%rip),%rax
mov    (%rax),%edi
lea    0xdd7(%rip),%rsi
mov    %rbx,%rdx
mov    %r14d,%ecx
xor    %eax,%eax
call   1050 <fprintf@plt>
movw   $0x3e7,(%r15)
mov    $0xffff,%r12w
jmp    1340 <read_rules+0x200>
mov    0x2d5f(%rip),%rax
mov    (%rax),%edi
lea    0xd79(%rip),%rsi
mov    %r14d,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0xffff,%r12w
jmp    1340 <read_rules+0x200>
mov    %r9d,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
call   1040 <isspace@plt>
test   %eax,%eax
je     12c3 <read_rules+0x183>
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
jmp    12b0 <read_rules+0x170>
cmpb   $0x0,(%rbx)
je     1305 <read_rules+0x1c5>
cmp    $0x10,%r14d
jne    1323 <read_rules+0x1e3>
movw   $0xffff,0x0(%rbp)
lea    0xd25(%rip),%rsi
xor    %r12d,%r12d
mov    %rbx,%rdi
mov    %r13,%rdx
xor    %eax,%eax
call   1060 <sscanf@plt>
cmp    $0x1,%eax
je     1340 <read_rules+0x200>
mov    0x2ce9(%rip),%rax
mov    (%rax),%edi
lea    0xd03(%rip),%rsi
mov    %r15d,%edx
jmp    128d <read_rules+0x14d>
movw   $0xffff,0x0(%rbp)
movl   $0x0,0x0(%r13)
xor    %r12d,%r12d
jmp    1340 <read_rules+0x200>
movw   $0x3e7,(%r15)
xor    %r12d,%r12d
jmp    1340 <read_rules+0x200>
mov    0x2cb6(%rip),%rax
mov    (%rax),%edi
lea    0xd33(%rip),%rsi
mov    %rbx,%rdx
mov    %r15d,%ecx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %r12d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@stderr = global i32 0
@.str.1 = [45 x i8] c"Missing value in configuration file line %d\0A\00"
@.str.2 = [4 x i8] c"%hd\00"
@.str.3 = [50 x i8] c"Invalid limit \22%s\22 in configuration file line %d\0A\00"
@.str.4 = [49 x i8] c"Invalid rule \22%s\22 in configuration file line %d\0A\00"
define signext i16 @read_rules(i32 %0, i8* %1, i16* %2, float* %3, i16* %4, i32 %5) {
%7 = icmp ne i8* %1, null
%8 = icmp ne i16* %2, null
%9 = and i1 %7, %8
%10 = icmp ne float* %3, null
%11 = and i1 %9, %10
br i1 %11, label %12, label %73
12: ; preds = %6
%13 = load i8, i8* %1
%14 = sext i8 %13 to i32
switch i32 %14, label %15 [
i32 0, label %18
i32 43, label %19
i32 45, label %19
i32 42, label %19
]
15: ; preds = %12
%16 = tail call i32 @isspace(i8 signext %13)
%17 = icmp eq i32 %16, 0
br i1 %17, label %57, label %51
18: ; preds = %12
store i16 -1, i16* %2
store float 0.000000e+00, float* %3
br label %73
19: ; preds = %12, %12, %12
%20 = icmp eq i8 %13, 43
%21 = icmp eq i8 %13, 45
%22 = select i1 %21, i16 4, i16 1
%23 = select i1 %20, i16 16, i16 %22
store i16 %23, i16* %2
%24 = getelementptr inbounds i8, i8* %1, i64 1
%25 = load i8, i8* %24
%26 = load i8, i8* %1
%27 = icmp eq i8 %25, %26
br i1 %27, label %28, label %30
28: ; preds = %19
%29 = shl nuw nsw i16 %23, 1
store i16 %29, i16* %2
br label %30
30: ; preds = %28, %19
%31 = phi i8* [ %24, %28 ], [ %1, %19 ]
%32 = getelementptr inbounds i8, i8* %31, i64 1
%33 = tail call i32 (i8*, i8*, ...) @sscanf(i8* %32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %3)
%34 = icmp eq i32 %33, 1
br i1 %34, label %38, label %35
35: ; preds = %30
%36 = load i32, i32* @stderr
%37 = tail call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i32 %5)
br label %73
38: ; preds = %30
%39 = load i16, i16* %2
switch i16 %39, label %73 [
i16 32, label %40
i16 8, label %40
i16 2, label %40
]
40: ; preds = %38, %38, %38
%41 = tail call i8* @strchr(i8* %32, i8 signext 124)
%42 = icmp eq i8* %41, null
br i1 %42, label %50, label %43
43: ; preds = %40
%44 = getelementptr inbounds i8, i8* %41, i64 1
%45 = tail call i32 (i8*, i8*, ...) @sscanf(i8* %44, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i16* %4)
%46 = icmp eq i32 %45, 1
br i1 %46, label %73, label %47
47: ; preds = %43
%48 = load i32, i32* @stderr
%49 = tail call i32 (i32, i8*, ...) @fprintf(i32 %48, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.3, i64 0, i64 0), i8* %44, i32 %5)
store i16 999, i16* %4
br label %73
50: ; preds = %40
store i16 999, i16* %4
br label %73
51: ; preds = %15, %51
%52 = phi i8* [ %53, %51 ], [ %1, %15 ]
%53 = getelementptr inbounds i8, i8* %52, i64 1
%54 = load i8, i8* %53
%55 = tail call i32 @isspace(i8 signext %54)
%56 = icmp eq i32 %55, 0
br i1 %56, label %57, label %51
57: ; preds = %51, %15
%58 = phi i8* [ %1, %15 ], [ %53, %51 ]
%59 = load i8, i8* %58
%60 = icmp eq i8 %59, 0
br i1 %60, label %61, label %62
61: ; preds = %57
store i16 -1, i16* %2
store float 0.000000e+00, float* %3
br label %73
62: ; preds = %57
%63 = icmp eq i32 %0, 16
br i1 %63, label %64, label %70
64: ; preds = %62
store i16 -1, i16* %2
%65 = tail call i32 (i8*, i8*, ...) @sscanf(i8* %58, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %3)
%66 = icmp eq i32 %65, 1
br i1 %66, label %73, label %67
67: ; preds = %64
%68 = load i32, i32* @stderr
%69 = tail call i32 (i32, i8*, ...) @fprintf(i32 %68, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i32 %5)
br label %73
70: ; preds = %62
%71 = load i32, i32* @stderr
%72 = tail call i32 (i32, i8*, ...) @fprintf(i32 %71, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0), i8* %58, i32 %5)
br label %73
73: ; preds = %64, %38, %18, %43, %47, %50, %35, %70, %67, %61, %6
%74 = phi i16 [ 0, %61 ], [ -1, %67 ], [ -1, %70 ], [ -1, %35 ], [ -1, %47 ], [ 0, %43 ], [ 0, %50 ], [ 0, %18 ], [ -1, %6 ], [ 0, %38 ], [ 0, %64 ]
ret i16 %74
}