#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 > 20) {
    *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 {
          *dtype = 80;
        }
      } else if (len == 20) {
        if (strcmp(p, "18446744073709551615") <= 0) {
          *dtype = 80;
        } 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    1679 <ffinttyp+0x549>
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    1679 <ffinttyp+0x549>
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    1679 <ffinttyp+0x549>
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    1670 <ffinttyp+0x540>
cmpl   $0x3,-0x30(%rbp)
jge    12c4 <ffinttyp+0x194>
mov    -0x18(%rbp),%rax
movl   $0xc,(%rax)
jmp    166b <ffinttyp+0x53b>
cmpl   $0x4,-0x30(%rbp)
jne    12dd <ffinttyp+0x1ad>
mov    -0x18(%rbp),%rax
movl   $0x15,(%rax)
jmp    1666 <ffinttyp+0x536>
cmpl   $0x5,-0x30(%rbp)
jle    1300 <ffinttyp+0x1d0>
cmpl   $0xa,-0x30(%rbp)
jge    1300 <ffinttyp+0x1d0>
mov    -0x18(%rbp),%rax
movl   $0x1f,(%rax)
jmp    1661 <ffinttyp+0x531>
cmpl   $0xa,-0x30(%rbp)
jle    1323 <ffinttyp+0x1f3>
cmpl   $0x13,-0x30(%rbp)
jge    1323 <ffinttyp+0x1f3>
mov    -0x18(%rbp),%rax
movl   $0x51,(%rax)
jmp    165c <ffinttyp+0x52c>
cmpl   $0x14,-0x30(%rbp)
jle    133c <ffinttyp+0x20c>
mov    -0x28(%rbp),%rax
movl   $0x193,(%rax)
jmp    1657 <ffinttyp+0x527>
mov    -0x20(%rbp),%rax
cmpl   $0x0,(%rax)
jne    1536 <ffinttyp+0x406>
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    1531 <ffinttyp+0x401>
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    152c <ffinttyp+0x3fc>
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    1527 <ffinttyp+0x3f7>
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    -0x18(%rbp),%rax
movl   $0x50,(%rax)
jmp    1522 <ffinttyp+0x3f2>
cmpl   $0x14,-0x30(%rbp)
jne    151d <ffinttyp+0x3ed>
mov    -0x38(%rbp),%rdi
lea    0xb4e(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jg     150e <ffinttyp+0x3de>
mov    -0x18(%rbp),%rax
movl   $0x50,(%rax)
jmp    1518 <ffinttyp+0x3e8>
mov    -0x28(%rbp),%rax
movl   $0x193,(%rax)
jmp    151d <ffinttyp+0x3ed>
jmp    1522 <ffinttyp+0x3f2>
jmp    1527 <ffinttyp+0x3f7>
jmp    152c <ffinttyp+0x3fc>
jmp    1531 <ffinttyp+0x401>
jmp    1652 <ffinttyp+0x522>
cmpl   $0x3,-0x30(%rbp)
jne    1578 <ffinttyp+0x448>
mov    -0x38(%rbp),%rdi
lea    0xb08(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jg     1569 <ffinttyp+0x439>
mov    -0x18(%rbp),%rax
movl   $0xc,(%rax)
jmp    1573 <ffinttyp+0x443>
mov    -0x18(%rbp),%rax
movl   $0x15,(%rax)
jmp    164d <ffinttyp+0x51d>
cmpl   $0x5,-0x30(%rbp)
jne    15ba <ffinttyp+0x48a>
mov    -0x38(%rbp),%rdi
lea    0xaca(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jg     15ab <ffinttyp+0x47b>
mov    -0x18(%rbp),%rax
movl   $0x15,(%rax)
jmp    15b5 <ffinttyp+0x485>
mov    -0x18(%rbp),%rax
movl   $0x1f,(%rax)
jmp    1648 <ffinttyp+0x518>
cmpl   $0xa,-0x30(%rbp)
jne    15fc <ffinttyp+0x4cc>
mov    -0x38(%rbp),%rdi
lea    0xa8e(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jg     15ed <ffinttyp+0x4bd>
mov    -0x18(%rbp),%rax
movl   $0x1f,(%rax)
jmp    15f7 <ffinttyp+0x4c7>
mov    -0x18(%rbp),%rax
movl   $0x51,(%rax)
jmp    1643 <ffinttyp+0x513>
cmpl   $0x13,-0x30(%rbp)
jne    163e <ffinttyp+0x50e>
mov    -0x38(%rbp),%rdi
lea    0xa57(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jg     162f <ffinttyp+0x4ff>
mov    -0x18(%rbp),%rax
movl   $0x51,(%rax)
jmp    1639 <ffinttyp+0x509>
mov    -0x28(%rbp),%rax
movl   $0x193,(%rax)
jmp    163e <ffinttyp+0x50e>
jmp    1643 <ffinttyp+0x513>
jmp    1648 <ffinttyp+0x518>
jmp    164d <ffinttyp+0x51d>
jmp    1652 <ffinttyp+0x522>
jmp    1657 <ffinttyp+0x527>
jmp    165c <ffinttyp+0x52c>
jmp    1661 <ffinttyp+0x531>
jmp    1666 <ffinttyp+0x536>
jmp    166b <ffinttyp+0x53b>
jmp    1670 <ffinttyp+0x540>
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    $0x15,%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    0xe57(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jle    11e2 <ffinttyp+0xb2>
jmp    120b <ffinttyp+0xdb>
add    $0xfffffffd,%r13d
cmp    $0x11,%r13d
ja     124e <ffinttyp+0x11e>
lea    0xd95(%rip),%rax
movslq (%rax,%r13,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0xdcd(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jle    11e2 <ffinttyp+0xb2>
lea    0xdb9(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jg     120b <ffinttyp+0xdb>
mov    (%rsp),%rax
movl   $0xb,(%rax)
jmp    124e <ffinttyp+0x11e>
lea    0xde5(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jle    120b <ffinttyp+0xdb>
jmp    1220 <ffinttyp+0xf0>
lea    0xdce(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jle    1220 <ffinttyp+0xf0>
jmp    1235 <ffinttyp+0x105>
lea    0xdbc(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jle    1235 <ffinttyp+0x105>
jmp    1247 <ffinttyp+0x117>
lea    0xd4b(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jle    1220 <ffinttyp+0xf0>
lea    0xd3e(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jg     1235 <ffinttyp+0x105>
mov    (%rsp),%rax
movl   $0x1e,(%rax)
jmp    124e <ffinttyp+0x11e>
lea    0xd00(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jle    120b <ffinttyp+0xdb>
lea    0xcee(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jg     1220 <ffinttyp+0xf0>
mov    (%rsp),%rax
movl   $0x14,(%rax)
jmp    124e <ffinttyp+0x11e>
lea    0xce3(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jle    1235 <ffinttyp+0x105>
jmp    13fe <ffinttyp+0x2ce>
lea    0xcdd(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jg     1247 <ffinttyp+0x117>
mov    (%rsp),%rax
movl   $0x50,(%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 = [21 x i8] c"18446744073709551615\00"
@.str.8 = [4 x i8] c"128\00"
@.str.9 = [6 x i8] c"32768\00"
@.str.10 = [11 x i8] c"2147483648\00"
@.str.11 = [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 %274
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 %274
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 %274
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 %271
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 %270
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 %269
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 %268
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 %267
118: ; preds = %113, %110
%119 = load i32, i32* %11
%120 = icmp sgt i32 %119, 20
br i1 %120, label %121, label %123
121: ; preds = %118
%122 = load i32*, i32** %9
store i32 403, i32* %122
br label %266
123: ; preds = %118
%124 = load i32*, i32** %8
%125 = load i32, i32* %124
%126 = icmp ne i32 %125, 0
br i1 %126, label %213, 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 %212
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 %211
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 %210
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** %7
store i32 80, i32* %194
br label %195
195: ; preds = %193, %191
br label %209
196: ; preds = %184
%197 = load i32, i32* %11
%198 = icmp eq i32 %197, 20
br i1 %198, label %199, label %208
199: ; preds = %196
%200 = load i8*, i8** %12
%201 = call i64 @strcmp(i8* %200, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0))
%202 = icmp sle i64 %201, 0
br i1 %202, label %203, label %205
203: ; preds = %199
%204 = load i32*, i32** %7
store i32 80, i32* %204
br label %207
205: ; preds = %199
%206 = load i32*, i32** %9
store i32 403, i32* %206
br label %207
207: ; preds = %205, %203
br label %208
208: ; preds = %207, %196
br label %209
209: ; preds = %208, %195
br label %210
210: ; preds = %209, %183
br label %211
211: ; preds = %210, %164
br label %212
212: ; preds = %211, %145
br label %265
213: ; preds = %123
%214 = load i32, i32* %11
%215 = icmp eq i32 %214, 3
br i1 %215, label %216, label %225
216: ; preds = %213
%217 = load i8*, i8** %12
%218 = call i64 @strcmp(i8* %217, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%219 = icmp sle i64 %218, 0
br i1 %219, label %220, label %222
220: ; preds = %216
%221 = load i32*, i32** %7
store i32 12, i32* %221
br label %224
222: ; preds = %216
%223 = load i32*, i32** %7
store i32 21, i32* %223
br label %224
224: ; preds = %222, %220
br label %264
225: ; preds = %213
%226 = load i32, i32* %11
%227 = icmp eq i32 %226, 5
br i1 %227, label %228, label %237
228: ; preds = %225
%229 = load i8*, i8** %12
%230 = call i64 @strcmp(i8* %229, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
%231 = icmp sle i64 %230, 0
br i1 %231, label %232, label %234
232: ; preds = %228
%233 = load i32*, i32** %7
store i32 21, i32* %233
br label %236
234: ; preds = %228
%235 = load i32*, i32** %7
store i32 31, i32* %235
br label %236
236: ; preds = %234, %232
br label %263
237: ; preds = %225
%238 = load i32, i32* %11
%239 = icmp eq i32 %238, 10
br i1 %239, label %240, label %249
240: ; preds = %237
%241 = load i8*, i8** %12
%242 = call i64 @strcmp(i8* %241, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%243 = icmp sle i64 %242, 0
br i1 %243, label %244, label %246
244: ; preds = %240
%245 = load i32*, i32** %7
store i32 31, i32* %245
br label %248
246: ; preds = %240
%247 = load i32*, i32** %7
store i32 81, i32* %247
br label %248
248: ; preds = %246, %244
br label %262
249: ; preds = %237
%250 = load i32, i32* %11
%251 = icmp eq i32 %250, 19
br i1 %251, label %252, label %261
252: ; preds = %249
%253 = load i8*, i8** %12
%254 = call i64 @strcmp(i8* %253, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0))
%255 = icmp sle i64 %254, 0
br i1 %255, label %256, label %258
256: ; preds = %252
%257 = load i32*, i32** %7
store i32 81, i32* %257
br label %260
258: ; preds = %252
%259 = load i32*, i32** %9
store i32 403, i32* %259
br label %260
260: ; preds = %258, %256
br label %261
261: ; preds = %260, %249
br label %262
262: ; preds = %261, %248
br label %263
263: ; preds = %262, %236
br label %264
264: ; preds = %263, %224
br label %265
265: ; preds = %264, %212
br label %266
266: ; preds = %265, %121
br label %267
267: ; preds = %266, %116
br label %268
268: ; preds = %267, %108
br label %269
269: ; preds = %268, %100
br label %270
270: ; preds = %269, %95
br label %271
271: ; preds = %270, %90
%272 = load i32*, i32** %9
%273 = load i32, i32* %272
store i32 %273, i32* %5
br label %274
274: ; preds = %271, %79, %59, %16
%275 = load i32, i32* %5
ret i32 %275
}

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 = [21 x i8] c"18446744073709551615\00"
@.str.8 = [4 x i8] c"128\00"
@.str.9 = [6 x i8] c"32768\00"
@.str.10 = [11 x i8] c"2147483648\00"
@.str.11 = [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 %125, 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 %125
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 %125
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 %123
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 %123
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 %123
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 %123
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 %123
58: ; preds = %54
%59 = icmp ugt i32 %27, 20
br i1 %59, label %60, label %61
60: ; preds = %58
store i32 403, i32* %3
br label %123
61: ; preds = %58
%62 = load i32, i32* %2
%63 = icmp eq i32 %62, 0
br i1 %63, label %64, label %102
64: ; preds = %61
switch i32 %27, label %123 [
i32 3, label %65
i32 5, label %74
i32 10, label %83
i32 19, label %92
i32 20, label %97
]
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 %123
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 %123
73: ; preds = %69
store i32 21, i32* %1
br label %123
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 %123
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 %123
82: ; preds = %78
store i32 31, i32* %1
br label %123
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 %123
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 %123
91: ; preds = %87
store i32 81, i32* %1
br label %123
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 %123
96: ; preds = %92
store i32 80, i32* %1
br label %123
97: ; preds = %64
%98 = tail call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0))
%99 = icmp slt i64 %98, 1
br i1 %99, label %100, label %101
100: ; preds = %97
store i32 80, i32* %1
br label %123
101: ; preds = %97
store i32 403, i32* %3
br label %123
102: ; preds = %61
switch i32 %27, label %123 [
i32 3, label %103
i32 5, label %108
i32 10, label %113
i32 19, label %118
]
103: ; preds = %102
%104 = tail call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([4 x i8], [4 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 12, i32* %1
br label %123
107: ; preds = %103
store i32 21, i32* %1
br label %123
108: ; preds = %102
%109 = tail call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([6 x i8], [6 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 21, i32* %1
br label %123
112: ; preds = %108
store i32 31, i32* %1
br label %123
113: ; preds = %102
%114 = tail call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([11 x i8], [11 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 31, i32* %1
br label %123
117: ; preds = %113
store i32 81, i32* %1
br label %123
118: ; preds = %102
%119 = tail call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0))
%120 = icmp slt i64 %119, 1
br i1 %120, label %121, label %122
121: ; preds = %118
store i32 81, i32* %1
br label %123
122: ; preds = %118
store i32 403, i32* %3
br label %123
123: ; preds = %102, %64, %46, %53, %60, %107, %106, %117, %116, %121, %122, %111, %112, %72, %73, %68, %90, %91, %86, %101, %100, %95, %96, %77, %82, %81, %57, %49, %43
%124 = load i32, i32* %3
br label %125
125: ; preds = %4, %123, %40, %23
%126 = phi i32 [ %24, %23 ], [ 403, %40 ], [ %124, %123 ], [ %5, %4 ]
ret i32 %126
}