#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 */
typedef double uintmax_t;
typedef double intmax_t;

/* Variables and functions */
int /*<<< orphan*/ ENOMEM;
int /*<<< orphan*/ asprintf(char **, char *, ...);
int escape(char *, int /*<<< orphan*/, size_t *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
char getchr();
int /*<<< orphan*/ getfloating(long double *, int);
scalar_t__ getint(int *);
int /*<<< orphan*/ getnum(double *, double *, int);
char *getstr();
char *mknum(char *, char);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ strchr(char *, char);
char *strdup(char *);
char strerror(int /*<<< orphan*/);
int /*<<< orphan*/ strspn(char *, char const *);
int /*<<< orphan*/ warnx(char *, ...);
char *printf_doformat(char *start, int *rval) {
  static const char skip1[] = "#'-+ 0";
  static const char skip2[] = "0123456789";
  char *fmt;
  int fieldwidth, haveprec, havewidth, mod_ldbl, precision;
  char convch, nextch;
  fmt = start + 1;
  fmt += strspn(fmt, skip1);
  if (*fmt == '*') {
    if (getint(&fieldwidth))
      return (NULL);
    havewidth = 1;
    ++fmt;
  } else {
    havewidth = 0;
    fmt += strspn(fmt, skip2);
  }
  if (*fmt == '.') {
    ++fmt;
    if (*fmt == '*') {
      if (getint(&precision))
        return (NULL);
      haveprec = 1;
      ++fmt;
    } else {
      haveprec = 0;
      fmt += strspn(fmt, skip2);
    }
  } else
    haveprec = 0;
  if (!*fmt) {
    warnx("missing format character");
    return (NULL);
  }
  if (*fmt == 'L') {
    mod_ldbl = 1;
    fmt++;
    if (!strchr("aAeEfFgG", *fmt)) {
      warnx("bad modifier L for %%%c", *fmt);
      return (NULL);
    }
  } else {
    mod_ldbl = 0;
  }
  convch = *fmt;
  nextch = *++fmt;
  *fmt = '\0';
  switch (convch) {
  case 'b': {
    size_t len;
    char *p;
    int getout;
    p = strdup(getstr());
    if (p == NULL) {
      warnx("%s", strerror(ENOMEM));
      return (NULL);
    }
    getout = escape(p, 0, &len);
    *(fmt - 1) = 's';
    do {
      char *b = NULL;
      if (havewidth)
        if (haveprec)
          (void)asprintf(&b, start, fieldwidth, precision, p);
        else
          (void)asprintf(&b, start, fieldwidth, p);
      else if (haveprec)
        (void)asprintf(&b, start, precision, p);
      else
        (void)asprintf(&b, start, p);
      if (b) {
        (void)fputs(b, stdout);
        free(b);
      }
    } while (0);
    *(fmt - 1) = 'b';
    free(p);
    if (getout)
      return (fmt);
    break;
  }
  case 'c': {
    char p;
    p = getchr();
    do {
      char *b = NULL;
      if (havewidth)
        if (haveprec)
          (void)asprintf(&b, start, fieldwidth, precision, p);
        else
          (void)asprintf(&b, start, fieldwidth, p);
      else if (haveprec)
        (void)asprintf(&b, start, precision, p);
      else
        (void)asprintf(&b, start, p);
      if (b) {
        (void)fputs(b, stdout);
        free(b);
      }
    } while (0);
    break;
  }
  case 's': {
    const char *p;
    p = getstr();
    do {
      char *b = NULL;
      if (havewidth)
        if (haveprec)
          (void)asprintf(&b, start, fieldwidth, precision, p);
        else
          (void)asprintf(&b, start, fieldwidth, p);
      else if (haveprec)
        (void)asprintf(&b, start, precision, p);
      else
        (void)asprintf(&b, start, p);
      if (b) {
        (void)fputs(b, stdout);
        free(b);
      }
    } while (0);
    break;
  }
  case 'd':
  case 'i':
  case 'o':
  case 'u':
  case 'x':
  case 'X': {
    char *f;
    intmax_t val;
    uintmax_t uval;
    int signedconv;
    signedconv = (convch == 'd' || convch == 'i');
    if ((f = mknum(start, convch)) == NULL)
      return (NULL);
    if (getnum(&val, &uval, signedconv))
      *rval = 1;
    if (signedconv)
      do {
        char *b = NULL;
        if (havewidth)
          if (haveprec)
            (void)asprintf(&b, f, fieldwidth, precision, val);
          else
            (void)asprintf(&b, f, fieldwidth, val);
        else if (haveprec)
          (void)asprintf(&b, f, precision, val);
        else
          (void)asprintf(&b, f, val);
        if (b) {
          (void)fputs(b, stdout);
          free(b);
        }
      } while (0);
    else
      do {
        char *b = NULL;
        if (havewidth)
          if (haveprec)
            (void)asprintf(&b, f, fieldwidth, precision, uval);
          else
            (void)asprintf(&b, f, fieldwidth, uval);
        else if (haveprec)
          (void)asprintf(&b, f, precision, uval);
        else
          (void)asprintf(&b, f, uval);
        if (b) {
          (void)fputs(b, stdout);
          free(b);
        }
      } while (0);
    break;
  }
  case 'e':
  case 'E':
  case 'f':
  case 'F':
  case 'g':
  case 'G':
  case 'a':
  case 'A': {
    long double p;
    if (getfloating(&p, mod_ldbl))
      *rval = 1;
    if (mod_ldbl)
      do {
        char *b = NULL;
        if (havewidth)
          if (haveprec)
            (void)asprintf(&b, start, fieldwidth, precision, p);
          else
            (void)asprintf(&b, start, fieldwidth, p);
        else if (haveprec)
          (void)asprintf(&b, start, precision, p);
        else
          (void)asprintf(&b, start, p);
        if (b) {
          (void)fputs(b, stdout);
          free(b);
        }
      } while (0);
    else
      do {
        char *b = NULL;
        if (havewidth)
          if (haveprec)
            (void)asprintf(&b, start, fieldwidth, precision, (double)p);
          else
            (void)asprintf(&b, start, fieldwidth, (double)p);
        else if (haveprec)
          (void)asprintf(&b, start, precision, (double)p);
        else
          (void)asprintf(&b, start, (double)p);
        if (b) {
          (void)fputs(b, stdout);
          free(b);
        }
      } while (0);
    break;
  }
  default:
    warnx("illegal format character %c", convch);
    return (NULL);
  }
  *fmt = nextch;
  return (fmt);
}


x86 assembly (clang, -O0):
<printf_doformat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xec6(%rip),%rsi
call   10a0 <strspn@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2a,%eax
jne    1277 <printf_doformat+0x87>
lea    -0x24(%rbp),%rdi
call   1090 <getint@plt>
cmp    $0x0,%rax
je     125f <printf_doformat+0x6f>
movq   $0x0,-0x8(%rbp)
jmp    1bfc <printf_doformat+0xa0c>
movl   $0x1,-0x2c(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    129e <printf_doformat+0xae>
movl   $0x0,-0x2c(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xe5e(%rip),%rsi
call   10a0 <strspn@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    132e <printf_doformat+0x13e>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2a,%eax
jne    1302 <printf_doformat+0x112>
lea    -0x34(%rbp),%rdi
call   1090 <getint@plt>
cmp    $0x0,%rax
je     12ea <printf_doformat+0xfa>
movq   $0x0,-0x8(%rbp)
jmp    1bfc <printf_doformat+0xa0c>
movl   $0x1,-0x28(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1329 <printf_doformat+0x139>
movl   $0x0,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xdd3(%rip),%rsi
call   10a0 <strspn@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
jmp    1335 <printf_doformat+0x145>
movl   $0x0,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
jne    135d <printf_doformat+0x16d>
lea    0xda9(%rip),%rdi
mov    $0x0,%al
call   1070 <warnx@plt>
movq   $0x0,-0x8(%rbp)
jmp    1bfc <printf_doformat+0xa0c>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4c,%eax
jne    13c3 <printf_doformat+0x1d3>
movl   $0x1,-0x30(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
lea    0xd80(%rip),%rdi
movsbl (%rax),%esi
call   1060 <strchr@plt>
cmp    $0x0,%eax
jne    13be <printf_doformat+0x1ce>
mov    -0x20(%rbp),%rax
movsbl (%rax),%esi
lea    0xd6a(%rip),%rdi
mov    $0x0,%al
call   1070 <warnx@plt>
movq   $0x0,-0x8(%rbp)
jmp    1bfc <printf_doformat+0xa0c>
jmp    13ca <printf_doformat+0x1da>
movl   $0x0,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x35(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
mov    0x1(%rax),%al
mov    %al,-0x36(%rbp)
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
movsbl -0x35(%rbp),%eax
add    $0xffffffbf,%eax
mov    %eax,%ecx
mov    %rcx,-0xf8(%rbp)
sub    $0x37,%eax
ja     1bcc <printf_doformat+0x9dc>
mov    -0xf8(%rbp),%rax
lea    0xbea(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   10c0 <getstr@plt>
mov    %rax,%rdi
call   10e0 <strdup@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jne    1469 <printf_doformat+0x279>
mov    0x2b9c(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
movsbl %al,%esi
lea    0xcd7(%rip),%rdi
mov    $0x0,%al
call   1070 <warnx@plt>
movq   $0x0,-0x8(%rbp)
jmp    1bfc <printf_doformat+0xa0c>
mov    -0x48(%rbp),%rdi
xor    %esi,%esi
lea    -0x40(%rbp),%rdx
call   1110 <escape@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x20(%rbp),%rax
movb   $0x73,-0x1(%rax)
movq   $0x0,-0x58(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     14d8 <printf_doformat+0x2e8>
cmpl   $0x0,-0x28(%rbp)
je     14bd <printf_doformat+0x2cd>
mov    -0x10(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x34(%rbp),%ecx
mov    -0x48(%rbp),%r8
lea    -0x58(%rbp),%rdi
mov    $0x0,%al
call   10d0 <asprintf@plt>
jmp    14d3 <printf_doformat+0x2e3>
mov    -0x10(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x48(%rbp),%rcx
lea    -0x58(%rbp),%rdi
mov    $0x0,%al
call   10d0 <asprintf@plt>
jmp    1515 <printf_doformat+0x325>
cmpl   $0x0,-0x28(%rbp)
je     14fd <printf_doformat+0x30d>
mov    -0x10(%rbp),%rsi
mov    -0x34(%rbp),%edx
mov    -0x48(%rbp),%rcx
lea    -0x58(%rbp),%rdi
mov    $0x0,%al
call   10d0 <asprintf@plt>
jmp    1510 <printf_doformat+0x320>
mov    -0x10(%rbp),%rsi
mov    -0x48(%rbp),%rdx
lea    -0x58(%rbp),%rdi
mov    $0x0,%al
call   10d0 <asprintf@plt>
jmp    1515 <printf_doformat+0x325>
cmpq   $0x0,-0x58(%rbp)
je     153b <printf_doformat+0x34b>
mov    -0x58(%rbp),%rdi
mov    0x2aad(%rip),%rax
mov    (%rax),%esi
call   1080 <fputs@plt>
mov    -0x58(%rbp),%rdi
call   1050 <free@plt>
jmp    1540 <printf_doformat+0x350>
mov    -0x20(%rbp),%rax
movb   $0x62,-0x1(%rax)
mov    -0x48(%rbp),%rdi
call   1050 <free@plt>
cmpl   $0x0,-0x4c(%rbp)
je     1568 <printf_doformat+0x378>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1bfc <printf_doformat+0xa0c>
jmp    1beb <printf_doformat+0x9fb>
mov    $0x0,%al
call   1030 <getchr@plt>
mov    %al,-0x59(%rbp)
movq   $0x0,-0x68(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     15cd <printf_doformat+0x3dd>
cmpl   $0x0,-0x28(%rbp)
je     15b2 <printf_doformat+0x3c2>
mov    -0x10(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x34(%rbp),%ecx
movsbl -0x59(%rbp),%r8d
lea    -0x68(%rbp),%rdi
mov    $0x0,%al
call   10d0 <asprintf@plt>
jmp    15c8 <printf_doformat+0x3d8>
mov    -0x10(%rbp),%rsi
mov    -0x24(%rbp),%edx
movsbl -0x59(%rbp),%ecx
lea    -0x68(%rbp),%rdi
mov    $0x0,%al
call   10d0 <asprintf@plt>
jmp    160a <printf_doformat+0x41a>
cmpl   $0x0,-0x28(%rbp)
je     15f2 <printf_doformat+0x402>
mov    -0x10(%rbp),%rsi
mov    -0x34(%rbp),%edx
movsbl -0x59(%rbp),%ecx
lea    -0x68(%rbp),%rdi
mov    $0x0,%al
call   10d0 <asprintf@plt>
jmp    1605 <printf_doformat+0x415>
mov    -0x10(%rbp),%rsi
movsbl -0x59(%rbp),%edx
lea    -0x68(%rbp),%rdi
mov    $0x0,%al
call   10d0 <asprintf@plt>
jmp    160a <printf_doformat+0x41a>
cmpq   $0x0,-0x68(%rbp)
je     1630 <printf_doformat+0x440>
mov    -0x68(%rbp),%rdi
mov    0x29b8(%rip),%rax
mov    (%rax),%esi
call   1080 <fputs@plt>
mov    -0x68(%rbp),%rdi
call   1050 <free@plt>
jmp    1635 <printf_doformat+0x445>
jmp    1beb <printf_doformat+0x9fb>
mov    $0x0,%al
call   10c0 <getstr@plt>
mov    %rax,-0x70(%rbp)
movq   $0x0,-0x78(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     169a <printf_doformat+0x4aa>
cmpl   $0x0,-0x28(%rbp)
je     167f <printf_doformat+0x48f>
mov    -0x10(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x34(%rbp),%ecx
mov    -0x70(%rbp),%r8
lea    -0x78(%rbp),%rdi
mov    $0x0,%al
call   10d0 <asprintf@plt>
jmp    1695 <printf_doformat+0x4a5>
mov    -0x10(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x70(%rbp),%rcx
lea    -0x78(%rbp),%rdi
mov    $0x0,%al
call   10d0 <asprintf@plt>
jmp    16d7 <printf_doformat+0x4e7>
cmpl   $0x0,-0x28(%rbp)
je     16bf <printf_doformat+0x4cf>
mov    -0x10(%rbp),%rsi
mov    -0x34(%rbp),%edx
mov    -0x70(%rbp),%rcx
lea    -0x78(%rbp),%rdi
mov    $0x0,%al
call   10d0 <asprintf@plt>
jmp    16d2 <printf_doformat+0x4e2>
mov    -0x10(%rbp),%rsi
mov    -0x70(%rbp),%rdx
lea    -0x78(%rbp),%rdi
mov    $0x0,%al
call   10d0 <asprintf@plt>
jmp    16d7 <printf_doformat+0x4e7>
cmpq   $0x0,-0x78(%rbp)
je     16fd <printf_doformat+0x50d>
mov    -0x78(%rbp),%rdi
mov    0x28eb(%rip),%rax
mov    (%rax),%esi
call   1080 <fputs@plt>
mov    -0x78(%rbp),%rdi
call   1050 <free@plt>
jmp    1702 <printf_doformat+0x512>
jmp    1beb <printf_doformat+0x9fb>
movsbl -0x35(%rbp),%ecx
mov    $0x1,%al
cmp    $0x64,%ecx
mov    %al,-0xf9(%rbp)
je     172c <printf_doformat+0x53c>
movsbl -0x35(%rbp),%eax
cmp    $0x69,%eax
sete   %al
mov    %al,-0xf9(%rbp)
mov    -0xf9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x94(%rbp)
mov    -0x10(%rbp),%rdi
movsbl -0x35(%rbp),%esi
call   1100 <mknum@plt>
mov    %rax,-0x80(%rbp)
cmp    $0x0,%rax
jne    1765 <printf_doformat+0x575>
movq   $0x0,-0x8(%rbp)
jmp    1bfc <printf_doformat+0xa0c>
mov    -0x94(%rbp),%edx
lea    -0x88(%rbp),%rdi
lea    -0x90(%rbp),%rsi
call   1040 <getnum@plt>
cmp    $0x0,%eax
je     1791 <printf_doformat+0x5a1>
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
cmpl   $0x0,-0x94(%rbp)
je     188d <printf_doformat+0x69d>
jmp    17a3 <printf_doformat+0x5b3>
movq   $0x0,-0xa0(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1809 <printf_doformat+0x619>
cmpl   $0x0,-0x28(%rbp)
je     17e7 <printf_doformat+0x5f7>
mov    -0x80(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x34(%rbp),%ecx
movsd  -0x88(%rbp),%xmm0
ff
lea    -0xa0(%rbp),%rdi
mov    $0x1,%al
call   10d0 <asprintf@plt>
jmp    1804 <printf_doformat+0x614>
mov    -0x80(%rbp),%rsi
mov    -0x24(%rbp),%edx
movsd  -0x88(%rbp),%xmm0
ff
lea    -0xa0(%rbp),%rdi
mov    $0x1,%al
call   10d0 <asprintf@plt>
jmp    1854 <printf_doformat+0x664>
cmpl   $0x0,-0x28(%rbp)
je     1835 <printf_doformat+0x645>
mov    -0x80(%rbp),%rsi
mov    -0x34(%rbp),%edx
movsd  -0x88(%rbp),%xmm0
ff
lea    -0xa0(%rbp),%rdi
mov    $0x1,%al
call   10d0 <asprintf@plt>
jmp    184f <printf_doformat+0x65f>
mov    -0x80(%rbp),%rsi
movsd  -0x88(%rbp),%xmm0
ff
lea    -0xa0(%rbp),%rdi
mov    $0x1,%al
call   10d0 <asprintf@plt>
jmp    1854 <printf_doformat+0x664>
cmpq   $0x0,-0xa0(%rbp)
je     1883 <printf_doformat+0x693>
mov    -0xa0(%rbp),%rdi
mov    0x2768(%rip),%rax
mov    (%rax),%esi
call   1080 <fputs@plt>
mov    -0xa0(%rbp),%rdi
call   1050 <free@plt>
jmp    1888 <printf_doformat+0x698>
jmp    197c <printf_doformat+0x78c>
jmp    1892 <printf_doformat+0x6a2>
movq   $0x0,-0xa8(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     18f8 <printf_doformat+0x708>
cmpl   $0x0,-0x28(%rbp)
je     18d6 <printf_doformat+0x6e6>
mov    -0x80(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x34(%rbp),%ecx
movsd  -0x90(%rbp),%xmm0
ff
lea    -0xa8(%rbp),%rdi
mov    $0x1,%al
call   10d0 <asprintf@plt>
jmp    18f3 <printf_doformat+0x703>
mov    -0x80(%rbp),%rsi
mov    -0x24(%rbp),%edx
movsd  -0x90(%rbp),%xmm0
ff
lea    -0xa8(%rbp),%rdi
mov    $0x1,%al
call   10d0 <asprintf@plt>
jmp    1943 <printf_doformat+0x753>
cmpl   $0x0,-0x28(%rbp)
je     1924 <printf_doformat+0x734>
mov    -0x80(%rbp),%rsi
mov    -0x34(%rbp),%edx
movsd  -0x90(%rbp),%xmm0
ff
lea    -0xa8(%rbp),%rdi
mov    $0x1,%al
call   10d0 <asprintf@plt>
jmp    193e <printf_doformat+0x74e>
mov    -0x80(%rbp),%rsi
movsd  -0x90(%rbp),%xmm0
ff
lea    -0xa8(%rbp),%rdi
mov    $0x1,%al
call   10d0 <asprintf@plt>
jmp    1943 <printf_doformat+0x753>
cmpq   $0x0,-0xa8(%rbp)
je     1972 <printf_doformat+0x782>
mov    -0xa8(%rbp),%rdi
mov    0x2679(%rip),%rax
mov    (%rax),%esi
call   1080 <fputs@plt>
mov    -0xa8(%rbp),%rdi
call   1050 <free@plt>
jmp    1977 <printf_doformat+0x787>
jmp    197c <printf_doformat+0x78c>
jmp    1beb <printf_doformat+0x9fb>
mov    -0x30(%rbp),%esi
lea    -0xc0(%rbp),%rdi
call   10b0 <getfloating@plt>
cmp    $0x0,%eax
je     19a3 <printf_doformat+0x7b3>
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
cmpl   $0x0,-0x30(%rbp)
je     1aa8 <printf_doformat+0x8b8>
jmp    19b2 <printf_doformat+0x7c2>
movq   $0x0,-0xc8(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1a1e <printf_doformat+0x82e>
cmpl   $0x0,-0x28(%rbp)
je     19f9 <printf_doformat+0x809>
mov    -0x10(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x34(%rbp),%ecx
fldt   -0xc0(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
xor    %eax,%eax
lea    -0xc8(%rbp),%rdi
call   10d0 <asprintf@plt>
jmp    1a19 <printf_doformat+0x829>
mov    -0x10(%rbp),%rsi
mov    -0x24(%rbp),%edx
fldt   -0xc0(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
xor    %eax,%eax
lea    -0xc8(%rbp),%rdi
call   10d0 <asprintf@plt>
jmp    1a6f <printf_doformat+0x87f>
cmpl   $0x0,-0x28(%rbp)
je     1a4d <printf_doformat+0x85d>
mov    -0x10(%rbp),%rsi
mov    -0x34(%rbp),%edx
fldt   -0xc0(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
xor    %eax,%eax
lea    -0xc8(%rbp),%rdi
call   10d0 <asprintf@plt>
jmp    1a6a <printf_doformat+0x87a>
mov    -0x10(%rbp),%rsi
fldt   -0xc0(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
xor    %eax,%eax
lea    -0xc8(%rbp),%rdi
call   10d0 <asprintf@plt>
jmp    1a6f <printf_doformat+0x87f>
cmpq   $0x0,-0xc8(%rbp)
je     1a9e <printf_doformat+0x8ae>
mov    -0xc8(%rbp),%rdi
mov    0x254d(%rip),%rax
mov    (%rax),%esi
call   1080 <fputs@plt>
mov    -0xc8(%rbp),%rdi
call   1050 <free@plt>
jmp    1aa3 <printf_doformat+0x8b3>
jmp    1bc7 <printf_doformat+0x9d7>
jmp    1aad <printf_doformat+0x8bd>
movq   $0x0,-0xd0(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1b2b <printf_doformat+0x93b>
cmpl   $0x0,-0x28(%rbp)
je     1afd <printf_doformat+0x90d>
mov    -0x10(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x34(%rbp),%ecx
fldt   -0xc0(%rbp)
fstpl  -0xf0(%rbp)
movsd  -0xf0(%rbp),%xmm0
ff
lea    -0xd0(%rbp),%rdi
mov    $0x1,%al
call   10d0 <asprintf@plt>
jmp    1b26 <printf_doformat+0x936>
mov    -0x10(%rbp),%rsi
mov    -0x24(%rbp),%edx
fldt   -0xc0(%rbp)
fstpl  -0xe8(%rbp)
movsd  -0xe8(%rbp),%xmm0
ff
lea    -0xd0(%rbp),%rdi
mov    $0x1,%al
call   10d0 <asprintf@plt>
jmp    1b8e <printf_doformat+0x99e>
cmpl   $0x0,-0x28(%rbp)
je     1b63 <printf_doformat+0x973>
mov    -0x10(%rbp),%rsi
mov    -0x34(%rbp),%edx
fldt   -0xc0(%rbp)
fstpl  -0xe0(%rbp)
movsd  -0xe0(%rbp),%xmm0
ff
lea    -0xd0(%rbp),%rdi
mov    $0x1,%al
call   10d0 <asprintf@plt>
jmp    1b89 <printf_doformat+0x999>
mov    -0x10(%rbp),%rsi
fldt   -0xc0(%rbp)
fstpl  -0xd8(%rbp)
movsd  -0xd8(%rbp),%xmm0
ff
lea    -0xd0(%rbp),%rdi
mov    $0x1,%al
call   10d0 <asprintf@plt>
jmp    1b8e <printf_doformat+0x99e>
cmpq   $0x0,-0xd0(%rbp)
je     1bbd <printf_doformat+0x9cd>
mov    -0xd0(%rbp),%rdi
mov    0x242e(%rip),%rax
mov    (%rax),%esi
call   1080 <fputs@plt>
mov    -0xd0(%rbp),%rdi
call   1050 <free@plt>
jmp    1bc2 <printf_doformat+0x9d2>
jmp    1bc7 <printf_doformat+0x9d7>
jmp    1beb <printf_doformat+0x9fb>
movsbl -0x35(%rbp),%esi
lea    0x558(%rip),%rdi
mov    $0x0,%al
call   1070 <warnx@plt>
movq   $0x0,-0x8(%rbp)
jmp    1bfc <printf_doformat+0xa0c>
mov    -0x36(%rbp),%cl
mov    -0x20(%rbp),%rax
mov    %cl,(%rax)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printf_doformat>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %rsi,%rbx
mov    %rdi,%r15
add    $0x1,%rdi
lea    0xed1(%rip),%rsi
call   10a0 <strspn@plt>
cltq
lea    (%r15,%rax,1),%rbp
add    $0x1,%rbp
mov    0x1(%r15,%rax,1),%r13b
cmp    $0x2a,%r13b
jne    1248 <printf_doformat+0x58>
lea    0x28(%rsp),%rdi
call   1090 <getint@plt>
test   %rax,%rax
jne    1432 <printf_doformat+0x242>
mov    %rbx,0x50(%rsp)
mov    $0x1,%eax
jmp    125e <printf_doformat+0x6e>
mov    %rbx,0x50(%rsp)
lea    0xe93(%rip),%rsi
mov    %rbp,%rdi
call   10a0 <strspn@plt>
cltq
lea    (%rax,%rbp,1),%r12
mov    0x0(%rbp,%rax,1),%r14b
mov    $0x1,%bl
cmp    $0x2e,%r14b
jne    12b4 <printf_doformat+0xc4>
mov    0x1(%r12),%bl
cmp    $0x2a,%bl
jne    1292 <printf_doformat+0xa2>
lea    0x1c(%rsp),%rdi
call   1090 <getint@plt>
test   %rax,%rax
jne    1432 <printf_doformat+0x242>
add    $0x2,%r12
jmp    12aa <printf_doformat+0xba>
add    $0x1,%r12
lea    0xe4a(%rip),%rsi
mov    %r12,%rdi
call   10a0 <strspn@plt>
cltq
add    %rax,%r12
cmp    $0x2a,%bl
setne  %bl
mov    (%r12),%r14b
test   %r14b,%r14b
je     12ef <printf_doformat+0xff>
xor    %esi,%esi
cmp    $0x4c,%r14b
jne    1305 <printf_doformat+0x115>
movsbl 0x1(%r12),%esi
lea    0xe3d(%rip),%rdi
call   1060 <strchr@plt>
mov    0x1(%r12),%bpl
test   %eax,%eax
je     143a <printf_doformat+0x24a>
mov    %bl,0x1b(%rsp)
add    $0x1,%r12
mov    $0x1,%esi
jmp    130c <printf_doformat+0x11c>
lea    0xdfc(%rip),%rdi
xor    %r14d,%r14d
xor    %eax,%eax
call   1070 <warnx@plt>
jmp    180c <printf_doformat+0x61c>
mov    %bl,0x1b(%rsp)
mov    %r14d,%ebp
mov    0x1(%r12),%bl
movb   $0x0,0x1(%r12)
movsbl %bpl,%eax
lea    -0x41(%rax),%ecx
cmp    $0x37,%ecx
ja     152e <printf_doformat+0x33e>
lea    0x1(%r12),%rdi
lea    0xccd(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
mov    %bl,0x2f(%rsp)
jmp    *%rcx
mov    %rdi,%rbp
lea    0x30(%rsp),%rdi
call   10b0 <getfloating@plt>
test   %eax,%eax
je     135c <printf_doformat+0x16c>
mov    0x50(%rsp),%rax
movl   $0x1,(%rax)
cmp    $0x4c,%r14b
mov    0x1b(%rsp),%al
jne    1454 <printf_doformat+0x264>
movq   $0x0,0x20(%rsp)
cmp    $0x2a,%r13b
jne    1485 <printf_doformat+0x295>
mov    0x28(%rsp),%edx
test   %al,%al
mov    %rbp,%r14
jne    1667 <printf_doformat+0x477>
mov    0x1c(%rsp),%ecx
fldt   0x30(%rsp)
fstpt  (%rsp)
lea    0x20(%rsp),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   10d0 <asprintf@plt>
jmp    16a0 <printf_doformat+0x4b0>
mov    %rdi,%r14
mov    %r15,%rdi
mov    %eax,%esi
call   1100 <mknum@plt>
test   %rax,%rax
je     1432 <printf_doformat+0x242>
mov    %rax,%rbx
cmp    $0x64,%bpl
sete   %al
cmp    $0x69,%bpl
sete   %cl
or     %al,%cl
movzbl %cl,%edx
lea    0x30(%rsp),%rdi
lea    0x20(%rsp),%rsi
call   1040 <getnum@plt>
test   %eax,%eax
je     13f1 <printf_doformat+0x201>
mov    0x50(%rsp),%rax
movl   $0x1,(%rax)
cmp    $0x69,%bpl
je     1401 <printf_doformat+0x211>
cmp    $0x64,%bpl
jne    14ee <printf_doformat+0x2fe>
movq   $0x0,0x48(%rsp)
cmp    $0x2a,%r13b
jne    14d8 <printf_doformat+0x2e8>
mov    0x28(%rsp),%edx
cmpb   $0x0,0x1b(%rsp)
jne    16ca <printf_doformat+0x4da>
mov    0x1c(%rsp),%ecx
movsd  0x30(%rsp),%xmm0
jmp    151a <printf_doformat+0x32a>
xor    %r14d,%r14d
jmp    180c <printf_doformat+0x61c>
movsbl %bpl,%esi
lea    0xccf(%rip),%rdi
xor    %r14d,%r14d
xor    %eax,%eax
call   1070 <warnx@plt>
jmp    180c <printf_doformat+0x61c>
movq   $0x0,0x20(%rsp)
cmp    $0x2a,%r13b
jne    14ab <printf_doformat+0x2bb>
mov    0x28(%rsp),%edx
test   %al,%al
mov    %rbp,%r14
je     1640 <printf_doformat+0x450>
fldt   0x30(%rsp)
fstpl  0x58(%rsp)
movsd  0x58(%rsp),%xmm0
jmp    1691 <printf_doformat+0x4a1>
test   %al,%al
mov    %rbp,%r14
je     1663 <printf_doformat+0x473>
fldt   0x30(%rsp)
fstpt  (%rsp)
lea    0x20(%rsp),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   10d0 <asprintf@plt>
jmp    16a0 <printf_doformat+0x4b0>
test   %al,%al
mov    %rbp,%r14
je     167f <printf_doformat+0x48f>
fldt   0x30(%rsp)
fstpl  0x68(%rsp)
movsd  0x68(%rsp),%xmm0
lea    0x20(%rsp),%rdi
mov    %r15,%rsi
mov    $0x1,%al
call   10d0 <asprintf@plt>
jmp    16a0 <printf_doformat+0x4b0>
cmpb   $0x0,0x1b(%rsp)
je     16c6 <printf_doformat+0x4d6>
movsd  0x30(%rsp),%xmm0
jmp    16e6 <printf_doformat+0x4f6>
movq   $0x0,0x48(%rsp)
cmp    $0x2a,%r13b
jne    16d5 <printf_doformat+0x4e5>
mov    0x28(%rsp),%edx
cmpb   $0x0,0x1b(%rsp)
jne    1781 <printf_doformat+0x591>
mov    0x1c(%rsp),%ecx
movsd  0x20(%rsp),%xmm0
lea    0x48(%rsp),%rdi
mov    %rbx,%rsi
mov    $0x1,%al
call   10d0 <asprintf@plt>
jmp    1796 <printf_doformat+0x5a6>
lea    0xbfa(%rip),%rdi
xor    %r14d,%r14d
mov    %eax,%esi
jmp    1448 <printf_doformat+0x258>
mov    %rdi,%rbp
xor    %eax,%eax
call   10c0 <getstr@plt>
mov    %rax,%rdi
call   10e0 <strdup@plt>
test   %rax,%rax
je     173e <printf_doformat+0x54e>
mov    %rax,%rbx
lea    0x30(%rsp),%rdx
mov    %rax,%rdi
xor    %esi,%esi
call   1110 <escape@plt>
mov    %eax,%r14d
movb   $0x73,(%r12)
movq   $0x0,0x20(%rsp)
cmp    $0x2a,%r13b
jne    175b <printf_doformat+0x56b>
mov    0x28(%rsp),%edx
cmpb   $0x0,0x1b(%rsp)
jne    1822 <printf_doformat+0x632>
mov    0x1c(%rsp),%ecx
lea    0x20(%rsp),%rdi
mov    %r15,%rsi
mov    %rbx,%r8
xor    %eax,%eax
call   10d0 <asprintf@plt>
jmp    1834 <printf_doformat+0x644>
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <getchr@plt>
movq   $0x0,0x30(%rsp)
cmp    $0x2a,%r13b
jne    16fa <printf_doformat+0x50a>
mov    0x28(%rsp),%edx
cmpb   $0x0,0x1b(%rsp)
jne    17b9 <printf_doformat+0x5c9>
mov    0x1c(%rsp),%ecx
movsbl %al,%r8d
lea    0x30(%rsp),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   10d0 <asprintf@plt>
jmp    17e3 <printf_doformat+0x5f3>
mov    %rdi,%r14
xor    %eax,%eax
call   10c0 <getstr@plt>
movq   $0x0,0x30(%rsp)
cmp    $0x2a,%r13b
jne    171c <printf_doformat+0x52c>
mov    0x28(%rsp),%edx
cmpb   $0x0,0x1b(%rsp)
jne    17d1 <printf_doformat+0x5e1>
mov    0x1c(%rsp),%ecx
lea    0x30(%rsp),%rdi
mov    %r15,%rsi
mov    %rax,%r8
xor    %eax,%eax
call   10d0 <asprintf@plt>
jmp    17e3 <printf_doformat+0x5f3>
mov    0x1c(%rsp),%ecx
fldt   0x30(%rsp)
fstpl  0x60(%rsp)
movsd  0x60(%rsp),%xmm0
lea    0x20(%rsp),%rdi
mov    %r15,%rsi
mov    $0x1,%al
call   10d0 <asprintf@plt>
jmp    16a0 <printf_doformat+0x4b0>
mov    0x1c(%rsp),%edx
fldt   0x30(%rsp)
fstpt  (%rsp)
lea    0x20(%rsp),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   10d0 <asprintf@plt>
jmp    16a0 <printf_doformat+0x4b0>
mov    0x1c(%rsp),%edx
fldt   0x30(%rsp)
fstpl  0x70(%rsp)
movsd  0x70(%rsp),%xmm0
lea    0x20(%rsp),%rdi
mov    %r15,%rsi
mov    $0x1,%al
call   10d0 <asprintf@plt>
mov    0x20(%rsp),%rdi
test   %rdi,%rdi
je     1805 <printf_doformat+0x615>
mov    0x2923(%rip),%rax
mov    (%rax),%esi
call   1080 <fputs@plt>
mov    0x20(%rsp),%rdi
jmp    1800 <printf_doformat+0x610>
mov    0x1c(%rsp),%edx
movsd  0x30(%rsp),%xmm0
jmp    1787 <printf_doformat+0x597>
cmpb   $0x0,0x1b(%rsp)
je     177d <printf_doformat+0x58d>
movsd  0x20(%rsp),%xmm0
lea    0x48(%rsp),%rdi
mov    %rbx,%rsi
mov    $0x1,%al
call   10d0 <asprintf@plt>
jmp    1796 <printf_doformat+0x5a6>
cmpb   $0x0,0x1b(%rsp)
je     17b5 <printf_doformat+0x5c5>
movsbl %al,%edx
lea    0x30(%rsp),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   10d0 <asprintf@plt>
jmp    17e3 <printf_doformat+0x5f3>
cmpb   $0x0,0x1b(%rsp)
je     17cd <printf_doformat+0x5dd>
lea    0x30(%rsp),%rdi
mov    %r15,%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   10d0 <asprintf@plt>
jmp    17e3 <printf_doformat+0x5f3>
mov    0x289b(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
movsbl %al,%esi
lea    0x9d6(%rip),%rdi
jmp    1445 <printf_doformat+0x255>
cmpb   $0x0,0x1b(%rsp)
je     181e <printf_doformat+0x62e>
lea    0x20(%rsp),%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   10d0 <asprintf@plt>
jmp    1834 <printf_doformat+0x644>
mov    0x1c(%rsp),%edx
movsd  0x20(%rsp),%xmm0
lea    0x48(%rsp),%rdi
mov    %rbx,%rsi
mov    $0x1,%al
call   10d0 <asprintf@plt>
mov    0x48(%rsp),%rdi
test   %rdi,%rdi
je     1805 <printf_doformat+0x615>
mov    0x2831(%rip),%rax
mov    (%rax),%esi
call   1080 <fputs@plt>
mov    0x48(%rsp),%rdi
jmp    1800 <printf_doformat+0x610>
mov    0x1c(%rsp),%edx
movsbl %al,%ecx
lea    0x30(%rsp),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   10d0 <asprintf@plt>
jmp    17e3 <printf_doformat+0x5f3>
mov    0x1c(%rsp),%edx
lea    0x30(%rsp),%rdi
mov    %r15,%rsi
mov    %rax,%rcx
xor    %eax,%eax
call   10d0 <asprintf@plt>
mov    0x30(%rsp),%rdi
test   %rdi,%rdi
je     1805 <printf_doformat+0x615>
mov    0x27e4(%rip),%rax
mov    (%rax),%esi
call   1080 <fputs@plt>
mov    0x30(%rsp),%rdi
call   1050 <free@plt>
mov    0x2f(%rsp),%al
mov    %al,(%r14)
mov    %r14,%rax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x1c(%rsp),%edx
lea    0x20(%rsp),%rdi
mov    %r15,%rsi
mov    %rbx,%rcx
xor    %eax,%eax
call   10d0 <asprintf@plt>
mov    0x20(%rsp),%rdi
test   %rdi,%rdi
je     1856 <printf_doformat+0x666>
mov    0x2793(%rip),%rax
mov    (%rax),%esi
call   1080 <fputs@plt>
mov    0x20(%rsp),%rdi
call   1050 <free@plt>
movb   $0x62,(%r12)
mov    %rbx,%rdi
call   1050 <free@plt>
test   %r14d,%r14d
mov    %rbp,%r14
jne    180c <printf_doformat+0x61c>
jmp    1805 <printf_doformat+0x615>

LLVM IR (-O0):
@printf_doformat.skip1 = internal constant [7 x i8] c"#'-+ 0\00"
@printf_doformat.skip2 = internal constant [11 x i8] c"0123456789\00"
@.str = [25 x i8] c"missing format character\00"
@.str.1 = [9 x i8] c"aAeEfFgG\00"
@.str.2 = [24 x i8] c"bad modifier L for %%%c\00"
@.str.3 = [3 x i8] c"%s\00"
@ENOMEM = global i32 0
@stdout = global i32 0
@.str.4 = [28 x i8] c"illegal format character %c\00"
define i8* @printf_doformat(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8
%13 = alloca i8
%14 = alloca i64
%15 = alloca i8*
%16 = alloca i32
%17 = alloca i8*
%18 = alloca i8
%19 = alloca i8*
%20 = alloca i8*
%21 = alloca i8*
%22 = alloca i8*
%23 = alloca double
%24 = alloca double
%25 = alloca i32
%26 = alloca i8*
%27 = alloca i8*
%28 = alloca x86_fp80
%29 = alloca i8*
%30 = alloca i8*
store i8* %0, i8** %4
store i32* %1, i32** %5
%31 = load i8*, i8** %4
%32 = getelementptr inbounds i8, i8* %31, i64 1
store i8* %32, i8** %6
%33 = load i8*, i8** %6
%34 = call i32 @strspn(i8* %33, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @printf_doformat.skip1, i64 0, i64 0))
%35 = load i8*, i8** %6
%36 = sext i32 %34 to i64
%37 = getelementptr inbounds i8, i8* %35, i64 %36
store i8* %37, i8** %6
%38 = load i8*, i8** %6
%39 = load i8, i8* %38
%40 = sext i8 %39 to i32
%41 = icmp eq i32 %40, 42
br i1 %41, label %42, label %49
42: ; preds = %2
%43 = call i64 @getint(i32* %7)
%44 = icmp ne i64 %43, 0
br i1 %44, label %45, label %46
45: ; preds = %42
store i8* null, i8** %3
br label %494
46: ; preds = %42
store i32 1, i32* %9
%47 = load i8*, i8** %6
%48 = getelementptr inbounds i8, i8* %47, i32 1
store i8* %48, i8** %6
br label %55
49: ; preds = %2
store i32 0, i32* %9
%50 = load i8*, i8** %6
%51 = call i32 @strspn(i8* %50, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @printf_doformat.skip2, i64 0, i64 0))
%52 = load i8*, i8** %6
%53 = sext i32 %51 to i64
%54 = getelementptr inbounds i8, i8* %52, i64 %53
store i8* %54, i8** %6
br label %55
55: ; preds = %49, %46
%56 = load i8*, i8** %6
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = icmp eq i32 %58, 46
br i1 %59, label %60, label %81
60: ; preds = %55
%61 = load i8*, i8** %6
%62 = getelementptr inbounds i8, i8* %61, i32 1
store i8* %62, i8** %6
%63 = load i8*, i8** %6
%64 = load i8, i8* %63
%65 = sext i8 %64 to i32
%66 = icmp eq i32 %65, 42
br i1 %66, label %67, label %74
67: ; preds = %60
%68 = call i64 @getint(i32* %11)
%69 = icmp ne i64 %68, 0
br i1 %69, label %70, label %71
70: ; preds = %67
store i8* null, i8** %3
br label %494
71: ; preds = %67
store i32 1, i32* %8
%72 = load i8*, i8** %6
%73 = getelementptr inbounds i8, i8* %72, i32 1
store i8* %73, i8** %6
br label %80
74: ; preds = %60
store i32 0, i32* %8
%75 = load i8*, i8** %6
%76 = call i32 @strspn(i8* %75, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @printf_doformat.skip2, i64 0, i64 0))
%77 = load i8*, i8** %6
%78 = sext i32 %76 to i64
%79 = getelementptr inbounds i8, i8* %77, i64 %78
store i8* %79, i8** %6
br label %80
80: ; preds = %74, %71
br label %82
81: ; preds = %55
store i32 0, i32* %8
br label %82
82: ; preds = %81, %80
%83 = load i8*, i8** %6
%84 = load i8, i8* %83
%85 = icmp ne i8 %84, 0
br i1 %85, label %88, label %86
86: ; preds = %82
%87 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
store i8* null, i8** %3
br label %494
88: ; preds = %82
%89 = load i8*, i8** %6
%90 = load i8, i8* %89
%91 = sext i8 %90 to i32
%92 = icmp eq i32 %91, 76
br i1 %92, label %93, label %106
93: ; preds = %88
store i32 1, i32* %10
%94 = load i8*, i8** %6
%95 = getelementptr inbounds i8, i8* %94, i32 1
store i8* %95, i8** %6
%96 = load i8*, i8** %6
%97 = load i8, i8* %96
%98 = call i32 @strchr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8 signext %97)
%99 = icmp ne i32 %98, 0
br i1 %99, label %105, label %100
100: ; preds = %93
%101 = load i8*, i8** %6
%102 = load i8, i8* %101
%103 = sext i8 %102 to i32
%104 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %103)
store i8* null, i8** %3
br label %494
105: ; preds = %93
br label %107
106: ; preds = %88
store i32 0, i32* %10
br label %107
107: ; preds = %106, %105
%108 = load i8*, i8** %6
%109 = load i8, i8* %108
store i8 %109, i8* %12
%110 = load i8*, i8** %6
%111 = getelementptr inbounds i8, i8* %110, i32 1
store i8* %111, i8** %6
%112 = load i8, i8* %111
store i8 %112, i8* %13
%113 = load i8*, i8** %6
store i8 0, i8* %113
%114 = load i8, i8* %12
%115 = sext i8 %114 to i32
switch i32 %115, label %486 [
i32 98, label %116
i32 99, label %182
i32 115, label %230
i32 100, label %274
i32 105, label %274
i32 111, label %274
i32 117, label %274
i32 120, label %274
i32 88, label %274
i32 101, label %386
i32 69, label %386
i32 102, label %386
i32 70, label %386
i32 103, label %386
i32 71, label %386
i32 97, label %386
i32 65, label %386
]
116: ; preds = %107
%117 = call i8* (...) @getstr()
%118 = call i8* @strdup(i8* %117)
store i8* %118, i8** %15
%119 = load i8*, i8** %15
%120 = icmp eq i8* %119, null
br i1 %120, label %121, label %126
121: ; preds = %116
%122 = load i32, i32* @ENOMEM
%123 = call signext i8 @strerror(i32 %122)
%124 = sext i8 %123 to i32
%125 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %124)
store i8* null, i8** %3
br label %494
126: ; preds = %116
%127 = load i8*, i8** %15
%128 = call i32 @escape(i8* %127, i32 0, i64* %14)
store i32 %128, i32* %16
%129 = load i8*, i8** %6
%130 = getelementptr inbounds i8, i8* %129, i64 -1
store i8 115, i8* %130
br label %131
131: ; preds = %126
store i8* null, i8** %17
%132 = load i32, i32* %9
%133 = icmp ne i32 %132, 0
br i1 %133, label %134, label %149
134: ; preds = %131
%135 = load i32, i32* %8
%136 = icmp ne i32 %135, 0
br i1 %136, label %137, label %143
137: ; preds = %134
%138 = load i8*, i8** %4
%139 = load i32, i32* %7
%140 = load i32, i32* %11
%141 = load i8*, i8** %15
%142 = call i32 (i8**, i8*, ...) @asprintf(i8** %17, i8* %138, i32 %139, i32 %140, i8* %141)
br label %148
143: ; preds = %134
%144 = load i8*, i8** %4
%145 = load i32, i32* %7
%146 = load i8*, i8** %15
%147 = call i32 (i8**, i8*, ...) @asprintf(i8** %17, i8* %144, i32 %145, i8* %146)
br label %148
148: ; preds = %143, %137
br label %162
149: ; preds = %131
%150 = load i32, i32* %8
%151 = icmp ne i32 %150, 0
br i1 %151, label %152, label %157
152: ; preds = %149
%153 = load i8*, i8** %4
%154 = load i32, i32* %11
%155 = load i8*, i8** %15
%156 = call i32 (i8**, i8*, ...) @asprintf(i8** %17, i8* %153, i32 %154, i8* %155)
br label %161
157: ; preds = %149
%158 = load i8*, i8** %4
%159 = load i8*, i8** %15
%160 = call i32 (i8**, i8*, ...) @asprintf(i8** %17, i8* %158, i8* %159)
br label %161
161: ; preds = %157, %152
br label %162
162: ; preds = %161, %148
%163 = load i8*, i8** %17
%164 = icmp ne i8* %163, null
br i1 %164, label %165, label %171
165: ; preds = %162
%166 = load i8*, i8** %17
%167 = load i32, i32* @stdout
%168 = call i32 @fputs(i8* %166, i32 %167)
%169 = load i8*, i8** %17
%170 = call i32 @free(i8* %169)
br label %171
171: ; preds = %165, %162
br label %172
172: ; preds = %171
%173 = load i8*, i8** %6
%174 = getelementptr inbounds i8, i8* %173, i64 -1
store i8 98, i8* %174
%175 = load i8*, i8** %15
%176 = call i32 @free(i8* %175)
%177 = load i32, i32* %16
%178 = icmp ne i32 %177, 0
br i1 %178, label %179, label %181
179: ; preds = %172
%180 = load i8*, i8** %6
store i8* %180, i8** %3
br label %494
181: ; preds = %172
br label %490
182: ; preds = %107
%183 = call signext i8 (...) @getchr()
store i8 %183, i8* %18
br label %184
184: ; preds = %182
store i8* null, i8** %19
%185 = load i32, i32* %9
%186 = icmp ne i32 %185, 0
br i1 %186, label %187, label %204
187: ; preds = %184
%188 = load i32, i32* %8
%189 = icmp ne i32 %188, 0
br i1 %189, label %190, label %197
190: ; preds = %187
%191 = load i8*, i8** %4
%192 = load i32, i32* %7
%193 = load i32, i32* %11
%194 = load i8, i8* %18
%195 = sext i8 %194 to i32
%196 = call i32 (i8**, i8*, ...) @asprintf(i8** %19, i8* %191, i32 %192, i32 %193, i32 %195)
br label %203
197: ; preds = %187
%198 = load i8*, i8** %4
%199 = load i32, i32* %7
%200 = load i8, i8* %18
%201 = sext i8 %200 to i32
%202 = call i32 (i8**, i8*, ...) @asprintf(i8** %19, i8* %198, i32 %199, i32 %201)
br label %203
203: ; preds = %197, %190
br label %219
204: ; preds = %184
%205 = load i32, i32* %8
%206 = icmp ne i32 %205, 0
br i1 %206, label %207, label %213
207: ; preds = %204
%208 = load i8*, i8** %4
%209 = load i32, i32* %11
%210 = load i8, i8* %18
%211 = sext i8 %210 to i32
%212 = call i32 (i8**, i8*, ...) @asprintf(i8** %19, i8* %208, i32 %209, i32 %211)
br label %218
213: ; preds = %204
%214 = load i8*, i8** %4
%215 = load i8, i8* %18
%216 = sext i8 %215 to i32
%217 = call i32 (i8**, i8*, ...) @asprintf(i8** %19, i8* %214, i32 %216)
br label %218
218: ; preds = %213, %207
br label %219
219: ; preds = %218, %203
%220 = load i8*, i8** %19
%221 = icmp ne i8* %220, null
br i1 %221, label %222, label %228
222: ; preds = %219
%223 = load i8*, i8** %19
%224 = load i32, i32* @stdout
%225 = call i32 @fputs(i8* %223, i32 %224)
%226 = load i8*, i8** %19
%227 = call i32 @free(i8* %226)
br label %228
228: ; preds = %222, %219
br label %229
229: ; preds = %228
br label %490
230: ; preds = %107
%231 = call i8* (...) @getstr()
store i8* %231, i8** %20
br label %232
232: ; preds = %230
store i8* null, i8** %21
%233 = load i32, i32* %9
%234 = icmp ne i32 %233, 0
br i1 %234, label %235, label %250
235: ; preds = %232
%236 = load i32, i32* %8
%237 = icmp ne i32 %236, 0
br i1 %237, label %238, label %244
238: ; preds = %235
%239 = load i8*, i8** %4
%240 = load i32, i32* %7
%241 = load i32, i32* %11
%242 = load i8*, i8** %20
%243 = call i32 (i8**, i8*, ...) @asprintf(i8** %21, i8* %239, i32 %240, i32 %241, i8* %242)
br label %249
244: ; preds = %235
%245 = load i8*, i8** %4
%246 = load i32, i32* %7
%247 = load i8*, i8** %20
%248 = call i32 (i8**, i8*, ...) @asprintf(i8** %21, i8* %245, i32 %246, i8* %247)
br label %249
249: ; preds = %244, %238
br label %263
250: ; preds = %232
%251 = load i32, i32* %8
%252 = icmp ne i32 %251, 0
br i1 %252, label %253, label %258
253: ; preds = %250
%254 = load i8*, i8** %4
%255 = load i32, i32* %11
%256 = load i8*, i8** %20
%257 = call i32 (i8**, i8*, ...) @asprintf(i8** %21, i8* %254, i32 %255, i8* %256)
br label %262
258: ; preds = %250
%259 = load i8*, i8** %4
%260 = load i8*, i8** %20
%261 = call i32 (i8**, i8*, ...) @asprintf(i8** %21, i8* %259, i8* %260)
br label %262
262: ; preds = %258, %253
br label %263
263: ; preds = %262, %249
%264 = load i8*, i8** %21
%265 = icmp ne i8* %264, null
br i1 %265, label %266, label %272
266: ; preds = %263
%267 = load i8*, i8** %21
%268 = load i32, i32* @stdout
%269 = call i32 @fputs(i8* %267, i32 %268)
%270 = load i8*, i8** %21
%271 = call i32 @free(i8* %270)
br label %272
272: ; preds = %266, %263
br label %273
273: ; preds = %272
br label %490
274: ; preds = %107, %107, %107, %107, %107, %107
%275 = load i8, i8* %12
%276 = sext i8 %275 to i32
%277 = icmp eq i32 %276, 100
br i1 %277, label %282, label %278
278: ; preds = %274
%279 = load i8, i8* %12
%280 = sext i8 %279 to i32
%281 = icmp eq i32 %280, 105
br label %282
282: ; preds = %278, %274
%283 = phi i1 [ true, %274 ], [ %281, %278 ]
%284 = zext i1 %283 to i32
store i32 %284, i32* %25
%285 = load i8*, i8** %4
%286 = load i8, i8* %12
%287 = call i8* @mknum(i8* %285, i8 signext %286)
store i8* %287, i8** %22
%288 = icmp eq i8* %287, null
br i1 %288, label %289, label %290
289: ; preds = %282
store i8* null, i8** %3
br label %494
290: ; preds = %282
%291 = load i32, i32* %25
%292 = call i32 @getnum(double* %23, double* %24, i32 %291)
%293 = icmp ne i32 %292, 0
br i1 %293, label %294, label %296
294: ; preds = %290
%295 = load i32*, i32** %5
store i32 1, i32* %295
br label %296
296: ; preds = %294, %290
%297 = load i32, i32* %25
%298 = icmp ne i32 %297, 0
br i1 %298, label %299, label %342
299: ; preds = %296
br label %300
300: ; preds = %299
store i8* null, i8** %26
%301 = load i32, i32* %9
%302 = icmp ne i32 %301, 0
br i1 %302, label %303, label %318
303: ; preds = %300
%304 = load i32, i32* %8
%305 = icmp ne i32 %304, 0
br i1 %305, label %306, label %312
306: ; preds = %303
%307 = load i8*, i8** %22
%308 = load i32, i32* %7
%309 = load i32, i32* %11
%310 = load double, double* %23
%311 = call i32 (i8**, i8*, ...) @asprintf(i8** %26, i8* %307, i32 %308, i32 %309, double %310)
br label %317
312: ; preds = %303
%313 = load i8*, i8** %22
%314 = load i32, i32* %7
%315 = load double, double* %23
%316 = call i32 (i8**, i8*, ...) @asprintf(i8** %26, i8* %313, i32 %314, double %315)
br label %317
317: ; preds = %312, %306
br label %331
318: ; preds = %300
%319 = load i32, i32* %8
%320 = icmp ne i32 %319, 0
br i1 %320, label %321, label %326
321: ; preds = %318
%322 = load i8*, i8** %22
%323 = load i32, i32* %11
%324 = load double, double* %23
%325 = call i32 (i8**, i8*, ...) @asprintf(i8** %26, i8* %322, i32 %323, double %324)
br label %330
326: ; preds = %318
%327 = load i8*, i8** %22
%328 = load double, double* %23
%329 = call i32 (i8**, i8*, ...) @asprintf(i8** %26, i8* %327, double %328)
br label %330
330: ; preds = %326, %321
br label %331
331: ; preds = %330, %317
%332 = load i8*, i8** %26
%333 = icmp ne i8* %332, null
br i1 %333, label %334, label %340
334: ; preds = %331
%335 = load i8*, i8** %26
%336 = load i32, i32* @stdout
%337 = call i32 @fputs(i8* %335, i32 %336)
%338 = load i8*, i8** %26
%339 = call i32 @free(i8* %338)
br label %340
340: ; preds = %334, %331
br label %341
341: ; preds = %340
br label %385
342: ; preds = %296
br label %343
343: ; preds = %342
store i8* null, i8** %27
%344 = load i32, i32* %9
%345 = icmp ne i32 %344, 0
br i1 %345, label %346, label %361
346: ; preds = %343
%347 = load i32, i32* %8
%348 = icmp ne i32 %347, 0
br i1 %348, label %349, label %355
349: ; preds = %346
%350 = load i8*, i8** %22
%351 = load i32, i32* %7
%352 = load i32, i32* %11
%353 = load double, double* %24
%354 = call i32 (i8**, i8*, ...) @asprintf(i8** %27, i8* %350, i32 %351, i32 %352, double %353)
br label %360
355: ; preds = %346
%356 = load i8*, i8** %22
%357 = load i32, i32* %7
%358 = load double, double* %24
%359 = call i32 (i8**, i8*, ...) @asprintf(i8** %27, i8* %356, i32 %357, double %358)
br label %360
360: ; preds = %355, %349
br label %374
361: ; preds = %343
%362 = load i32, i32* %8
%363 = icmp ne i32 %362, 0
br i1 %363, label %364, label %369
364: ; preds = %361
%365 = load i8*, i8** %22
%366 = load i32, i32* %11
%367 = load double, double* %24
%368 = call i32 (i8**, i8*, ...) @asprintf(i8** %27, i8* %365, i32 %366, double %367)
br label %373
369: ; preds = %361
%370 = load i8*, i8** %22
%371 = load double, double* %24
%372 = call i32 (i8**, i8*, ...) @asprintf(i8** %27, i8* %370, double %371)
br label %373
373: ; preds = %369, %364
br label %374
374: ; preds = %373, %360
%375 = load i8*, i8** %27
%376 = icmp ne i8* %375, null
br i1 %376, label %377, label %383
377: ; preds = %374
%378 = load i8*, i8** %27
%379 = load i32, i32* @stdout
%380 = call i32 @fputs(i8* %378, i32 %379)
%381 = load i8*, i8** %27
%382 = call i32 @free(i8* %381)
br label %383
383: ; preds = %377, %374
br label %384
384: ; preds = %383
br label %385
385: ; preds = %384, %341
br label %490
386: ; preds = %107, %107, %107, %107, %107, %107, %107, %107
%387 = load i32, i32* %10
%388 = call i32 @getfloating(x86_fp80* %28, i32 %387)
%389 = icmp ne i32 %388, 0
br i1 %389, label %390, label %392
390: ; preds = %386
%391 = load i32*, i32** %5
store i32 1, i32* %391
br label %392
392: ; preds = %390, %386
%393 = load i32, i32* %10
%394 = icmp ne i32 %393, 0
br i1 %394, label %395, label %438
395: ; preds = %392
br label %396
396: ; preds = %395
store i8* null, i8** %29
%397 = load i32, i32* %9
%398 = icmp ne i32 %397, 0
br i1 %398, label %399, label %414
399: ; preds = %396
%400 = load i32, i32* %8
%401 = icmp ne i32 %400, 0
br i1 %401, label %402, label %408
402: ; preds = %399
%403 = load i8*, i8** %4
%404 = load i32, i32* %7
%405 = load i32, i32* %11
%406 = load x86_fp80, x86_fp80* %28
%407 = call i32 (i8**, i8*, ...) @asprintf(i8** %29, i8* %403, i32 %404, i32 %405, x86_fp80 %406)
br label %413
408: ; preds = %399
%409 = load i8*, i8** %4
%410 = load i32, i32* %7
%411 = load x86_fp80, x86_fp80* %28
%412 = call i32 (i8**, i8*, ...) @asprintf(i8** %29, i8* %409, i32 %410, x86_fp80 %411)
br label %413
413: ; preds = %408, %402
br label %427
414: ; preds = %396
%415 = load i32, i32* %8
%416 = icmp ne i32 %415, 0
br i1 %416, label %417, label %422
417: ; preds = %414
%418 = load i8*, i8** %4
%419 = load i32, i32* %11
%420 = load x86_fp80, x86_fp80* %28
%421 = call i32 (i8**, i8*, ...) @asprintf(i8** %29, i8* %418, i32 %419, x86_fp80 %420)
br label %426
422: ; preds = %414
%423 = load i8*, i8** %4
%424 = load x86_fp80, x86_fp80* %28
%425 = call i32 (i8**, i8*, ...) @asprintf(i8** %29, i8* %423, x86_fp80 %424)
br label %426
426: ; preds = %422, %417
br label %427
427: ; preds = %426, %413
%428 = load i8*, i8** %29
%429 = icmp ne i8* %428, null
br i1 %429, label %430, label %436
430: ; preds = %427
%431 = load i8*, i8** %29
%432 = load i32, i32* @stdout
%433 = call i32 @fputs(i8* %431, i32 %432)
%434 = load i8*, i8** %29
%435 = call i32 @free(i8* %434)
br label %436
436: ; preds = %430, %427
br label %437
437: ; preds = %436
br label %485
438: ; preds = %392
br label %439
439: ; preds = %438
store i8* null, i8** %30
%440 = load i32, i32* %9
%441 = icmp ne i32 %440, 0
br i1 %441, label %442, label %459
442: ; preds = %439
%443 = load i32, i32* %8
%444 = icmp ne i32 %443, 0
br i1 %444, label %445, label %452
445: ; preds = %442
%446 = load i8*, i8** %4
%447 = load i32, i32* %7
%448 = load i32, i32* %11
%449 = load x86_fp80, x86_fp80* %28
%450 = fptrunc x86_fp80 %449 to double
%451 = call i32 (i8**, i8*, ...) @asprintf(i8** %30, i8* %446, i32 %447, i32 %448, double %450)
br label %458
452: ; preds = %442
%453 = load i8*, i8** %4
%454 = load i32, i32* %7
%455 = load x86_fp80, x86_fp80* %28
%456 = fptrunc x86_fp80 %455 to double
%457 = call i32 (i8**, i8*, ...) @asprintf(i8** %30, i8* %453, i32 %454, double %456)
br label %458
458: ; preds = %452, %445
br label %474
459: ; preds = %439
%460 = load i32, i32* %8
%461 = icmp ne i32 %460, 0
br i1 %461, label %462, label %468
462: ; preds = %459
%463 = load i8*, i8** %4
%464 = load i32, i32* %11
%465 = load x86_fp80, x86_fp80* %28
%466 = fptrunc x86_fp80 %465 to double
%467 = call i32 (i8**, i8*, ...) @asprintf(i8** %30, i8* %463, i32 %464, double %466)
br label %473
468: ; preds = %459
%469 = load i8*, i8** %4
%470 = load x86_fp80, x86_fp80* %28
%471 = fptrunc x86_fp80 %470 to double
%472 = call i32 (i8**, i8*, ...) @asprintf(i8** %30, i8* %469, double %471)
br label %473
473: ; preds = %468, %462
br label %474
474: ; preds = %473, %458
%475 = load i8*, i8** %30
%476 = icmp ne i8* %475, null
br i1 %476, label %477, label %483
477: ; preds = %474
%478 = load i8*, i8** %30
%479 = load i32, i32* @stdout
%480 = call i32 @fputs(i8* %478, i32 %479)
%481 = load i8*, i8** %30
%482 = call i32 @free(i8* %481)
br label %483
483: ; preds = %477, %474
br label %484
484: ; preds = %483
br label %485
485: ; preds = %484, %437
br label %490
486: ; preds = %107
%487 = load i8, i8* %12
%488 = sext i8 %487 to i32
%489 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), i32 %488)
store i8* null, i8** %3
br label %494
490: ; preds = %485, %385, %273, %229, %181
%491 = load i8, i8* %13
%492 = load i8*, i8** %6
store i8 %491, i8* %492
%493 = load i8*, i8** %6
store i8* %493, i8** %3
br label %494
494: ; preds = %490, %486, %289, %179, %121, %100, %86, %70, %45
%495 = load i8*, i8** %3
ret i8* %495
}

LLVM IR (-O2):
@printf_doformat.skip1 = internal constant [7 x i8] c"#'-+ 0\00"
@printf_doformat.skip2 = internal constant [11 x i8] c"0123456789\00"
@.str = [25 x i8] c"missing format character\00"
@.str.1 = [9 x i8] c"aAeEfFgG\00"
@.str.2 = [24 x i8] c"bad modifier L for %%%c\00"
@.str.3 = [3 x i8] c"%s\00"
@ENOMEM = global i32 0
@stdout = global i32 0
@.str.4 = [28 x i8] c"illegal format character %c\00"
define i8* @printf_doformat(i8* %0, i32* nocapture writeonly %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca double
%10 = alloca double
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca x86_fp80
%14 = alloca i8*
%15 = alloca i8*
%16 = bitcast i32* %3 to i8*
%17 = bitcast i32* %4 to i8*
%18 = getelementptr inbounds i8, i8* %0, i64 1
%19 = tail call i32 @strspn(i8* %18, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @printf_doformat.skip1, i64 0, i64 0))
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
%22 = load i8, i8* %21
%23 = icmp eq i8 %22, 42
br i1 %23, label %24, label %27
24: ; preds = %2
%25 = call i64 @getint(i32* %3)
%26 = icmp eq i64 %25, 0
br i1 %26, label %30, label %310
27: ; preds = %2
%28 = tail call i32 @strspn(i8* %21, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @printf_doformat.skip2, i64 0, i64 0))
%29 = sext i32 %28 to i64
br label %30
30: ; preds = %24, %27
%31 = phi i64 [ %29, %27 ], [ 1, %24 ]
%32 = getelementptr inbounds i8, i8* %21, i64 %31
%33 = load i8, i8* %32
%34 = icmp eq i8 %33, 46
br i1 %34, label %35, label %52
35: ; preds = %30
%36 = getelementptr inbounds i8, i8* %32, i64 1
%37 = load i8, i8* %36
%38 = icmp eq i8 %37, 42
br i1 %38, label %39, label %44
39: ; preds = %35
%40 = call i64 @getint(i32* %4)
%41 = icmp eq i64 %40, 0
br i1 %41, label %42, label %310
42: ; preds = %39
%43 = getelementptr inbounds i8, i8* %32, i64 2
br label %48
44: ; preds = %35
%45 = call i32 @strspn(i8* %36, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @printf_doformat.skip2, i64 0, i64 0))
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i8, i8* %36, i64 %46
br label %48
48: ; preds = %44, %42
%49 = phi i8* [ %47, %44 ], [ %43, %42 ]
%50 = xor i1 %38, true
%51 = load i8, i8* %49
br label %52
52: ; preds = %48, %30
%53 = phi i8 [ %51, %48 ], [ %33, %30 ]
%54 = phi i1 [ %50, %48 ], [ true, %30 ]
%55 = phi i8* [ %49, %48 ], [ %32, %30 ]
%56 = icmp eq i8 %53, 0
br i1 %56, label %57, label %59
57: ; preds = %52
%58 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %310
59: ; preds = %52
%60 = icmp eq i8 %53, 76
br i1 %60, label %61, label %70
61: ; preds = %59
%62 = getelementptr inbounds i8, i8* %55, i64 1
%63 = load i8, i8* %62
%64 = call i32 @strchr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8 signext %63)
%65 = icmp eq i32 %64, 0
%66 = load i8, i8* %62
br i1 %65, label %67, label %70
67: ; preds = %61
%68 = sext i8 %66 to i32
%69 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %68)
br label %310
70: ; preds = %61, %59
%71 = phi i8 [ %53, %59 ], [ %66, %61 ]
%72 = phi i32 [ 0, %59 ], [ 1, %61 ]
%73 = phi i8* [ %55, %59 ], [ %62, %61 ]
%74 = getelementptr inbounds i8, i8* %73, i64 1
%75 = load i8, i8* %74
store i8 0, i8* %74
%76 = sext i8 %71 to i32
switch i32 %76, label %306 [
i32 98, label %77
i32 99, label %114
i32 115, label %143
i32 100, label %168
i32 105, label %168
i32 111, label %168
i32 117, label %168
i32 120, label %168
i32 88, label %168
i32 101, label %239
i32 69, label %239
i32 102, label %239
i32 70, label %239
i32 103, label %239
i32 71, label %239
i32 97, label %239
i32 65, label %239
]
77: ; preds = %70
%78 = bitcast i64* %5 to i8*
%79 = call i8* (...) @getstr()
%80 = call i8* @strdup(i8* %79)
%81 = icmp eq i8* %80, null
br i1 %81, label %82, label %87
82: ; preds = %77
%83 = load i32, i32* @ENOMEM
%84 = call signext i8 @strerror(i32 %83)
%85 = sext i8 %84 to i32
%86 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %85)
br label %310
87: ; preds = %77
%88 = call i32 @escape(i8* %80, i32 0, i64* %5)
store i8 115, i8* %73
%89 = bitcast i8** %6 to i8*
store i8* null, i8** %6
br i1 %23, label %90, label %97
90: ; preds = %87
%91 = load i32, i32* %3
br i1 %54, label %95, label %92
92: ; preds = %90
%93 = load i32, i32* %4
%94 = call i32 (i8**, i8*, ...) @asprintf(i8** %6, i8* %0, i32 %91, i32 %93, i8* %80)
br label %103
95: ; preds = %90
%96 = call i32 (i8**, i8*, ...) @asprintf(i8** %6, i8* %0, i32 %91, i8* %80)
br label %103
97: ; preds = %87
br i1 %54, label %101, label %98
98: ; preds = %97
%99 = load i32, i32* %4
%100 = call i32 (i8**, i8*, ...) @asprintf(i8** %6, i8* %0, i32 %99, i8* %80)
br label %103
101: ; preds = %97
%102 = call i32 (i8**, i8*, ...) @asprintf(i8** %6, i8* %0, i8* %80)
br label %103
103: ; preds = %98, %101, %92, %95
%104 = load i8*, i8** %6
%105 = icmp eq i8* %104, null
br i1 %105, label %111, label %106
106: ; preds = %103
%107 = load i32, i32* @stdout
%108 = call i32 @fputs(i8* %104, i32 %107)
%109 = load i8*, i8** %6
%110 = call i32 @free(i8* %109)
br label %111
111: ; preds = %103, %106
store i8 98, i8* %73
%112 = call i32 @free(i8* %80)
%113 = icmp eq i32 %88, 0
br i1 %113, label %308, label %310
114: ; preds = %70
%115 = call signext i8 (...) @getchr()
%116 = bitcast i8** %7 to i8*
store i8* null, i8** %7
br i1 %23, label %117, label %126
117: ; preds = %114
%118 = load i32, i32* %3
br i1 %54, label %123, label %119
119: ; preds = %117
%120 = load i32, i32* %4
%121 = sext i8 %115 to i32
%122 = call i32 (i8**, i8*, ...) @asprintf(i8** %7, i8* %0, i32 %118, i32 %120, i32 %121)
br label %134
123: ; preds = %117
%124 = sext i8 %115 to i32
%125 = call i32 (i8**, i8*, ...) @asprintf(i8** %7, i8* %0, i32 %118, i32 %124)
br label %134
126: ; preds = %114
br i1 %54, label %131, label %127
127: ; preds = %126
%128 = load i32, i32* %4
%129 = sext i8 %115 to i32
%130 = call i32 (i8**, i8*, ...) @asprintf(i8** %7, i8* %0, i32 %128, i32 %129)
br label %134
131: ; preds = %126
%132 = sext i8 %115 to i32
%133 = call i32 (i8**, i8*, ...) @asprintf(i8** %7, i8* %0, i32 %132)
br label %134
134: ; preds = %127, %131, %119, %123
%135 = load i8*, i8** %7
%136 = icmp eq i8* %135, null
br i1 %136, label %142, label %137
137: ; preds = %134
%138 = load i32, i32* @stdout
%139 = call i32 @fputs(i8* %135, i32 %138)
%140 = load i8*, i8** %7
%141 = call i32 @free(i8* %140)
br label %142
142: ; preds = %137, %134
br label %308
143: ; preds = %70
%144 = call i8* (...) @getstr()
%145 = bitcast i8** %8 to i8*
store i8* null, i8** %8
br i1 %23, label %146, label %153
146: ; preds = %143
%147 = load i32, i32* %3
br i1 %54, label %151, label %148
148: ; preds = %146
%149 = load i32, i32* %4
%150 = call i32 (i8**, i8*, ...) @asprintf(i8** %8, i8* %0, i32 %147, i32 %149, i8* %144)
br label %159
151: ; preds = %146
%152 = call i32 (i8**, i8*, ...) @asprintf(i8** %8, i8* %0, i32 %147, i8* %144)
br label %159
153: ; preds = %143
br i1 %54, label %157, label %154
154: ; preds = %153
%155 = load i32, i32* %4
%156 = call i32 (i8**, i8*, ...) @asprintf(i8** %8, i8* %0, i32 %155, i8* %144)
br label %159
157: ; preds = %153
%158 = call i32 (i8**, i8*, ...) @asprintf(i8** %8, i8* %0, i8* %144)
br label %159
159: ; preds = %154, %157, %148, %151
%160 = load i8*, i8** %8
%161 = icmp eq i8* %160, null
br i1 %161, label %167, label %162
162: ; preds = %159
%163 = load i32, i32* @stdout
%164 = call i32 @fputs(i8* %160, i32 %163)
%165 = load i8*, i8** %8
%166 = call i32 @free(i8* %165)
br label %167
167: ; preds = %162, %159
br label %308
168: ; preds = %70, %70, %70, %70, %70, %70
%169 = bitcast double* %9 to i8*
%170 = bitcast double* %10 to i8*
%171 = call i8* @mknum(i8* %0, i8 signext %71)
%172 = icmp eq i8* %171, null
br i1 %172, label %309, label %173
173: ; preds = %168
%174 = icmp eq i8 %71, 100
%175 = icmp eq i8 %71, 105
%176 = or i1 %174, %175
%177 = zext i1 %176 to i32
%178 = call i32 @getnum(double* %9, double* %10, i32 %177)
%179 = icmp eq i32 %178, 0
br i1 %179, label %181, label %180
180: ; preds = %173
store i32 1, i32* %1
br label %181
181: ; preds = %180, %173
switch i8 %71, label %210 [
i8 105, label %182
i8 100, label %182
]
182: ; preds = %181, %181
%183 = bitcast i8** %11 to i8*
store i8* null, i8** %11
br i1 %23, label %184, label %193
184: ; preds = %182
%185 = load i32, i32* %3
br i1 %54, label %190, label %186
186: ; preds = %184
%187 = load i32, i32* %4
%188 = load double, double* %9
%189 = call i32 (i8**, i8*, ...) @asprintf(i8** %11, i8* %171, i32 %185, i32 %187, double %188)
br label %201
190: ; preds = %184
%191 = load double, double* %9
%192 = call i32 (i8**, i8*, ...) @asprintf(i8** %11, i8* %171, i32 %185, double %191)
br label %201
193: ; preds = %182
br i1 %54, label %198, label %194
194: ; preds = %193
%195 = load i32, i32* %4
%196 = load double, double* %9
%197 = call i32 (i8**, i8*, ...) @asprintf(i8** %11, i8* %171, i32 %195, double %196)
br label %201
198: ; preds = %193
%199 = load double, double* %9
%200 = call i32 (i8**, i8*, ...) @asprintf(i8** %11, i8* %171, double %199)
br label %201
201: ; preds = %194, %198, %186, %190
%202 = load i8*, i8** %11
%203 = icmp eq i8* %202, null
br i1 %203, label %209, label %204
204: ; preds = %201
%205 = load i32, i32* @stdout
%206 = call i32 @fputs(i8* %202, i32 %205)
%207 = load i8*, i8** %11
%208 = call i32 @free(i8* %207)
br label %209
209: ; preds = %204, %201
br label %238
210: ; preds = %181
%211 = bitcast i8** %12 to i8*
store i8* null, i8** %12
br i1 %23, label %212, label %221
212: ; preds = %210
%213 = load i32, i32* %3
br i1 %54, label %218, label %214
214: ; preds = %212
%215 = load i32, i32* %4
%216 = load double, double* %10
%217 = call i32 (i8**, i8*, ...) @asprintf(i8** %12, i8* %171, i32 %213, i32 %215, double %216)
br label %229
218: ; preds = %212
%219 = load double, double* %10
%220 = call i32 (i8**, i8*, ...) @asprintf(i8** %12, i8* %171, i32 %213, double %219)
br label %229
221: ; preds = %210
br i1 %54, label %226, label %222
222: ; preds = %221
%223 = load i32, i32* %4
%224 = load double, double* %10
%225 = call i32 (i8**, i8*, ...) @asprintf(i8** %12, i8* %171, i32 %223, double %224)
br label %229
226: ; preds = %221
%227 = load double, double* %10
%228 = call i32 (i8**, i8*, ...) @asprintf(i8** %12, i8* %171, double %227)
br label %229
229: ; preds = %222, %226, %214, %218
%230 = load i8*, i8** %12
%231 = icmp eq i8* %230, null
br i1 %231, label %237, label %232
232: ; preds = %229
%233 = load i32, i32* @stdout
%234 = call i32 @fputs(i8* %230, i32 %233)
%235 = load i8*, i8** %12
%236 = call i32 @free(i8* %235)
br label %237
237: ; preds = %232, %229
br label %238
238: ; preds = %209, %237
br label %308
239: ; preds = %70, %70, %70, %70, %70, %70, %70, %70
%240 = bitcast x86_fp80* %13 to i8*
%241 = call i32 @getfloating(x86_fp80* %13, i32 %72)
%242 = icmp eq i32 %241, 0
br i1 %242, label %244, label %243
243: ; preds = %239
store i32 1, i32* %1
br label %244
244: ; preds = %243, %239
br i1 %60, label %245, label %273
245: ; preds = %244
%246 = bitcast i8** %14 to i8*
store i8* null, i8** %14
br i1 %23, label %247, label %256
247: ; preds = %245
%248 = load i32, i32* %3
br i1 %54, label %253, label %249
249: ; preds = %247
%250 = load i32, i32* %4
%251 = load x86_fp80, x86_fp80* %13
%252 = call i32 (i8**, i8*, ...) @asprintf(i8** %14, i8* %0, i32 %248, i32 %250, x86_fp80 %251)
br label %264
253: ; preds = %247
%254 = load x86_fp80, x86_fp80* %13
%255 = call i32 (i8**, i8*, ...) @asprintf(i8** %14, i8* %0, i32 %248, x86_fp80 %254)
br label %264
256: ; preds = %245
br i1 %54, label %261, label %257
257: ; preds = %256
%258 = load i32, i32* %4
%259 = load x86_fp80, x86_fp80* %13
%260 = call i32 (i8**, i8*, ...) @asprintf(i8** %14, i8* %0, i32 %258, x86_fp80 %259)
br label %264
261: ; preds = %256
%262 = load x86_fp80, x86_fp80* %13
%263 = call i32 (i8**, i8*, ...) @asprintf(i8** %14, i8* %0, x86_fp80 %262)
br label %264
264: ; preds = %257, %261, %249, %253
%265 = load i8*, i8** %14
%266 = icmp eq i8* %265, null
br i1 %266, label %272, label %267
267: ; preds = %264
%268 = load i32, i32* @stdout
%269 = call i32 @fputs(i8* %265, i32 %268)
%270 = load i8*, i8** %14
%271 = call i32 @free(i8* %270)
br label %272
272: ; preds = %267, %264
br label %305
273: ; preds = %244
%274 = bitcast i8** %15 to i8*
store i8* null, i8** %15
br i1 %23, label %275, label %286
275: ; preds = %273
%276 = load i32, i32* %3
br i1 %54, label %282, label %277
277: ; preds = %275
%278 = load i32, i32* %4
%279 = load x86_fp80, x86_fp80* %13
%280 = fptrunc x86_fp80 %279 to double
%281 = call i32 (i8**, i8*, ...) @asprintf(i8** %15, i8* %0, i32 %276, i32 %278, double %280)
br label %296
282: ; preds = %275
%283 = load x86_fp80, x86_fp80* %13
%284 = fptrunc x86_fp80 %283 to double
%285 = call i32 (i8**, i8*, ...) @asprintf(i8** %15, i8* %0, i32 %276, double %284)
br label %296
286: ; preds = %273
br i1 %54, label %292, label %287
287: ; preds = %286
%288 = load i32, i32* %4
%289 = load x86_fp80, x86_fp80* %13
%290 = fptrunc x86_fp80 %289 to double
%291 = call i32 (i8**, i8*, ...) @asprintf(i8** %15, i8* %0, i32 %288, double %290)
br label %296
292: ; preds = %286
%293 = load x86_fp80, x86_fp80* %13
%294 = fptrunc x86_fp80 %293 to double
%295 = call i32 (i8**, i8*, ...) @asprintf(i8** %15, i8* %0, double %294)
br label %296
296: ; preds = %287, %292, %277, %282
%297 = load i8*, i8** %15
%298 = icmp eq i8* %297, null
br i1 %298, label %304, label %299
299: ; preds = %296
%300 = load i32, i32* @stdout
%301 = call i32 @fputs(i8* %297, i32 %300)
%302 = load i8*, i8** %15
%303 = call i32 @free(i8* %302)
br label %304
304: ; preds = %299, %296
br label %305
305: ; preds = %304, %272
br label %308
306: ; preds = %70
%307 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), i32 %76)
br label %310
308: ; preds = %238, %111, %305, %167, %142
store i8 %75, i8* %74
br label %310
309: ; preds = %168
br label %310
310: ; preds = %82, %309, %39, %24, %111, %308, %306, %67, %57
%311 = phi i8* [ null, %306 ], [ %74, %308 ], [ %74, %111 ], [ null, %67 ], [ null, %57 ], [ null, %24 ], [ null, %39 ], [ null, %309 ], [ null, %82 ]
ret i8* %311
}