#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*/ isdigit(char);
scalar_t__ strcmp(char *, char *);
int strlen(char *);
int ffinttyp(char *cval, int *dtype, int *negative, int *status) {
  int ii, len;
  char *p;
  if (*status > 0)
    return (*status);
  *dtype = 0;
  *negative = 0;
  p = cval;
  if (*p == '+') {
    p++;
  } else if (*p == '-') {
    p++;
    *negative = 1;
  }
  if (*p == '0') {
    while (*p == '0')
      p++;
    if (*p == 0) {
      *dtype = 12;
      return (*status);
    }
  }
  len = strlen(p);
  for (ii = 0; ii < len; ii++) {
    if (!isdigit(*(p + ii))) {
      *status = 403;
      return (*status);
    }
  }
  if (len == 0) {
    *status = 204;
  } else if (len < 3) {
    *dtype = 12;
  } else if (len == 4) {
    *dtype = 21;
  } else if (len > 5 && len < 10) {
    *dtype = 31;
  } else if (len > 10 && len < 19) {
    *dtype = 81;
  } else if (len > 19) {
    *status = 403;
  } else {
    if (!(*negative)) {
      if (len == 3) {
        if (strcmp(p, "127") <= 0) {
          *dtype = 12;
        } else if (strcmp(p, "255") <= 0) {
          *dtype = 11;
        } else {
          *dtype = 21;
        }
      } else if (len == 5) {
        if (strcmp(p, "32767") <= 0) {
          *dtype = 21;
        } else if (strcmp(p, "65535") <= 0) {
          *dtype = 20;
        } else {
          *dtype = 31;
        }
      } else if (len == 10) {
        if (strcmp(p, "2147483647") <= 0) {
          *dtype = 31;
        } else if (strcmp(p, "4294967295") <= 0) {
          *dtype = 30;
        } else {
          *dtype = 81;
        }
      } else if (len == 19) {
        if (strcmp(p, "9223372036854775807") <= 0) {
          *dtype = 81;
        } else {
          *status = 403;
        }
      }
    } else {
      if (len == 3) {
        if (strcmp(p, "128") <= 0) {
          *dtype = 12;
        } else {
          *dtype = 21;
        }
      } else if (len == 5) {
        if (strcmp(p, "32768") <= 0) {
          *dtype = 21;
        } else {
          *dtype = 31;
        }
      } else if (len == 10) {
        if (strcmp(p, "2147483648") <= 0) {
          *dtype = 31;
        } else {
          *dtype = 81;
        }
      } else if (len == 19) {
        if (strcmp(p, "9223372036854775808") <= 0) {
          *dtype = 81;
        } else {
          *status = 403;
        }
      }
    }
  }
  return (*status);
}


x86 assembly (clang, -O0):
<ffinttyp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmpl   $0x0,(%rax)
jle    1163 <ffinttyp+0x33>
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1632 <ffinttyp+0x502>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
jne    11a0 <ffinttyp+0x70>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    11cb <ffinttyp+0x9b>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    11c6 <ffinttyp+0x96>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
jmp    11cb <ffinttyp+0x9b>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    122e <ffinttyp+0xfe>
jmp    11e0 <ffinttyp+0xb0>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    1201 <ffinttyp+0xd1>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    11e0 <ffinttyp+0xb0>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1229 <ffinttyp+0xf9>
mov    -0x18(%rbp),%rax
movl   $0xc,(%rax)
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1632 <ffinttyp+0x502>
jmp    122e <ffinttyp+0xfe>
mov    -0x38(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x30(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    1292 <ffinttyp+0x162>
mov    -0x38(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    127f <ffinttyp+0x14f>
mov    -0x28(%rbp),%rax
movl   $0x193,(%rax)
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1632 <ffinttyp+0x502>
jmp    1284 <ffinttyp+0x154>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1241 <ffinttyp+0x111>
cmpl   $0x0,-0x30(%rbp)
jne    12ab <ffinttyp+0x17b>
mov    -0x28(%rbp),%rax
movl   $0xcc,(%rax)
jmp    1629 <ffinttyp+0x4f9>
cmpl   $0x3,-0x30(%rbp)
jge    12c4 <ffinttyp+0x194>
mov    -0x18(%rbp),%rax
movl   $0xc,(%rax)
jmp    1624 <ffinttyp+0x4f4>
cmpl   $0x4,-0x30(%rbp)
jne    12dd <ffinttyp+0x1ad>
mov    -0x18(%rbp),%rax
movl   $0x15,(%rax)
jmp    161f <ffinttyp+0x4ef>
cmpl   $0x5,-0x30(%rbp)
jle    1300 <ffinttyp+0x1d0>
cmpl   $0xa,-0x30(%rbp)
jge    1300 <ffinttyp+0x1d0>
mov    -0x18(%rbp),%rax
movl   $0x1f,(%rax)
jmp    161a <ffinttyp+0x4ea>
cmpl   $0xa,-0x30(%rbp)
jle    1323 <ffinttyp+0x1f3>
cmpl   $0x13,-0x30(%rbp)
jge    1323 <ffinttyp+0x1f3>
mov    -0x18(%rbp),%rax
movl   $0x51,(%rax)
jmp    1615 <ffinttyp+0x4e5>
cmpl   $0x13,-0x30(%rbp)
jle    133c <ffinttyp+0x20c>
mov    -0x28(%rbp),%rax
movl   $0x193,(%rax)
jmp    1610 <ffinttyp+0x4e0>
mov    -0x20(%rbp),%rax
cmpl   $0x0,(%rax)
jne    14ef <ffinttyp+0x3bf>
cmpl   $0x3,-0x30(%rbp)
jne    13b9 <ffinttyp+0x289>
mov    -0x38(%rbp),%rdi
lea    0xca2(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jg     137c <ffinttyp+0x24c>
mov    -0x18(%rbp),%rax
movl   $0xc,(%rax)
jmp    13b4 <ffinttyp+0x284>
mov    -0x38(%rbp),%rdi
lea    0xc7d(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jg     13a5 <ffinttyp+0x275>
mov    -0x18(%rbp),%rax
movl   $0xb,(%rax)
jmp    13af <ffinttyp+0x27f>
mov    -0x18(%rbp),%rax
movl   $0x15,(%rax)
jmp    13b4 <ffinttyp+0x284>
jmp    14ea <ffinttyp+0x3ba>
cmpl   $0x5,-0x30(%rbp)
jne    1429 <ffinttyp+0x2f9>
mov    -0x38(%rbp),%rdi
lea    0xc3a(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jg     13ec <ffinttyp+0x2bc>
mov    -0x18(%rbp),%rax
movl   $0x15,(%rax)
jmp    1424 <ffinttyp+0x2f4>
mov    -0x38(%rbp),%rdi
lea    0xc17(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jg     1415 <ffinttyp+0x2e5>
mov    -0x18(%rbp),%rax
movl   $0x14,(%rax)
jmp    141f <ffinttyp+0x2ef>
mov    -0x18(%rbp),%rax
movl   $0x1f,(%rax)
jmp    1424 <ffinttyp+0x2f4>
jmp    14e5 <ffinttyp+0x3b5>
cmpl   $0xa,-0x30(%rbp)
jne    1499 <ffinttyp+0x369>
mov    -0x38(%rbp),%rdi
lea    0xbd6(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jg     145c <ffinttyp+0x32c>
mov    -0x18(%rbp),%rax
movl   $0x1f,(%rax)
jmp    1494 <ffinttyp+0x364>
mov    -0x38(%rbp),%rdi
lea    0xbb8(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jg     1485 <ffinttyp+0x355>
mov    -0x18(%rbp),%rax
movl   $0x1e,(%rax)
jmp    148f <ffinttyp+0x35f>
mov    -0x18(%rbp),%rax
movl   $0x51,(%rax)
jmp    1494 <ffinttyp+0x364>
jmp    14e0 <ffinttyp+0x3b0>
cmpl   $0x13,-0x30(%rbp)
jne    14db <ffinttyp+0x3ab>
mov    -0x38(%rbp),%rdi
lea    0xb7c(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jg     14cc <ffinttyp+0x39c>
mov    -0x18(%rbp),%rax
movl   $0x51,(%rax)
jmp    14d6 <ffinttyp+0x3a6>
mov    -0x28(%rbp),%rax
movl   $0x193,(%rax)
jmp    14db <ffinttyp+0x3ab>
jmp    14e0 <ffinttyp+0x3b0>
jmp    14e5 <ffinttyp+0x3b5>
jmp    14ea <ffinttyp+0x3ba>
jmp    160b <ffinttyp+0x4db>
cmpl   $0x3,-0x30(%rbp)
jne    1531 <ffinttyp+0x401>
mov    -0x38(%rbp),%rdi
lea    0xb3a(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jg     1522 <ffinttyp+0x3f2>
mov    -0x18(%rbp),%rax
movl   $0xc,(%rax)
jmp    152c <ffinttyp+0x3fc>
mov    -0x18(%rbp),%rax
movl   $0x15,(%rax)
jmp    1606 <ffinttyp+0x4d6>
cmpl   $0x5,-0x30(%rbp)
jne    1573 <ffinttyp+0x443>
mov    -0x38(%rbp),%rdi
lea    0xafc(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jg     1564 <ffinttyp+0x434>
mov    -0x18(%rbp),%rax
movl   $0x15,(%rax)
jmp    156e <ffinttyp+0x43e>
mov    -0x18(%rbp),%rax
movl   $0x1f,(%rax)
jmp    1601 <ffinttyp+0x4d1>
cmpl   $0xa,-0x30(%rbp)
jne    15b5 <ffinttyp+0x485>
mov    -0x38(%rbp),%rdi
lea    0xac0(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jg     15a6 <ffinttyp+0x476>
mov    -0x18(%rbp),%rax
movl   $0x1f,(%rax)
jmp    15b0 <ffinttyp+0x480>
mov    -0x18(%rbp),%rax
movl   $0x51,(%rax)
jmp    15fc <ffinttyp+0x4cc>
cmpl   $0x13,-0x30(%rbp)
jne    15f7 <ffinttyp+0x4c7>
mov    -0x38(%rbp),%rdi
lea    0xa89(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jg     15e8 <ffinttyp+0x4b8>
mov    -0x18(%rbp),%rax
movl   $0x51,(%rax)
jmp    15f2 <ffinttyp+0x4c2>
mov    -0x28(%rbp),%rax
movl   $0x193,(%rax)
jmp    15f7 <ffinttyp+0x4c7>
jmp    15fc <ffinttyp+0x4cc>
jmp    1601 <ffinttyp+0x4d1>
jmp    1606 <ffinttyp+0x4d6>
jmp    160b <ffinttyp+0x4db>
jmp    1610 <ffinttyp+0x4e0>
jmp    1615 <ffinttyp+0x4e5>
jmp    161a <ffinttyp+0x4ea>
jmp    161f <ffinttyp+0x4ef>
jmp    1624 <ffinttyp+0x4f4>
jmp    1629 <ffinttyp+0x4f9>
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffinttyp>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    (%rcx),%eax
test   %eax,%eax
jg     1251 <ffinttyp+0x121>
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rdi,%rbx
movl   $0x0,(%rsi)
movl   $0x0,(%rdx)
mov    (%rdi),%al
cmp    $0x2b,%al
je     116c <ffinttyp+0x3c>
cmp    $0x2d,%al
jne    1173 <ffinttyp+0x43>
movl   $0x1,(%r12)
mov    0x1(%rbx),%al
add    $0x1,%rbx
cmp    $0x30,%al
jne    119b <ffinttyp+0x6b>
mov    $0x30,%al
cmp    $0x30,%al
jne    118c <ffinttyp+0x5c>
nopl   (%rax)
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
cmp    $0x30,%al
je     1180 <ffinttyp+0x50>
test   %al,%al
jne    119b <ffinttyp+0x6b>
movl   $0xc,(%rsi)
jmp    124e <ffinttyp+0x11e>
mov    %rsi,(%rsp)
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %eax,%r13d
test   %eax,%eax
jle    11d7 <ffinttyp+0xa7>
mov    %r13d,%ebp
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%rbx,%r14,1),%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     11ee <ffinttyp+0xbe>
add    $0x1,%r14
cmp    %r14,%rbp
jne    11c0 <ffinttyp+0x90>
test   %r13d,%r13d
je     11fc <ffinttyp+0xcc>
cmp    $0x2,%r13d
jg     1205 <ffinttyp+0xd5>
mov    (%rsp),%rax
movl   $0xc,(%rax)
jmp    124e <ffinttyp+0x11e>
movl   $0x193,(%r15)
mov    $0x193,%eax
jmp    1251 <ffinttyp+0x121>
movl   $0xcc,(%r15)
jmp    124e <ffinttyp+0x11e>
cmp    $0x4,%r13d
jne    1217 <ffinttyp+0xe7>
mov    (%rsp),%rax
movl   $0x15,(%rax)
jmp    124e <ffinttyp+0x11e>
lea    -0x6(%r13),%eax
cmp    $0x3,%eax
ja     122c <ffinttyp+0xfc>
mov    (%rsp),%rax
movl   $0x1f,(%rax)
jmp    124e <ffinttyp+0x11e>
lea    -0xb(%r13),%eax
cmp    $0x7,%eax
ja     1241 <ffinttyp+0x111>
mov    (%rsp),%rax
movl   $0x51,(%rax)
jmp    124e <ffinttyp+0x11e>
cmp    $0x14,%r13d
jb     1260 <ffinttyp+0x130>
movl   $0x193,(%r15)
mov    (%r15),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
cmpl   $0x0,(%r12)
je     129e <ffinttyp+0x16e>
add    $0xfffffffd,%r13d
cmp    $0x10,%r13d
ja     124e <ffinttyp+0x11e>
lea    0xd88(%rip),%rax
movslq (%rax,%r13,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0xe3e(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jle    11e2 <ffinttyp+0xb2>
jmp    120b <ffinttyp+0xdb>
add    $0xfffffffd,%r13d
cmp    $0x10,%r13d
ja     124e <ffinttyp+0x11e>
lea    0xd95(%rip),%rax
movslq (%rax,%r13,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0xdc9(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jle    11e2 <ffinttyp+0xb2>
lea    0xdb5(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
mov    (%rsp),%rax
jg     13cd <ffinttyp+0x29d>
movl   $0xb,(%rax)
jmp    124e <ffinttyp+0x11e>
lea    0xdcc(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jle    120b <ffinttyp+0xdb>
jmp    1220 <ffinttyp+0xf0>
lea    0xdb5(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jle    1220 <ffinttyp+0xf0>
jmp    1235 <ffinttyp+0x105>
lea    0xda3(%rip),%rsi
jmp    13b7 <ffinttyp+0x287>
lea    0xd4f(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jle    120b <ffinttyp+0xdb>
lea    0xd3d(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
mov    (%rsp),%rax
jg     13d8 <ffinttyp+0x2a8>
movl   $0x14,(%rax)
jmp    124e <ffinttyp+0x11e>
lea    0xd20(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jle    1220 <ffinttyp+0xf0>
lea    0xd13(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
mov    (%rsp),%rax
jg     13e3 <ffinttyp+0x2b3>
movl   $0x1e,(%rax)
jmp    124e <ffinttyp+0x11e>
lea    0xcfb(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jle    1235 <ffinttyp+0x105>
jmp    1247 <ffinttyp+0x117>
movl   $0x15,(%rax)
jmp    124e <ffinttyp+0x11e>
movl   $0x1f,(%rax)
jmp    124e <ffinttyp+0x11e>
movl   $0x51,(%rax)
jmp    124e <ffinttyp+0x11e>

LLVM IR (-O0):
@.str = [4 x i8] c"127\00"
@.str.1 = [4 x i8] c"255\00"
@.str.2 = [6 x i8] c"32767\00"
@.str.3 = [6 x i8] c"65535\00"
@.str.4 = [11 x i8] c"2147483647\00"
@.str.5 = [11 x i8] c"4294967295\00"
@.str.6 = [20 x i8] c"9223372036854775807\00"
@.str.7 = [4 x i8] c"128\00"
@.str.8 = [6 x i8] c"32768\00"
@.str.9 = [11 x i8] c"2147483648\00"
@.str.10 = [20 x i8] c"9223372036854775808\00"
define i32 @ffinttyp(i8* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
store i8* %0, i8** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
%13 = load i32*, i32** %9
%14 = load i32, i32* %13
%15 = icmp sgt i32 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %4
%17 = load i32*, i32** %9
%18 = load i32, i32* %17
store i32 %18, i32* %5
br label %261
19: ; preds = %4
%20 = load i32*, i32** %7
store i32 0, i32* %20
%21 = load i32*, i32** %8
store i32 0, i32* %21
%22 = load i8*, i8** %6
store i8* %22, i8** %12
%23 = load i8*, i8** %12
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 43
br i1 %26, label %27, label %30
27: ; preds = %19
%28 = load i8*, i8** %12
%29 = getelementptr inbounds i8, i8* %28, i32 1
store i8* %29, i8** %12
br label %40
30: ; preds = %19
%31 = load i8*, i8** %12
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %33, 45
br i1 %34, label %35, label %39
35: ; preds = %30
%36 = load i8*, i8** %12
%37 = getelementptr inbounds i8, i8* %36, i32 1
store i8* %37, i8** %12
%38 = load i32*, i32** %8
store i32 1, i32* %38
br label %39
39: ; preds = %35, %30
br label %40
40: ; preds = %39, %27
%41 = load i8*, i8** %12
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = icmp eq i32 %43, 48
br i1 %44, label %45, label %64
45: ; preds = %40
br label %46
46: ; preds = %51, %45
%47 = load i8*, i8** %12
%48 = load i8, i8* %47
%49 = sext i8 %48 to i32
%50 = icmp eq i32 %49, 48
br i1 %50, label %51, label %54
51: ; preds = %46
%52 = load i8*, i8** %12
%53 = getelementptr inbounds i8, i8* %52, i32 1
store i8* %53, i8** %12
br label %46
54: ; preds = %46
%55 = load i8*, i8** %12
%56 = load i8, i8* %55
%57 = sext i8 %56 to i32
%58 = icmp eq i32 %57, 0
br i1 %58, label %59, label %63
59: ; preds = %54
%60 = load i32*, i32** %7
store i32 12, i32* %60
%61 = load i32*, i32** %9
%62 = load i32, i32* %61
store i32 %62, i32* %5
br label %261
63: ; preds = %54
br label %64
64: ; preds = %63, %40
%65 = load i8*, i8** %12
%66 = call i32 @strlen(i8* %65)
store i32 %66, i32* %11
store i32 0, i32* %10
br label %67
67: ; preds = %84, %64
%68 = load i32, i32* %10
%69 = load i32, i32* %11
%70 = icmp slt i32 %68, %69
br i1 %70, label %71, label %87
71: ; preds = %67
%72 = load i8*, i8** %12
%73 = load i32, i32* %10
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i8, i8* %72, i64 %74
%76 = load i8, i8* %75
%77 = call i32 @isdigit(i8 signext %76)
%78 = icmp ne i32 %77, 0
br i1 %78, label %83, label %79
79: ; preds = %71
%80 = load i32*, i32** %9
store i32 403, i32* %80
%81 = load i32*, i32** %9
%82 = load i32, i32* %81
store i32 %82, i32* %5
br label %261
83: ; preds = %71
br label %84
84: ; preds = %83
%85 = load i32, i32* %10
%86 = add nsw i32 %85, 1
store i32 %86, i32* %10
br label %67
87: ; preds = %67
%88 = load i32, i32* %11
%89 = icmp eq i32 %88, 0
br i1 %89, label %90, label %92
90: ; preds = %87
%91 = load i32*, i32** %9
store i32 204, i32* %91
br label %258
92: ; preds = %87
%93 = load i32, i32* %11
%94 = icmp slt i32 %93, 3
br i1 %94, label %95, label %97
95: ; preds = %92
%96 = load i32*, i32** %7
store i32 12, i32* %96
br label %257
97: ; preds = %92
%98 = load i32, i32* %11
%99 = icmp eq i32 %98, 4
br i1 %99, label %100, label %102
100: ; preds = %97
%101 = load i32*, i32** %7
store i32 21, i32* %101
br label %256
102: ; preds = %97
%103 = load i32, i32* %11
%104 = icmp sgt i32 %103, 5
br i1 %104, label %105, label %110
105: ; preds = %102
%106 = load i32, i32* %11
%107 = icmp slt i32 %106, 10
br i1 %107, label %108, label %110
108: ; preds = %105
%109 = load i32*, i32** %7
store i32 31, i32* %109
br label %255
110: ; preds = %105, %102
%111 = load i32, i32* %11
%112 = icmp sgt i32 %111, 10
br i1 %112, label %113, label %118
113: ; preds = %110
%114 = load i32, i32* %11
%115 = icmp slt i32 %114, 19
br i1 %115, label %116, label %118
116: ; preds = %113
%117 = load i32*, i32** %7
store i32 81, i32* %117
br label %254
118: ; preds = %113, %110
%119 = load i32, i32* %11
%120 = icmp sgt i32 %119, 19
br i1 %120, label %121, label %123
121: ; preds = %118
%122 = load i32*, i32** %9
store i32 403, i32* %122
br label %253
123: ; preds = %118
%124 = load i32*, i32** %8
%125 = load i32, i32* %124
%126 = icmp ne i32 %125, 0
br i1 %126, label %200, label %127
127: ; preds = %123
%128 = load i32, i32* %11
%129 = icmp eq i32 %128, 3
br i1 %129, label %130, label %146
130: ; preds = %127
%131 = load i8*, i8** %12
%132 = call i64 @strcmp(i8* %131, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%133 = icmp sle i64 %132, 0
br i1 %133, label %134, label %136
134: ; preds = %130
%135 = load i32*, i32** %7
store i32 12, i32* %135
br label %145
136: ; preds = %130
%137 = load i8*, i8** %12
%138 = call i64 @strcmp(i8* %137, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%139 = icmp sle i64 %138, 0
br i1 %139, label %140, label %142
140: ; preds = %136
%141 = load i32*, i32** %7
store i32 11, i32* %141
br label %144
142: ; preds = %136
%143 = load i32*, i32** %7
store i32 21, i32* %143
br label %144
144: ; preds = %142, %140
br label %145
145: ; preds = %144, %134
br label %199
146: ; preds = %127
%147 = load i32, i32* %11
%148 = icmp eq i32 %147, 5
br i1 %148, label %149, label %165
149: ; preds = %146
%150 = load i8*, i8** %12
%151 = call i64 @strcmp(i8* %150, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%152 = icmp sle i64 %151, 0
br i1 %152, label %153, label %155
153: ; preds = %149
%154 = load i32*, i32** %7
store i32 21, i32* %154
br label %164
155: ; preds = %149
%156 = load i8*, i8** %12
%157 = call i64 @strcmp(i8* %156, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%158 = icmp sle i64 %157, 0
br i1 %158, label %159, label %161
159: ; preds = %155
%160 = load i32*, i32** %7
store i32 20, i32* %160
br label %163
161: ; preds = %155
%162 = load i32*, i32** %7
store i32 31, i32* %162
br label %163
163: ; preds = %161, %159
br label %164
164: ; preds = %163, %153
br label %198
165: ; preds = %146
%166 = load i32, i32* %11
%167 = icmp eq i32 %166, 10
br i1 %167, label %168, label %184
168: ; preds = %165
%169 = load i8*, i8** %12
%170 = call i64 @strcmp(i8* %169, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%171 = icmp sle i64 %170, 0
br i1 %171, label %172, label %174
172: ; preds = %168
%173 = load i32*, i32** %7
store i32 31, i32* %173
br label %183
174: ; preds = %168
%175 = load i8*, i8** %12
%176 = call i64 @strcmp(i8* %175, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%177 = icmp sle i64 %176, 0
br i1 %177, label %178, label %180
178: ; preds = %174
%179 = load i32*, i32** %7
store i32 30, i32* %179
br label %182
180: ; preds = %174
%181 = load i32*, i32** %7
store i32 81, i32* %181
br label %182
182: ; preds = %180, %178
br label %183
183: ; preds = %182, %172
br label %197
184: ; preds = %165
%185 = load i32, i32* %11
%186 = icmp eq i32 %185, 19
br i1 %186, label %187, label %196
187: ; preds = %184
%188 = load i8*, i8** %12
%189 = call i64 @strcmp(i8* %188, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%190 = icmp sle i64 %189, 0
br i1 %190, label %191, label %193
191: ; preds = %187
%192 = load i32*, i32** %7
store i32 81, i32* %192
br label %195
193: ; preds = %187
%194 = load i32*, i32** %9
store i32 403, i32* %194
br label %195
195: ; preds = %193, %191
br label %196
196: ; preds = %195, %184
br label %197
197: ; preds = %196, %183
br label %198
198: ; preds = %197, %164
br label %199
199: ; preds = %198, %145
br label %252
200: ; preds = %123
%201 = load i32, i32* %11
%202 = icmp eq i32 %201, 3
br i1 %202, label %203, label %212
203: ; preds = %200
%204 = load i8*, i8** %12
%205 = call i64 @strcmp(i8* %204, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%206 = icmp sle i64 %205, 0
br i1 %206, label %207, label %209
207: ; preds = %203
%208 = load i32*, i32** %7
store i32 12, i32* %208
br label %211
209: ; preds = %203
%210 = load i32*, i32** %7
store i32 21, i32* %210
br label %211
211: ; preds = %209, %207
br label %251
212: ; preds = %200
%213 = load i32, i32* %11
%214 = icmp eq i32 %213, 5
br i1 %214, label %215, label %224
215: ; preds = %212
%216 = load i8*, i8** %12
%217 = call i64 @strcmp(i8* %216, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%218 = icmp sle i64 %217, 0
br i1 %218, label %219, label %221
219: ; preds = %215
%220 = load i32*, i32** %7
store i32 21, i32* %220
br label %223
221: ; preds = %215
%222 = load i32*, i32** %7
store i32 31, i32* %222
br label %223
223: ; preds = %221, %219
br label %250
224: ; preds = %212
%225 = load i32, i32* %11
%226 = icmp eq i32 %225, 10
br i1 %226, label %227, label %236
227: ; preds = %224
%228 = load i8*, i8** %12
%229 = call i64 @strcmp(i8* %228, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0))
%230 = icmp sle i64 %229, 0
br i1 %230, label %231, label %233
231: ; preds = %227
%232 = load i32*, i32** %7
store i32 31, i32* %232
br label %235
233: ; preds = %227
%234 = load i32*, i32** %7
store i32 81, i32* %234
br label %235
235: ; preds = %233, %231
br label %249
236: ; preds = %224
%237 = load i32, i32* %11
%238 = icmp eq i32 %237, 19
br i1 %238, label %239, label %248
239: ; preds = %236
%240 = load i8*, i8** %12
%241 = call i64 @strcmp(i8* %240, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0))
%242 = icmp sle i64 %241, 0
br i1 %242, label %243, label %245
243: ; preds = %239
%244 = load i32*, i32** %7
store i32 81, i32* %244
br label %247
245: ; preds = %239
%246 = load i32*, i32** %9
store i32 403, i32* %246
br label %247
247: ; preds = %245, %243
br label %248
248: ; preds = %247, %236
br label %249
249: ; preds = %248, %235
br label %250
250: ; preds = %249, %223
br label %251
251: ; preds = %250, %211
br label %252
252: ; preds = %251, %199
br label %253
253: ; preds = %252, %121
br label %254
254: ; preds = %253, %116
br label %255
255: ; preds = %254, %108
br label %256
256: ; preds = %255, %100
br label %257
257: ; preds = %256, %95
br label %258
258: ; preds = %257, %90
%259 = load i32*, i32** %9
%260 = load i32, i32* %259
store i32 %260, i32* %5
br label %261
261: ; preds = %258, %79, %59, %16
%262 = load i32, i32* %5
ret i32 %262
}

LLVM IR (-O2):
@.str = [4 x i8] c"127\00"
@.str.1 = [4 x i8] c"255\00"
@.str.2 = [6 x i8] c"32767\00"
@.str.3 = [6 x i8] c"65535\00"
@.str.4 = [11 x i8] c"2147483647\00"
@.str.5 = [11 x i8] c"4294967295\00"
@.str.6 = [20 x i8] c"9223372036854775807\00"
@.str.7 = [4 x i8] c"128\00"
@.str.8 = [6 x i8] c"32768\00"
@.str.9 = [11 x i8] c"2147483648\00"
@.str.10 = [20 x i8] c"9223372036854775808\00"
define i32 @ffinttyp(i8* %0, i32* writeonly %1, i32* nocapture %2, i32* nocapture %3) {
%5 = load i32, i32* %3
%6 = icmp sgt i32 %5, 0
br i1 %6, label %120, label %7
7: ; preds = %4
store i32 0, i32* %1
store i32 0, i32* %2
%8 = load i8, i8* %0
switch i8 %8, label %13 [
i8 43, label %10
i8 45, label %9
]
9: ; preds = %7
store i32 1, i32* %2
br label %10
10: ; preds = %7, %9
%11 = getelementptr inbounds i8, i8* %0, i64 1
%12 = load i8, i8* %11
br label %13
13: ; preds = %10, %7
%14 = phi i8 [ %12, %10 ], [ %8, %7 ]
%15 = phi i8* [ %11, %10 ], [ %0, %7 ]
%16 = icmp eq i8 %14, 48
br i1 %16, label %17, label %25
17: ; preds = %13, %20
%18 = phi i8 [ %22, %20 ], [ 48, %13 ]
%19 = phi i8* [ %21, %20 ], [ %15, %13 ]
switch i8 %18, label %25 [
i8 48, label %20
i8 0, label %23
]
20: ; preds = %17
%21 = getelementptr inbounds i8, i8* %19, i64 1
%22 = load i8, i8* %21
br label %17
23: ; preds = %17
store i32 12, i32* %1
%24 = load i32, i32* %3
br label %120
25: ; preds = %17, %13
%26 = phi i8* [ %15, %13 ], [ %19, %17 ]
%27 = tail call i32 @strlen(i8* %26)
%28 = icmp sgt i32 %27, 0
br i1 %28, label %29, label %41
29: ; preds = %25
%30 = zext i32 %27 to i64
br label %33
31: ; preds = %33
%32 = icmp eq i64 %39, %30
br i1 %32, label %41, label %33
33: ; preds = %29, %31
%34 = phi i64 [ 0, %29 ], [ %39, %31 ]
%35 = getelementptr inbounds i8, i8* %26, i64 %34
%36 = load i8, i8* %35
%37 = tail call i32 @isdigit(i8 signext %36)
%38 = icmp eq i32 %37, 0
%39 = add nuw nsw i64 %34, 1
br i1 %38, label %40, label %31
40: ; preds = %33
store i32 403, i32* %3
br label %120
41: ; preds = %31, %25
%42 = icmp eq i32 %27, 0
br i1 %42, label %43, label %44
43: ; preds = %41
store i32 204, i32* %3
br label %118
44: ; preds = %41
%45 = icmp slt i32 %27, 3
br i1 %45, label %46, label %47
46: ; preds = %44
store i32 12, i32* %1
br label %118
47: ; preds = %44
%48 = icmp eq i32 %27, 4
br i1 %48, label %49, label %50
49: ; preds = %47
store i32 21, i32* %1
br label %118
50: ; preds = %47
%51 = add nsw i32 %27, -6
%52 = icmp ult i32 %51, 4
br i1 %52, label %53, label %54
53: ; preds = %50
store i32 31, i32* %1
br label %118
54: ; preds = %50
%55 = add nsw i32 %27, -11
%56 = icmp ult i32 %55, 8
br i1 %56, label %57, label %58
57: ; preds = %54
store i32 81, i32* %1
br label %118
58: ; preds = %54
%59 = icmp ugt i32 %27, 19
br i1 %59, label %60, label %61
60: ; preds = %58
store i32 403, i32* %3
br label %118
61: ; preds = %58
%62 = load i32, i32* %2
%63 = icmp eq i32 %62, 0
br i1 %63, label %64, label %97
64: ; preds = %61
switch i32 %27, label %118 [
i32 3, label %65
i32 5, label %74
i32 10, label %83
i32 19, label %92
]
65: ; preds = %64
%66 = tail call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%67 = icmp slt i64 %66, 1
br i1 %67, label %68, label %69
68: ; preds = %65
store i32 12, i32* %1
br label %118
69: ; preds = %65
%70 = tail call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%71 = icmp slt i64 %70, 1
br i1 %71, label %72, label %73
72: ; preds = %69
store i32 11, i32* %1
br label %118
73: ; preds = %69
store i32 21, i32* %1
br label %118
74: ; preds = %64
%75 = tail call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%76 = icmp slt i64 %75, 1
br i1 %76, label %77, label %78
77: ; preds = %74
store i32 21, i32* %1
br label %118
78: ; preds = %74
%79 = tail call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%80 = icmp slt i64 %79, 1
br i1 %80, label %81, label %82
81: ; preds = %78
store i32 20, i32* %1
br label %118
82: ; preds = %78
store i32 31, i32* %1
br label %118
83: ; preds = %64
%84 = tail call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%85 = icmp slt i64 %84, 1
br i1 %85, label %86, label %87
86: ; preds = %83
store i32 31, i32* %1
br label %118
87: ; preds = %83
%88 = tail call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%89 = icmp slt i64 %88, 1
br i1 %89, label %90, label %91
90: ; preds = %87
store i32 30, i32* %1
br label %118
91: ; preds = %87
store i32 81, i32* %1
br label %118
92: ; preds = %64
%93 = tail call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%94 = icmp slt i64 %93, 1
br i1 %94, label %95, label %96
95: ; preds = %92
store i32 81, i32* %1
br label %118
96: ; preds = %92
store i32 403, i32* %3
br label %118
97: ; preds = %61
switch i32 %27, label %118 [
i32 3, label %98
i32 5, label %103
i32 10, label %108
i32 19, label %113
]
98: ; preds = %97
%99 = tail call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%100 = icmp slt i64 %99, 1
br i1 %100, label %101, label %102
101: ; preds = %98
store i32 12, i32* %1
br label %118
102: ; preds = %98
store i32 21, i32* %1
br label %118
103: ; preds = %97
%104 = tail call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%105 = icmp slt i64 %104, 1
br i1 %105, label %106, label %107
106: ; preds = %103
store i32 21, i32* %1
br label %118
107: ; preds = %103
store i32 31, i32* %1
br label %118
108: ; preds = %97
%109 = tail call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0))
%110 = icmp slt i64 %109, 1
br i1 %110, label %111, label %112
111: ; preds = %108
store i32 31, i32* %1
br label %118
112: ; preds = %108
store i32 81, i32* %1
br label %118
113: ; preds = %97
%114 = tail call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0))
%115 = icmp slt i64 %114, 1
br i1 %115, label %116, label %117
116: ; preds = %113
store i32 81, i32* %1
br label %118
117: ; preds = %113
store i32 403, i32* %3
br label %118
118: ; preds = %97, %64, %46, %53, %60, %102, %101, %112, %111, %116, %117, %106, %107, %72, %73, %68, %90, %91, %86, %95, %96, %77, %82, %81, %57, %49, %43
%119 = load i32, i32* %3
br label %120
120: ; preds = %4, %118, %40, %23
%121 = phi i32 [ %24, %23 ], [ 403, %40 ], [ %119, %118 ], [ %5, %4 ]
ret i32 %121
}