#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int calculate(int, int, int, int, int, int, int, int, int *, int *, int *,
              int *, int *);
int /*<<< orphan*/ printf(char *, ...);
int conf_clock(int xin, int target_clock, int ppm) {
  int pdf, s, mfn, mfd, mfi;
  int dpref, dpgdck, jdbck, gclk2, xout, dbrmo;
  int found = 0;
  for (pdf = 0; pdf <= 15; pdf++) {
    for (mfi = 5; mfi <= 15; mfi++) {
      for (s = 0; s <= 2; s++) {
        xout = calculate(xin, target_clock, ppm, pdf, mfi, 0, 0, s, &dpref,
                         &dpgdck, &jdbck, &gclk2, &dbrmo);
        if (xout < 0)
          continue;
        if (found == 0) {
          printf("pdf mfi mfn mfd s dbrmo     dpref    dpgdck     jdbck     "
                 "gclk2 exact?\n");
          printf("--- --- --- --- - -----     -----    ------     -----     "
                 "----- ------\n");
        }
        printf("%3d %3d --- --- %1d %5d %9d %9d %9d %9d%s\n", pdf, mfi, s,
               dbrmo, dpref, dpgdck, jdbck, gclk2,
               gclk2 == target_clock ? "    YES" : "");
        found++;
      }
    }
  }
  for (pdf = 0; pdf <= 15; pdf++) {
    for (mfi = 5; mfi <= 15; mfi++) {
      for (mfn = 1; mfn <= 15; mfn++) {
        for (mfd = 1; mfd <= 31; mfd++) {
          for (s = 0; s <= 2; s++) {
            xout = calculate(xin, target_clock, ppm, pdf, mfi, mfn, mfd, s,
                             &dpref, &dpgdck, &jdbck, &gclk2, &dbrmo);
            if (xout < 0)
              continue;
            if (found == 0) {
              printf("pdf mfi mfn mfd s dbrmo     dpref    dpgdck     jdbck    "
                     " gclk2 exact?\n");
              printf("--- --- --- --- - -----     -----    ------     -----    "
                     " ----- ------\n");
            }
            printf("%3d %3d %3d %3d %1d %5d %9d %9d %9d %9d%s\n", pdf, mfi, mfn,
                   mfd, s, dbrmo, dpref, dpgdck, jdbck, gclk2,
                   gclk2 == target_clock ? "    YES" : "");
            found++;
          }
        }
      }
    }
  }
  return found;
}


x86 assembly (clang, -O0):
<conf_clock>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %edi,-0x2c(%rbp)
mov    %esi,-0x30(%rbp)
mov    %edx,-0x34(%rbp)
movl   $0x0,-0x64(%rbp)
movl   $0x0,-0x38(%rbp)
cmpl   $0xf,-0x38(%rbp)
jg     1297 <conf_clock+0x177>
movl   $0x5,-0x48(%rbp)
cmpl   $0xf,-0x48(%rbp)
jg     1284 <conf_clock+0x164>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x2,-0x3c(%rbp)
jg     1271 <conf_clock+0x151>
mov    -0x2c(%rbp),%edi
mov    -0x30(%rbp),%esi
mov    -0x34(%rbp),%edx
mov    -0x38(%rbp),%ecx
mov    -0x48(%rbp),%r8d
mov    -0x3c(%rbp),%r15d
xor    %r9d,%r9d
lea    -0x4c(%rbp),%r14
lea    -0x50(%rbp),%rbx
lea    -0x54(%rbp),%r11
lea    -0x58(%rbp),%r10
lea    -0x60(%rbp),%rax
movl   $0x0,(%rsp)
mov    %r15d,0x8(%rsp)
mov    %r14,0x10(%rsp)
mov    %rbx,0x18(%rsp)
mov    %r11,0x20(%rsp)
mov    %r10,0x28(%rsp)
mov    %rax,0x30(%rsp)
call   1040 <calculate@plt>
mov    %eax,-0x5c(%rbp)
cmpl   $0x0,-0x5c(%rbp)
jge    11db <conf_clock+0xbb>
jmp    1263 <conf_clock+0x143>
cmpl   $0x0,-0x64(%rbp)
jne    1201 <conf_clock+0xe1>
lea    0xe14(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%esi
mov    -0x48(%rbp),%edx
mov    -0x3c(%rbp),%ecx
mov    -0x60(%rbp),%r8d
mov    -0x4c(%rbp),%r9d
mov    -0x50(%rbp),%ebx
mov    -0x54(%rbp),%r11d
mov    -0x58(%rbp),%r10d
mov    -0x58(%rbp),%r14d
mov    -0x30(%rbp),%r15d
lea    0xe63(%rip),%rax
lea    0xe88(%rip),%rdi
cmp    %r15d,%r14d
cmove  %rdi,%rax
lea    0xe4f(%rip),%rdi
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    116a <conf_clock+0x4a>
jmp    1276 <conf_clock+0x156>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1159 <conf_clock+0x39>
jmp    1289 <conf_clock+0x169>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1148 <conf_clock+0x28>
movl   $0x0,-0x38(%rbp)
cmpl   $0xf,-0x38(%rbp)
jg     1449 <conf_clock+0x329>
movl   $0x5,-0x48(%rbp)
cmpl   $0xf,-0x48(%rbp)
jg     1436 <conf_clock+0x316>
movl   $0x1,-0x40(%rbp)
cmpl   $0xf,-0x40(%rbp)
jg     1423 <conf_clock+0x303>
movl   $0x1,-0x44(%rbp)
cmpl   $0x1f,-0x44(%rbp)
jg     1410 <conf_clock+0x2f0>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x2,-0x3c(%rbp)
jg     13fd <conf_clock+0x2dd>
mov    -0x2c(%rbp),%edi
mov    -0x30(%rbp),%esi
mov    -0x34(%rbp),%edx
mov    -0x38(%rbp),%ecx
mov    -0x48(%rbp),%r8d
mov    -0x40(%rbp),%r9d
mov    -0x44(%rbp),%r12d
mov    -0x3c(%rbp),%r15d
lea    -0x4c(%rbp),%r14
lea    -0x50(%rbp),%rbx
lea    -0x54(%rbp),%r11
lea    -0x58(%rbp),%r10
lea    -0x60(%rbp),%rax
mov    %r12d,(%rsp)
mov    %r15d,0x8(%rsp)
mov    %r14,0x10(%rsp)
mov    %rbx,0x18(%rsp)
mov    %r11,0x20(%rsp)
mov    %r10,0x28(%rsp)
mov    %rax,0x30(%rsp)
call   1040 <calculate@plt>
mov    %eax,-0x5c(%rbp)
cmpl   $0x0,-0x5c(%rbp)
jge    1355 <conf_clock+0x235>
jmp    13ef <conf_clock+0x2cf>
cmpl   $0x0,-0x64(%rbp)
jne    137b <conf_clock+0x25b>
lea    0xc9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xcd4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%esi
mov    -0x48(%rbp),%edx
mov    -0x40(%rbp),%ecx
mov    -0x44(%rbp),%r8d
mov    -0x3c(%rbp),%r9d
mov    -0x60(%rbp),%r15d
mov    -0x4c(%rbp),%r14d
mov    -0x50(%rbp),%ebx
mov    -0x54(%rbp),%r11d
mov    -0x58(%rbp),%r10d
mov    -0x58(%rbp),%r12d
mov    -0x30(%rbp),%r13d
lea    0xce1(%rip),%rax
lea    0xd06(%rip),%rdi
cmp    %r13d,%r12d
cmove  %rdi,%rax
lea    0xd00(%rip),%rdi
mov    %r15d,(%rsp)
mov    %r14d,0x8(%rsp)
mov    %ebx,0x10(%rsp)
mov    %r11d,0x18(%rsp)
mov    %r10d,0x20(%rsp)
mov    %rax,0x28(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    12e2 <conf_clock+0x1c2>
jmp    1402 <conf_clock+0x2e2>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    12d1 <conf_clock+0x1b1>
jmp    1415 <conf_clock+0x2f5>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    12c0 <conf_clock+0x1a0>
jmp    1428 <conf_clock+0x308>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    12af <conf_clock+0x18f>
jmp    143b <conf_clock+0x31b>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    129e <conf_clock+0x17e>
mov    -0x64(%rbp),%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<conf_clock>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %edx,0x20(%rsp)
mov    %esi,%ebx
mov    %edi,0x1c(%rsp)
xor    %ebp,%ebp
xor    %r13d,%r13d
jmp    115e <conf_clock+0x2e>
nop
add    $0x1,%r13d
cmp    $0x10,%r13d
je     13c0 <conf_clock+0x290>
mov    $0x5,%r14d
jmp    11d7 <conf_clock+0xa7>
cs nopw 0x0(%rax,%rax,1)
mov    0x8(%rsp),%r8d
mov    0x18(%rsp),%r9d
mov    0x14(%rsp),%r10d
mov    0x10(%rsp),%r11d
mov    0xc(%rsp),%r12d
cmp    %ebx,%r12d
lea    0xe97(%rip),%rbp
lea    0xe91(%rip),%rax
cmove  %rax,%rbp
lea    0xe5b(%rip),%rdi
mov    %r13d,%esi
mov    %r14d,%edx
mov    $0x2,%ecx
xor    %eax,%eax
push   %rbp
push   %r12
push   %r11
push   %r10
call   1040 <printf@plt>
add    $0x20,%rsp
add    $0x1,%r15d
mov    %r15d,%ebp
add    $0x1,%r14d
cmp    $0x10,%r14d
je     1150 <conf_clock+0x20>
sub    $0x8,%rsp
mov    0x24(%rsp),%edi
mov    %ebx,%esi
mov    0x28(%rsp),%edx
mov    %r13d,%ecx
mov    %r14d,%r8d
xor    %r9d,%r9d
lea    0x10(%rsp),%rax
push   %rax
lea    0x1c(%rsp),%rax
push   %rax
lea    0x28(%rsp),%rax
push   %rax
lea    0x34(%rsp),%rax
push   %rax
lea    0x40(%rsp),%rax
push   %rax
push   $0x0
push   $0x0
call   1050 <calculate@plt>
add    $0x40,%rsp
test   %eax,%eax
js     1290 <conf_clock+0x160>
test   %ebp,%ebp
mov    %ebp,%r15d
jne    123c <conf_clock+0x10c>
lea    0xe33(%rip),%rdi
call   1030 <puts@plt>
lea    0xe6e(%rip),%rdi
call   1030 <puts@plt>
mov    0x8(%rsp),%r8d
mov    0x18(%rsp),%r9d
mov    0x14(%rsp),%r10d
mov    0x10(%rsp),%r11d
mov    0xc(%rsp),%ebp
cmp    %ebx,%ebp
lea    0xdcd(%rip),%r12
lea    0xdc7(%rip),%rax
cmove  %rax,%r12
lea    0xd91(%rip),%rdi
mov    %r13d,%esi
mov    %r14d,%edx
xor    %ecx,%ecx
xor    %eax,%eax
push   %r12
push   %rbp
push   %r11
push   %r10
call   1040 <printf@plt>
add    $0x20,%rsp
add    $0x1,%r15d
mov    %r15d,%ebp
sub    $0x8,%rsp
mov    0x24(%rsp),%edi
mov    %ebx,%esi
mov    0x28(%rsp),%edx
mov    %r13d,%ecx
mov    %r14d,%r8d
xor    %r9d,%r9d
lea    0x10(%rsp),%rax
push   %rax
lea    0x1c(%rsp),%rax
push   %rax
lea    0x28(%rsp),%rax
push   %rax
lea    0x34(%rsp),%rax
push   %rax
lea    0x40(%rsp),%rax
push   %rax
push   $0x1
push   $0x0
call   1050 <calculate@plt>
add    $0x40,%rsp
test   %eax,%eax
js     134e <conf_clock+0x21e>
test   %ebp,%ebp
mov    %ebp,%r15d
jne    12f5 <conf_clock+0x1c5>
lea    0xd7a(%rip),%rdi
call   1030 <puts@plt>
lea    0xdb5(%rip),%rdi
call   1030 <puts@plt>
mov    0x8(%rsp),%r8d
mov    0x18(%rsp),%r9d
mov    0x14(%rsp),%r10d
mov    0x10(%rsp),%r11d
mov    0xc(%rsp),%r12d
cmp    %ebx,%r12d
lea    0xd12(%rip),%rbp
lea    0xd0c(%rip),%rax
cmove  %rax,%rbp
lea    0xcd6(%rip),%rdi
mov    %r13d,%esi
mov    %r14d,%edx
mov    $0x1,%ecx
xor    %eax,%eax
push   %rbp
push   %r12
push   %r11
push   %r10
call   1040 <printf@plt>
add    $0x20,%rsp
add    $0x1,%r15d
mov    %r15d,%ebp
sub    $0x8,%rsp
mov    0x24(%rsp),%edi
mov    %ebx,%esi
mov    0x28(%rsp),%edx
mov    %r13d,%ecx
mov    %r14d,%r8d
xor    %r9d,%r9d
lea    0x10(%rsp),%rax
push   %rax
lea    0x1c(%rsp),%rax
push   %rax
lea    0x28(%rsp),%rax
push   %rax
lea    0x34(%rsp),%rax
push   %rax
lea    0x40(%rsp),%rax
push   %rax
push   $0x2
push   $0x0
call   1050 <calculate@plt>
add    $0x40,%rsp
test   %eax,%eax
js     11c9 <conf_clock+0x99>
test   %ebp,%ebp
mov    %ebp,%r15d
jne    1170 <conf_clock+0x40>
lea    0xcb4(%rip),%rdi
call   1030 <puts@plt>
lea    0xcef(%rip),%rdi
call   1030 <puts@plt>
jmp    1170 <conf_clock+0x40>
xor    %eax,%eax
mov    %ebx,0x34(%rsp)
mov    0x1c(%rsp),%ebx
jmp    13df <conf_clock+0x2af>
nopl   0x0(%rax)
mov    %r14d,%eax
add    $0x1,%eax
cmp    $0x10,%eax
je     170f <conf_clock+0x5df>
mov    $0x5,%ecx
mov    %eax,%r14d
mov    %eax,0x28(%rsp)
jmp    13fb <conf_clock+0x2cb>
nopl   (%rax)
mov    %r12d,%ecx
add    $0x1,%ecx
cmp    $0x10,%ecx
je     13d0 <conf_clock+0x2a0>
mov    $0x1,%eax
mov    %ecx,%r12d
mov    %ecx,0x2c(%rsp)
jmp    141b <conf_clock+0x2eb>
nopl   0x0(%rax)
mov    %r13d,%eax
add    $0x1,%eax
cmp    $0x10,%eax
je     13f0 <conf_clock+0x2c0>
mov    $0x1,%r15d
mov    %eax,%r13d
mov    %eax,0x30(%rsp)
jmp    14be <conf_clock+0x38e>
nopl   (%rax)
mov    0x8(%rsp),%eax
mov    %rax,0x38(%rsp)
mov    0x18(%rsp),%eax
mov    %rax,0x40(%rsp)
mov    0x14(%rsp),%r10d
mov    0x10(%rsp),%r11d
mov    0xc(%rsp),%ebp
cmp    %ebx,%ebp
lea    0xbd1(%rip),%rbx
lea    0xbcb(%rip),%rax
cmove  %rax,%rbx
lea    0xbc8(%rip),%rdi
mov    0x28(%rsp),%r14d
mov    %r14d,%esi
mov    0x2c(%rsp),%r12d
mov    %r12d,%edx
mov    0x30(%rsp),%r13d
mov    %r13d,%ecx
mov    %r15d,%r8d
mov    $0x2,%r9d
xor    %eax,%eax
push   %rbx
push   %rbp
push   %r11
push   %r10
push   0x60(%rsp)
push   0x60(%rsp)
call   1040 <printf@plt>
add    $0x30,%rsp
mov    0x24(%rsp),%ebp
add    $0x1,%ebp
mov    0x1c(%rsp),%ebx
add    $0x1,%r15d
cmp    $0x20,%r15d
je     1410 <conf_clock+0x2e0>
mov    %ebp,0x24(%rsp)
sub    $0x8,%rsp
mov    %ebx,%ebp
mov    %ebx,%edi
mov    0x3c(%rsp),%ebx
mov    %ebx,%esi
mov    0x28(%rsp),%edx
mov    %r14d,%ecx
mov    %r12d,%r8d
mov    %r13d,%r9d
lea    0x10(%rsp),%rax
push   %rax
lea    0x1c(%rsp),%rax
push   %rax
lea    0x28(%rsp),%rax
push   %rax
lea    0x34(%rsp),%rax
push   %rax
lea    0x40(%rsp),%rax
push   %rax
push   $0x0
push   %r15
call   1050 <calculate@plt>
add    $0x40,%rsp
test   %eax,%eax
js     15b0 <conf_clock+0x480>
mov    0x24(%rsp),%ebp
test   %ebp,%ebp
jne    1530 <conf_clock+0x400>
lea    0xb3f(%rip),%rdi
call   1030 <puts@plt>
lea    0xb7a(%rip),%rdi
call   1030 <puts@plt>
mov    0x8(%rsp),%eax
mov    %rax,0x38(%rsp)
mov    0x18(%rsp),%r11d
mov    0x14(%rsp),%r10d
mov    0x10(%rsp),%r14d
mov    0xc(%rsp),%r13d
mov    0x34(%rsp),%ebx
cmp    %ebx,%r13d
lea    0xacf(%rip),%r12
lea    0xac9(%rip),%rax
cmove  %rax,%r12
lea    0xac6(%rip),%rdi
mov    0x28(%rsp),%esi
mov    0x2c(%rsp),%edx
mov    0x30(%rsp),%ecx
mov    %r15d,%r8d
xor    %r9d,%r9d
xor    %eax,%eax
push   %r12
mov    %edx,%r12d
push   %r13
mov    %ecx,%r13d
push   %r14
mov    %esi,%r14d
push   %r10
push   %r11
push   0x60(%rsp)
call   1040 <printf@plt>
add    $0x30,%rsp
add    $0x1,%ebp
mov    0x1c(%rsp),%edi
jmp    15b6 <conf_clock+0x486>
nopw   0x0(%rax,%rax,1)
mov    %ebp,%edi
mov    0x24(%rsp),%ebp
sub    $0x8,%rsp
mov    %ebx,%esi
mov    0x28(%rsp),%edx
mov    %r14d,%ecx
mov    %r12d,%r8d
mov    %r13d,%r9d
lea    0x10(%rsp),%rax
push   %rax
lea    0x1c(%rsp),%rax
push   %rax
lea    0x28(%rsp),%rax
push   %rax
lea    0x34(%rsp),%rax
push   %rax
lea    0x40(%rsp),%rax
push   %rax
push   $0x1
push   %r15
call   1050 <calculate@plt>
add    $0x40,%rsp
test   %eax,%eax
js     169c <conf_clock+0x56c>
test   %ebp,%ebp
mov    %ebp,0x24(%rsp)
jne    161c <conf_clock+0x4ec>
lea    0xa53(%rip),%rdi
call   1030 <puts@plt>
lea    0xa8e(%rip),%rdi
call   1030 <puts@plt>
mov    0x8(%rsp),%eax
mov    %rax,0x38(%rsp)
mov    0x18(%rsp),%eax
mov    %rax,0x40(%rsp)
mov    0x14(%rsp),%r10d
mov    0x10(%rsp),%r11d
mov    0xc(%rsp),%ebp
cmp    %ebx,%ebp
lea    0x9e5(%rip),%rbx
lea    0x9df(%rip),%rax
cmove  %rax,%rbx
lea    0x9dc(%rip),%rdi
mov    0x28(%rsp),%r14d
mov    %r14d,%esi
mov    0x2c(%rsp),%r12d
mov    %r12d,%edx
mov    0x30(%rsp),%r13d
mov    %r13d,%ecx
mov    %r15d,%r8d
mov    $0x1,%r9d
xor    %eax,%eax
push   %rbx
mov    0x3c(%rsp),%ebx
push   %rbp
push   %r11
push   %r10
push   0x60(%rsp)
push   0x60(%rsp)
call   1040 <printf@plt>
add    $0x30,%rsp
mov    0x24(%rsp),%ebp
add    $0x1,%ebp
mov    0x1c(%rsp),%edi
sub    $0x8,%rsp
mov    %ebx,%esi
mov    0x28(%rsp),%edx
mov    %r14d,%ecx
mov    %r12d,%r8d
mov    %r13d,%r9d
lea    0x10(%rsp),%rax
push   %rax
lea    0x1c(%rsp),%rax
push   %rax
lea    0x28(%rsp),%rax
push   %rax
lea    0x34(%rsp),%rax
push   %rax
lea    0x40(%rsp),%rax
push   %rax
push   $0x2
push   %r15
call   1050 <calculate@plt>
add    $0x40,%rsp
test   %eax,%eax
js     14ac <conf_clock+0x37c>
test   %ebp,%ebp
mov    %ebp,0x24(%rsp)
jne    1430 <conf_clock+0x300>
lea    0x965(%rip),%rdi
call   1030 <puts@plt>
lea    0x9a0(%rip),%rdi
call   1030 <puts@plt>
jmp    1430 <conf_clock+0x300>
mov    %ebp,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [72 x i8] c"pdf mfi mfn mfd s dbrmo dpref dpgdck jdbck gclk2 exact?\0A\00"
@.str.1 = [72 x i8] c"--- --- --- --- - ----- ----- ------ ----- ----- ------\0A\00"
@.str.2 = [43 x i8] c"%3d %3d --- --- %1d %5d %9d %9d %9d %9d%s\0A\00"
@.str.3 = [8 x i8] c" YES\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [43 x i8] c"%3d %3d %3d %3d %1d %5d %9d %9d %9d %9d%s\0A\00"
define i32 @conf_clock(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %18
store i32 0, i32* %7
br label %19
19: ; preds = %72, %3
%20 = load i32, i32* %7
%21 = icmp sle i32 %20, 15
br i1 %21, label %22, label %75
22: ; preds = %19
store i32 5, i32* %11
br label %23
23: ; preds = %68, %22
%24 = load i32, i32* %11
%25 = icmp sle i32 %24, 15
br i1 %25, label %26, label %71
26: ; preds = %23
store i32 0, i32* %8
br label %27
27: ; preds = %64, %26
%28 = load i32, i32* %8
%29 = icmp sle i32 %28, 2
br i1 %29, label %30, label %67
30: ; preds = %27
%31 = load i32, i32* %4
%32 = load i32, i32* %5
%33 = load i32, i32* %6
%34 = load i32, i32* %7
%35 = load i32, i32* %11
%36 = load i32, i32* %8
%37 = call i32 @calculate(i32 %31, i32 %32, i32 %33, i32 %34, i32 %35, i32 0, i32 0, i32 %36, i32* %12, i32* %13, i32* %14, i32* %15, i32* %17)
store i32 %37, i32* %16
%38 = load i32, i32* %16
%39 = icmp slt i32 %38, 0
br i1 %39, label %40, label %41
40: ; preds = %30
br label %64
41: ; preds = %30
%42 = load i32, i32* %18
%43 = icmp eq i32 %42, 0
br i1 %43, label %44, label %47
44: ; preds = %41
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.1, i64 0, i64 0))
br label %47
47: ; preds = %44, %41
%48 = load i32, i32* %7
%49 = load i32, i32* %11
%50 = load i32, i32* %8
%51 = load i32, i32* %17
%52 = load i32, i32* %12
%53 = load i32, i32* %13
%54 = load i32, i32* %14
%55 = load i32, i32* %15
%56 = load i32, i32* %15
%57 = load i32, i32* %5
%58 = icmp eq i32 %56, %57
%59 = zext i1 %58 to i64
%60 = select i1 %58, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0)
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 %48, i32 %49, i32 %50, i32 %51, i32 %52, i32 %53, i32 %54, i32 %55, i8* %60)
%62 = load i32, i32* %18
%63 = add nsw i32 %62, 1
store i32 %63, i32* %18
br label %64
64: ; preds = %47, %40
%65 = load i32, i32* %8
%66 = add nsw i32 %65, 1
store i32 %66, i32* %8
br label %27
67: ; preds = %27
br label %68
68: ; preds = %67
%69 = load i32, i32* %11
%70 = add nsw i32 %69, 1
store i32 %70, i32* %11
br label %23
71: ; preds = %23
br label %72
72: ; preds = %71
%73 = load i32, i32* %7
%74 = add nsw i32 %73, 1
store i32 %74, i32* %7
br label %19
75: ; preds = %19
store i32 0, i32* %7
br label %76
76: ; preds = %149, %75
%77 = load i32, i32* %7
%78 = icmp sle i32 %77, 15
br i1 %78, label %79, label %152
79: ; preds = %76
store i32 5, i32* %11
br label %80
80: ; preds = %145, %79
%81 = load i32, i32* %11
%82 = icmp sle i32 %81, 15
br i1 %82, label %83, label %148
83: ; preds = %80
store i32 1, i32* %9
br label %84
84: ; preds = %141, %83
%85 = load i32, i32* %9
%86 = icmp sle i32 %85, 15
br i1 %86, label %87, label %144
87: ; preds = %84
store i32 1, i32* %10
br label %88
88: ; preds = %137, %87
%89 = load i32, i32* %10
%90 = icmp sle i32 %89, 31
br i1 %90, label %91, label %140
91: ; preds = %88
store i32 0, i32* %8
br label %92
92: ; preds = %133, %91
%93 = load i32, i32* %8
%94 = icmp sle i32 %93, 2
br i1 %94, label %95, label %136
95: ; preds = %92
%96 = load i32, i32* %4
%97 = load i32, i32* %5
%98 = load i32, i32* %6
%99 = load i32, i32* %7
%100 = load i32, i32* %11
%101 = load i32, i32* %9
%102 = load i32, i32* %10
%103 = load i32, i32* %8
%104 = call i32 @calculate(i32 %96, i32 %97, i32 %98, i32 %99, i32 %100, i32 %101, i32 %102, i32 %103, i32* %12, i32* %13, i32* %14, i32* %15, i32* %17)
store i32 %104, i32* %16
%105 = load i32, i32* %16
%106 = icmp slt i32 %105, 0
br i1 %106, label %107, label %108
107: ; preds = %95
br label %133
108: ; preds = %95
%109 = load i32, i32* %18
%110 = icmp eq i32 %109, 0
br i1 %110, label %111, label %114
111: ; preds = %108
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.1, i64 0, i64 0))
br label %114
114: ; preds = %111, %108
%115 = load i32, i32* %7
%116 = load i32, i32* %11
%117 = load i32, i32* %9
%118 = load i32, i32* %10
%119 = load i32, i32* %8
%120 = load i32, i32* %17
%121 = load i32, i32* %12
%122 = load i32, i32* %13
%123 = load i32, i32* %14
%124 = load i32, i32* %15
%125 = load i32, i32* %15
%126 = load i32, i32* %5
%127 = icmp eq i32 %125, %126
%128 = zext i1 %127 to i64
%129 = select i1 %127, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0)
%130 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0), i32 %115, i32 %116, i32 %117, i32 %118, i32 %119, i32 %120, i32 %121, i32 %122, i32 %123, i32 %124, i8* %129)
%131 = load i32, i32* %18
%132 = add nsw i32 %131, 1
store i32 %132, i32* %18
br label %133
133: ; preds = %114, %107
%134 = load i32, i32* %8
%135 = add nsw i32 %134, 1
store i32 %135, i32* %8
br label %92
136: ; preds = %92
br label %137
137: ; preds = %136
%138 = load i32, i32* %10
%139 = add nsw i32 %138, 1
store i32 %139, i32* %10
br label %88
140: ; preds = %88
br label %141
141: ; preds = %140
%142 = load i32, i32* %9
%143 = add nsw i32 %142, 1
store i32 %143, i32* %9
br label %84
144: ; preds = %84
br label %145
145: ; preds = %144
%146 = load i32, i32* %11
%147 = add nsw i32 %146, 1
store i32 %147, i32* %11
br label %80
148: ; preds = %80
br label %149
149: ; preds = %148
%150 = load i32, i32* %7
%151 = add nsw i32 %150, 1
store i32 %151, i32* %7
br label %76
152: ; preds = %76
%153 = load i32, i32* %18
ret i32 %153
}

LLVM IR (-O2):
@.str.2 = [43 x i8] c"%3d %3d --- --- %1d %5d %9d %9d %9d %9d%s\0A\00"
@.str.3 = [8 x i8] c" YES\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [43 x i8] c"%3d %3d %3d %3d %1d %5d %9d %9d %9d %9d%s\0A\00"
@str.7 = [71 x i8] c"pdf mfi mfn mfd s dbrmo dpref dpgdck jdbck gclk2 exact?\00"
@str.8 = [71 x i8] c"--- --- --- --- - ----- ----- ------ ----- ----- ------\00"
define i32 @conf_clock(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = bitcast i32* %4 to i8*
%10 = bitcast i32* %5 to i8*
%11 = bitcast i32* %6 to i8*
%12 = bitcast i32* %7 to i8*
%13 = bitcast i32* %8 to i8*
br label %14
14: ; preds = %3, %79
%15 = phi i32 [ 0, %3 ], [ %76, %79 ]
%16 = phi i32 [ 0, %3 ], [ %80, %79 ]
br label %17
17: ; preds = %14, %75
%18 = phi i32 [ %15, %14 ], [ %76, %75 ]
%19 = phi i32 [ 5, %14 ], [ %77, %75 ]
%20 = call i32 @calculate(i32 %0, i32 %1, i32 %2, i32 %16, i32 %19, i32 0, i32 0, i32 0, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8)
%21 = icmp slt i32 %20, 0
br i1 %21, label %37, label %22
22: ; preds = %17
%23 = icmp eq i32 %18, 0
br i1 %23, label %24, label %27
24: ; preds = %22
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.7, i64 0, i64 0))
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.8, i64 0, i64 0))
br label %27
27: ; preds = %24, %22
%28 = load i32, i32* %8
%29 = load i32, i32* %4
%30 = load i32, i32* %5
%31 = load i32, i32* %6
%32 = load i32, i32* %7
%33 = icmp eq i32 %32, %1
%34 = select i1 %33, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0)
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 %16, i32 %19, i32 0, i32 %28, i32 %29, i32 %30, i32 %31, i32 %32, i8* %34)
%36 = add nsw i32 %18, 1
br label %37
37: ; preds = %17, %27
%38 = phi i32 [ %18, %17 ], [ %36, %27 ]
%39 = call i32 @calculate(i32 %0, i32 %1, i32 %2, i32 %16, i32 %19, i32 0, i32 0, i32 1, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8)
%40 = icmp slt i32 %39, 0
br i1 %40, label %56, label %41
41: ; preds = %37
%42 = icmp eq i32 %38, 0
br i1 %42, label %43, label %46
43: ; preds = %41
%44 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.7, i64 0, i64 0))
%45 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.8, i64 0, i64 0))
br label %46
46: ; preds = %43, %41
%47 = load i32, i32* %8
%48 = load i32, i32* %4
%49 = load i32, i32* %5
%50 = load i32, i32* %6
%51 = load i32, i32* %7
%52 = icmp eq i32 %51, %1
%53 = select i1 %52, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0)
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 %16, i32 %19, i32 1, i32 %47, i32 %48, i32 %49, i32 %50, i32 %51, i8* %53)
%55 = add nsw i32 %38, 1
br label %56
56: ; preds = %46, %37
%57 = phi i32 [ %38, %37 ], [ %55, %46 ]
%58 = call i32 @calculate(i32 %0, i32 %1, i32 %2, i32 %16, i32 %19, i32 0, i32 0, i32 2, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8)
%59 = icmp slt i32 %58, 0
br i1 %59, label %75, label %60
60: ; preds = %56
%61 = icmp eq i32 %57, 0
br i1 %61, label %62, label %65
62: ; preds = %60
%63 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.7, i64 0, i64 0))
%64 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.8, i64 0, i64 0))
br label %65
65: ; preds = %62, %60
%66 = load i32, i32* %8
%67 = load i32, i32* %4
%68 = load i32, i32* %5
%69 = load i32, i32* %6
%70 = load i32, i32* %7
%71 = icmp eq i32 %70, %1
%72 = select i1 %71, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0)
%73 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 %16, i32 %19, i32 2, i32 %66, i32 %67, i32 %68, i32 %69, i32 %70, i8* %72)
%74 = add nsw i32 %57, 1
br label %75
75: ; preds = %65, %56
%76 = phi i32 [ %57, %56 ], [ %74, %65 ]
%77 = add nuw nsw i32 %19, 1
%78 = icmp eq i32 %77, 16
br i1 %78, label %79, label %17
79: ; preds = %75
%80 = add nuw nsw i32 %16, 1
%81 = icmp eq i32 %80, 16
br i1 %81, label %82, label %14
82: ; preds = %79, %159
%83 = phi i32 [ %150, %159 ], [ %76, %79 ]
%84 = phi i32 [ %160, %159 ], [ 0, %79 ]
br label %85
85: ; preds = %82, %156
%86 = phi i32 [ %83, %82 ], [ %150, %156 ]
%87 = phi i32 [ 5, %82 ], [ %157, %156 ]
br label %88
88: ; preds = %85, %153
%89 = phi i32 [ %86, %85 ], [ %150, %153 ]
%90 = phi i32 [ 1, %85 ], [ %154, %153 ]
br label %91
91: ; preds = %88, %149
%92 = phi i32 [ %89, %88 ], [ %150, %149 ]
%93 = phi i32 [ 1, %88 ], [ %151, %149 ]
%94 = call i32 @calculate(i32 %0, i32 %1, i32 %2, i32 %84, i32 %87, i32 %90, i32 %93, i32 0, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8)
%95 = icmp slt i32 %94, 0
br i1 %95, label %111, label %96
96: ; preds = %91
%97 = icmp eq i32 %92, 0
br i1 %97, label %98, label %101
98: ; preds = %96
%99 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.7, i64 0, i64 0))
%100 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.8, i64 0, i64 0))
br label %101
101: ; preds = %98, %96
%102 = load i32, i32* %8
%103 = load i32, i32* %4
%104 = load i32, i32* %5
%105 = load i32, i32* %6
%106 = load i32, i32* %7
%107 = icmp eq i32 %106, %1
%108 = select i1 %107, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0)
%109 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0), i32 %84, i32 %87, i32 %90, i32 %93, i32 0, i32 %102, i32 %103, i32 %104, i32 %105, i32 %106, i8* %108)
%110 = add nsw i32 %92, 1
br label %111
111: ; preds = %91, %101
%112 = phi i32 [ %92, %91 ], [ %110, %101 ]
%113 = call i32 @calculate(i32 %0, i32 %1, i32 %2, i32 %84, i32 %87, i32 %90, i32 %93, i32 1, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8)
%114 = icmp slt i32 %113, 0
br i1 %114, label %130, label %115
115: ; preds = %111
%116 = icmp eq i32 %112, 0
br i1 %116, label %117, label %120
117: ; preds = %115
%118 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.7, i64 0, i64 0))
%119 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.8, i64 0, i64 0))
br label %120
120: ; preds = %117, %115
%121 = load i32, i32* %8
%122 = load i32, i32* %4
%123 = load i32, i32* %5
%124 = load i32, i32* %6
%125 = load i32, i32* %7
%126 = icmp eq i32 %125, %1
%127 = select i1 %126, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0)
%128 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0), i32 %84, i32 %87, i32 %90, i32 %93, i32 1, i32 %121, i32 %122, i32 %123, i32 %124, i32 %125, i8* %127)
%129 = add nsw i32 %112, 1
br label %130
130: ; preds = %120, %111
%131 = phi i32 [ %112, %111 ], [ %129, %120 ]
%132 = call i32 @calculate(i32 %0, i32 %1, i32 %2, i32 %84, i32 %87, i32 %90, i32 %93, i32 2, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8)
%133 = icmp slt i32 %132, 0
br i1 %133, label %149, label %134
134: ; preds = %130
%135 = icmp eq i32 %131, 0
br i1 %135, label %136, label %139
136: ; preds = %134
%137 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.7, i64 0, i64 0))
%138 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.8, i64 0, i64 0))
br label %139
139: ; preds = %136, %134
%140 = load i32, i32* %8
%141 = load i32, i32* %4
%142 = load i32, i32* %5
%143 = load i32, i32* %6
%144 = load i32, i32* %7
%145 = icmp eq i32 %144, %1
%146 = select i1 %145, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0)
%147 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0), i32 %84, i32 %87, i32 %90, i32 %93, i32 2, i32 %140, i32 %141, i32 %142, i32 %143, i32 %144, i8* %146)
%148 = add nsw i32 %131, 1
br label %149
149: ; preds = %139, %130
%150 = phi i32 [ %131, %130 ], [ %148, %139 ]
%151 = add nuw nsw i32 %93, 1
%152 = icmp eq i32 %151, 32
br i1 %152, label %153, label %91
153: ; preds = %149
%154 = add nuw nsw i32 %90, 1
%155 = icmp eq i32 %154, 16
br i1 %155, label %156, label %88
156: ; preds = %153
%157 = add nuw nsw i32 %87, 1
%158 = icmp eq i32 %157, 16
br i1 %158, label %159, label %85
159: ; preds = %156
%160 = add nuw nsw i32 %84, 1
%161 = icmp eq i32 %160, 16
br i1 %161, label %162, label %82
162: ; preds = %159
ret i32 %150
}