#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' || form[0] == 'Q') {
    variable = 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    1682 <ffbnfm+0x512>
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    1682 <ffbnfm+0x512>
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
je     1325 <ffbnfm+0x1b5>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x51,%eax
jne    133d <ffbnfm+0x1cd>
movl   $0x1,-0x48(%rbp)
mov    -0x68(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x68(%rbp)
jmp    1344 <ffbnfm+0x1d4>
movl   $0x0,-0x48(%rbp)
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x55,%eax
jne    1368 <ffbnfm+0x1f8>
movl   $0x14,-0x44(%rbp)
movq   $0x2,-0x58(%rbp)
jmp    1628 <ffbnfm+0x4b8>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x49,%eax
jne    138c <ffbnfm+0x21c>
movl   $0x15,-0x44(%rbp)
movq   $0x2,-0x58(%rbp)
jmp    1623 <ffbnfm+0x4b3>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x56,%eax
jne    13b0 <ffbnfm+0x240>
movl   $0x28,-0x44(%rbp)
movq   $0x4,-0x58(%rbp)
jmp    161e <ffbnfm+0x4ae>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4a,%eax
jne    13d4 <ffbnfm+0x264>
movl   $0x29,-0x44(%rbp)
movq   $0x4,-0x58(%rbp)
jmp    1619 <ffbnfm+0x4a9>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4b,%eax
jne    13f8 <ffbnfm+0x288>
movl   $0x51,-0x44(%rbp)
movq   $0x8,-0x58(%rbp)
jmp    1614 <ffbnfm+0x4a4>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x45,%eax
jne    141c <ffbnfm+0x2ac>
movl   $0x2a,-0x44(%rbp)
movq   $0x4,-0x58(%rbp)
jmp    160f <ffbnfm+0x49f>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x44,%eax
jne    1440 <ffbnfm+0x2d0>
movl   $0x52,-0x44(%rbp)
movq   $0x8,-0x58(%rbp)
jmp    160a <ffbnfm+0x49a>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jne    14d6 <ffbnfm+0x366>
movl   $0x10,-0x44(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x68(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
je     14a7 <ffbnfm+0x337>
mov    -0x68(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x28,%eax
jne    148c <ffbnfm+0x31c>
mov    -0x68(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rdi
add    $0x1,%rdi
lea    0xb97(%rip),%rsi
lea    -0x58(%rbp),%rdx
call   1080 <sscanf@plt>
mov    %eax,-0x4c(%rbp)
cmpl   $0x1,-0x4c(%rbp)
jne    14c9 <ffbnfm+0x359>
cmpl   $0x0,-0x48(%rbp)
jne    14d1 <ffbnfm+0x361>
mov    -0x58(%rbp),%rax
cmp    -0x60(%rbp),%rax
jle    14d1 <ffbnfm+0x361>
mov    -0x60(%rbp),%rax
mov    %rax,-0x58(%rbp)
jmp    1605 <ffbnfm+0x495>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4c,%eax
jne    14fa <ffbnfm+0x38a>
movl   $0xe,-0x44(%rbp)
movq   $0x1,-0x58(%rbp)
jmp    1600 <ffbnfm+0x490>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x58,%eax
jne    151e <ffbnfm+0x3ae>
movl   $0x1,-0x44(%rbp)
movq   $0x1,-0x58(%rbp)
jmp    15fb <ffbnfm+0x48b>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x42,%eax
jne    1542 <ffbnfm+0x3d2>
movl   $0xb,-0x44(%rbp)
movq   $0x1,-0x58(%rbp)
jmp    15f6 <ffbnfm+0x486>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x53,%eax
jne    1566 <ffbnfm+0x3f6>
movl   $0xc,-0x44(%rbp)
movq   $0x1,-0x58(%rbp)
jmp    15f1 <ffbnfm+0x481>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x43,%eax
jne    158a <ffbnfm+0x41a>
movl   $0x53,-0x44(%rbp)
movq   $0x8,-0x58(%rbp)
jmp    15ec <ffbnfm+0x47c>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4d,%eax
jne    15ae <ffbnfm+0x43e>
movl   $0xa3,-0x44(%rbp)
movq   $0x10,-0x58(%rbp)
jmp    15e7 <ffbnfm+0x477>
lea    -0x110(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xa76(%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    1682 <ffbnfm+0x512>
jmp    15ec <ffbnfm+0x47c>
jmp    15f1 <ffbnfm+0x481>
jmp    15f6 <ffbnfm+0x486>
jmp    15fb <ffbnfm+0x48b>
jmp    1600 <ffbnfm+0x490>
jmp    1605 <ffbnfm+0x495>
jmp    160a <ffbnfm+0x49a>
jmp    160f <ffbnfm+0x49f>
jmp    1614 <ffbnfm+0x4a4>
jmp    1619 <ffbnfm+0x4a9>
jmp    161e <ffbnfm+0x4ae>
jmp    1623 <ffbnfm+0x4b3>
jmp    1628 <ffbnfm+0x4b8>
cmpl   $0x0,-0x48(%rbp)
je     1639 <ffbnfm+0x4c9>
imul   $0xffffffff,-0x44(%rbp),%eax
mov    %eax,-0x44(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     164d <ffbnfm+0x4dd>
mov    -0x44(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     1663 <ffbnfm+0x4f3>
mov    -0x60(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
cmpq   $0x0,-0x28(%rbp)
je     1679 <ffbnfm+0x509>
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     1467 <ffbnfm+0x2f7>
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    1467 <ffbnfm+0x2f7>
mov    %rbp,(%rsp)
add    %rbx,%rsi
lea    0x70(%rsp),%rbp
mov    %rbp,%rdi
call   1040 <strcpy@plt>
mov    %rbp,%rdi
call   1070 <ffupch@plt>
lea    0x6f(%rsp),%r14
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
movsbl 0x1(%r14),%edi
add    $0x1,%r14
call   1030 <isdigit@plt>
add    $0xffffffffffffffff,%rbp
test   %rax,%rax
jne    1230 <ffbnfm+0xc0>
cmp    $0xffffffffffffffff,%rbp
je     1265 <ffbnfm+0xf5>
lea    0xe3e(%rip),%rsi
lea    0x70(%rsp),%rdi
lea    0x8(%rsp),%rdx
call   1080 <sscanf@plt>
jmp    126e <ffbnfm+0xfe>
movq   $0x1,0x8(%rsp)
mov    (%r14),%sil
and    $0xfe,%sil
lea    0x1(%r14),%rax
cmp    $0x50,%sil
cmove  %rax,%r14
mov    (%r14),%cl
add    $0xbf,%cl
cmp    $0x17,%cl
ja     13c5 <ffbnfm+0x255>
movzbl %cl,%ecx
lea    0xd66(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0x70(%rsp),%rcx
sub    %rbp,%rcx
add    $0x1,%rcx
cmp    $0x50,%sil
mov    %rax,%rdi
cmove  %rcx,%rdi
cmovne %rax,%rcx
mov    (%rcx),%al
test   %al,%al
mov    (%rsp),%rbx
je     130c <ffbnfm+0x19c>
mov    %esi,%ebp
cmp    $0x28,%al
jne    12d5 <ffbnfm+0x165>
add    $0x1,%rcx
mov    %rcx,%rdi
lea    0xdb6(%rip),%rsi
lea    0x10(%rsp),%rdx
call   1080 <sscanf@plt>
cmp    $0x1,%eax
mov    %ebp,%esi
jne    130c <ffbnfm+0x19c>
mov    $0x10,%eax
cmp    $0x50,%sil
je     1435 <ffbnfm+0x2c5>
mov    0x10(%rsp),%rcx
cmp    0x8(%rsp),%rcx
jle    1435 <ffbnfm+0x2c5>
mov    0x8(%rsp),%rax
mov    %rax,0x10(%rsp)
mov    $0x10,%eax
jmp    1435 <ffbnfm+0x2c5>
movq   $0x8,0x10(%rsp)
mov    $0x52,%eax
jmp    1431 <ffbnfm+0x2c1>
movq   $0x4,0x10(%rsp)
mov    $0x2a,%eax
jmp    1431 <ffbnfm+0x2c1>
movq   $0x2,0x10(%rsp)
mov    $0x15,%eax
jmp    1431 <ffbnfm+0x2c1>
movq   $0x1,0x10(%rsp)
mov    $0xc,%eax
jmp    1431 <ffbnfm+0x2c1>
movq   $0x2,0x10(%rsp)
mov    $0x14,%eax
jmp    1431 <ffbnfm+0x2c1>
movq   $0x4,0x10(%rsp)
mov    $0x28,%eax
jmp    1431 <ffbnfm+0x2c1>
movq   $0x1,0x10(%rsp)
mov    $0x1,%eax
jmp    1431 <ffbnfm+0x2c1>
movq   $0x1,0x10(%rsp)
mov    $0xb,%eax
jmp    1431 <ffbnfm+0x2c1>
movq   $0x8,0x10(%rsp)
mov    $0x53,%eax
jmp    1431 <ffbnfm+0x2c1>
lea    0xcca(%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    1467 <ffbnfm+0x2f7>
movq   $0x4,0x10(%rsp)
mov    $0x29,%eax
jmp    1431 <ffbnfm+0x2c1>
movq   $0x8,0x10(%rsp)
mov    $0x51,%eax
jmp    1431 <ffbnfm+0x2c1>
movq   $0x1,0x10(%rsp)
mov    $0xe,%eax
jmp    1431 <ffbnfm+0x2c1>
movq   $0x10,0x10(%rsp)
mov    $0xa3,%eax
mov    (%rsp),%rbx
test   %r12,%r12
je     1449 <ffbnfm+0x2d9>
mov    %eax,%ecx
neg    %ecx
cmp    $0x50,%sil
cmovne %eax,%ecx
mov    %ecx,(%r12)
test   %r15,%r15
je     1456 <ffbnfm+0x2e6>
mov    0x8(%rsp),%rax
mov    %rax,(%r15)
test   %rbx,%rbx
je     1463 <ffbnfm+0x2f3>
mov    0x10(%rsp),%rax
mov    %rax,(%rbx)
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 %291
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 %291
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 %111, label %105
105: ; preds = %96
%106 = load i8*, i8** %19
%107 = getelementptr inbounds i8, i8* %106, i64 0
%108 = load i8, i8* %107
%109 = sext i8 %108 to i32
%110 = icmp eq i32 %109, 81
br i1 %110, label %111, label %114
111: ; preds = %105, %96
store i32 1, i32* %15
%112 = load i8*, i8** %19
%113 = getelementptr inbounds i8, i8* %112, i32 1
store i8* %113, i8** %19
br label %115
114: ; preds = %105
store i32 0, i32* %15
br label %115
115: ; preds = %114, %111
%116 = load i8*, i8** %19
%117 = getelementptr inbounds i8, i8* %116, i64 0
%118 = load i8, i8* %117
%119 = sext i8 %118 to i32
%120 = icmp eq i32 %119, 85
br i1 %120, label %121, label %122
121: ; preds = %115
store i32 20, i32* %14
store i64 2, i64* %17
br label %264
122: ; preds = %115
%123 = load i8*, i8** %19
%124 = getelementptr inbounds i8, i8* %123, i64 0
%125 = load i8, i8* %124
%126 = sext i8 %125 to i32
%127 = icmp eq i32 %126, 73
br i1 %127, label %128, label %129
128: ; preds = %122
store i32 21, i32* %14
store i64 2, i64* %17
br label %263
129: ; preds = %122
%130 = load i8*, i8** %19
%131 = getelementptr inbounds i8, i8* %130, i64 0
%132 = load i8, i8* %131
%133 = sext i8 %132 to i32
%134 = icmp eq i32 %133, 86
br i1 %134, label %135, label %136
135: ; preds = %129
store i32 40, i32* %14
store i64 4, i64* %17
br label %262
136: ; preds = %129
%137 = load i8*, i8** %19
%138 = getelementptr inbounds i8, i8* %137, i64 0
%139 = load i8, i8* %138
%140 = sext i8 %139 to i32
%141 = icmp eq i32 %140, 74
br i1 %141, label %142, label %143
142: ; preds = %136
store i32 41, i32* %14
store i64 4, i64* %17
br label %261
143: ; preds = %136
%144 = load i8*, i8** %19
%145 = getelementptr inbounds i8, i8* %144, i64 0
%146 = load i8, i8* %145
%147 = sext i8 %146 to i32
%148 = icmp eq i32 %147, 75
br i1 %148, label %149, label %150
149: ; preds = %143
store i32 81, i32* %14
store i64 8, i64* %17
br label %260
150: ; preds = %143
%151 = load i8*, i8** %19
%152 = getelementptr inbounds i8, i8* %151, i64 0
%153 = load i8, i8* %152
%154 = sext i8 %153 to i32
%155 = icmp eq i32 %154, 69
br i1 %155, label %156, label %157
156: ; preds = %150
store i32 42, i32* %14
store i64 4, i64* %17
br label %259
157: ; preds = %150
%158 = load i8*, i8** %19
%159 = getelementptr inbounds i8, i8* %158, i64 0
%160 = load i8, i8* %159
%161 = sext i8 %160 to i32
%162 = icmp eq i32 %161, 68
br i1 %162, label %163, label %164
163: ; preds = %157
store i32 82, i32* %14
store i64 8, i64* %17
br label %258
164: ; preds = %157
%165 = load i8*, i8** %19
%166 = getelementptr inbounds i8, i8* %165, i64 0
%167 = load i8, i8* %166
%168 = sext i8 %167 to i32
%169 = icmp eq i32 %168, 65
br i1 %169, label %170, label %202
170: ; preds = %164
store i32 16, i32* %14
store i32 0, i32* %16
%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 ne i32 %174, 0
br i1 %175, label %176, label %189
176: ; preds = %170
%177 = load i8*, i8** %19
%178 = getelementptr inbounds i8, i8* %177, i64 1
%179 = load i8, i8* %178
%180 = sext i8 %179 to i32
%181 = icmp eq i32 %180, 40
br i1 %181, label %182, label %185
182: ; preds = %176
%183 = load i8*, i8** %19
%184 = getelementptr inbounds i8, i8* %183, i32 1
store i8* %184, i8** %19
br label %185
185: ; preds = %182, %176
%186 = load i8*, i8** %19
%187 = getelementptr inbounds i8, i8* %186, i64 1
%188 = call i32 @sscanf(i8* %187, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %17)
store i32 %188, i32* %16
br label %189
189: ; preds = %185, %170
%190 = load i32, i32* %16
%191 = icmp ne i32 %190, 1
br i1 %191, label %199, label %192
192: ; preds = %189
%193 = load i32, i32* %15
%194 = icmp ne i32 %193, 0
br i1 %194, label %201, label %195
195: ; preds = %192
%196 = load i64, i64* %17
%197 = load i64, i64* %18
%198 = icmp sgt i64 %196, %197
br i1 %198, label %199, label %201
199: ; preds = %195, %189
%200 = load i64, i64* %18
store i64 %200, i64* %17
br label %201
201: ; preds = %199, %195, %192
br label %257
202: ; preds = %164
%203 = load i8*, i8** %19
%204 = getelementptr inbounds i8, i8* %203, i64 0
%205 = load i8, i8* %204
%206 = sext i8 %205 to i32
%207 = icmp eq i32 %206, 76
br i1 %207, label %208, label %209
208: ; preds = %202
store i32 14, i32* %14
store i64 1, i64* %17
br label %256
209: ; preds = %202
%210 = load i8*, i8** %19
%211 = getelementptr inbounds i8, i8* %210, i64 0
%212 = load i8, i8* %211
%213 = sext i8 %212 to i32
%214 = icmp eq i32 %213, 88
br i1 %214, label %215, label %216
215: ; preds = %209
store i32 1, i32* %14
store i64 1, i64* %17
br label %255
216: ; preds = %209
%217 = load i8*, i8** %19
%218 = getelementptr inbounds i8, i8* %217, i64 0
%219 = load i8, i8* %218
%220 = sext i8 %219 to i32
%221 = icmp eq i32 %220, 66
br i1 %221, label %222, label %223
222: ; preds = %216
store i32 11, i32* %14
store i64 1, i64* %17
br label %254
223: ; preds = %216
%224 = load i8*, i8** %19
%225 = getelementptr inbounds i8, i8* %224, i64 0
%226 = load i8, i8* %225
%227 = sext i8 %226 to i32
%228 = icmp eq i32 %227, 83
br i1 %228, label %229, label %230
229: ; preds = %223
store i32 12, i32* %14
store i64 1, i64* %17
br label %253
230: ; preds = %223
%231 = load i8*, i8** %19
%232 = getelementptr inbounds i8, i8* %231, i64 0
%233 = load i8, i8* %232
%234 = sext i8 %233 to i32
%235 = icmp eq i32 %234, 67
br i1 %235, label %236, label %237
236: ; preds = %230
store i32 83, i32* %14
store i64 8, i64* %17
br label %252
237: ; preds = %230
%238 = load i8*, i8** %19
%239 = getelementptr inbounds i8, i8* %238, i64 0
%240 = load i8, i8* %239
%241 = sext i8 %240 to i32
%242 = icmp eq i32 %241, 77
br i1 %242, label %243, label %244
243: ; preds = %237
store i32 163, i32* %14
store i64 16, i64* %17
br label %251
244: ; preds = %237
%245 = getelementptr inbounds [81 x i8], [81 x i8]* %21, i64 0, i64 0
%246 = load i8*, i8** %7
%247 = call i32 @sprintf(i8* %245, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), i8* %246)
%248 = getelementptr inbounds [81 x i8], [81 x i8]* %21, i64 0, i64 0
%249 = call i32 @ffpmsg(i8* %248)
%250 = load i32*, i32** %11
store i32 262, i32* %250
store i32 262, i32* %6
br label %291
251: ; preds = %243
br label %252
252: ; preds = %251, %236
br label %253
253: ; preds = %252, %229
br label %254
254: ; preds = %253, %222
br label %255
255: ; preds = %254, %215
br label %256
256: ; preds = %255, %208
br label %257
257: ; preds = %256, %201
br label %258
258: ; preds = %257, %163
br label %259
259: ; preds = %258, %156
br label %260
260: ; preds = %259, %149
br label %261
261: ; preds = %260, %142
br label %262
262: ; preds = %261, %135
br label %263
263: ; preds = %262, %128
br label %264
264: ; preds = %263, %121
%265 = load i32, i32* %15
%266 = icmp ne i32 %265, 0
br i1 %266, label %267, label %270
267: ; preds = %264
%268 = load i32, i32* %14
%269 = mul nsw i32 %268, -1
store i32 %269, i32* %14
br label %270
270: ; preds = %267, %264
%271 = load i32*, i32** %8
%272 = icmp ne i32* %271, null
br i1 %272, label %273, label %276
273: ; preds = %270
%274 = load i32, i32* %14
%275 = load i32*, i32** %8
store i32 %274, i32* %275
br label %276
276: ; preds = %273, %270
%277 = load i64*, i64** %9
%278 = icmp ne i64* %277, null
br i1 %278, label %279, label %282
279: ; preds = %276
%280 = load i64, i64* %18
%281 = load i64*, i64** %9
store i64 %280, i64* %281
br label %282
282: ; preds = %279, %276
%283 = load i64*, i64** %10
%284 = icmp ne i64* %283, null
br i1 %284, label %285, label %288
285: ; preds = %282
%286 = load i64, i64* %17
%287 = load i64*, i64** %10
store i64 %286, i64* %287
br label %288
288: ; preds = %285, %282
%289 = load i32*, i32** %11
%290 = load i32, i32* %289
store i32 %290, i32* %6
br label %291
291: ; preds = %288, %244, %66, %25
%292 = load i32, i32* %6
ret i32 %292
}

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 %114, 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 %114
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 = and i8 %60, -2
%62 = icmp eq i8 %61, 80
%63 = getelementptr inbounds i8, i8* %54, i64 1
%64 = select i1 %62, i8* %63, i8* %54
%65 = load i8, i8* %64
switch i8 %65, label %98 [
i8 85, label %66
i8 73, label %67
i8 86, label %68
i8 74, label %69
i8 75, label %70
i8 69, label %71
i8 68, label %72
i8 65, label %73
i8 76, label %92
i8 88, label %93
i8 66, label %94
i8 83, label %95
i8 67, label %96
i8 77, label %97
]
66: ; preds = %59
store i64 2, i64* %6
br label %101
67: ; preds = %59
store i64 2, i64* %6
br label %101
68: ; preds = %59
store i64 4, i64* %6
br label %101
69: ; preds = %59
store i64 4, i64* %6
br label %101
70: ; preds = %59
store i64 8, i64* %6
br label %101
71: ; preds = %59
store i64 4, i64* %6
br label %101
72: ; preds = %59
store i64 8, i64* %6
br label %101
73: ; preds = %59
%74 = getelementptr inbounds i8, i8* %54, i64 2
%75 = select i1 %62, i8* %74, i8* %63
%76 = getelementptr inbounds i8, i8* %54, i64 2
%77 = select i1 %62, i8* %76, i8* %63
%78 = load i8, i8* %77
switch i8 %78, label %81 [
i8 0, label %90
i8 40, label %79
]
79: ; preds = %73
%80 = getelementptr inbounds i8, i8* %77, i64 1
br label %81
81: ; preds = %73, %79
%82 = phi i8* [ %80, %79 ], [ %75, %73 ]
%83 = call i32 @sscanf(i8* %82, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %6)
%84 = icmp eq i32 %83, 1
br i1 %84, label %85, label %90
85: ; preds = %81
br i1 %62, label %101, label %86
86: ; preds = %85
%87 = load i64, i64* %6
%88 = load i64, i64* %7
%89 = icmp sgt i64 %87, %88
br i1 %89, label %90, label %101
90: ; preds = %73, %86, %81
%91 = load i64, i64* %7
store i64 %91, i64* %6
br label %101
92: ; preds = %59
store i64 1, i64* %6
br label %101
93: ; preds = %59
store i64 1, i64* %6
br label %101
94: ; preds = %59
store i64 1, i64* %6
br label %101
95: ; preds = %59
store i64 1, i64* %6
br label %101
96: ; preds = %59
store i64 8, i64* %6
br label %101
97: ; preds = %59
store i64 16, i64* %6
br label %101
98: ; preds = %59
%99 = call i32 @sprintf(i8* %13, i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%100 = call i32 @ffpmsg(i8* %13)
store i32 262, i32* %4
br label %114
101: ; preds = %67, %69, %71, %90, %86, %85, %93, %95, %97, %96, %94, %92, %72, %70, %68, %66
%102 = phi i32 [ 20, %66 ], [ 21, %67 ], [ 40, %68 ], [ 41, %69 ], [ 81, %70 ], [ 42, %71 ], [ 82, %72 ], [ 16, %90 ], [ 16, %85 ], [ 16, %86 ], [ 14, %92 ], [ 1, %93 ], [ 11, %94 ], [ 12, %95 ], [ 83, %96 ], [ 163, %97 ]
br i1 %17, label %106, label %103
103: ; preds = %101
%104 = sub nsw i32 0, %102
%105 = select i1 %62, i32 %104, i32 %102
store i32 %105, i32* %1
br label %106
106: ; preds = %103, %101
br i1 %20, label %109, label %107
107: ; preds = %106
%108 = load i64, i64* %7
store i64 %108, i64* %2
br label %109
109: ; preds = %107, %106
br i1 %23, label %112, label %110
110: ; preds = %109
%111 = load i64, i64* %6
store i64 %111, i64* %3
br label %112
112: ; preds = %110, %109
%113 = load i32, i32* %4
br label %114
114: ; preds = %5, %112, %98, %39
%115 = phi i32 [ 261, %39 ], [ %113, %112 ], [ 262, %98 ], [ %14, %5 ]
ret i32 %115
}