#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 int /*<<< orphan*/ ok;
typedef int /*<<< orphan*/ buf;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int BUFSIZ;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ ferror(int /*<<< orphan*/ *);
char *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int fscanf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ pclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ *popen(char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int sscanf(char *, char *, ...);
int /*<<< orphan*/ *stdin;
int /*<<< orphan*/ *stdout;
scalar_t__ strcmp(char *, char *);
int main(int argc, char **argv) {
  char buf[BUFSIZ];
  FILE *in = stdin, *out = stdout;
  int x;
  int result = 0;
  if (sscanf("0", "%d", &x) != 1) {
    fputs("test failed!\n", stdout);
    result = 1;
  }
  sscanf("conversion] Zero flag Ze]ro#\n", "%*[^]] %[^#]\n", buf);
  if (strcmp(buf, "] Zero flag Ze]ro") != 0) {
    fputs("test failed!\n", stdout);
    result = 1;
  }
  if (argc == 2 && !strcmp(argv[1], "-opipe")) {
    out = popen("/bin/cat", "w");
    if (out == NULL) {
      perror("popen: /bin/cat");
      result = 1;
    }
  } else if (argc == 3 && !strcmp(argv[1], "-ipipe")) {
    sprintf(buf, "/bin/cat %s", argv[2]);
    in = popen(buf, "r");
    if (in == NULL) {
      perror("popen: /bin/cat");
      result = 1;
    }
  }
  {
    char name[50];
    fprintf(out, "sscanf (\"thompson\", \"%%s\", name) == %d, name == \"%s\"\n",
            sscanf("thompson", "%s", name), name);
    if (strcmp(name, "thompson") != 0) {
      fputs("test failed!\n", stdout);
      result = 1;
    }
  }
  fputs("Testing scanf (vfscanf)\n", out);
  fputs("Test 1:\n", out);
  {
    int n, i;
    float x;
    char name[50];
    n = fscanf(in, "%d%f%s", &i, &x, name);
    fprintf(out, "n = %d, i = %d, x = %f, name = \"%.50s\"\n", n, i, x, name);
    if (n != 3 || i != 25 || x != 5.432F || strcmp(name, "thompson")) {
      fputs("test failed!\n", stdout);
      result = 1;
    }
  }
  fprintf(out, "Residual: \"%s\"\n", fgets(buf, sizeof(buf), in));
  if (strcmp(buf, "\n")) {
    fputs("test failed!\n", stdout);
    result = 1;
  }
  fputs("Test 2:\n", out);
  {
    int i;
    float x;
    char name[50];
    (void)fscanf(in, "%2d%f%*d %[0123456789]", &i, &x, name);
    fprintf(out, "i = %d, x = %f, name = \"%.50s\"\n", i, x, name);
    if (i != 56 || x != 789.0F || strcmp(name, "56")) {
      fputs("test failed!\n", stdout);
      result = 1;
    }
  }
  fprintf(out, "Residual: \"%s\"\n", fgets(buf, sizeof(buf), in));
  if (strcmp(buf, "a72\n")) {
    fputs("test failed!\n", stdout);
    result = 1;
  }
  fputs("Test 3:\n", out);
  {
    static struct {
      int count;
      float quant;
      const char *units;
      const char *item;
    } ok[] = {{3, 2.0F, "quarts", "oil"},
              {2, -12.8F, "degrees", ""},
              {0, 0.0F, "", ""},
              {3, 10.0F, "LBS", "fertilizer"},
              {3, 100.0F, "rgs", "energy"},
              {-1, 0.0F, "", ""}};
    size_t rounds = 0;
    float quant;
    char units[21], item[21];
    while (!feof(in) && !ferror(in)) {
      int count;
      if (rounds++ >= sizeof(ok) / sizeof(ok[0])) {
        fputs("test failed!\n", stdout);
        result = 1;
      }
      quant = 0.0;
      units[0] = item[0] = '\0';
      count = fscanf(in, "%f%20s of %20s", &quant, units, item);
      (void)fscanf(in, "%*[^\n]");
      fprintf(out, "count = %d, quant = %f, item = %.21s, units = %.21s\n",
              count, quant, item, units);
      if (count != ok[rounds - 1].count || quant != ok[rounds - 1].quant ||
          strcmp(item, ok[rounds - 1].item) ||
          strcmp(units, ok[rounds - 1].units)) {
        fputs("test failed!\n", stdout);
        result = 1;
      }
    }
  }
  buf[0] = '\0';
  fprintf(out, "Residual: \"%s\"\n", fgets(buf, sizeof(buf), in));
  if (strcmp(buf, "")) {
    fputs("test failed!\n", stdout);
    result = 1;
  }
  if (out != stdout)
    pclose(out);
  fputs("Test 4:\n", out);
  {
    int res, val, n;
    res = sscanf("-242", "%3o%n", &val, &n);
    printf("res = %d, val = %d, n = %d\n", res, val, n);
    if (res != 1 || val != -20 || n != 3) {
      fputs("test failed!\n", stdout);
      result = 1;
    }
  }
  fputs("Test 5:\n", out);
  {
    double a = 0, b = 0;
    int res, n;
    res = sscanf("1234567", "%3lg%3lg%n", &a, &b, &n);
    printf("res = %d, a = %g, b = %g, n = %d\n", res, a, b, n);
    if (res != 2 || a != 123 || b != 456 || n != 6) {
      fputs("test failed!\n", stdout);
      result = 1;
    }
    res = sscanf("0", "%lg", &a);
    printf("res = %d, a = %g\n", res, a);
    if (res != 1 || a != 0) {
      fputs("test failed!\n", stdout);
      result = 1;
    }
    res = sscanf("1e3", "%lg%n", &a, &n);
    printf("res = %d, a = %g, n = %d\n", res, a, n);
    if (res != 1 || a != 1000 || n != 3) {
      fputs("test failed!\n", stdout);
      result = 1;
    }
  }
  fputs("Test 6:\n", stdout);
  {
    char *p = (char *)-1;
    int res;
    sprintf(buf, "%p", NULL);
    res = sscanf(buf, "%p", &p);
    printf("sscanf (\"%s\", \"%%p\", &p) = %d, p == %p\n", buf, res, p);
    if (res != 1 || p != NULL) {
      fputs("test failed!\n", stdout);
      result = 1;
    }
  }
  exit(result);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2dd8(%rip),%rax
mov    (%rax),%eax
mov    %rax,-0x188(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x180(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
mov    0x2db2(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    0x2d8c(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x38(%rbp)
lea    0xdc7(%rip),%rdi
lea    0xdc2(%rip),%rsi
lea    -0x34(%rbp),%rdx
mov    $0x0,%al
call   10c0 <sscanf@plt>
cmp    $0x1,%eax
je     1291 <main+0xb1>
mov    0x2d55(%rip),%rax
mov    (%rax),%rsi
lea    0xda0(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x38(%rbp)
mov    -0x180(%rbp),%rdx
lea    0xd94(%rip),%rdi
lea    0xdab(%rip),%rsi
mov    $0x0,%al
call   10c0 <sscanf@plt>
mov    -0x180(%rbp),%rdi
lea    0xda4(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
je     12e7 <main+0x107>
mov    0x2cff(%rip),%rax
mov    (%rax),%rsi
lea    0xd4a(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x38(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1349 <main+0x169>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd71(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1349 <main+0x169>
lea    0xd6b(%rip),%rdi
lea    0xd5b(%rip),%rsi
call   10d0 <popen@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    1344 <main+0x164>
lea    0xd42(%rip),%rdi
call   10e0 <perror@plt>
movl   $0x1,-0x38(%rbp)
jmp    13cb <main+0x1eb>
cmpl   $0x3,-0x8(%rbp)
jne    13c6 <main+0x1e6>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd28(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    13c6 <main+0x1e6>
mov    -0x180(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdx
lea    0xd0a(%rip),%rsi
call   10f0 <sprintf@plt>
mov    -0x180(%rbp),%rdi
lea    0xdf4(%rip),%rsi
call   10d0 <popen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    13c1 <main+0x1e1>
lea    0xcc5(%rip),%rdi
call   10e0 <perror@plt>
movl   $0x1,-0x38(%rbp)
jmp    13c6 <main+0x1e6>
jmp    13cb <main+0x1eb>
mov    -0x30(%rbp),%rax
mov    %rax,-0x190(%rbp)
lea    -0x70(%rbp),%rdx
lea    0xcf2(%rip),%rdi
lea    0xcb2(%rip),%rsi
mov    $0x0,%al
call   10c0 <sscanf@plt>
mov    -0x190(%rbp),%rdi
mov    %eax,%edx
lea    -0x70(%rbp),%rcx
lea    0xc9a(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xcbe(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
je     1441 <main+0x261>
mov    0x2ba5(%rip),%rax
mov    (%rax),%rsi
lea    0xbf0(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x38(%rbp)
mov    -0x30(%rbp),%rsi
lea    0xc90(%rip),%rdi
call   1060 <fputs@plt>
mov    -0x30(%rbp),%rsi
lea    0xc99(%rip),%rdi
call   1060 <fputs@plt>
mov    -0x28(%rbp),%rdi
lea    -0xb0(%rbp),%r8
lea    0xc8b(%rip),%rsi
lea    -0x78(%rbp),%rdx
lea    -0x7c(%rbp),%rcx
mov    $0x0,%al
call   1070 <fscanf@plt>
mov    %eax,-0x74(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x74(%rbp),%edx
mov    -0x78(%rbp),%ecx
movss  -0x7c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    -0xb0(%rbp),%r8
lea    0xc5f(%rip),%rsi
mov    $0x1,%al
call   10a0 <fprintf@plt>
cmpl   $0x3,-0x74(%rbp)
jne    14fa <main+0x31a>
cmpl   $0x19,-0x78(%rbp)
jne    14fa <main+0x31a>
movss  -0x7c(%rbp),%xmm0
movss  0xb32(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    14fa <main+0x31a>
jp     14fa <main+0x31a>
lea    -0xb0(%rbp),%rdi
lea    0xbe8(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
je     1517 <main+0x337>
mov    0x2acf(%rip),%rax
mov    (%rax),%rsi
lea    0xb1a(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x38(%rbp)
mov    -0x180(%rbp),%rdi
mov    -0x188(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    %rcx,-0x198(%rbp)
mov    %eax,%esi
mov    -0x28(%rbp),%rdx
call   1080 <fgets@plt>
mov    -0x198(%rbp),%rdi
mov    %rax,%rdx
lea    0xbe1(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x180(%rbp),%rdi
lea    0xad0(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
je     158d <main+0x3ad>
mov    0x2a59(%rip),%rax
mov    (%rax),%rsi
lea    0xaa4(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x38(%rbp)
mov    -0x30(%rbp),%rsi
lea    0xba5(%rip),%rdi
call   1060 <fputs@plt>
mov    -0x28(%rbp),%rdi
lea    -0xf0(%rbp),%r8
lea    0xb97(%rip),%rsi
lea    -0xb4(%rbp),%rdx
lea    -0xb8(%rbp),%rcx
mov    $0x0,%al
call   1070 <fscanf@plt>
mov    -0x30(%rbp),%rdi
mov    -0xb4(%rbp),%edx
movss  -0xb8(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    -0xf0(%rbp),%rcx
lea    0xb25(%rip),%rsi
mov    $0x1,%al
call   10a0 <fprintf@plt>
cmpl   $0x38,-0xb4(%rbp)
jne    1638 <main+0x458>
movss  -0xb8(%rbp),%xmm0
ff
movss  0x9f8(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    1638 <main+0x458>
jp     1638 <main+0x458>
lea    -0xf0(%rbp),%rdi
lea    0xb34(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
je     1655 <main+0x475>
mov    0x2991(%rip),%rax
mov    (%rax),%rsi
lea    0x9dc(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x38(%rbp)
mov    -0x180(%rbp),%rdi
mov    -0x188(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    %rcx,-0x1a0(%rbp)
mov    %eax,%esi
mov    -0x28(%rbp),%rdx
call   1080 <fgets@plt>
mov    -0x1a0(%rbp),%rdi
mov    %rax,%rdx
lea    0xaa3(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x180(%rbp),%rdi
lea    0xac1(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
je     16cb <main+0x4eb>
mov    0x291b(%rip),%rax
mov    (%rax),%rsi
lea    0x966(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x38(%rbp)
mov    -0x30(%rbp),%rsi
lea    0xa8f(%rip),%rdi
call   1060 <fputs@plt>
movq   $0x0,-0xf8(%rbp)
mov    -0x28(%rbp),%rdi
call   10b0 <feof@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x1a1(%rbp)
jne    1719 <main+0x539>
mov    -0x28(%rbp),%rdi
call   1030 <ferror@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x1a1(%rbp)
mov    -0x1a1(%rbp),%al
test   $0x1,%al
jne    172c <main+0x54c>
jmp    18d2 <main+0x6f2>
mov    -0xf8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0xf8(%rbp)
cmp    $0x6,%rax
jb     1768 <main+0x588>
mov    0x287e(%rip),%rax
mov    (%rax),%rsi
lea    0x8c9(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x38(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xfc(%rbp)
ff
movb   $0x0,-0x140(%rbp)
movb   $0x0,-0x120(%rbp)
mov    -0x28(%rbp),%rdi
lea    -0x120(%rbp),%rcx
lea    -0x140(%rbp),%r8
lea    0xa01(%rip),%rsi
lea    -0xfc(%rbp),%rdx
mov    $0x0,%al
call   1070 <fscanf@plt>
mov    %eax,-0x144(%rbp)
mov    -0x28(%rbp),%rdi
lea    0x9f1(%rip),%rsi
mov    $0x0,%al
call   1070 <fscanf@plt>
mov    -0x30(%rbp),%rdi
mov    -0x144(%rbp),%edx
movss  -0xfc(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    -0x140(%rbp),%rcx
lea    -0x120(%rbp),%r8
lea    0x9c6(%rip),%rsi
mov    $0x1,%al
call   10a0 <fprintf@plt>
mov    -0x144(%rbp),%eax
mov    -0xf8(%rbp),%rdx
sub    $0x1,%rdx
lea    0x2896(%rip),%rcx
imul   $0x18,%rdx,%rdx
add    %rdx,%rcx
cmp    (%rcx),%eax
jne    18b0 <main+0x6d0>
movss  -0xfc(%rbp),%xmm0
ff
mov    -0xf8(%rbp),%rcx
sub    $0x1,%rcx
lea    0x286d(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
ucomiss 0x4(%rax),%xmm0
jne    18b0 <main+0x6d0>
jp     18b0 <main+0x6d0>
lea    -0x140(%rbp),%rdi
mov    -0xf8(%rbp),%rcx
sub    $0x1,%rcx
lea    0x283d(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    0x10(%rax),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    18b0 <main+0x6d0>
lea    -0x120(%rbp),%rdi
mov    -0xf8(%rbp),%rcx
sub    $0x1,%rcx
lea    0x280a(%rip),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    0x8(%rax),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
je     18cd <main+0x6ed>
mov    0x2719(%rip),%rax
mov    (%rax),%rsi
lea    0x764(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x38(%rbp)
jmp    16e6 <main+0x506>
mov    -0x180(%rbp),%rdi
mov    -0x188(%rbp),%rax
movb   $0x0,(%rdi)
mov    -0x30(%rbp),%rcx
mov    %rcx,-0x1b0(%rbp)
mov    %eax,%esi
mov    -0x28(%rbp),%rdx
call   1080 <fgets@plt>
mov    -0x1b0(%rbp),%rdi
mov    %rax,%rdx
lea    0x823(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
mov    -0x180(%rbp),%rdi
lea    0x713(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
je     194b <main+0x76b>
mov    0x269b(%rip),%rax
mov    (%rax),%rsi
lea    0x6e6(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x38(%rbp)
mov    -0x30(%rbp),%rax
mov    0x267a(%rip),%rcx
cmp    (%rcx),%rax
je     1968 <main+0x788>
mov    -0x30(%rbp),%rdi
call   1050 <pclose@plt>
mov    -0x30(%rbp),%rsi
lea    0x873(%rip),%rdi
call   1060 <fputs@plt>
lea    0x870(%rip),%rdi
lea    0x86e(%rip),%rsi
lea    -0x14c(%rbp),%rdx
lea    -0x150(%rbp),%rcx
mov    $0x0,%al
call   10c0 <sscanf@plt>
mov    %eax,-0x148(%rbp)
mov    -0x148(%rbp),%esi
mov    -0x14c(%rbp),%edx
mov    -0x150(%rbp),%ecx
lea    0x840(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x1,-0x148(%rbp)
jne    19e8 <main+0x808>
cmpl   $0xffffffec,-0x14c(%rbp)
jne    19e8 <main+0x808>
cmpl   $0x3,-0x150(%rbp)
je     1a05 <main+0x825>
mov    0x25e1(%rip),%rax
mov    (%rax),%rsi
lea    0x62c(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x38(%rbp)
mov    -0x30(%rbp),%rsi
lea    0x806(%rip),%rdi
call   1060 <fputs@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x158(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x160(%rbp)
ff
lea    0x7ed(%rip),%rdi
lea    0x7ee(%rip),%rsi
lea    -0x158(%rbp),%rdx
lea    -0x160(%rbp),%rcx
lea    -0x168(%rbp),%r8
mov    $0x0,%al
call   10c0 <sscanf@plt>
mov    %eax,-0x164(%rbp)
mov    -0x164(%rbp),%esi
movsd  -0x158(%rbp),%xmm0
ff
movsd  -0x160(%rbp),%xmm1
ff
mov    -0x168(%rbp),%edx
lea    0x7b4(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
cmpl   $0x2,-0x164(%rbp)
jne    1adf <main+0x8ff>
movsd  -0x158(%rbp),%xmm0
ff
movsd  0x566(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1adf <main+0x8ff>
jp     1adf <main+0x8ff>
movsd  -0x160(%rbp),%xmm0
ff
movsd  0x54e(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1adf <main+0x8ff>
jp     1adf <main+0x8ff>
cmpl   $0x6,-0x168(%rbp)
je     1afc <main+0x91c>
mov    0x24ea(%rip),%rax
mov    (%rax),%rsi
lea    0x535(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x38(%rbp)
lea    0x51d(%rip),%rdi
lea    0x74a(%rip),%rsi
lea    -0x158(%rbp),%rdx
mov    $0x0,%al
call   10c0 <sscanf@plt>
mov    %eax,-0x164(%rbp)
mov    -0x164(%rbp),%esi
movsd  -0x158(%rbp),%xmm0
ff
lea    0x725(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
cmpl   $0x1,-0x164(%rbp)
jne    1b67 <main+0x987>
movsd  -0x158(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1b67 <main+0x987>
jp     1b67 <main+0x987>
jmp    1b84 <main+0x9a4>
mov    0x2462(%rip),%rax
mov    (%rax),%rsi
lea    0x4ad(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x38(%rbp)
lea    0x6df(%rip),%rdi
lea    0x6dc(%rip),%rsi
lea    -0x158(%rbp),%rdx
lea    -0x168(%rbp),%rcx
mov    $0x0,%al
call   10c0 <sscanf@plt>
mov    %eax,-0x164(%rbp)
mov    -0x164(%rbp),%esi
movsd  -0x158(%rbp),%xmm0
ff
mov    -0x168(%rbp),%edx
lea    0x6ac(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
cmpl   $0x1,-0x164(%rbp)
jne    1c09 <main+0xa29>
movsd  -0x158(%rbp),%xmm0
ff
movsd  0x42c(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1c09 <main+0xa29>
jp     1c09 <main+0xa29>
cmpl   $0x3,-0x168(%rbp)
je     1c26 <main+0xa46>
mov    0x23c0(%rip),%rax
mov    (%rax),%rsi
lea    0x40b(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x38(%rbp)
mov    0x23a3(%rip),%rax
mov    (%rax),%rsi
lea    0x657(%rip),%rdi
call   1060 <fputs@plt>
mov    -0x180(%rbp),%rdi
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x170(%rbp)
lea    0x63f(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   10f0 <sprintf@plt>
mov    -0x180(%rbp),%rdi
lea    0x628(%rip),%rsi
lea    -0x170(%rbp),%rdx
mov    $0x0,%al
call   10c0 <sscanf@plt>
mov    -0x180(%rbp),%rsi
mov    %eax,-0x174(%rbp)
mov    -0x174(%rbp),%edx
mov    -0x170(%rbp),%rcx
lea    0x5fc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x1,-0x174(%rbp)
jne    1cc0 <main+0xae0>
cmpq   $0x0,-0x170(%rbp)
je     1cdd <main+0xafd>
mov    0x2309(%rip),%rax
mov    (%rax),%rsi
lea    0x354(%rip),%rdi
call   1060 <fputs@plt>
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%edi
call   1100 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rsi,%r14
mov    %edi,%r15d
mov    0x2dcf(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rbx
mov    %rax,-0x98(%rbp)
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    0x2dbe(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x38(%rbp)
mov    0x2d98(%rip),%rax
mov    (%rax),%r12
lea    0xde6(%rip),%rdi
lea    0xde1(%rip),%rsi
xor    %r13d,%r13d
lea    -0xa4(%rbp),%rdx
xor    %eax,%eax
call   10b0 <sscanf@plt>
cmp    $0x1,%eax
je     127d <main+0x9d>
mov    0x2d6a(%rip),%rax
mov    (%rax),%rcx
lea    0xdbd(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
call   1100 <fwrite@plt>
mov    $0x1,%r13d
lea    0xdaf(%rip),%rdi
lea    0xdc6(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   10b0 <sscanf@plt>
lea    0xdc3(%rip),%rsi
mov    %rbx,%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     12cf <main+0xef>
mov    0x2d18(%rip),%rax
mov    (%rax),%rcx
lea    0xd6b(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
call   1100 <fwrite@plt>
mov    $0x1,%r13d
cmp    $0x3,%r15d
mov    %rbx,-0xa0(%rbp)
je     1320 <main+0x140>
cmp    $0x2,%r15d
jne    1378 <main+0x198>
mov    0x8(%r14),%rdi
lea    0xd80(%rip),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
mov    -0x38(%rbp),%rbx
jne    1378 <main+0x198>
lea    0xd7b(%rip),%rdi
lea    0xd6b(%rip),%rsi
call   10c0 <popen@plt>
test   %rax,%rax
jne    1b50 <main+0x970>
xor    %r12d,%r12d
jmp    1362 <main+0x182>
mov    0x8(%r14),%rdi
lea    0xd5f(%rip),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
jne    1378 <main+0x198>
mov    0x10(%r14),%rdx
lea    0xd51(%rip),%rsi
mov    %rbx,%rdi
call   10e0 <sprintf@plt>
lea    0xe3f(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <popen@plt>
test   %rax,%rax
jne    1b58 <main+0x978>
xor    %ebx,%ebx
mov    %rbx,-0x38(%rbp)
lea    0xd0d(%rip),%rdi
call   10d0 <perror@plt>
mov    $0x1,%r13d
lea    0xd54(%rip),%r14
lea    0xd14(%rip),%rsi
lea    -0x90(%rbp),%r15
mov    %r14,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   10b0 <sscanf@plt>
lea    0xcfc(%rip),%rsi
mov    %r12,%rdi
mov    %eax,%edx
mov    %r15,%rcx
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
mov    -0xa0(%rbp),%rbx
je     13ed <main+0x20d>
mov    0x2bfa(%rip),%rax
mov    (%rax),%rcx
lea    0xc4d(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
call   1100 <fwrite@plt>
mov    $0x1,%r13d
lea    0xce8(%rip),%rdi
mov    $0x18,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1100 <fwrite@plt>
lea    0xce8(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1100 <fwrite@plt>
lea    0xcd8(%rip),%rsi
lea    -0x50(%rbp),%rdx
lea    -0x2c(%rbp),%rcx
lea    -0x90(%rbp),%r14
mov    -0x38(%rbp),%rdi
mov    %r14,%r8
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %eax,%r15d
mov    -0x50(%rbp),%ecx
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcac(%rip),%rsi
mov    %r12,%rdi
mov    %eax,%edx
mov    %r14,%r8
mov    $0x1,%al
call   1090 <fprintf@plt>
cmp    $0x3,%r15d
jne    149c <main+0x2bc>
cmpl   $0x19,-0x50(%rbp)
jne    149c <main+0x2bc>
movss  -0x2c(%rbp),%xmm0
ucomiss 0xb80(%rip),%xmm0
jne    149c <main+0x2bc>
jp     149c <main+0x2bc>
lea    0xc48(%rip),%rsi
lea    -0x90(%rbp),%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     14c2 <main+0x2e2>
mov    0x2b25(%rip),%rax
mov    (%rax),%rcx
lea    0xb78(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
call   1100 <fwrite@plt>
mov    $0x1,%r13d
mov    %rbx,%rdi
mov    -0x98(%rbp),%rsi
mov    -0x38(%rbp),%r15
mov    %r15,%rdx
call   1070 <fgets@plt>
lea    0xc4e(%rip),%rsi
mov    %r12,%rdi
mov    %rax,%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0xb3e(%rip),%rsi
mov    %rbx,%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     1526 <main+0x346>
mov    0x2ac1(%rip),%rax
mov    (%rax),%rcx
lea    0xb14(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
call   1100 <fwrite@plt>
mov    $0x1,%r13d
lea    0xc10(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1100 <fwrite@plt>
lea    0xc00(%rip),%rsi
lea    -0x50(%rbp),%rdx
lea    -0x2c(%rbp),%rcx
lea    -0x90(%rbp),%r14
mov    %r15,%rdi
mov    %r14,%r8
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    -0x50(%rbp),%edx
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xb98(%rip),%rsi
mov    %r12,%rdi
mov    %r14,%rcx
mov    $0x1,%al
call   1090 <fprintf@plt>
cmpl   $0x38,-0x50(%rbp)
jne    15b0 <main+0x3d0>
movss  -0x2c(%rbp),%xmm0
ucomiss 0xa70(%rip),%xmm0
jne    15b0 <main+0x3d0>
jp     15b0 <main+0x3d0>
lea    0xbbe(%rip),%rsi
lea    -0x90(%rbp),%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     15d6 <main+0x3f6>
mov    0x2a11(%rip),%rax
mov    (%rax),%rcx
lea    0xa64(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
call   1100 <fwrite@plt>
mov    $0x1,%r13d
mov    %rbx,%rdi
mov    -0x98(%rbp),%rsi
mov    %r15,%rdx
call   1070 <fgets@plt>
lea    0xb3e(%rip),%rsi
mov    %r12,-0x58(%rbp)
mov    %r12,%rdi
mov    %rax,%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0xb59(%rip),%rsi
mov    %rbx,%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     163a <main+0x45a>
mov    0x29ad(%rip),%rax
mov    (%rax),%rcx
lea    0xa00(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
call   1100 <fwrite@plt>
mov    $0x1,%r13d
mov    %r13d,-0x30(%rbp)
lea    0xb20(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    -0x58(%rbp),%rcx
call   1100 <fwrite@plt>
mov    %r15,%rdi
call   10a0 <feof@plt>
test   %eax,%eax
jne    17c7 <main+0x5e7>
lea    0x2711(%rip),%r12
xor    %ebx,%ebx
jmp    16c3 <main+0x4e3>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x2941(%rip),%rax
mov    (%rax),%rcx
mov    $0xd,%esi
mov    $0x1,%edx
lea    0x98a(%rip),%rdi
call   1100 <fwrite@plt>
movl   $0x1,-0x30(%rbp)
mov    -0x38(%rbp),%r15
mov    %r15,%rdi
call   10a0 <feof@plt>
add    $0x18,%r12
add    $0x1,%rbx
test   %eax,%eax
jne    17c7 <main+0x5e7>
mov    %r15,%rdi
call   1030 <ferror@plt>
test   %eax,%eax
jne    17c7 <main+0x5e7>
cmp    $0x6,%rbx
jb     1700 <main+0x520>
mov    0x28e8(%rip),%rax
mov    (%rax),%rcx
mov    $0xd,%esi
mov    $0x1,%edx
lea    0x931(%rip),%rdi
call   1100 <fwrite@plt>
movl   $0x1,-0x30(%rbp)
movl   $0x0,-0x2c(%rbp)
movb   $0x0,-0x50(%rbp)
movb   $0x0,-0x90(%rbp)
mov    %r15,%rdi
lea    0xa7f(%rip),%rsi
lea    -0x2c(%rbp),%rdx
lea    -0x90(%rbp),%r13
mov    %r13,%rcx
lea    -0x50(%rbp),%r14
mov    %r14,%r8
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %r15,%rdi
mov    %eax,%r15d
lea    0xa65(%rip),%rsi
xor    %eax,%eax
call   1060 <fscanf@plt>
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x58(%rbp),%rdi
lea    0xa51(%rip),%rsi
mov    %r15d,%edx
mov    %r14,%rcx
mov    %r13,%r8
mov    $0x1,%al
call   1090 <fprintf@plt>
cmp    -0x10(%r12),%r15d
jne    1680 <main+0x4a0>
movss  -0x2c(%rbp),%xmm0
ucomiss -0xc(%r12),%xmm0
jne    1680 <main+0x4a0>
jp     1680 <main+0x4a0>
mov    (%r12),%rsi
lea    -0x50(%rbp),%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
jne    1680 <main+0x4a0>
mov    -0x8(%r12),%rsi
lea    -0x90(%rbp),%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
jne    1680 <main+0x4a0>
jmp    16a7 <main+0x4c7>
mov    -0xa0(%rbp),%r14
movb   $0x0,(%r14)
mov    %r14,%rdi
mov    -0x98(%rbp),%rsi
mov    %r15,%rdx
call   1070 <fgets@plt>
lea    0x942(%rip),%rsi
mov    -0x58(%rbp),%rdi
mov    %rax,%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0x832(%rip),%rsi
mov    %r14,%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
mov    -0x30(%rbp),%r15d
je     1837 <main+0x657>
mov    0x27b0(%rip),%rax
mov    (%rax),%rcx
lea    0x803(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
call   1100 <fwrite@plt>
mov    $0x1,%r15d
mov    0x278a(%rip),%rax
mov    -0x58(%rbp),%r12
cmp    (%rax),%r12
je     184f <main+0x66f>
mov    %r12,%rdi
call   1050 <pclose@plt>
lea    0x990(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1100 <fwrite@plt>
lea    0x980(%rip),%rdi
lea    0x97e(%rip),%rsi
lea    -0x90(%rbp),%rdx
lea    -0x50(%rbp),%rcx
xor    %eax,%eax
call   10b0 <sscanf@plt>
mov    %eax,%ebx
mov    -0x90(%rbp),%edx
mov    -0x50(%rbp),%ecx
lea    0x960(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x1,%ebx
jne    18b7 <main+0x6d7>
cmpl   $0xffffffec,-0x90(%rbp)
jne    18b7 <main+0x6d7>
cmpl   $0x3,-0x50(%rbp)
je     18dd <main+0x6fd>
mov    0x270a(%rip),%rax
mov    (%rax),%rcx
lea    0x75d(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
call   1100 <fwrite@plt>
mov    $0x1,%r15d
lea    0x932(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1100 <fwrite@plt>
movq   $0x0,-0x90(%rbp)
movq   $0x0,-0x50(%rbp)
lea    0x90f(%rip),%rdi
lea    0x910(%rip),%rsi
lea    -0x90(%rbp),%rdx
lea    -0x50(%rbp),%rcx
lea    -0x2c(%rbp),%r8
xor    %eax,%eax
call   10b0 <sscanf@plt>
mov    %eax,%ebx
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x50(%rbp),%xmm1
mov    -0x2c(%rbp),%edx
lea    0x8ec(%rip),%rdi
mov    %eax,%esi
mov    $0x2,%al
call   1040 <printf@plt>
cmp    $0x2,%ebx
jne    197f <main+0x79f>
movsd  -0x90(%rbp),%xmm0
ff
ucomisd 0x6a4(%rip),%xmm0
jne    197f <main+0x79f>
jp     197f <main+0x79f>
movsd  -0x50(%rbp),%xmm0
ucomisd 0x69b(%rip),%xmm0
jne    197f <main+0x79f>
jp     197f <main+0x79f>
cmpl   $0x6,-0x2c(%rbp)
je     19a5 <main+0x7c5>
mov    0x2642(%rip),%rax
mov    (%rax),%rcx
lea    0x695(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
call   1100 <fwrite@plt>
mov    $0x1,%r15d
lea    0x674(%rip),%rdi
lea    0x8a1(%rip),%rsi
lea    -0x90(%rbp),%rdx
xor    %eax,%eax
call   10b0 <sscanf@plt>
mov    %eax,%ebx
movsd  -0x90(%rbp),%xmm0
ff
lea    0x886(%rip),%rdi
mov    %eax,%esi
mov    $0x1,%al
call   1040 <printf@plt>
cmp    $0x1,%ebx
jne    19f4 <main+0x814>
movsd  -0x90(%rbp),%xmm0
ff
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    19f4 <main+0x814>
jnp    1a1a <main+0x83a>
mov    0x25cd(%rip),%rax
mov    (%rax),%rcx
lea    0x620(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
call   1100 <fwrite@plt>
mov    $0x1,%r15d
lea    0x849(%rip),%rdi
lea    0x846(%rip),%rsi
lea    -0x90(%rbp),%rdx
lea    -0x2c(%rbp),%rcx
xor    %eax,%eax
call   10b0 <sscanf@plt>
mov    %eax,%ebx
movsd  -0x90(%rbp),%xmm0
ff
mov    -0x2c(%rbp),%edx
lea    0x826(%rip),%rdi
mov    %eax,%esi
mov    $0x1,%al
call   1040 <printf@plt>
cmp    $0x1,%ebx
jne    1a76 <main+0x896>
movsd  -0x90(%rbp),%xmm0
ff
ucomisd 0x5ac(%rip),%xmm0
jne    1a76 <main+0x896>
jp     1a76 <main+0x896>
cmpl   $0x3,-0x2c(%rbp)
je     1a9c <main+0x8bc>
mov    0x254b(%rip),%rax
mov    (%rax),%rcx
lea    0x59e(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
call   1100 <fwrite@plt>
mov    $0x1,%r15d
mov    0x2525(%rip),%rax
mov    (%rax),%rcx
lea    0x7e1(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   1100 <fwrite@plt>
movq   $0xffffffffffffffff,-0x90(%rbp)
ff ff ff ff
lea    0x7c9(%rip),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %edx,%edx
call   10e0 <sprintf@plt>
lea    -0x90(%rbp),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   10b0 <sscanf@plt>
mov    %eax,%ebx
mov    -0x90(%rbp),%rcx
lea    0x79b(%rip),%rdi
mov    %r14,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x1,%ebx
jne    1b22 <main+0x942>
cmpq   $0x0,-0x90(%rbp)
jne    1b22 <main+0x942>
mov    %r15d,%edi
call   10f0 <exit@plt>
mov    0x249f(%rip),%rax
mov    (%rax),%rcx
lea    0x4f2(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
call   1100 <fwrite@plt>
mov    $0x1,%r15d
mov    %r15d,%edi
call   10f0 <exit@plt>
mov    %rax,%r12
jmp    1378 <main+0x198>
mov    %rax,-0x38(%rbp)
jmp    1378 <main+0x198>

LLVM IR (-O0):
%struct.anon = type { i32, float, i8*, i8* }
@BUFSIZ = global i32 0
@stdin = global i32* null
@stdout = global i32* null
@.str = [2 x i8] c"0\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [14 x i8] c"test failed!\0A\00"
@.str.3 = [30 x i8] c"conversion] Zero flag Ze]ro#\0A\00"
@.str.4 = [14 x i8] c"%*[^]] %[^#]\0A\00"
@.str.5 = [18 x i8] c"] Zero flag Ze]ro\00"
@.str.6 = [7 x i8] c"-opipe\00"
@.str.7 = [9 x i8] c"/bin/cat\00"
@.str.8 = [2 x i8] c"w\00"
@.str.9 = [16 x i8] c"popen: /bin/cat\00"
@.str.10 = [7 x i8] c"-ipipe\00"
@.str.11 = [12 x i8] c"/bin/cat %s\00"
@.str.12 = [2 x i8] c"r\00"
@.str.13 = [54 x i8] c"sscanf (\22thompson\22, \22%%s\22, name) == %d, name == \22%s\22\0A\00"
@.str.14 = [9 x i8] c"thompson\00"
@.str.15 = [3 x i8] c"%s\00"
@.str.16 = [25 x i8] c"Testing scanf (vfscanf)\0A\00"
@.str.17 = [9 x i8] c"Test 1:\0A\00"
@.str.18 = [7 x i8] c"%d%f%s\00"
@.str.19 = [40 x i8] c"n = %d, i = %d, x = %f, name = \22%.50s\22\0A\00"
@.str.20 = [16 x i8] c"Residual: \22%s\22\0A\00"
@.str.21 = [2 x i8] c"\0A\00"
@.str.22 = [9 x i8] c"Test 2:\0A\00"
@.str.23 = [23 x i8] c"%2d%f%*d %[0123456789]\00"
@.str.24 = [32 x i8] c"i = %d, x = %f, name = \22%.50s\22\0A\00"
@.str.25 = [3 x i8] c"56\00"
@.str.26 = [5 x i8] c"a72\0A\00"
@.str.27 = [9 x i8] c"Test 3:\0A\00"
@main.ok = internal global [6 x %struct.anon] [%struct.anon { i32 3, float 2.000000e+00, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.28, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.29, i32 0, i32 0) }, %struct.anon { i32 2, float 0xC0299999A0000000, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.30, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.31, i32 0, i32 0) }, %struct.anon { i32 0, float 0.000000e+00, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.31, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.31, i32 0, i32 0) }, %struct.anon { i32 3, float 1.000000e+01, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.32, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.33, i32 0, i32 0) }, %struct.anon { i32 3, float 1.000000e+02, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.34, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.35, i32 0, i32 0) }, %struct.anon { i32 -1, float 0.000000e+00, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.31, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.31, i32 0, i32 0) }]
@.str.28 = [7 x i8] c"quarts\00"
@.str.29 = [4 x i8] c"oil\00"
@.str.30 = [8 x i8] c"degrees\00"
@.str.31 = [1 x i8] zeroinitializer
@.str.32 = [4 x i8] c"LBS\00"
@.str.33 = [11 x i8] c"fertilizer\00"
@.str.34 = [4 x i8] c"rgs\00"
@.str.35 = [7 x i8] c"energy\00"
@.str.36 = [15 x i8] c"%f%20s of %20s\00"
@.str.37 = [7 x i8] c"%*[^\0A]\00"
@.str.38 = [53 x i8] c"count = %d, quant = %f, item = %.21s, units = %.21s\0A\00"
@.str.39 = [9 x i8] c"Test 4:\0A\00"
@.str.40 = [5 x i8] c"-242\00"
@.str.41 = [6 x i8] c"%3o%n\00"
@.str.42 = [28 x i8] c"res = %d, val = %d, n = %d\0A\00"
@.str.43 = [9 x i8] c"Test 5:\0A\00"
@.str.44 = [8 x i8] c"1234567\00"
@.str.45 = [11 x i8] c"%3lg%3lg%n\00"
@.str.46 = [34 x i8] c"res = %d, a = %g, b = %g, n = %d\0A\00"
@.str.47 = [4 x i8] c"%lg\00"
@.str.48 = [18 x i8] c"res = %d, a = %g\0A\00"
@.str.49 = [4 x i8] c"1e3\00"
@.str.50 = [6 x i8] c"%lg%n\00"
@.str.51 = [26 x i8] c"res = %d, a = %g, n = %d\0A\00"
@.str.52 = [9 x i8] c"Test 6:\0A\00"
@.str.53 = [3 x i8] c"%p\00"
@.str.54 = [40 x i8] c"sscanf (\22%s\22, \22%%p\22, &p) = %d, p == %p\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
%12 = alloca [50 x i8]
%13 = alloca i32
%14 = alloca i32
%15 = alloca float
%16 = alloca [50 x i8]
%17 = alloca i32
%18 = alloca float
%19 = alloca [50 x i8]
%20 = alloca i64
%21 = alloca float
%22 = alloca [21 x i8]
%23 = alloca [21 x i8]
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca double
%29 = alloca double
%30 = alloca i32
%31 = alloca i32
%32 = alloca i8*
%33 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%34 = load i32, i32* @BUFSIZ
%35 = zext i32 %34 to i64
%36 = call i8* @llvm.stacksave()
store i8* %36, i8** %6
%37 = alloca i8, i64 %35
store i64 %35, i64* %7
%38 = load i32*, i32** @stdin
store i32* %38, i32** %8
%39 = load i32*, i32** @stdout
store i32* %39, i32** %9
store i32 0, i32* %11
%40 = call i32 (i8*, i8*, ...) @sscanf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %10)
%41 = icmp ne i32 %40, 1
br i1 %41, label %42, label %45
42: ; preds = %2
%43 = load i32*, i32** @stdout
%44 = call i32 @fputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32* %43)
store i32 1, i32* %11
br label %45
45: ; preds = %42, %2
%46 = call i32 (i8*, i8*, ...) @sscanf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i8* %37)
%47 = call i64 @strcmp(i8* %37, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0))
%48 = icmp ne i64 %47, 0
br i1 %48, label %49, label %52
49: ; preds = %45
%50 = load i32*, i32** @stdout
%51 = call i32 @fputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32* %50)
store i32 1, i32* %11
br label %52
52: ; preds = %49, %45
%53 = load i32, i32* %4
%54 = icmp eq i32 %53, 2
br i1 %54, label %55, label %68
55: ; preds = %52
%56 = load i8**, i8*** %5
%57 = getelementptr inbounds i8*, i8** %56, i64 1
%58 = load i8*, i8** %57
%59 = call i64 @strcmp(i8* %58, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%60 = icmp ne i64 %59, 0
br i1 %60, label %68, label %61
61: ; preds = %55
%62 = call i32* @popen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
store i32* %62, i32** %9
%63 = load i32*, i32** %9
%64 = icmp eq i32* %63, null
br i1 %64, label %65, label %67
65: ; preds = %61
%66 = call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0))
store i32 1, i32* %11
br label %67
67: ; preds = %65, %61
br label %89
68: ; preds = %55, %52
%69 = load i32, i32* %4
%70 = icmp eq i32 %69, 3
br i1 %70, label %71, label %88
71: ; preds = %68
%72 = load i8**, i8*** %5
%73 = getelementptr inbounds i8*, i8** %72, i64 1
%74 = load i8*, i8** %73
%75 = call i64 @strcmp(i8* %74, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%76 = icmp ne i64 %75, 0
br i1 %76, label %88, label %77
77: ; preds = %71
%78 = load i8**, i8*** %5
%79 = getelementptr inbounds i8*, i8** %78, i64 2
%80 = load i8*, i8** %79
%81 = call i32 @sprintf(i8* %37, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0), i8* %80)
%82 = call i32* @popen(i8* %37, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
store i32* %82, i32** %8
%83 = load i32*, i32** %8
%84 = icmp eq i32* %83, null
br i1 %84, label %85, label %87
85: ; preds = %77
%86 = call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0))
store i32 1, i32* %11
br label %87
87: ; preds = %85, %77
br label %88
88: ; preds = %87, %71, %68
br label %89
89: ; preds = %88, %67
%90 = load i32*, i32** %9
%91 = getelementptr inbounds [50 x i8], [50 x i8]* %12, i64 0, i64 0
%92 = call i32 (i8*, i8*, ...) @sscanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* %91)
%93 = getelementptr inbounds [50 x i8], [50 x i8]* %12, i64 0, i64 0
%94 = call i32 (i32*, i8*, ...) @fprintf(i32* %90, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.13, i64 0, i64 0), i32 %92, i8* %93)
%95 = getelementptr inbounds [50 x i8], [50 x i8]* %12, i64 0, i64 0
%96 = call i64 @strcmp(i8* %95, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0))
%97 = icmp ne i64 %96, 0
br i1 %97, label %98, label %101
98: ; preds = %89
%99 = load i32*, i32** @stdout
%100 = call i32 @fputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32* %99)
store i32 1, i32* %11
br label %101
101: ; preds = %98, %89
%102 = load i32*, i32** %9
%103 = call i32 @fputs(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.16, i64 0, i64 0), i32* %102)
%104 = load i32*, i32** %9
%105 = call i32 @fputs(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0), i32* %104)
%106 = load i32*, i32** %8
%107 = getelementptr inbounds [50 x i8], [50 x i8]* %16, i64 0, i64 0
%108 = call i32 (i32*, i8*, ...) @fscanf(i32* %106, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i64 0, i64 0), i32* %14, float* %15, i8* %107)
store i32 %108, i32* %13
%109 = load i32*, i32** %9
%110 = load i32, i32* %13
%111 = load i32, i32* %14
%112 = load float, float* %15
%113 = fpext float %112 to double
%114 = getelementptr inbounds [50 x i8], [50 x i8]* %16, i64 0, i64 0
%115 = call i32 (i32*, i8*, ...) @fprintf(i32* %109, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.19, i64 0, i64 0), i32 %110, i32 %111, double %113, i8* %114)
%116 = load i32, i32* %13
%117 = icmp ne i32 %116, 3
br i1 %117, label %128, label %118
118: ; preds = %101
%119 = load i32, i32* %14
%120 = icmp ne i32 %119, 25
br i1 %120, label %128, label %121
121: ; preds = %118
%122 = load float, float* %15
%123 = fcmp une float %122, 0x4015BA5E40000000
br i1 %123, label %128, label %124
124: ; preds = %121
%125 = getelementptr inbounds [50 x i8], [50 x i8]* %16, i64 0, i64 0
%126 = call i64 @strcmp(i8* %125, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0))
%127 = icmp ne i64 %126, 0
br i1 %127, label %128, label %131
128: ; preds = %124, %121, %118, %101
%129 = load i32*, i32** @stdout
%130 = call i32 @fputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32* %129)
store i32 1, i32* %11
br label %131
131: ; preds = %128, %124
%132 = load i32*, i32** %9
%133 = trunc i64 %35 to i32
%134 = load i32*, i32** %8
%135 = call i8* @fgets(i8* %37, i32 %133, i32* %134)
%136 = call i32 (i32*, i8*, ...) @fprintf(i32* %132, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.20, i64 0, i64 0), i8* %135)
%137 = call i64 @strcmp(i8* %37, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i64 0, i64 0))
%138 = icmp ne i64 %137, 0
br i1 %138, label %139, label %142
139: ; preds = %131
%140 = load i32*, i32** @stdout
%141 = call i32 @fputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32* %140)
store i32 1, i32* %11
br label %142
142: ; preds = %139, %131
%143 = load i32*, i32** %9
%144 = call i32 @fputs(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.22, i64 0, i64 0), i32* %143)
%145 = load i32*, i32** %8
%146 = getelementptr inbounds [50 x i8], [50 x i8]* %19, i64 0, i64 0
%147 = call i32 (i32*, i8*, ...) @fscanf(i32* %145, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.23, i64 0, i64 0), i32* %17, float* %18, i8* %146)
%148 = load i32*, i32** %9
%149 = load i32, i32* %17
%150 = load float, float* %18
%151 = fpext float %150 to double
%152 = getelementptr inbounds [50 x i8], [50 x i8]* %19, i64 0, i64 0
%153 = call i32 (i32*, i8*, ...) @fprintf(i32* %148, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.24, i64 0, i64 0), i32 %149, double %151, i8* %152)
%154 = load i32, i32* %17
%155 = icmp ne i32 %154, 56
br i1 %155, label %163, label %156
156: ; preds = %142
%157 = load float, float* %18
%158 = fcmp une float %157, 7.890000e+02
br i1 %158, label %163, label %159
159: ; preds = %156
%160 = getelementptr inbounds [50 x i8], [50 x i8]* %19, i64 0, i64 0
%161 = call i64 @strcmp(i8* %160, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.25, i64 0, i64 0))
%162 = icmp ne i64 %161, 0
br i1 %162, label %163, label %166
163: ; preds = %159, %156, %142
%164 = load i32*, i32** @stdout
%165 = call i32 @fputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32* %164)
store i32 1, i32* %11
br label %166
166: ; preds = %163, %159
%167 = load i32*, i32** %9
%168 = trunc i64 %35 to i32
%169 = load i32*, i32** %8
%170 = call i8* @fgets(i8* %37, i32 %168, i32* %169)
%171 = call i32 (i32*, i8*, ...) @fprintf(i32* %167, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.20, i64 0, i64 0), i8* %170)
%172 = call i64 @strcmp(i8* %37, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.26, i64 0, i64 0))
%173 = icmp ne i64 %172, 0
br i1 %173, label %174, label %177
174: ; preds = %166
%175 = load i32*, i32** @stdout
%176 = call i32 @fputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32* %175)
store i32 1, i32* %11
br label %177
177: ; preds = %174, %166
%178 = load i32*, i32** %9
%179 = call i32 @fputs(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.27, i64 0, i64 0), i32* %178)
store i64 0, i64* %20
br label %180
180: ; preds = %250, %177
%181 = load i32*, i32** %8
%182 = call i32 @feof(i32* %181)
%183 = icmp ne i32 %182, 0
br i1 %183, label %189, label %184
184: ; preds = %180
%185 = load i32*, i32** %8
%186 = call i32 @ferror(i32* %185)
%187 = icmp ne i32 %186, 0
%188 = xor i1 %187, true
br label %189
189: ; preds = %184, %180
%190 = phi i1 [ false, %180 ], [ %188, %184 ]
br i1 %190, label %191, label %251
191: ; preds = %189
%192 = load i64, i64* %20
%193 = add i64 %192, 1
store i64 %193, i64* %20
%194 = icmp uge i64 %192, 6
br i1 %194, label %195, label %198
195: ; preds = %191
%196 = load i32*, i32** @stdout
%197 = call i32 @fputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32* %196)
store i32 1, i32* %11
br label %198
198: ; preds = %195, %191
store float 0.000000e+00, float* %21
%199 = getelementptr inbounds [21 x i8], [21 x i8]* %23, i64 0, i64 0
store i8 0, i8* %199
%200 = getelementptr inbounds [21 x i8], [21 x i8]* %22, i64 0, i64 0
store i8 0, i8* %200
%201 = load i32*, i32** %8
%202 = getelementptr inbounds [21 x i8], [21 x i8]* %22, i64 0, i64 0
%203 = getelementptr inbounds [21 x i8], [21 x i8]* %23, i64 0, i64 0
%204 = call i32 (i32*, i8*, ...) @fscanf(i32* %201, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.36, i64 0, i64 0), float* %21, i8* %202, i8* %203)
store i32 %204, i32* %24
%205 = load i32*, i32** %8
%206 = call i32 (i32*, i8*, ...) @fscanf(i32* %205, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.37, i64 0, i64 0))
%207 = load i32*, i32** %9
%208 = load i32, i32* %24
%209 = load float, float* %21
%210 = fpext float %209 to double
%211 = getelementptr inbounds [21 x i8], [21 x i8]* %23, i64 0, i64 0
%212 = getelementptr inbounds [21 x i8], [21 x i8]* %22, i64 0, i64 0
%213 = call i32 (i32*, i8*, ...) @fprintf(i32* %207, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.38, i64 0, i64 0), i32 %208, double %210, i8* %211, i8* %212)
%214 = load i32, i32* %24
%215 = load i64, i64* %20
%216 = sub i64 %215, 1
%217 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* @main.ok, i64 0, i64 %216
%218 = getelementptr inbounds %struct.anon, %struct.anon* %217, i32 0, i32 0
%219 = load i32, i32* %218
%220 = icmp ne i32 %214, %219
br i1 %220, label %247, label %221
221: ; preds = %198
%222 = load float, float* %21
%223 = load i64, i64* %20
%224 = sub i64 %223, 1
%225 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* @main.ok, i64 0, i64 %224
%226 = getelementptr inbounds %struct.anon, %struct.anon* %225, i32 0, i32 1
%227 = load float, float* %226
%228 = fcmp une float %222, %227
br i1 %228, label %247, label %229
229: ; preds = %221
%230 = getelementptr inbounds [21 x i8], [21 x i8]* %23, i64 0, i64 0
%231 = load i64, i64* %20
%232 = sub i64 %231, 1
%233 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* @main.ok, i64 0, i64 %232
%234 = getelementptr inbounds %struct.anon, %struct.anon* %233, i32 0, i32 3
%235 = load i8*, i8** %234
%236 = call i64 @strcmp(i8* %230, i8* %235)
%237 = icmp ne i64 %236, 0
br i1 %237, label %247, label %238
238: ; preds = %229
%239 = getelementptr inbounds [21 x i8], [21 x i8]* %22, i64 0, i64 0
%240 = load i64, i64* %20
%241 = sub i64 %240, 1
%242 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* @main.ok, i64 0, i64 %241
%243 = getelementptr inbounds %struct.anon, %struct.anon* %242, i32 0, i32 2
%244 = load i8*, i8** %243
%245 = call i64 @strcmp(i8* %239, i8* %244)
%246 = icmp ne i64 %245, 0
br i1 %246, label %247, label %250
247: ; preds = %238, %229, %221, %198
%248 = load i32*, i32** @stdout
%249 = call i32 @fputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32* %248)
store i32 1, i32* %11
br label %250
250: ; preds = %247, %238
br label %180
251: ; preds = %189
%252 = getelementptr inbounds i8, i8* %37, i64 0
store i8 0, i8* %252
%253 = load i32*, i32** %9
%254 = trunc i64 %35 to i32
%255 = load i32*, i32** %8
%256 = call i8* @fgets(i8* %37, i32 %254, i32* %255)
%257 = call i32 (i32*, i8*, ...) @fprintf(i32* %253, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.20, i64 0, i64 0), i8* %256)
%258 = call i64 @strcmp(i8* %37, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.31, i64 0, i64 0))
%259 = icmp ne i64 %258, 0
br i1 %259, label %260, label %263
260: ; preds = %251
%261 = load i32*, i32** @stdout
%262 = call i32 @fputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32* %261)
store i32 1, i32* %11
br label %263
263: ; preds = %260, %251
%264 = load i32*, i32** %9
%265 = load i32*, i32** @stdout
%266 = icmp ne i32* %264, %265
br i1 %266, label %267, label %270
267: ; preds = %263
%268 = load i32*, i32** %9
%269 = call i32 @pclose(i32* %268)
br label %270
270: ; preds = %267, %263
%271 = load i32*, i32** %9
%272 = call i32 @fputs(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.39, i64 0, i64 0), i32* %271)
%273 = call i32 (i8*, i8*, ...) @sscanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.40, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.41, i64 0, i64 0), i32* %26, i32* %27)
store i32 %273, i32* %25
%274 = load i32, i32* %25
%275 = load i32, i32* %26
%276 = load i32, i32* %27
%277 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.42, i64 0, i64 0), i32 %274, i32 %275, i32 %276)
%278 = load i32, i32* %25
%279 = icmp ne i32 %278, 1
br i1 %279, label %286, label %280
280: ; preds = %270
%281 = load i32, i32* %26
%282 = icmp ne i32 %281, -20
br i1 %282, label %286, label %283
283: ; preds = %280
%284 = load i32, i32* %27
%285 = icmp ne i32 %284, 3
br i1 %285, label %286, label %289
286: ; preds = %283, %280, %270
%287 = load i32*, i32** @stdout
%288 = call i32 @fputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32* %287)
store i32 1, i32* %11
br label %289
289: ; preds = %286, %283
%290 = load i32*, i32** %9
%291 = call i32 @fputs(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.43, i64 0, i64 0), i32* %290)
store double 0.000000e+00, double* %28
store double 0.000000e+00, double* %29
%292 = call i32 (i8*, i8*, ...) @sscanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.44, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.45, i64 0, i64 0), double* %28, double* %29, i32* %31)
store i32 %292, i32* %30
%293 = load i32, i32* %30
%294 = load double, double* %28
%295 = load double, double* %29
%296 = load i32, i32* %31
%297 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.46, i64 0, i64 0), i32 %293, double %294, double %295, i32 %296)
%298 = load i32, i32* %30
%299 = icmp ne i32 %298, 2
br i1 %299, label %309, label %300
300: ; preds = %289
%301 = load double, double* %28
%302 = fcmp une double %301, 1.230000e+02
br i1 %302, label %309, label %303
303: ; preds = %300
%304 = load double, double* %29
%305 = fcmp une double %304, 4.560000e+02
br i1 %305, label %309, label %306
306: ; preds = %303
%307 = load i32, i32* %31
%308 = icmp ne i32 %307, 6
br i1 %308, label %309, label %312
309: ; preds = %306, %303, %300, %289
%310 = load i32*, i32** @stdout
%311 = call i32 @fputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32* %310)
store i32 1, i32* %11
br label %312
312: ; preds = %309, %306
%313 = call i32 (i8*, i8*, ...) @sscanf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.47, i64 0, i64 0), double* %28)
store i32 %313, i32* %30
%314 = load i32, i32* %30
%315 = load double, double* %28
%316 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.48, i64 0, i64 0), i32 %314, double %315)
%317 = load i32, i32* %30
%318 = icmp ne i32 %317, 1
br i1 %318, label %322, label %319
319: ; preds = %312
%320 = load double, double* %28
%321 = fcmp une double %320, 0.000000e+00
br i1 %321, label %322, label %325
322: ; preds = %319, %312
%323 = load i32*, i32** @stdout
%324 = call i32 @fputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32* %323)
store i32 1, i32* %11
br label %325
325: ; preds = %322, %319
%326 = call i32 (i8*, i8*, ...) @sscanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.49, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.50, i64 0, i64 0), double* %28, i32* %31)
store i32 %326, i32* %30
%327 = load i32, i32* %30
%328 = load double, double* %28
%329 = load i32, i32* %31
%330 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.51, i64 0, i64 0), i32 %327, double %328, i32 %329)
%331 = load i32, i32* %30
%332 = icmp ne i32 %331, 1
br i1 %332, label %339, label %333
333: ; preds = %325
%334 = load double, double* %28
%335 = fcmp une double %334, 1.000000e+03
br i1 %335, label %339, label %336
336: ; preds = %333
%337 = load i32, i32* %31
%338 = icmp ne i32 %337, 3
br i1 %338, label %339, label %342
339: ; preds = %336, %333, %325
%340 = load i32*, i32** @stdout
%341 = call i32 @fputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32* %340)
store i32 1, i32* %11
br label %342
342: ; preds = %339, %336
%343 = load i32*, i32** @stdout
%344 = call i32 @fputs(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.52, i64 0, i64 0), i32* %343)
store i8* inttoptr (i64 -1 to i8*), i8** %32
%345 = call i32 @sprintf(i8* %37, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.53, i64 0, i64 0), i8* null)
%346 = call i32 (i8*, i8*, ...) @sscanf(i8* %37, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.53, i64 0, i64 0), i8** %32)
store i32 %346, i32* %33
%347 = load i32, i32* %33
%348 = load i8*, i8** %32
%349 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.54, i64 0, i64 0), i8* %37, i32 %347, i8* %348)
%350 = load i32, i32* %33
%351 = icmp ne i32 %350, 1
br i1 %351, label %355, label %352
352: ; preds = %342
%353 = load i8*, i8** %32
%354 = icmp ne i8* %353, null
br i1 %354, label %355, label %358
355: ; preds = %352, %342
%356 = load i32*, i32** @stdout
%357 = call i32 @fputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32* %356)
store i32 1, i32* %11
br label %358
358: ; preds = %355, %352
%359 = load i32, i32* %11
%360 = call i32 @exit(i32 %359)
unreachable
}

LLVM IR (-O2):
%struct.anon = type { i32, float, i8*, i8* }
@BUFSIZ = global i32 0
@stdin = global i32* null
@stdout = global i32* null
@.str = [2 x i8] c"0\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [14 x i8] c"test failed!\0A\00"
@.str.3 = [30 x i8] c"conversion] Zero flag Ze]ro#\0A\00"
@.str.4 = [14 x i8] c"%*[^]] %[^#]\0A\00"
@.str.5 = [18 x i8] c"] Zero flag Ze]ro\00"
@.str.6 = [7 x i8] c"-opipe\00"
@.str.7 = [9 x i8] c"/bin/cat\00"
@.str.8 = [2 x i8] c"w\00"
@.str.9 = [16 x i8] c"popen: /bin/cat\00"
@.str.10 = [7 x i8] c"-ipipe\00"
@.str.11 = [12 x i8] c"/bin/cat %s\00"
@.str.12 = [2 x i8] c"r\00"
@.str.13 = [54 x i8] c"sscanf (\22thompson\22, \22%%s\22, name) == %d, name == \22%s\22\0A\00"
@.str.14 = [9 x i8] c"thompson\00"
@.str.15 = [3 x i8] c"%s\00"
@.str.16 = [25 x i8] c"Testing scanf (vfscanf)\0A\00"
@.str.17 = [9 x i8] c"Test 1:\0A\00"
@.str.18 = [7 x i8] c"%d%f%s\00"
@.str.19 = [40 x i8] c"n = %d, i = %d, x = %f, name = \22%.50s\22\0A\00"
@.str.20 = [16 x i8] c"Residual: \22%s\22\0A\00"
@.str.21 = [2 x i8] c"\0A\00"
@.str.22 = [9 x i8] c"Test 2:\0A\00"
@.str.23 = [23 x i8] c"%2d%f%*d %[0123456789]\00"
@.str.24 = [32 x i8] c"i = %d, x = %f, name = \22%.50s\22\0A\00"
@.str.25 = [3 x i8] c"56\00"
@.str.26 = [5 x i8] c"a72\0A\00"
@.str.27 = [9 x i8] c"Test 3:\0A\00"
@main.ok = internal unnamed_addr constant [6 x %struct.anon] [%struct.anon { i32 3, float 2.000000e+00, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.28, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.29, i32 0, i32 0) }, %struct.anon { i32 2, float 0xC0299999A0000000, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.30, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.31, i32 0, i32 0) }, %struct.anon { i32 0, float 0.000000e+00, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.31, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.31, i32 0, i32 0) }, %struct.anon { i32 3, float 1.000000e+01, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.32, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.33, i32 0, i32 0) }, %struct.anon { i32 3, float 1.000000e+02, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.34, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.35, i32 0, i32 0) }, %struct.anon { i32 -1, float 0.000000e+00, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.31, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.31, i32 0, i32 0) }]
@.str.28 = [7 x i8] c"quarts\00"
@.str.29 = [4 x i8] c"oil\00"
@.str.30 = [8 x i8] c"degrees\00"
@.str.31 = [1 x i8] zeroinitializer
@.str.32 = [4 x i8] c"LBS\00"
@.str.33 = [11 x i8] c"fertilizer\00"
@.str.34 = [4 x i8] c"rgs\00"
@.str.35 = [7 x i8] c"energy\00"
@.str.36 = [15 x i8] c"%f%20s of %20s\00"
@.str.37 = [7 x i8] c"%*[^\0A]\00"
@.str.38 = [53 x i8] c"count = %d, quant = %f, item = %.21s, units = %.21s\0A\00"
@.str.39 = [9 x i8] c"Test 4:\0A\00"
@.str.40 = [5 x i8] c"-242\00"
@.str.41 = [6 x i8] c"%3o%n\00"
@.str.42 = [28 x i8] c"res = %d, val = %d, n = %d\0A\00"
@.str.43 = [9 x i8] c"Test 5:\0A\00"
@.str.44 = [8 x i8] c"1234567\00"
@.str.45 = [11 x i8] c"%3lg%3lg%n\00"
@.str.46 = [34 x i8] c"res = %d, a = %g, b = %g, n = %d\0A\00"
@.str.47 = [4 x i8] c"%lg\00"
@.str.48 = [18 x i8] c"res = %d, a = %g\0A\00"
@.str.49 = [4 x i8] c"1e3\00"
@.str.50 = [6 x i8] c"%lg%n\00"
@.str.51 = [26 x i8] c"res = %d, a = %g, n = %d\0A\00"
@.str.52 = [9 x i8] c"Test 6:\0A\00"
@.str.53 = [3 x i8] c"%p\00"
@.str.54 = [40 x i8] c"sscanf (\22%s\22, \22%%p\22, &p) = %d, p == %p\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca [50 x i8]
%5 = alloca i32
%6 = alloca float
%7 = alloca [50 x i8]
%8 = alloca i32
%9 = alloca float
%10 = alloca [50 x i8]
%11 = alloca float
%12 = alloca [21 x i8]
%13 = alloca [21 x i8]
%14 = alloca i32
%15 = alloca i32
%16 = alloca double
%17 = alloca double
%18 = alloca i32
%19 = alloca i8*
%20 = load i32, i32* @BUFSIZ
%21 = zext i32 %20 to i64
%22 = alloca i8, i64 %21
%23 = load i32*, i32** @stdin
%24 = load i32*, i32** @stdout
%25 = bitcast i32* %3 to i8*
%26 = call i32 (i8*, i8*, ...) @sscanf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%27 = icmp eq i32 %26, 1
br i1 %27, label %31, label %28
28: ; preds = %2
%29 = load i32*, i32** @stdout
%30 = call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i64 13, i64 1, i32* %29)
br label %31
31: ; preds = %28, %2
%32 = phi i32 [ 1, %28 ], [ 0, %2 ]
%33 = call i32 (i8*, i8*, ...) @sscanf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i8* %22)
%34 = call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0))
%35 = icmp eq i64 %34, 0
br i1 %35, label %39, label %36
36: ; preds = %31
%37 = load i32*, i32** @stdout
%38 = call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i64 13, i64 1, i32* %37)
br label %39
39: ; preds = %36, %31
%40 = phi i32 [ 1, %36 ], [ %32, %31 ]
switch i32 %0, label %64 [
i32 2, label %41
i32 3, label %49
]
41: ; preds = %39
%42 = getelementptr inbounds i8*, i8** %1, i64 1
%43 = load i8*, i8** %42
%44 = call i64 @strcmp(i8* %43, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %64
46: ; preds = %41
%47 = call i32* @popen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%48 = icmp eq i32* %47, null
br i1 %48, label %60, label %64
49: ; preds = %39
%50 = getelementptr inbounds i8*, i8** %1, i64 1
%51 = load i8*, i8** %50
%52 = call i64 @strcmp(i8* %51, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%53 = icmp eq i64 %52, 0
br i1 %53, label %54, label %64
54: ; preds = %49
%55 = getelementptr inbounds i8*, i8** %1, i64 2
%56 = load i8*, i8** %55
%57 = call i32 @sprintf(i8* %22, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0), i8* %56)
%58 = call i32* @popen(i8* %22, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
%59 = icmp eq i32* %58, null
br i1 %59, label %60, label %64
60: ; preds = %54, %46
%61 = phi i32* [ null, %46 ], [ %24, %54 ]
%62 = phi i32* [ %23, %46 ], [ null, %54 ]
%63 = call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0))
br label %64
64: ; preds = %60, %41, %39, %49, %54, %46
%65 = phi i32 [ %40, %49 ], [ %40, %54 ], [ %40, %46 ], [ %40, %39 ], [ %40, %41 ], [ 1, %60 ]
%66 = phi i32* [ %24, %49 ], [ %24, %54 ], [ %47, %46 ], [ %24, %39 ], [ %24, %41 ], [ %61, %60 ]
%67 = phi i32* [ %23, %49 ], [ %58, %54 ], [ %23, %46 ], [ %23, %39 ], [ %23, %41 ], [ %62, %60 ]
%68 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
%69 = call i32 (i8*, i8*, ...) @sscanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* %68)
%70 = call i32 (i32*, i8*, ...) @fprintf(i32* %66, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.13, i64 0, i64 0), i32 %69, i8* %68)
%71 = call i64 @strcmp(i8* %68, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0))
%72 = icmp eq i64 %71, 0
br i1 %72, label %76, label %73
73: ; preds = %64
%74 = load i32*, i32** @stdout
%75 = call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i64 13, i64 1, i32* %74)
br label %76
76: ; preds = %73, %64
%77 = phi i32 [ 1, %73 ], [ %65, %64 ]
%78 = call i64 @fwrite(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.16, i64 0, i64 0), i64 24, i64 1, i32* %66)
%79 = call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0), i64 8, i64 1, i32* %66)
%80 = bitcast i32* %5 to i8*
%81 = bitcast float* %6 to i8*
%82 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%83 = call i32 (i32*, i8*, ...) @fscanf(i32* %67, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i64 0, i64 0), i32* %5, float* %6, i8* %82)
%84 = load i32, i32* %5
%85 = load float, float* %6
%86 = fpext float %85 to double
%87 = call i32 (i32*, i8*, ...) @fprintf(i32* %66, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.19, i64 0, i64 0), i32 %83, i32 %84, double %86, i8* %82)
%88 = icmp ne i32 %83, 3
%89 = load i32, i32* %5
%90 = icmp ne i32 %89, 25
%91 = select i1 %88, i1 true, i1 %90
%92 = load float, float* %6
%93 = fcmp une float %92, 0x4015BA5E40000000
%94 = select i1 %91, i1 true, i1 %93
br i1 %94, label %98, label %95
95: ; preds = %76
%96 = call i64 @strcmp(i8* %82, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0))
%97 = icmp eq i64 %96, 0
br i1 %97, label %101, label %98
98: ; preds = %95, %76
%99 = load i32*, i32** @stdout
%100 = call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i64 13, i64 1, i32* %99)
br label %101
101: ; preds = %98, %95
%102 = phi i32 [ 1, %98 ], [ %77, %95 ]
%103 = call i8* @fgets(i8* %22, i32 %20, i32* %67)
%104 = call i32 (i32*, i8*, ...) @fprintf(i32* %66, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.20, i64 0, i64 0), i8* %103)
%105 = call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i64 0, i64 0))
%106 = icmp eq i64 %105, 0
br i1 %106, label %110, label %107
107: ; preds = %101
%108 = load i32*, i32** @stdout
%109 = call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i64 13, i64 1, i32* %108)
br label %110
110: ; preds = %107, %101
%111 = phi i32 [ 1, %107 ], [ %102, %101 ]
%112 = call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.22, i64 0, i64 0), i64 8, i64 1, i32* %66)
%113 = bitcast i32* %8 to i8*
%114 = bitcast float* %9 to i8*
%115 = getelementptr inbounds [50 x i8], [50 x i8]* %10, i64 0, i64 0
%116 = call i32 (i32*, i8*, ...) @fscanf(i32* %67, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.23, i64 0, i64 0), i32* %8, float* %9, i8* %115)
%117 = load i32, i32* %8
%118 = load float, float* %9
%119 = fpext float %118 to double
%120 = call i32 (i32*, i8*, ...) @fprintf(i32* %66, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.24, i64 0, i64 0), i32 %117, double %119, i8* %115)
%121 = load i32, i32* %8
%122 = icmp ne i32 %121, 56
%123 = load float, float* %9
%124 = fcmp une float %123, 7.890000e+02
%125 = select i1 %122, i1 true, i1 %124
br i1 %125, label %129, label %126
126: ; preds = %110
%127 = call i64 @strcmp(i8* %115, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.25, i64 0, i64 0))
%128 = icmp eq i64 %127, 0
br i1 %128, label %132, label %129
129: ; preds = %126, %110
%130 = load i32*, i32** @stdout
%131 = call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i64 13, i64 1, i32* %130)
br label %132
132: ; preds = %129, %126
%133 = phi i32 [ 1, %129 ], [ %111, %126 ]
%134 = call i8* @fgets(i8* %22, i32 %20, i32* %67)
%135 = call i32 (i32*, i8*, ...) @fprintf(i32* %66, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.20, i64 0, i64 0), i8* %134)
%136 = call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.26, i64 0, i64 0))
%137 = icmp eq i64 %136, 0
br i1 %137, label %141, label %138
138: ; preds = %132
%139 = load i32*, i32** @stdout
%140 = call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i64 13, i64 1, i32* %139)
br label %141
141: ; preds = %138, %132
%142 = phi i32 [ 1, %138 ], [ %133, %132 ]
%143 = call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.27, i64 0, i64 0), i64 8, i64 1, i32* %66)
%144 = bitcast float* %11 to i8*
%145 = getelementptr inbounds [21 x i8], [21 x i8]* %12, i64 0, i64 0
%146 = getelementptr inbounds [21 x i8], [21 x i8]* %13, i64 0, i64 0
%147 = call i32 @feof(i32* %67)
%148 = icmp eq i32 %147, 0
br i1 %148, label %149, label %192
149: ; preds = %141, %188
%150 = phi i32 [ %189, %188 ], [ %142, %141 ]
%151 = phi i64 [ %155, %188 ], [ 0, %141 ]
%152 = call i32 @ferror(i32* %67)
%153 = icmp eq i32 %152, 0
br i1 %153, label %154, label %192
154: ; preds = %149
%155 = add i64 %151, 1
%156 = icmp ugt i64 %151, 5
br i1 %156, label %157, label %160
157: ; preds = %154
%158 = load i32*, i32** @stdout
%159 = call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i64 13, i64 1, i32* %158)
br label %160
160: ; preds = %157, %154
%161 = phi i32 [ 1, %157 ], [ %150, %154 ]
store float 0.000000e+00, float* %11
store i8 0, i8* %146
store i8 0, i8* %145
%162 = call i32 (i32*, i8*, ...) @fscanf(i32* %67, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.36, i64 0, i64 0), float* %11, i8* %145, i8* %146)
%163 = call i32 (i32*, i8*, ...) @fscanf(i32* %67, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.37, i64 0, i64 0))
%164 = load float, float* %11
%165 = fpext float %164 to double
%166 = call i32 (i32*, i8*, ...) @fprintf(i32* %66, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.38, i64 0, i64 0), i32 %162, double %165, i8* %146, i8* %145)
%167 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* @main.ok, i64 0, i64 %151, i32 0
%168 = load i32, i32* %167
%169 = icmp eq i32 %162, %168
br i1 %169, label %170, label %185
170: ; preds = %160
%171 = load float, float* %11
%172 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* @main.ok, i64 0, i64 %151, i32 1
%173 = load float, float* %172
%174 = fcmp une float %171, %173
br i1 %174, label %185, label %175
175: ; preds = %170
%176 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* @main.ok, i64 0, i64 %151, i32 3
%177 = load i8*, i8** %176
%178 = call i64 @strcmp(i8* %146, i8* %177)
%179 = icmp eq i64 %178, 0
br i1 %179, label %180, label %185
180: ; preds = %175
%181 = getelementptr inbounds [6 x %struct.anon], [6 x %struct.anon]* @main.ok, i64 0, i64 %151, i32 2
%182 = load i8*, i8** %181
%183 = call i64 @strcmp(i8* %145, i8* %182)
%184 = icmp eq i64 %183, 0
br i1 %184, label %188, label %185
185: ; preds = %180, %175, %170, %160
%186 = load i32*, i32** @stdout
%187 = call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i64 13, i64 1, i32* %186)
br label %188
188: ; preds = %185, %180
%189 = phi i32 [ 1, %185 ], [ %161, %180 ]
%190 = call i32 @feof(i32* %67)
%191 = icmp eq i32 %190, 0
br i1 %191, label %149, label %192
192: ; preds = %149, %188, %141
%193 = phi i32 [ %142, %141 ], [ %189, %188 ], [ %150, %149 ]
store i8 0, i8* %22
%194 = call i8* @fgets(i8* %22, i32 %20, i32* %67)
%195 = call i32 (i32*, i8*, ...) @fprintf(i32* %66, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.20, i64 0, i64 0), i8* %194)
%196 = call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.31, i64 0, i64 0))
%197 = icmp eq i64 %196, 0
br i1 %197, label %201, label %198
198: ; preds = %192
%199 = load i32*, i32** @stdout
%200 = call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i64 13, i64 1, i32* %199)
br label %201
201: ; preds = %198, %192
%202 = phi i32 [ 1, %198 ], [ %193, %192 ]
%203 = load i32*, i32** @stdout
%204 = icmp eq i32* %66, %203
br i1 %204, label %207, label %205
205: ; preds = %201
%206 = call i32 @pclose(i32* %66)
br label %207
207: ; preds = %205, %201
%208 = call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.39, i64 0, i64 0), i64 8, i64 1, i32* %66)
%209 = bitcast i32* %14 to i8*
%210 = bitcast i32* %15 to i8*
%211 = call i32 (i8*, i8*, ...) @sscanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.40, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.41, i64 0, i64 0), i32* %14, i32* %15)
%212 = load i32, i32* %14
%213 = load i32, i32* %15
%214 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.42, i64 0, i64 0), i32 %211, i32 %212, i32 %213)
%215 = icmp ne i32 %211, 1
%216 = load i32, i32* %14
%217 = icmp ne i32 %216, -20
%218 = select i1 %215, i1 true, i1 %217
%219 = load i32, i32* %15
%220 = icmp ne i32 %219, 3
%221 = select i1 %218, i1 true, i1 %220
br i1 %221, label %222, label %225
222: ; preds = %207
%223 = load i32*, i32** @stdout
%224 = call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i64 13, i64 1, i32* %223)
br label %225
225: ; preds = %207, %222
%226 = phi i32 [ 1, %222 ], [ %202, %207 ]
%227 = call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.43, i64 0, i64 0), i64 8, i64 1, i32* %66)
%228 = bitcast double* %16 to i8*
store double 0.000000e+00, double* %16
%229 = bitcast double* %17 to i8*
store double 0.000000e+00, double* %17
%230 = bitcast i32* %18 to i8*
%231 = call i32 (i8*, i8*, ...) @sscanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.44, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.45, i64 0, i64 0), double* %16, double* %17, i32* %18)
%232 = load double, double* %16
%233 = load double, double* %17
%234 = load i32, i32* %18
%235 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.46, i64 0, i64 0), i32 %231, double %232, double %233, i32 %234)
%236 = icmp ne i32 %231, 2
%237 = load double, double* %16
%238 = fcmp une double %237, 1.230000e+02
%239 = select i1 %236, i1 true, i1 %238
%240 = load double, double* %17
%241 = fcmp une double %240, 4.560000e+02
%242 = select i1 %239, i1 true, i1 %241
%243 = load i32, i32* %18
%244 = icmp ne i32 %243, 6
%245 = select i1 %242, i1 true, i1 %244
br i1 %245, label %246, label %249
246: ; preds = %225
%247 = load i32*, i32** @stdout
%248 = call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i64 13, i64 1, i32* %247)
br label %249
249: ; preds = %225, %246
%250 = phi i32 [ 1, %246 ], [ %226, %225 ]
%251 = call i32 (i8*, i8*, ...) @sscanf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.47, i64 0, i64 0), double* %16)
%252 = load double, double* %16
%253 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.48, i64 0, i64 0), i32 %251, double %252)
%254 = icmp ne i32 %251, 1
%255 = load double, double* %16
%256 = fcmp une double %255, 0.000000e+00
%257 = select i1 %254, i1 true, i1 %256
br i1 %257, label %258, label %261
258: ; preds = %249
%259 = load i32*, i32** @stdout
%260 = call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i64 13, i64 1, i32* %259)
br label %261
261: ; preds = %249, %258
%262 = phi i32 [ 1, %258 ], [ %250, %249 ]
%263 = call i32 (i8*, i8*, ...) @sscanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.49, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.50, i64 0, i64 0), double* %16, i32* %18)
%264 = load double, double* %16
%265 = load i32, i32* %18
%266 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.51, i64 0, i64 0), i32 %263, double %264, i32 %265)
%267 = icmp ne i32 %263, 1
%268 = load double, double* %16
%269 = fcmp une double %268, 1.000000e+03
%270 = select i1 %267, i1 true, i1 %269
%271 = load i32, i32* %18
%272 = icmp ne i32 %271, 3
%273 = select i1 %270, i1 true, i1 %272
br i1 %273, label %274, label %277
274: ; preds = %261
%275 = load i32*, i32** @stdout
%276 = call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i64 13, i64 1, i32* %275)
br label %277
277: ; preds = %261, %274
%278 = phi i32 [ 1, %274 ], [ %262, %261 ]
%279 = load i32*, i32** @stdout
%280 = call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.52, i64 0, i64 0), i64 8, i64 1, i32* %279)
%281 = bitcast i8** %19 to i8*
store i8* inttoptr (i64 -1 to i8*), i8** %19
%282 = call i32 @sprintf(i8* %22, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.53, i64 0, i64 0), i8* null)
%283 = call i32 (i8*, i8*, ...) @sscanf(i8* %22, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.53, i64 0, i64 0), i8** %19)
%284 = load i8*, i8** %19
%285 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.54, i64 0, i64 0), i8* %22, i32 %283, i8* %284)
%286 = icmp ne i32 %283, 1
%287 = load i8*, i8** %19
%288 = icmp ne i8* %287, null
%289 = select i1 %286, i1 true, i1 %288
br i1 %289, label %290, label %293
290: ; preds = %277
%291 = load i32*, i32** @stdout
%292 = call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i64 13, i64 1, i32* %291)
br label %293
293: ; preds = %277, %290
%294 = phi i32 [ 1, %290 ], [ %278, %277 ]
%295 = call i32 @exit(i32 %294)
unreachable
}