#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*/ ffpmsg(char *);
int /*<<< orphan*/ ffupch(char *);
scalar_t__ isdigit(int);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int sscanf(char *, char *, long *);
int /*<<< orphan*/ strcpy(char *, char *);
size_t strlen(char *);
int ffbnfm(char *tform, int *dtcode, long *trepeat, long *twidth, int *status) {
  size_t ii, nchar;
  int datacode, variable, iread;
  long width, repeat;
  char *form, temp[71], message[81];
  if (*status > 0)
    return (*status);
  if (dtcode)
    *dtcode = 0;
  if (trepeat)
    *trepeat = 0;
  if (twidth)
    *twidth = 0;
  nchar = strlen(tform);
  for (ii = 0; ii < nchar; ii++) {
    if (tform[ii] != ' ')
      break;
  }
  if (ii == nchar) {
    ffpmsg("Error: binary table TFORM code is blank (ffbnfm).");
    return (*status = 261);
  }
  strcpy(temp, &tform[ii]);
  ffupch(temp);
  form = temp;
  ii = 0;
  while (isdigit((int)form[ii]))
    ii++;
  if (ii == 0)
    repeat = 1;
  else
    sscanf(form, "%ld", &repeat);
  form = form + ii;
  if (form[0] == 'P') {
    variable = 1;
    repeat = 1;
    form++;
  } else
    variable = 0;
  if (form[0] == 'U') {
    datacode = 20;
    width = 2;
  } else if (form[0] == 'I') {
    datacode = 21;
    width = 2;
  } else if (form[0] == 'V') {
    datacode = 40;
    width = 4;
  } else if (form[0] == 'J') {
    datacode = 41;
    width = 4;
  } else if (form[0] == 'K') {
    datacode = 81;
    width = 8;
  } else if (form[0] == 'E') {
    datacode = 42;
    width = 4;
  } else if (form[0] == 'D') {
    datacode = 82;
    width = 8;
  } else if (form[0] == 'A') {
    datacode = 16;
    iread = 0;
    if (form[1] != 0) {
      if (form[1] == '(')
        form++;
      iread = sscanf(&form[1], "%ld", &width);
    }
    if (iread != 1 || (!variable && (width > repeat)))
      width = repeat;
  } else if (form[0] == 'L') {
    datacode = 14;
    width = 1;
  } else if (form[0] == 'X') {
    datacode = 1;
    width = 1;
  } else if (form[0] == 'B') {
    datacode = 11;
    width = 1;
  } else if (form[0] == 'S') {
    datacode = 12;
    width = 1;
  } else if (form[0] == 'C') {
    datacode = 83;
    width = 8;
  } else if (form[0] == 'M') {
    datacode = 163;
    width = 16;
  } else {
    sprintf(message, "Illegal binary table TFORMn datatype: \'%s\' ", tform);
    ffpmsg(message);
    return (*status = 262);
  }
  if (variable)
    datacode = datacode * (-1);
  if (dtcode)
    *dtcode = datacode;
  if (trepeat)
    *trepeat = repeat;
  if (twidth)
    *twidth = width;
  return (*status);
}


x86 assembly (clang, -O0):
<ffbnfm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmpl   $0x0,(%rax)
jle    11aa <ffbnfm+0x3a>
mov    -0x30(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    167a <ffbnfm+0x50a>
cmpq   $0x0,-0x18(%rbp)
je     11bf <ffbnfm+0x4f>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     11d5 <ffbnfm+0x65>
mov    -0x20(%rbp),%rax
movq   $0x0,(%rax)
cmpq   $0x0,-0x28(%rbp)
je     11eb <ffbnfm+0x7b>
mov    -0x28(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,-0x40(%rbp)
movq   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x40(%rbp),%rax
jae    123e <ffbnfm+0xce>
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
je     1228 <ffbnfm+0xb8>
jmp    123e <ffbnfm+0xce>
jmp    122d <ffbnfm+0xbd>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    1200 <ffbnfm+0x90>
mov    -0x38(%rbp),%rax
cmp    -0x40(%rbp),%rax
jne    126e <ffbnfm+0xfe>
lea    0xdad(%rip),%rdi
call   1060 <ffpmsg@plt>
mov    -0x30(%rbp),%rax
movl   $0x105,(%rax)
movl   $0x105,-0x4(%rbp)
jmp    167a <ffbnfm+0x50a>
lea    -0xb0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    -0x38(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0xb0(%rbp),%rdi
call   1070 <ffupch@plt>
lea    -0xb0(%rbp),%rax
mov    %rax,-0x68(%rbp)
movq   $0x0,-0x38(%rbp)
mov    -0x68(%rbp),%rax
mov    -0x38(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     12cd <ffbnfm+0x15d>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    12a1 <ffbnfm+0x131>
cmpq   $0x0,-0x38(%rbp)
jne    12e5 <ffbnfm+0x175>
movq   $0x1,-0x60(%rbp)
jmp    12f9 <ffbnfm+0x189>
mov    -0x68(%rbp),%rdi
lea    0xd42(%rip),%rsi
lea    -0x60(%rbp),%rdx
call   1080 <sscanf@plt>
mov    -0x68(%rbp),%rax
add    -0x38(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x50,%eax
jne    1335 <ffbnfm+0x1c5>
movl   $0x1,-0x48(%rbp)
movq   $0x1,-0x60(%rbp)
mov    -0x68(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x68(%rbp)
jmp    133c <ffbnfm+0x1cc>
movl   $0x0,-0x48(%rbp)
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x55,%eax
jne    1360 <ffbnfm+0x1f0>
movl   $0x14,-0x44(%rbp)
movq   $0x2,-0x58(%rbp)
jmp    1620 <ffbnfm+0x4b0>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x49,%eax
jne    1384 <ffbnfm+0x214>
movl   $0x15,-0x44(%rbp)
movq   $0x2,-0x58(%rbp)
jmp    161b <ffbnfm+0x4ab>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x56,%eax
jne    13a8 <ffbnfm+0x238>
movl   $0x28,-0x44(%rbp)
movq   $0x4,-0x58(%rbp)
jmp    1616 <ffbnfm+0x4a6>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4a,%eax
jne    13cc <ffbnfm+0x25c>
movl   $0x29,-0x44(%rbp)
movq   $0x4,-0x58(%rbp)
jmp    1611 <ffbnfm+0x4a1>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4b,%eax
jne    13f0 <ffbnfm+0x280>
movl   $0x51,-0x44(%rbp)
movq   $0x8,-0x58(%rbp)
jmp    160c <ffbnfm+0x49c>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x45,%eax
jne    1414 <ffbnfm+0x2a4>
movl   $0x2a,-0x44(%rbp)
movq   $0x4,-0x58(%rbp)
jmp    1607 <ffbnfm+0x497>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x44,%eax
jne    1438 <ffbnfm+0x2c8>
movl   $0x52,-0x44(%rbp)
movq   $0x8,-0x58(%rbp)
jmp    1602 <ffbnfm+0x492>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jne    14ce <ffbnfm+0x35e>
movl   $0x10,-0x44(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x68(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
je     149f <ffbnfm+0x32f>
mov    -0x68(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x28,%eax
jne    1484 <ffbnfm+0x314>
mov    -0x68(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rdi
add    $0x1,%rdi
lea    0xb9f(%rip),%rsi
lea    -0x58(%rbp),%rdx
call   1080 <sscanf@plt>
mov    %eax,-0x4c(%rbp)
cmpl   $0x1,-0x4c(%rbp)
jne    14c1 <ffbnfm+0x351>
cmpl   $0x0,-0x48(%rbp)
jne    14c9 <ffbnfm+0x359>
mov    -0x58(%rbp),%rax
cmp    -0x60(%rbp),%rax
jle    14c9 <ffbnfm+0x359>
mov    -0x60(%rbp),%rax
mov    %rax,-0x58(%rbp)
jmp    15fd <ffbnfm+0x48d>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4c,%eax
jne    14f2 <ffbnfm+0x382>
movl   $0xe,-0x44(%rbp)
movq   $0x1,-0x58(%rbp)
jmp    15f8 <ffbnfm+0x488>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x58,%eax
jne    1516 <ffbnfm+0x3a6>
movl   $0x1,-0x44(%rbp)
movq   $0x1,-0x58(%rbp)
jmp    15f3 <ffbnfm+0x483>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x42,%eax
jne    153a <ffbnfm+0x3ca>
movl   $0xb,-0x44(%rbp)
movq   $0x1,-0x58(%rbp)
jmp    15ee <ffbnfm+0x47e>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x53,%eax
jne    155e <ffbnfm+0x3ee>
movl   $0xc,-0x44(%rbp)
movq   $0x1,-0x58(%rbp)
jmp    15e9 <ffbnfm+0x479>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x43,%eax
jne    1582 <ffbnfm+0x412>
movl   $0x53,-0x44(%rbp)
movq   $0x8,-0x58(%rbp)
jmp    15e4 <ffbnfm+0x474>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4d,%eax
jne    15a6 <ffbnfm+0x436>
movl   $0xa3,-0x44(%rbp)
movq   $0x10,-0x58(%rbp)
jmp    15df <ffbnfm+0x46f>
lea    -0x110(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xa7e(%rip),%rsi
call   1090 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1060 <ffpmsg@plt>
mov    -0x30(%rbp),%rax
movl   $0x106,(%rax)
movl   $0x106,-0x4(%rbp)
jmp    167a <ffbnfm+0x50a>
jmp    15e4 <ffbnfm+0x474>
jmp    15e9 <ffbnfm+0x479>
jmp    15ee <ffbnfm+0x47e>
jmp    15f3 <ffbnfm+0x483>
jmp    15f8 <ffbnfm+0x488>
jmp    15fd <ffbnfm+0x48d>
jmp    1602 <ffbnfm+0x492>
jmp    1607 <ffbnfm+0x497>
jmp    160c <ffbnfm+0x49c>
jmp    1611 <ffbnfm+0x4a1>
jmp    1616 <ffbnfm+0x4a6>
jmp    161b <ffbnfm+0x4ab>
jmp    1620 <ffbnfm+0x4b0>
cmpl   $0x0,-0x48(%rbp)
je     1631 <ffbnfm+0x4c1>
imul   $0xffffffff,-0x44(%rbp),%eax
mov    %eax,-0x44(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1645 <ffbnfm+0x4d5>
mov    -0x44(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     165b <ffbnfm+0x4eb>
mov    -0x60(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
cmpq   $0x0,-0x28(%rbp)
je     1671 <ffbnfm+0x501>
mov    -0x58(%rbp),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x30(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffbnfm>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb8,%rsp
mov    (%r8),%eax
test   %eax,%eax
jg     1448 <ffbnfm+0x2d8>
mov    %r8,%r13
mov    %rcx,%rbp
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
test   %rsi,%rsi
je     11a8 <ffbnfm+0x38>
movl   $0x0,(%r12)
test   %r15,%r15
je     11b4 <ffbnfm+0x44>
movq   $0x0,(%r15)
test   %rbp,%rbp
je     11c1 <ffbnfm+0x51>
movq   $0x0,0x0(%rbp)
mov    %rbx,%rdi
call   1050 <strlen@plt>
xor    %esi,%esi
test   %rax,%rax
je     11e1 <ffbnfm+0x71>
cmpb   $0x20,(%rbx,%rsi,1)
jne    11e1 <ffbnfm+0x71>
add    $0x1,%rsi
cmp    %rsi,%rax
jne    11d0 <ffbnfm+0x60>
jmp    11e6 <ffbnfm+0x76>
cmp    %rax,%rsi
jne    1204 <ffbnfm+0x94>
lea    0xe73(%rip),%rdi
call   1060 <ffpmsg@plt>
movl   $0x105,0x0(%r13)
mov    $0x105,%eax
jmp    1448 <ffbnfm+0x2d8>
mov    %rbp,0x8(%rsp)
add    %rbx,%rsi
lea    0x70(%rsp),%rbp
mov    %rbp,%rdi
call   1040 <strcpy@plt>
mov    %rbp,%rdi
call   1070 <ffupch@plt>
mov    $0x1,%r14d
nopw   0x0(%rax,%rax,1)
movsbl 0x0(%rbp),%edi
call   1030 <isdigit@plt>
add    $0x1,%rbp
add    $0xffffffffffffffff,%r14
test   %rax,%rax
jne    1230 <ffbnfm+0xc0>
test   %r14,%r14
je     1261 <ffbnfm+0xf1>
lea    0xe40(%rip),%rsi
lea    0x70(%rsp),%rdi
mov    %rsp,%rdx
call   1080 <sscanf@plt>
jmp    1269 <ffbnfm+0xf9>
movq   $0x1,(%rsp)
mov    -0x1(%rbp),%r14b
cmp    $0x50,%r14b
jne    1280 <ffbnfm+0x110>
movq   $0x1,(%rsp)
mov    0x0(%rbp),%al
jmp    1287 <ffbnfm+0x117>
add    $0xffffffffffffffff,%rbp
mov    %r14d,%eax
add    $0xbf,%al
cmp    $0x17,%al
ja     13a6 <ffbnfm+0x236>
movzbl %al,%eax
lea    0xd65(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x1(%rbp),%al
test   %al,%al
je     12ee <ffbnfm+0x17e>
cmp    $0x28,%al
jne    12b3 <ffbnfm+0x143>
add    $0x1,%rbp
add    $0x1,%rbp
lea    0xdd4(%rip),%rsi
lea    0x10(%rsp),%rdx
mov    %rbp,%rdi
call   1080 <sscanf@plt>
cmp    $0x1,%eax
jne    12ee <ffbnfm+0x17e>
mov    $0x10,%eax
cmp    $0x50,%r14b
je     1412 <ffbnfm+0x2a2>
mov    0x10(%rsp),%rcx
cmp    (%rsp),%rcx
jle    1412 <ffbnfm+0x2a2>
mov    (%rsp),%rax
mov    %rax,0x10(%rsp)
mov    $0x10,%eax
jmp    1412 <ffbnfm+0x2a2>
movq   $0x8,0x10(%rsp)
mov    $0x52,%eax
jmp    1412 <ffbnfm+0x2a2>
movq   $0x4,0x10(%rsp)
mov    $0x2a,%eax
jmp    1412 <ffbnfm+0x2a2>
movq   $0x2,0x10(%rsp)
mov    $0x15,%eax
jmp    1412 <ffbnfm+0x2a2>
movq   $0x1,0x10(%rsp)
mov    $0xc,%eax
jmp    1412 <ffbnfm+0x2a2>
movq   $0x2,0x10(%rsp)
mov    $0x14,%eax
jmp    1412 <ffbnfm+0x2a2>
movq   $0x4,0x10(%rsp)
mov    $0x28,%eax
jmp    1412 <ffbnfm+0x2a2>
movq   $0x1,0x10(%rsp)
mov    $0x1,%eax
jmp    1412 <ffbnfm+0x2a2>
movq   $0x1,0x10(%rsp)
mov    $0xb,%eax
jmp    1412 <ffbnfm+0x2a2>
movq   $0x8,0x10(%rsp)
mov    $0x53,%eax
jmp    1412 <ffbnfm+0x2a2>
lea    0xce9(%rip),%rsi
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    %rbx,%rdx
call   1090 <sprintf@plt>
mov    %rbp,%rdi
call   1060 <ffpmsg@plt>
movl   $0x106,0x0(%r13)
mov    $0x106,%eax
jmp    1448 <ffbnfm+0x2d8>
movq   $0x4,0x10(%rsp)
mov    $0x29,%eax
jmp    1412 <ffbnfm+0x2a2>
movq   $0x8,0x10(%rsp)
mov    $0x51,%eax
jmp    1412 <ffbnfm+0x2a2>
movq   $0x1,0x10(%rsp)
mov    $0xe,%eax
jmp    1412 <ffbnfm+0x2a2>
movq   $0x10,0x10(%rsp)
mov    $0xa3,%eax
test   %r12,%r12
je     1426 <ffbnfm+0x2b6>
mov    %eax,%ecx
neg    %ecx
cmp    $0x50,%r14b
cmovne %eax,%ecx
mov    %ecx,(%r12)
test   %r15,%r15
mov    0x8(%rsp),%rcx
je     1437 <ffbnfm+0x2c7>
mov    (%rsp),%rax
mov    %rax,(%r15)
test   %rcx,%rcx
je     1444 <ffbnfm+0x2d4>
mov    0x10(%rsp),%rax
mov    %rax,(%rcx)
mov    0x0(%r13),%eax
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [50 x i8] c"Error: binary table TFORM code is blank (ffbnfm).\00"
@.str.1 = [4 x i8] c"%ld\00"
@.str.2 = [44 x i8] c"Illegal binary table TFORMn datatype: '%s' \00"
define i32 @ffbnfm(i8* %0, i32* writeonly %1, i64* writeonly %2, i64* writeonly %3, i32* nocapture %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca [71 x i8]
%9 = alloca [81 x i8]
%10 = bitcast i64* %6 to i8*
%11 = bitcast i64* %7 to i8*
%12 = getelementptr inbounds [71 x i8], [71 x i8]* %8, i64 0, i64 0
%13 = getelementptr inbounds [81 x i8], [81 x i8]* %9, i64 0, i64 0
%14 = load i32, i32* %4
%15 = icmp sgt i32 %14, 0
br i1 %15, label %113, label %16
16: ; preds = %5
%17 = icmp eq i32* %1, null
br i1 %17, label %19, label %18
18: ; preds = %16
store i32 0, i32* %1
br label %19
19: ; preds = %18, %16
%20 = icmp eq i64* %2, null
br i1 %20, label %22, label %21
21: ; preds = %19
store i64 0, i64* %2
br label %22
22: ; preds = %21, %19
%23 = icmp eq i64* %3, null
br i1 %23, label %25, label %24
24: ; preds = %22
store i64 0, i64* %3
br label %25
25: ; preds = %24, %22
%26 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%27 = icmp eq i64 %26, 0
br i1 %27, label %36, label %28
28: ; preds = %25, %33
%29 = phi i64 [ %34, %33 ], [ 0, %25 ]
%30 = getelementptr inbounds i8, i8* %0, i64 %29
%31 = load i8, i8* %30
%32 = icmp eq i8 %31, 32
br i1 %32, label %33, label %36
33: ; preds = %28
%34 = add nuw i64 %29, 1
%35 = icmp eq i64 %34, %26
br i1 %35, label %39, label %28
36: ; preds = %28, %25
%37 = phi i64 [ 0, %25 ], [ %29, %28 ]
%38 = icmp eq i64 %37, %26
br i1 %38, label %39, label %41
39: ; preds = %33, %36
%40 = tail call i32 @ffpmsg(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
store i32 261, i32* %4
br label %113
41: ; preds = %36
%42 = getelementptr inbounds i8, i8* %0, i64 %37
%43 = call i32 @strcpy(i8* %12, i8* %42)
%44 = call i32 @ffupch(i8* %12)
br label %45
45: ; preds = %45, %41
%46 = phi i64 [ 0, %41 ], [ %52, %45 ]
%47 = getelementptr inbounds [71 x i8], [71 x i8]* %8, i64 0, i64 %46
%48 = load i8, i8* %47
%49 = sext i8 %48 to i32
%50 = call i64 @isdigit(i32 %49)
%51 = icmp eq i64 %50, 0
%52 = add i64 %46, 1
br i1 %51, label %53, label %45
53: ; preds = %45
%54 = getelementptr inbounds [71 x i8], [71 x i8]* %8, i64 0, i64 %46
%55 = icmp eq i64 %46, 0
br i1 %55, label %56, label %57
56: ; preds = %53
store i64 1, i64* %7
br label %59
57: ; preds = %53
%58 = call i32 @sscanf(i8* %12, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %7)
br label %59
59: ; preds = %57, %56
%60 = load i8, i8* %54
%61 = icmp eq i8 %60, 80
br i1 %61, label %62, label %65
62: ; preds = %59
store i64 1, i64* %7
%63 = getelementptr inbounds i8, i8* %54, i64 1
%64 = load i8, i8* %63
br label %65
65: ; preds = %59, %62
%66 = phi i8 [ %60, %59 ], [ %64, %62 ]
%67 = phi i8* [ %54, %59 ], [ %63, %62 ]
switch i8 %66, label %97 [
i8 85, label %68
i8 73, label %69
i8 86, label %70
i8 74, label %71
i8 75, label %72
i8 69, label %73
i8 68, label %74
i8 65, label %75
i8 76, label %91
i8 88, label %92
i8 66, label %93
i8 83, label %94
i8 67, label %95
i8 77, label %96
]
68: ; preds = %65
store i64 2, i64* %6
br label %100
69: ; preds = %65
store i64 2, i64* %6
br label %100
70: ; preds = %65
store i64 4, i64* %6
br label %100
71: ; preds = %65
store i64 4, i64* %6
br label %100
72: ; preds = %65
store i64 8, i64* %6
br label %100
73: ; preds = %65
store i64 4, i64* %6
br label %100
74: ; preds = %65
store i64 8, i64* %6
br label %100
75: ; preds = %65
%76 = getelementptr inbounds i8, i8* %67, i64 1
%77 = load i8, i8* %76
switch i8 %77, label %79 [
i8 0, label %89
i8 40, label %78
]
78: ; preds = %75
br label %79
79: ; preds = %75, %78
%80 = phi i8* [ %76, %78 ], [ %67, %75 ]
%81 = getelementptr inbounds i8, i8* %80, i64 1
%82 = call i32 @sscanf(i8* %81, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %6)
%83 = icmp eq i32 %82, 1
br i1 %83, label %84, label %89
84: ; preds = %79
br i1 %61, label %100, label %85
85: ; preds = %84
%86 = load i64, i64* %6
%87 = load i64, i64* %7
%88 = icmp sgt i64 %86, %87
br i1 %88, label %89, label %100
89: ; preds = %75, %85, %79
%90 = load i64, i64* %7
store i64 %90, i64* %6
br label %100
91: ; preds = %65
store i64 1, i64* %6
br label %100
92: ; preds = %65
store i64 1, i64* %6
br label %100
93: ; preds = %65
store i64 1, i64* %6
br label %100
94: ; preds = %65
store i64 1, i64* %6
br label %100
95: ; preds = %65
store i64 8, i64* %6
br label %100
96: ; preds = %65
store i64 16, i64* %6
br label %100
97: ; preds = %65
%98 = call i32 @sprintf(i8* %13, i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%99 = call i32 @ffpmsg(i8* %13)
store i32 262, i32* %4
br label %113
100: ; preds = %69, %71, %73, %89, %85, %84, %92, %94, %96, %95, %93, %91, %74, %72, %70, %68
%101 = phi i32 [ 20, %68 ], [ 21, %69 ], [ 40, %70 ], [ 41, %71 ], [ 81, %72 ], [ 42, %73 ], [ 82, %74 ], [ 16, %89 ], [ 16, %84 ], [ 16, %85 ], [ 14, %91 ], [ 1, %92 ], [ 11, %93 ], [ 12, %94 ], [ 83, %95 ], [ 163, %96 ]
br i1 %17, label %105, label %102
102: ; preds = %100
%103 = sub nsw i32 0, %101
%104 = select i1 %61, i32 %103, i32 %101
store i32 %104, i32* %1
br label %105
105: ; preds = %102, %100
br i1 %20, label %108, label %106
106: ; preds = %105
%107 = load i64, i64* %7
store i64 %107, i64* %2
br label %108
108: ; preds = %106, %105
br i1 %23, label %111, label %109
109: ; preds = %108
%110 = load i64, i64* %6
store i64 %110, i64* %3
br label %111
111: ; preds = %109, %108
%112 = load i32, i32* %4
br label %113
113: ; preds = %5, %111, %97, %39
%114 = phi i32 [ 261, %39 ], [ %112, %111 ], [ 262, %97 ], [ %14, %5 ]
ret i32 %114
}