#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*/ snprintf(char *, int, 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);
  }
  if (nchar - ii > 71 - 1) {
    ffpmsg("Error: binary table TFORM code is too long (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 {
    if (sscanf(form, "%ld", &repeat) != 1) {
      ffpmsg("Error: Bad repeat format in TFORM (ffbnfm).");
      return (*status = 261);
    }
  }
  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] == 'W') {
    datacode = 80;
    width = 8;
  } 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 {
    snprintf(message, 81, "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    1714 <ffbnfm+0x5a4>
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    1714 <ffbnfm+0x5a4>
mov    -0x40(%rbp),%rax
sub    -0x38(%rbp),%rax
cmp    $0x46,%rax
jbe    12a2 <ffbnfm+0x132>
lea    0xdab(%rip),%rdi
call   1060 <ffpmsg@plt>
mov    -0x30(%rbp),%rax
movl   $0x105,(%rax)
movl   $0x105,-0x4(%rbp)
jmp    1714 <ffbnfm+0x5a4>
lea    -0xb0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    -0x38(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0xb0(%rbp),%rdi
call   1080 <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     1301 <ffbnfm+0x191>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    12d5 <ffbnfm+0x165>
cmpq   $0x0,-0x38(%rbp)
jne    1319 <ffbnfm+0x1a9>
movq   $0x1,-0x60(%rbp)
jmp    135d <ffbnfm+0x1ed>
mov    -0x68(%rbp),%rdi
lea    0xd43(%rip),%rsi
lea    -0x60(%rbp),%rdx
call   1090 <sscanf@plt>
cmp    $0x1,%eax
je     1358 <ffbnfm+0x1e8>
lea    0xd2e(%rip),%rdi
call   1060 <ffpmsg@plt>
mov    -0x30(%rbp),%rax
movl   $0x105,(%rax)
movl   $0x105,-0x4(%rbp)
jmp    1714 <ffbnfm+0x5a4>
jmp    135d <ffbnfm+0x1ed>
mov    -0x68(%rbp),%rax
add    -0x38(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x50,%eax
je     1389 <ffbnfm+0x219>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x51,%eax
jne    13a1 <ffbnfm+0x231>
movl   $0x1,-0x48(%rbp)
mov    -0x68(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x68(%rbp)
jmp    13a8 <ffbnfm+0x238>
movl   $0x0,-0x48(%rbp)
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x55,%eax
jne    13cc <ffbnfm+0x25c>
movl   $0x14,-0x44(%rbp)
movq   $0x2,-0x58(%rbp)
jmp    16ba <ffbnfm+0x54a>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x49,%eax
jne    13f0 <ffbnfm+0x280>
movl   $0x15,-0x44(%rbp)
movq   $0x2,-0x58(%rbp)
jmp    16b5 <ffbnfm+0x545>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x56,%eax
jne    1414 <ffbnfm+0x2a4>
movl   $0x28,-0x44(%rbp)
movq   $0x4,-0x58(%rbp)
jmp    16b0 <ffbnfm+0x540>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x57,%eax
jne    1438 <ffbnfm+0x2c8>
movl   $0x50,-0x44(%rbp)
movq   $0x8,-0x58(%rbp)
jmp    16ab <ffbnfm+0x53b>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4a,%eax
jne    145c <ffbnfm+0x2ec>
movl   $0x29,-0x44(%rbp)
movq   $0x4,-0x58(%rbp)
jmp    16a6 <ffbnfm+0x536>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4b,%eax
jne    1480 <ffbnfm+0x310>
movl   $0x51,-0x44(%rbp)
movq   $0x8,-0x58(%rbp)
jmp    16a1 <ffbnfm+0x531>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x45,%eax
jne    14a4 <ffbnfm+0x334>
movl   $0x2a,-0x44(%rbp)
movq   $0x4,-0x58(%rbp)
jmp    169c <ffbnfm+0x52c>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x44,%eax
jne    14c8 <ffbnfm+0x358>
movl   $0x52,-0x44(%rbp)
movq   $0x8,-0x58(%rbp)
jmp    1697 <ffbnfm+0x527>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jne    155e <ffbnfm+0x3ee>
movl   $0x10,-0x44(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x68(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
je     152f <ffbnfm+0x3bf>
mov    -0x68(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x28,%eax
jne    1514 <ffbnfm+0x3a4>
mov    -0x68(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rdi
add    $0x1,%rdi
lea    0xb44(%rip),%rsi
lea    -0x58(%rbp),%rdx
call   1090 <sscanf@plt>
mov    %eax,-0x4c(%rbp)
cmpl   $0x1,-0x4c(%rbp)
jne    1551 <ffbnfm+0x3e1>
cmpl   $0x0,-0x48(%rbp)
jne    1559 <ffbnfm+0x3e9>
mov    -0x58(%rbp),%rax
cmp    -0x60(%rbp),%rax
jle    1559 <ffbnfm+0x3e9>
mov    -0x60(%rbp),%rax
mov    %rax,-0x58(%rbp)
jmp    1692 <ffbnfm+0x522>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4c,%eax
jne    1582 <ffbnfm+0x412>
movl   $0xe,-0x44(%rbp)
movq   $0x1,-0x58(%rbp)
jmp    168d <ffbnfm+0x51d>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x58,%eax
jne    15a6 <ffbnfm+0x436>
movl   $0x1,-0x44(%rbp)
movq   $0x1,-0x58(%rbp)
jmp    1688 <ffbnfm+0x518>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x42,%eax
jne    15ca <ffbnfm+0x45a>
movl   $0xb,-0x44(%rbp)
movq   $0x1,-0x58(%rbp)
jmp    1683 <ffbnfm+0x513>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x53,%eax
jne    15ee <ffbnfm+0x47e>
movl   $0xc,-0x44(%rbp)
movq   $0x1,-0x58(%rbp)
jmp    167e <ffbnfm+0x50e>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x43,%eax
jne    1612 <ffbnfm+0x4a2>
movl   $0x53,-0x44(%rbp)
movq   $0x8,-0x58(%rbp)
jmp    1679 <ffbnfm+0x509>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4d,%eax
jne    1636 <ffbnfm+0x4c6>
movl   $0xa3,-0x44(%rbp)
movq   $0x10,-0x58(%rbp)
jmp    1674 <ffbnfm+0x504>
lea    -0x110(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x51,%esi
lea    0xa4a(%rip),%rdx
call   1070 <snprintf@plt>
lea    -0x110(%rbp),%rdi
call   1060 <ffpmsg@plt>
mov    -0x30(%rbp),%rax
movl   $0x106,(%rax)
movl   $0x106,-0x4(%rbp)
jmp    1714 <ffbnfm+0x5a4>
jmp    1679 <ffbnfm+0x509>
jmp    167e <ffbnfm+0x50e>
jmp    1683 <ffbnfm+0x513>
jmp    1688 <ffbnfm+0x518>
jmp    168d <ffbnfm+0x51d>
jmp    1692 <ffbnfm+0x522>
jmp    1697 <ffbnfm+0x527>
jmp    169c <ffbnfm+0x52c>
jmp    16a1 <ffbnfm+0x531>
jmp    16a6 <ffbnfm+0x536>
jmp    16ab <ffbnfm+0x53b>
jmp    16b0 <ffbnfm+0x540>
jmp    16b5 <ffbnfm+0x545>
jmp    16ba <ffbnfm+0x54a>
cmpl   $0x0,-0x48(%rbp)
je     16cb <ffbnfm+0x55b>
imul   $0xffffffff,-0x44(%rbp),%eax
mov    %eax,-0x44(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     16df <ffbnfm+0x56f>
mov    -0x44(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     16f5 <ffbnfm+0x585>
mov    -0x60(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
cmpq   $0x0,-0x28(%rbp)
je     170b <ffbnfm+0x59b>
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     11ff <ffbnfm+0x8f>
mov    %r8,%r13
mov    %rcx,%rbp
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
test   %rsi,%rsi
je     11a4 <ffbnfm+0x34>
movl   $0x0,(%r12)
test   %r15,%r15
je     11b0 <ffbnfm+0x40>
movq   $0x0,(%r15)
test   %rbp,%rbp
je     11bd <ffbnfm+0x4d>
movq   $0x0,0x0(%rbp)
mov    %rbx,%rdi
call   1050 <strlen@plt>
test   %rax,%rax
je     11e6 <ffbnfm+0x76>
xor    %esi,%esi
nopl   0x0(%rax)
cmpb   $0x20,(%rbx,%rsi,1)
jne    11e1 <ffbnfm+0x71>
add    $0x1,%rsi
cmp    %rsi,%rax
jne    11d0 <ffbnfm+0x60>
jmp    11e6 <ffbnfm+0x76>
sub    %rsi,%rax
jne    1211 <ffbnfm+0xa1>
lea    0xe73(%rip),%rdi
call   1060 <ffpmsg@plt>
movl   $0x105,0x0(%r13)
mov    $0x105,%eax
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
cmp    $0x47,%rax
jb     1220 <ffbnfm+0xb0>
lea    0xe74(%rip),%rdi
jmp    11ed <ffbnfm+0x7d>
mov    %rbp,(%rsp)
add    %rbx,%rsi
lea    0x70(%rsp),%rbp
mov    %rbp,%rdi
call   1040 <strcpy@plt>
mov    %rbp,%rdi
call   1080 <ffupch@plt>
lea    0x6f(%rsp),%r14
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl 0x1(%r14),%edi
add    $0x1,%r14
call   1030 <isdigit@plt>
add    $0xffffffffffffffff,%rbp
test   %rax,%rax
jne    1250 <ffbnfm+0xe0>
cmp    $0xffffffffffffffff,%rbp
je     1294 <ffbnfm+0x124>
lea    0xe53(%rip),%rsi
lea    0x70(%rsp),%rdi
lea    0x8(%rsp),%rdx
call   1090 <sscanf@plt>
cmp    $0x1,%eax
je     129d <ffbnfm+0x12d>
lea    0xe3c(%rip),%rdi
jmp    11ed <ffbnfm+0x7d>
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     1375 <ffbnfm+0x205>
movzbl %cl,%ecx
lea    0xd37(%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     133b <ffbnfm+0x1cb>
mov    %esi,%ebp
cmp    $0x28,%al
jne    1304 <ffbnfm+0x194>
add    $0x1,%rcx
mov    %rcx,%rdi
lea    0xdbc(%rip),%rsi
lea    0x10(%rsp),%rdx
call   1090 <sscanf@plt>
cmp    $0x1,%eax
mov    %ebp,%esi
jne    133b <ffbnfm+0x1cb>
mov    $0x10,%eax
cmp    $0x50,%sil
je     1476 <ffbnfm+0x306>
mov    0x10(%rsp),%rcx
cmp    0x8(%rsp),%rcx
jle    1476 <ffbnfm+0x306>
mov    0x8(%rsp),%rax
mov    %rax,0x10(%rsp)
mov    $0x10,%eax
jmp    1476 <ffbnfm+0x306>
movq   $0x1,0x10(%rsp)
mov    $0xb,%eax
jmp    1472 <ffbnfm+0x302>
movq   $0x8,0x10(%rsp)
mov    $0x53,%eax
jmp    1472 <ffbnfm+0x302>
lea    0xd7b(%rip),%rdx
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x51,%esi
mov    %rbx,%rcx
call   1070 <snprintf@plt>
mov    %rbp,%rdi
call   1060 <ffpmsg@plt>
movl   $0x106,0x0(%r13)
mov    $0x106,%eax
jmp    11ff <ffbnfm+0x8f>
movq   $0x2,0x10(%rsp)
mov    $0x15,%eax
jmp    1472 <ffbnfm+0x302>
movq   $0x4,0x10(%rsp)
mov    $0x29,%eax
jmp    1472 <ffbnfm+0x302>
movq   $0x1,0x10(%rsp)
mov    $0xc,%eax
jmp    1472 <ffbnfm+0x302>
movq   $0x2,0x10(%rsp)
mov    $0x14,%eax
jmp    1472 <ffbnfm+0x302>
movq   $0x4,0x10(%rsp)
mov    $0x28,%eax
jmp    1472 <ffbnfm+0x302>
movq   $0x8,0x10(%rsp)
mov    $0x50,%eax
jmp    1472 <ffbnfm+0x302>
movq   $0x8,0x10(%rsp)
mov    $0x52,%eax
jmp    1472 <ffbnfm+0x302>
movq   $0x4,0x10(%rsp)
mov    $0x2a,%eax
jmp    1472 <ffbnfm+0x302>
movq   $0x8,0x10(%rsp)
mov    $0x51,%eax
jmp    1472 <ffbnfm+0x302>
movq   $0x1,0x10(%rsp)
mov    $0xe,%eax
jmp    1472 <ffbnfm+0x302>
movq   $0x10,0x10(%rsp)
mov    $0xa3,%eax
jmp    1472 <ffbnfm+0x302>
movq   $0x1,0x10(%rsp)
mov    $0x1,%eax
mov    (%rsp),%rbx
test   %r12,%r12
je     148a <ffbnfm+0x31a>
mov    %eax,%ecx
neg    %ecx
cmp    $0x50,%sil
cmovne %eax,%ecx
mov    %ecx,(%r12)
test   %r15,%r15
je     1497 <ffbnfm+0x327>
mov    0x8(%rsp),%rax
mov    %rax,(%r15)
test   %rbx,%rbx
je     14a4 <ffbnfm+0x334>
mov    0x10(%rsp),%rax
mov    %rax,(%rbx)
mov    0x0(%r13),%eax
jmp    11ff <ffbnfm+0x8f>

LLVM IR (-O0):
@.str = [50 x i8] c"Error: binary table TFORM code is blank (ffbnfm).\00"
@.str.1 = [53 x i8] c"Error: binary table TFORM code is too long (ffbnfm).\00"
@.str.2 = [4 x i8] c"%ld\00"
@.str.3 = [44 x i8] c"Error: Bad repeat format in TFORM (ffbnfm).\00"
@.str.4 = [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 %312
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 %312
69: ; preds = %62
%70 = load i64, i64* %13
%71 = load i64, i64* %12
%72 = sub i64 %70, %71
%73 = icmp ugt i64 %72, 70
br i1 %73, label %74, label %77
74: ; preds = %69
%75 = call i32 @ffpmsg(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
%76 = load i32*, i32** %11
store i32 261, i32* %76
store i32 261, i32* %6
br label %312
77: ; preds = %69
%78 = getelementptr inbounds [71 x i8], [71 x i8]* %20, i64 0, i64 0
%79 = load i8*, i8** %7
%80 = load i64, i64* %12
%81 = getelementptr inbounds i8, i8* %79, i64 %80
%82 = call i32 @strcpy(i8* %78, i8* %81)
%83 = getelementptr inbounds [71 x i8], [71 x i8]* %20, i64 0, i64 0
%84 = call i32 @ffupch(i8* %83)
%85 = getelementptr inbounds [71 x i8], [71 x i8]* %20, i64 0, i64 0
store i8* %85, i8** %19
store i64 0, i64* %12
br label %86
86: ; preds = %94, %77
%87 = load i8*, i8** %19
%88 = load i64, i64* %12
%89 = getelementptr inbounds i8, i8* %87, i64 %88
%90 = load i8, i8* %89
%91 = sext i8 %90 to i32
%92 = call i64 @isdigit(i32 %91)
%93 = icmp ne i64 %92, 0
br i1 %93, label %94, label %97
94: ; preds = %86
%95 = load i64, i64* %12
%96 = add i64 %95, 1
store i64 %96, i64* %12
br label %86
97: ; preds = %86
%98 = load i64, i64* %12
%99 = icmp eq i64 %98, 0
br i1 %99, label %100, label %101
100: ; preds = %97
store i64 1, i64* %18
br label %109
101: ; preds = %97
%102 = load i8*, i8** %19
%103 = call i32 @sscanf(i8* %102, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64* %18)
%104 = icmp ne i32 %103, 1
br i1 %104, label %105, label %108
105: ; preds = %101
%106 = call i32 @ffpmsg(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0))
%107 = load i32*, i32** %11
store i32 261, i32* %107
store i32 261, i32* %6
br label %312
108: ; preds = %101
br label %109
109: ; preds = %108, %100
%110 = load i8*, i8** %19
%111 = load i64, i64* %12
%112 = getelementptr inbounds i8, i8* %110, i64 %111
store i8* %112, i8** %19
%113 = load i8*, i8** %19
%114 = getelementptr inbounds i8, i8* %113, i64 0
%115 = load i8, i8* %114
%116 = sext i8 %115 to i32
%117 = icmp eq i32 %116, 80
br i1 %117, label %124, label %118
118: ; preds = %109
%119 = load i8*, i8** %19
%120 = getelementptr inbounds i8, i8* %119, i64 0
%121 = load i8, i8* %120
%122 = sext i8 %121 to i32
%123 = icmp eq i32 %122, 81
br i1 %123, label %124, label %127
124: ; preds = %118, %109
store i32 1, i32* %15
%125 = load i8*, i8** %19
%126 = getelementptr inbounds i8, i8* %125, i32 1
store i8* %126, i8** %19
br label %128
127: ; preds = %118
store i32 0, i32* %15
br label %128
128: ; preds = %127, %124
%129 = load i8*, i8** %19
%130 = getelementptr inbounds i8, i8* %129, i64 0
%131 = load i8, i8* %130
%132 = sext i8 %131 to i32
%133 = icmp eq i32 %132, 85
br i1 %133, label %134, label %135
134: ; preds = %128
store i32 20, i32* %14
store i64 2, i64* %17
br label %285
135: ; preds = %128
%136 = load i8*, i8** %19
%137 = getelementptr inbounds i8, i8* %136, i64 0
%138 = load i8, i8* %137
%139 = sext i8 %138 to i32
%140 = icmp eq i32 %139, 73
br i1 %140, label %141, label %142
141: ; preds = %135
store i32 21, i32* %14
store i64 2, i64* %17
br label %284
142: ; preds = %135
%143 = load i8*, i8** %19
%144 = getelementptr inbounds i8, i8* %143, i64 0
%145 = load i8, i8* %144
%146 = sext i8 %145 to i32
%147 = icmp eq i32 %146, 86
br i1 %147, label %148, label %149
148: ; preds = %142
store i32 40, i32* %14
store i64 4, i64* %17
br label %283
149: ; preds = %142
%150 = load i8*, i8** %19
%151 = getelementptr inbounds i8, i8* %150, i64 0
%152 = load i8, i8* %151
%153 = sext i8 %152 to i32
%154 = icmp eq i32 %153, 87
br i1 %154, label %155, label %156
155: ; preds = %149
store i32 80, i32* %14
store i64 8, i64* %17
br label %282
156: ; preds = %149
%157 = load i8*, i8** %19
%158 = getelementptr inbounds i8, i8* %157, i64 0
%159 = load i8, i8* %158
%160 = sext i8 %159 to i32
%161 = icmp eq i32 %160, 74
br i1 %161, label %162, label %163
162: ; preds = %156
store i32 41, i32* %14
store i64 4, i64* %17
br label %281
163: ; preds = %156
%164 = load i8*, i8** %19
%165 = getelementptr inbounds i8, i8* %164, i64 0
%166 = load i8, i8* %165
%167 = sext i8 %166 to i32
%168 = icmp eq i32 %167, 75
br i1 %168, label %169, label %170
169: ; preds = %163
store i32 81, i32* %14
store i64 8, i64* %17
br label %280
170: ; preds = %163
%171 = load i8*, i8** %19
%172 = getelementptr inbounds i8, i8* %171, i64 0
%173 = load i8, i8* %172
%174 = sext i8 %173 to i32
%175 = icmp eq i32 %174, 69
br i1 %175, label %176, label %177
176: ; preds = %170
store i32 42, i32* %14
store i64 4, i64* %17
br label %279
177: ; preds = %170
%178 = load i8*, i8** %19
%179 = getelementptr inbounds i8, i8* %178, i64 0
%180 = load i8, i8* %179
%181 = sext i8 %180 to i32
%182 = icmp eq i32 %181, 68
br i1 %182, label %183, label %184
183: ; preds = %177
store i32 82, i32* %14
store i64 8, i64* %17
br label %278
184: ; preds = %177
%185 = load i8*, i8** %19
%186 = getelementptr inbounds i8, i8* %185, i64 0
%187 = load i8, i8* %186
%188 = sext i8 %187 to i32
%189 = icmp eq i32 %188, 65
br i1 %189, label %190, label %222
190: ; preds = %184
store i32 16, i32* %14
store i32 0, i32* %16
%191 = load i8*, i8** %19
%192 = getelementptr inbounds i8, i8* %191, i64 1
%193 = load i8, i8* %192
%194 = sext i8 %193 to i32
%195 = icmp ne i32 %194, 0
br i1 %195, label %196, label %209
196: ; preds = %190
%197 = load i8*, i8** %19
%198 = getelementptr inbounds i8, i8* %197, i64 1
%199 = load i8, i8* %198
%200 = sext i8 %199 to i32
%201 = icmp eq i32 %200, 40
br i1 %201, label %202, label %205
202: ; preds = %196
%203 = load i8*, i8** %19
%204 = getelementptr inbounds i8, i8* %203, i32 1
store i8* %204, i8** %19
br label %205
205: ; preds = %202, %196
%206 = load i8*, i8** %19
%207 = getelementptr inbounds i8, i8* %206, i64 1
%208 = call i32 @sscanf(i8* %207, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64* %17)
store i32 %208, i32* %16
br label %209
209: ; preds = %205, %190
%210 = load i32, i32* %16
%211 = icmp ne i32 %210, 1
br i1 %211, label %219, label %212
212: ; preds = %209
%213 = load i32, i32* %15
%214 = icmp ne i32 %213, 0
br i1 %214, label %221, label %215
215: ; preds = %212
%216 = load i64, i64* %17
%217 = load i64, i64* %18
%218 = icmp sgt i64 %216, %217
br i1 %218, label %219, label %221
219: ; preds = %215, %209
%220 = load i64, i64* %18
store i64 %220, i64* %17
br label %221
221: ; preds = %219, %215, %212
br label %277
222: ; preds = %184
%223 = load i8*, i8** %19
%224 = getelementptr inbounds i8, i8* %223, i64 0
%225 = load i8, i8* %224
%226 = sext i8 %225 to i32
%227 = icmp eq i32 %226, 76
br i1 %227, label %228, label %229
228: ; preds = %222
store i32 14, i32* %14
store i64 1, i64* %17
br label %276
229: ; preds = %222
%230 = load i8*, i8** %19
%231 = getelementptr inbounds i8, i8* %230, i64 0
%232 = load i8, i8* %231
%233 = sext i8 %232 to i32
%234 = icmp eq i32 %233, 88
br i1 %234, label %235, label %236
235: ; preds = %229
store i32 1, i32* %14
store i64 1, i64* %17
br label %275
236: ; preds = %229
%237 = load i8*, i8** %19
%238 = getelementptr inbounds i8, i8* %237, i64 0
%239 = load i8, i8* %238
%240 = sext i8 %239 to i32
%241 = icmp eq i32 %240, 66
br i1 %241, label %242, label %243
242: ; preds = %236
store i32 11, i32* %14
store i64 1, i64* %17
br label %274
243: ; preds = %236
%244 = load i8*, i8** %19
%245 = getelementptr inbounds i8, i8* %244, i64 0
%246 = load i8, i8* %245
%247 = sext i8 %246 to i32
%248 = icmp eq i32 %247, 83
br i1 %248, label %249, label %250
249: ; preds = %243
store i32 12, i32* %14
store i64 1, i64* %17
br label %273
250: ; preds = %243
%251 = load i8*, i8** %19
%252 = getelementptr inbounds i8, i8* %251, i64 0
%253 = load i8, i8* %252
%254 = sext i8 %253 to i32
%255 = icmp eq i32 %254, 67
br i1 %255, label %256, label %257
256: ; preds = %250
store i32 83, i32* %14
store i64 8, i64* %17
br label %272
257: ; preds = %250
%258 = load i8*, i8** %19
%259 = getelementptr inbounds i8, i8* %258, i64 0
%260 = load i8, i8* %259
%261 = sext i8 %260 to i32
%262 = icmp eq i32 %261, 77
br i1 %262, label %263, label %264
263: ; preds = %257
store i32 163, i32* %14
store i64 16, i64* %17
br label %271
264: ; preds = %257
%265 = getelementptr inbounds [81 x i8], [81 x i8]* %21, i64 0, i64 0
%266 = load i8*, i8** %7
%267 = call i32 @snprintf(i8* %265, i32 81, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0), i8* %266)
%268 = getelementptr inbounds [81 x i8], [81 x i8]* %21, i64 0, i64 0
%269 = call i32 @ffpmsg(i8* %268)
%270 = load i32*, i32** %11
store i32 262, i32* %270
store i32 262, i32* %6
br label %312
271: ; preds = %263
br label %272
272: ; preds = %271, %256
br label %273
273: ; preds = %272, %249
br label %274
274: ; preds = %273, %242
br label %275
275: ; preds = %274, %235
br label %276
276: ; preds = %275, %228
br label %277
277: ; preds = %276, %221
br label %278
278: ; preds = %277, %183
br label %279
279: ; preds = %278, %176
br label %280
280: ; preds = %279, %169
br label %281
281: ; preds = %280, %162
br label %282
282: ; preds = %281, %155
br label %283
283: ; preds = %282, %148
br label %284
284: ; preds = %283, %141
br label %285
285: ; preds = %284, %134
%286 = load i32, i32* %15
%287 = icmp ne i32 %286, 0
br i1 %287, label %288, label %291
288: ; preds = %285
%289 = load i32, i32* %14
%290 = mul nsw i32 %289, -1
store i32 %290, i32* %14
br label %291
291: ; preds = %288, %285
%292 = load i32*, i32** %8
%293 = icmp ne i32* %292, null
br i1 %293, label %294, label %297
294: ; preds = %291
%295 = load i32, i32* %14
%296 = load i32*, i32** %8
store i32 %295, i32* %296
br label %297
297: ; preds = %294, %291
%298 = load i64*, i64** %9
%299 = icmp ne i64* %298, null
br i1 %299, label %300, label %303
300: ; preds = %297
%301 = load i64, i64* %18
%302 = load i64*, i64** %9
store i64 %301, i64* %302
br label %303
303: ; preds = %300, %297
%304 = load i64*, i64** %10
%305 = icmp ne i64* %304, null
br i1 %305, label %306, label %309
306: ; preds = %303
%307 = load i64, i64* %17
%308 = load i64*, i64** %10
store i64 %307, i64* %308
br label %309
309: ; preds = %306, %303
%310 = load i32*, i32** %11
%311 = load i32, i32* %310
store i32 %311, i32* %6
br label %312
312: ; preds = %309, %264, %105, %74, %66, %25
%313 = load i32, i32* %6
ret i32 %313
}

LLVM IR (-O2):
@.str = [50 x i8] c"Error: binary table TFORM code is blank (ffbnfm).\00"
@.str.1 = [53 x i8] c"Error: binary table TFORM code is too long (ffbnfm).\00"
@.str.2 = [4 x i8] c"%ld\00"
@.str.3 = [44 x i8] c"Error: Bad repeat format in TFORM (ffbnfm).\00"
@.str.4 = [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 %122, 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 %38, 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 %38, label %28
36: ; preds = %28
%37 = icmp eq i64 %26, %29
br i1 %37, label %38, label %40
38: ; preds = %33, %25, %36
%39 = 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 %122
40: ; preds = %36
%41 = sub i64 %26, %29
%42 = icmp ugt i64 %41, 70
br i1 %42, label %43, label %45
43: ; preds = %40
%44 = tail call i32 @ffpmsg(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
store i32 261, i32* %4
br label %122
45: ; preds = %40
%46 = getelementptr inbounds i8, i8* %0, i64 %29
%47 = call i32 @strcpy(i8* %12, i8* %46)
%48 = call i32 @ffupch(i8* %12)
br label %49
49: ; preds = %49, %45
%50 = phi i64 [ 0, %45 ], [ %56, %49 ]
%51 = getelementptr inbounds [71 x i8], [71 x i8]* %8, i64 0, i64 %50
%52 = load i8, i8* %51
%53 = sext i8 %52 to i32
%54 = call i64 @isdigit(i32 %53)
%55 = icmp eq i64 %54, 0
%56 = add i64 %50, 1
br i1 %55, label %57, label %49
57: ; preds = %49
%58 = getelementptr inbounds [71 x i8], [71 x i8]* %8, i64 0, i64 %50
%59 = icmp eq i64 %50, 0
br i1 %59, label %60, label %61
60: ; preds = %57
store i64 1, i64* %7
br label %66
61: ; preds = %57
%62 = call i32 @sscanf(i8* %12, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64* %7)
%63 = icmp eq i32 %62, 1
br i1 %63, label %66, label %64
64: ; preds = %61
%65 = call i32 @ffpmsg(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0))
store i32 261, i32* %4
br label %122
66: ; preds = %61, %60
%67 = load i8, i8* %58
%68 = and i8 %67, -2
%69 = icmp eq i8 %68, 80
%70 = getelementptr inbounds i8, i8* %58, i64 1
%71 = select i1 %69, i8* %70, i8* %58
%72 = load i8, i8* %71
switch i8 %72, label %106 [
i8 85, label %73
i8 73, label %74
i8 86, label %75
i8 87, label %76
i8 74, label %77
i8 75, label %78
i8 69, label %79
i8 68, label %80
i8 65, label %81
i8 76, label %100
i8 88, label %101
i8 66, label %102
i8 83, label %103
i8 67, label %104
i8 77, label %105
]
73: ; preds = %66
store i64 2, i64* %6
br label %109
74: ; preds = %66
store i64 2, i64* %6
br label %109
75: ; preds = %66
store i64 4, i64* %6
br label %109
76: ; preds = %66
store i64 8, i64* %6
br label %109
77: ; preds = %66
store i64 4, i64* %6
br label %109
78: ; preds = %66
store i64 8, i64* %6
br label %109
79: ; preds = %66
store i64 4, i64* %6
br label %109
80: ; preds = %66
store i64 8, i64* %6
br label %109
81: ; preds = %66
%82 = getelementptr inbounds i8, i8* %58, i64 2
%83 = select i1 %69, i8* %82, i8* %70
%84 = getelementptr inbounds i8, i8* %58, i64 2
%85 = select i1 %69, i8* %84, i8* %70
%86 = load i8, i8* %85
switch i8 %86, label %89 [
i8 0, label %98
i8 40, label %87
]
87: ; preds = %81
%88 = getelementptr inbounds i8, i8* %85, i64 1
br label %89
89: ; preds = %81, %87
%90 = phi i8* [ %88, %87 ], [ %83, %81 ]
%91 = call i32 @sscanf(i8* %90, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64* %6)
%92 = icmp eq i32 %91, 1
br i1 %92, label %93, label %98
93: ; preds = %89
br i1 %69, label %109, label %94
94: ; preds = %93
%95 = load i64, i64* %6
%96 = load i64, i64* %7
%97 = icmp sgt i64 %95, %96
br i1 %97, label %98, label %109
98: ; preds = %81, %94, %89
%99 = load i64, i64* %7
store i64 %99, i64* %6
br label %109
100: ; preds = %66
store i64 1, i64* %6
br label %109
101: ; preds = %66
store i64 1, i64* %6
br label %109
102: ; preds = %66
store i64 1, i64* %6
br label %109
103: ; preds = %66
store i64 1, i64* %6
br label %109
104: ; preds = %66
store i64 8, i64* %6
br label %109
105: ; preds = %66
store i64 16, i64* %6
br label %109
106: ; preds = %66
%107 = call i32 @snprintf(i8* %13, i32 81, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0), i8* %0)
%108 = call i32 @ffpmsg(i8* %13)
store i32 262, i32* %4
br label %122
109: ; preds = %74, %76, %78, %80, %100, %102, %104, %105, %103, %101, %93, %94, %98, %79, %77, %75, %73
%110 = phi i32 [ 20, %73 ], [ 21, %74 ], [ 40, %75 ], [ 80, %76 ], [ 41, %77 ], [ 81, %78 ], [ 42, %79 ], [ 82, %80 ], [ 16, %98 ], [ 16, %93 ], [ 16, %94 ], [ 14, %100 ], [ 1, %101 ], [ 11, %102 ], [ 12, %103 ], [ 83, %104 ], [ 163, %105 ]
br i1 %17, label %114, label %111
111: ; preds = %109
%112 = sub nsw i32 0, %110
%113 = select i1 %69, i32 %112, i32 %110
store i32 %113, i32* %1
br label %114
114: ; preds = %111, %109
br i1 %20, label %117, label %115
115: ; preds = %114
%116 = load i64, i64* %7
store i64 %116, i64* %2
br label %117
117: ; preds = %115, %114
br i1 %23, label %120, label %118
118: ; preds = %117
%119 = load i64, i64* %6
store i64 %119, i64* %3
br label %120
120: ; preds = %118, %117
%121 = load i32, i32* %4
br label %122
122: ; preds = %5, %120, %106, %64, %43, %38
%123 = phi i32 [ 261, %38 ], [ 261, %43 ], [ %121, %120 ], [ 262, %106 ], [ 261, %64 ], [ %14, %5 ]
ret i32 %123
}