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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  unsigned int ddfseq;
  printf("old sequencer:\n");
  printf("ddfseq shres hires lores\n");
  for (ddfseq = 0; ddfseq < 8; ddfseq++) {
    unsigned int ddfseq_neg = (~ddfseq);
    unsigned int shres = (((ddfseq_neg & 1) ? 1 : 0) << 0);
    unsigned int hires =
        (((ddfseq_neg & 1) ? 1 : 0) << 1) | (((ddfseq_neg & 2) ? 1 : 0) << 0);
    unsigned int lores = (((ddfseq_neg & 1) ? 1 : 0) << 2) |
                         (((ddfseq_neg & 2) ? 1 : 0) << 1) |
                         (((ddfseq_neg & 4) ? 1 : 0) << 0);
    printf("%01d      %01d     %01d     %01d\n", ddfseq, shres, hires, lores);
  }
  printf("\n");
  printf("new sequencer:\n");
  printf("  mode 1 = 2-fetch sequence (SHRES FMode = 0)\n");
  printf("  mode 2 = 4-fetch sequence (HRES FMode = 0, SHRES FMode = 1)\n");
  printf("  mode 3 = 8-fetch sequence (LRES FMode = 0, HRES FMode = 1, SHRES, "
         "FMode = 3)\n");
  printf("  mode 4 = 8-fetch sequence followed by 8 free cycles (LRES FMode = "
         "1, HRES FMode = 3)\n");
  printf("  mode 5 = 8-fetch sequence followed by 24 free cycles (LRES FMode = "
         "3)\n");
  printf("ddfseq 01 02 03 04 05\n");
  for (ddfseq = 0; ddfseq < 32; ddfseq++) {
    unsigned int ddfseq_neg = (~ddfseq);
    unsigned int m1 = (((ddfseq_neg & 1) ? 1 : 0) << 0);
    unsigned int m2 =
        (((ddfseq_neg & 1) ? 1 : 0) << 1) | (((ddfseq_neg & 2) ? 1 : 0) << 0);
    unsigned int m3 = (((ddfseq_neg & 1) ? 1 : 0) << 2) |
                      (((ddfseq_neg & 2) ? 1 : 0) << 1) |
                      (((ddfseq_neg & 4) ? 1 : 0) << 0);
    unsigned int m4 =
        (((ddfseq & 8) ? 1 : 0) << 3) | (((ddfseq_neg & 1) ? 1 : 0) << 2) |
        (((ddfseq_neg & 2) ? 1 : 0) << 1) | (((ddfseq_neg & 4) ? 1 : 0) << 0);
    unsigned int m5 =
        (((ddfseq & 16) ? 1 : 0) << 4) | (((ddfseq & 8) ? 1 : 0) << 3) |
        (((ddfseq_neg & 1) ? 1 : 0) << 2) | (((ddfseq_neg & 2) ? 1 : 0) << 1) |
        (((ddfseq_neg & 4) ? 1 : 0) << 0);
    printf("%02d     %02d %02d %02d %02d %02d\n", ddfseq, m1, m2, m3, m4, m5);
  }
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jae    1221 <main+0x101>
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edx
and    $0x1,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
shl    $0x0,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edx
and    $0x1,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
shl    $0x1,%eax
mov    -0xc(%rbp),%esi
and    $0x2,%esi
xor    %ecx,%ecx
mov    $0x1,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
shl    $0x0,%ecx
or     %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%edx
and    $0x1,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
shl    $0x2,%eax
mov    -0xc(%rbp),%esi
and    $0x2,%esi
xor    %ecx,%ecx
mov    $0x1,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
shl    $0x1,%ecx
or     %ecx,%eax
mov    -0xc(%rbp),%esi
and    $0x4,%esi
xor    %ecx,%ecx
mov    $0x1,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
shl    $0x0,%ecx
or     %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
lea    0xe1e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1152 <main+0x32>
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe16(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe18(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf31(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jae    144b <main+0x32b>
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edx
and    $0x1,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
shl    $0x0,%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%edx
and    $0x1,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
shl    $0x1,%eax
mov    -0x1c(%rbp),%esi
and    $0x2,%esi
xor    %ecx,%ecx
mov    $0x1,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
shl    $0x0,%ecx
or     %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x1c(%rbp),%edx
and    $0x1,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
shl    $0x2,%eax
mov    -0x1c(%rbp),%esi
and    $0x2,%esi
xor    %ecx,%ecx
mov    $0x1,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
shl    $0x1,%ecx
or     %ecx,%eax
mov    -0x1c(%rbp),%esi
and    $0x4,%esi
xor    %ecx,%ecx
mov    $0x1,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
shl    $0x0,%ecx
or     %ecx,%eax
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%edx
and    $0x8,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
shl    $0x3,%eax
mov    -0x1c(%rbp),%esi
and    $0x1,%esi
xor    %ecx,%ecx
mov    $0x1,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
shl    $0x2,%ecx
or     %ecx,%eax
mov    -0x1c(%rbp),%esi
and    $0x2,%esi
xor    %ecx,%ecx
mov    $0x1,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
shl    $0x1,%ecx
or     %ecx,%eax
mov    -0x1c(%rbp),%esi
and    $0x4,%esi
xor    %ecx,%ecx
mov    $0x1,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
shl    $0x0,%ecx
or     %ecx,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%edx
and    $0x10,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
shl    $0x4,%eax
mov    -0x8(%rbp),%esi
and    $0x8,%esi
xor    %ecx,%ecx
mov    $0x1,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
shl    $0x3,%ecx
or     %ecx,%eax
mov    -0x1c(%rbp),%esi
and    $0x1,%esi
xor    %ecx,%ecx
mov    $0x1,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
shl    $0x2,%ecx
or     %ecx,%eax
mov    -0x1c(%rbp),%esi
and    $0x2,%esi
xor    %ecx,%ecx
mov    $0x1,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
shl    $0x1,%ecx
or     %ecx,%eax
mov    -0x1c(%rbp),%esi
and    $0x4,%esi
xor    %ecx,%ecx
mov    $0x1,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
shl    $0x0,%ecx
or     %ecx,%eax
mov    %eax,-0x30(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    -0x24(%rbp),%ecx
mov    -0x28(%rbp),%r8d
mov    -0x2c(%rbp),%r9d
mov    -0x30(%rbp),%eax
lea    0xd9f(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1298 <main+0x178>
mov    0x2b8e(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xef6(%rip),%rdi
call   1040 <puts@plt>
lea    0xef9(%rip),%rdi
call   1040 <puts@plt>
mov    $0xffffffff,%ebx
lea    0xe94(%rip),%r14
xor    %ebp,%ebp
xchg   %ax,%ax
mov    %ebx,%edx
and    $0x1,%edx
mov    %ebx,%eax
rol    $0x4,%al
mov    %eax,%ecx
and    $0x33,%cl
shl    $0x2,%cl
shr    $0x2,%al
and    $0x33,%al
or     %cl,%al
mov    %eax,%ecx
and    $0x55,%cl
add    %cl,%cl
shr    %al
and    $0x55,%al
or     %cl,%al
mov    %eax,%ecx
shr    $0x6,%cl
movzbl %cl,%ecx
shr    $0x5,%al
movzbl %al,%r8d
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%ebp
add    $0xffffffff,%ebx
cmp    $0x8,%ebp
jne    1170 <main+0x30>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xea0(%rip),%rdi
call   1040 <puts@plt>
lea    0xea3(%rip),%rdi
call   1040 <puts@plt>
lea    0xec5(%rip),%rdi
call   1040 <puts@plt>
lea    0xef7(%rip),%rdi
call   1040 <puts@plt>
lea    0xf3a(%rip),%rdi
call   1040 <puts@plt>
lea    0xf85(%rip),%rdi
call   1040 <puts@plt>
lea    0xfc1(%rip),%rdi
call   1040 <puts@plt>
mov    $0xffffffff,%ebx
lea    0xdfc(%rip),%r14
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edx
and    $0x1,%edx
mov    %ebx,%esi
and    $0x2,%esi
mov    %ebx,%eax
rol    $0x4,%al
mov    %eax,%ecx
and    $0x33,%cl
shl    $0x2,%cl
shr    $0x2,%al
and    $0x33,%al
or     %cl,%al
mov    %eax,%ecx
and    $0x55,%cl
add    %cl,%cl
shr    %al
and    $0x55,%al
or     %cl,%al
mov    %eax,%ecx
shr    $0x6,%cl
movzbl %cl,%ecx
shr    $0x5,%al
movzbl %al,%r8d
mov    %ebp,%r9d
and    $0x8,%r9d
mov    %r8d,%eax
and    $0x5,%al
movzbl %al,%eax
or     %eax,%r9d
or     %esi,%r9d
mov    %ebp,%edi
and    $0x18,%edi
or     %eax,%edi
or     %esi,%edi
mov    %edi,(%rsp)
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%ebp
add    $0xffffffff,%ebx
cmp    $0x20,%ebp
jne    1230 <main+0xf0>
mov    0x2d37(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"old sequencer:\0A\00"
@.str.1 = [26 x i8] c"ddfseq shres hires lores\0A\00"
@.str.2 = [34 x i8] c"%01d %01d %01d %01d\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [16 x i8] c"new sequencer:\0A\00"
@.str.5 = [47 x i8] c" mode 1 = 2-fetch sequence (SHRES FMode = 0)\0A\00"
@.str.6 = [63 x i8] c" mode 2 = 4-fetch sequence (HRES FMode = 0, SHRES FMode = 1)\0A\00"
@.str.7 = [80 x i8] c" mode 3 = 8-fetch sequence (LRES FMode = 0, HRES FMode = 1, SHRES, FMode = 3)\0A\00"
@.str.8 = [88 x i8] c" mode 4 = 8-fetch sequence followed by 8 free cycles (LRES FMode = 1, HRES FMode = 3)\0A\00"
@.str.9 = [73 x i8] c" mode 5 = 8-fetch sequence followed by 24 free cycles (LRES FMode = 3)\0A\00"
@.str.10 = [23 x i8] c"ddfseq 01 02 03 04 05\0A\00"
@.str.11 = [35 x i8] c"%02d %02d %02d %02d %02d %02d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%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
store i32 0, i32* %1
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %2
br label %15
15: ; preds = %65, %0
%16 = load i32, i32* %2
%17 = icmp ult i32 %16, 8
br i1 %17, label %18, label %68
18: ; preds = %15
%19 = load i32, i32* %2
%20 = xor i32 %19, -1
store i32 %20, i32* %3
%21 = load i32, i32* %3
%22 = and i32 %21, 1
%23 = icmp ne i32 %22, 0
%24 = zext i1 %23 to i64
%25 = select i1 %23, i32 1, i32 0
%26 = shl i32 %25, 0
store i32 %26, i32* %4
%27 = load i32, i32* %3
%28 = and i32 %27, 1
%29 = icmp ne i32 %28, 0
%30 = zext i1 %29 to i64
%31 = select i1 %29, i32 1, i32 0
%32 = shl i32 %31, 1
%33 = load i32, i32* %3
%34 = and i32 %33, 2
%35 = icmp ne i32 %34, 0
%36 = zext i1 %35 to i64
%37 = select i1 %35, i32 1, i32 0
%38 = shl i32 %37, 0
%39 = or i32 %32, %38
store i32 %39, i32* %5
%40 = load i32, i32* %3
%41 = and i32 %40, 1
%42 = icmp ne i32 %41, 0
%43 = zext i1 %42 to i64
%44 = select i1 %42, i32 1, i32 0
%45 = shl i32 %44, 2
%46 = load i32, i32* %3
%47 = and i32 %46, 2
%48 = icmp ne i32 %47, 0
%49 = zext i1 %48 to i64
%50 = select i1 %48, i32 1, i32 0
%51 = shl i32 %50, 1
%52 = or i32 %45, %51
%53 = load i32, i32* %3
%54 = and i32 %53, 4
%55 = icmp ne i32 %54, 0
%56 = zext i1 %55 to i64
%57 = select i1 %55, i32 1, i32 0
%58 = shl i32 %57, 0
%59 = or i32 %52, %58
store i32 %59, i32* %6
%60 = load i32, i32* %2
%61 = load i32, i32* %4
%62 = load i32, i32* %5
%63 = load i32, i32* %6
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %60, i32 %61, i32 %62, i32 %63)
br label %65
65: ; preds = %18
%66 = load i32, i32* %2
%67 = add i32 %66, 1
store i32 %67, i32* %2
br label %15
68: ; preds = %15
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i64 0, i64 0))
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.6, i64 0, i64 0))
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.7, i64 0, i64 0))
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.8, i64 0, i64 0))
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.9, i64 0, i64 0))
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0))
store i32 0, i32* %2
br label %77
77: ; preds = %190, %68
%78 = load i32, i32* %2
%79 = icmp ult i32 %78, 32
br i1 %79, label %80, label %193
80: ; preds = %77
%81 = load i32, i32* %2
%82 = xor i32 %81, -1
store i32 %82, i32* %7
%83 = load i32, i32* %7
%84 = and i32 %83, 1
%85 = icmp ne i32 %84, 0
%86 = zext i1 %85 to i64
%87 = select i1 %85, i32 1, i32 0
%88 = shl i32 %87, 0
store i32 %88, i32* %8
%89 = load i32, i32* %7
%90 = and i32 %89, 1
%91 = icmp ne i32 %90, 0
%92 = zext i1 %91 to i64
%93 = select i1 %91, i32 1, i32 0
%94 = shl i32 %93, 1
%95 = load i32, i32* %7
%96 = and i32 %95, 2
%97 = icmp ne i32 %96, 0
%98 = zext i1 %97 to i64
%99 = select i1 %97, i32 1, i32 0
%100 = shl i32 %99, 0
%101 = or i32 %94, %100
store i32 %101, i32* %9
%102 = load i32, i32* %7
%103 = and i32 %102, 1
%104 = icmp ne i32 %103, 0
%105 = zext i1 %104 to i64
%106 = select i1 %104, i32 1, i32 0
%107 = shl i32 %106, 2
%108 = load i32, i32* %7
%109 = and i32 %108, 2
%110 = icmp ne i32 %109, 0
%111 = zext i1 %110 to i64
%112 = select i1 %110, i32 1, i32 0
%113 = shl i32 %112, 1
%114 = or i32 %107, %113
%115 = load i32, i32* %7
%116 = and i32 %115, 4
%117 = icmp ne i32 %116, 0
%118 = zext i1 %117 to i64
%119 = select i1 %117, i32 1, i32 0
%120 = shl i32 %119, 0
%121 = or i32 %114, %120
store i32 %121, i32* %10
%122 = load i32, i32* %2
%123 = and i32 %122, 8
%124 = icmp ne i32 %123, 0
%125 = zext i1 %124 to i64
%126 = select i1 %124, i32 1, i32 0
%127 = shl i32 %126, 3
%128 = load i32, i32* %7
%129 = and i32 %128, 1
%130 = icmp ne i32 %129, 0
%131 = zext i1 %130 to i64
%132 = select i1 %130, i32 1, i32 0
%133 = shl i32 %132, 2
%134 = or i32 %127, %133
%135 = load i32, i32* %7
%136 = and i32 %135, 2
%137 = icmp ne i32 %136, 0
%138 = zext i1 %137 to i64
%139 = select i1 %137, i32 1, i32 0
%140 = shl i32 %139, 1
%141 = or i32 %134, %140
%142 = load i32, i32* %7
%143 = and i32 %142, 4
%144 = icmp ne i32 %143, 0
%145 = zext i1 %144 to i64
%146 = select i1 %144, i32 1, i32 0
%147 = shl i32 %146, 0
%148 = or i32 %141, %147
store i32 %148, i32* %11
%149 = load i32, i32* %2
%150 = and i32 %149, 16
%151 = icmp ne i32 %150, 0
%152 = zext i1 %151 to i64
%153 = select i1 %151, i32 1, i32 0
%154 = shl i32 %153, 4
%155 = load i32, i32* %2
%156 = and i32 %155, 8
%157 = icmp ne i32 %156, 0
%158 = zext i1 %157 to i64
%159 = select i1 %157, i32 1, i32 0
%160 = shl i32 %159, 3
%161 = or i32 %154, %160
%162 = load i32, i32* %7
%163 = and i32 %162, 1
%164 = icmp ne i32 %163, 0
%165 = zext i1 %164 to i64
%166 = select i1 %164, i32 1, i32 0
%167 = shl i32 %166, 2
%168 = or i32 %161, %167
%169 = load i32, i32* %7
%170 = and i32 %169, 2
%171 = icmp ne i32 %170, 0
%172 = zext i1 %171 to i64
%173 = select i1 %171, i32 1, i32 0
%174 = shl i32 %173, 1
%175 = or i32 %168, %174
%176 = load i32, i32* %7
%177 = and i32 %176, 4
%178 = icmp ne i32 %177, 0
%179 = zext i1 %178 to i64
%180 = select i1 %178, i32 1, i32 0
%181 = shl i32 %180, 0
%182 = or i32 %175, %181
store i32 %182, i32* %12
%183 = load i32, i32* %2
%184 = load i32, i32* %8
%185 = load i32, i32* %9
%186 = load i32, i32* %10
%187 = load i32, i32* %11
%188 = load i32, i32* %12
%189 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i32 %183, i32 %184, i32 %185, i32 %186, i32 %187, i32 %188)
br label %190
190: ; preds = %80
%191 = load i32, i32* %2
%192 = add i32 %191, 1
store i32 %192, i32* %2
br label %77
193: ; preds = %77
%194 = load i32, i32* @EXIT_SUCCESS
%195 = call i32 @exit(i32 %194)
unreachable
}

LLVM IR (-O2):
@.str.2 = [34 x i8] c"%01d %01d %01d %01d\0A\00"
@.str.11 = [35 x i8] c"%02d %02d %02d %02d %02d %02d\0A\00"
@EXIT_SUCCESS = global i32 0
@str = [15 x i8] c"old sequencer:\00"
@str.12 = [25 x i8] c"ddfseq shres hires lores\00"
@str.13 = [15 x i8] c"new sequencer:\00"
@str.14 = [46 x i8] c" mode 1 = 2-fetch sequence (SHRES FMode = 0)\00"
@str.15 = [62 x i8] c" mode 2 = 4-fetch sequence (HRES FMode = 0, SHRES FMode = 1)\00"
@str.16 = [79 x i8] c" mode 3 = 8-fetch sequence (LRES FMode = 0, HRES FMode = 1, SHRES, FMode = 3)\00"
@str.17 = [87 x i8] c" mode 4 = 8-fetch sequence followed by 8 free cycles (LRES FMode = 1, HRES FMode = 3)\00"
@str.18 = [72 x i8] c" mode 5 = 8-fetch sequence followed by 24 free cycles (LRES FMode = 3)\00"
@str.19 = [22 x i8] c"ddfseq 01 02 03 04 05\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.12, i64 0, i64 0))
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 0, %0 ], [ %14, %3 ]
%5 = xor i32 %4, -1
%6 = and i32 %5, 1
%7 = trunc i32 %5 to i2
%8 = tail call i2 @llvm.bitreverse.i2(i2 %7)
%9 = zext i2 %8 to i32
%10 = trunc i32 %5 to i3
%11 = tail call i3 @llvm.bitreverse.i3(i3 %10)
%12 = zext i3 %11 to i32
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %4, i32 %6, i32 %9, i32 %12)
%14 = add nuw nsw i32 %4, 1
%15 = icmp eq i32 %14, 8
br i1 %15, label %16, label %3
16: ; preds = %3
%17 = tail call i32 @putchar(i32 10)
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.13, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.14, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.15, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str.16, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([87 x i8], [87 x i8]* @str.17, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str.18, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.19, i64 0, i64 0))
br label %25
25: ; preds = %16, %25
%26 = phi i32 [ 0, %16 ], [ %45, %25 ]
%27 = xor i32 %26, -1
%28 = and i32 %27, 1
%29 = and i32 %27, 2
%30 = trunc i32 %27 to i2
%31 = tail call i2 @llvm.bitreverse.i2(i2 %30)
%32 = zext i2 %31 to i32
%33 = trunc i32 %27 to i3
%34 = tail call i3 @llvm.bitreverse.i3(i3 %33)
%35 = zext i3 %34 to i32
%36 = and i32 %26, 8
%37 = and i3 %34, -3
%38 = zext i3 %37 to i32
%39 = or i32 %36, %38
%40 = or i32 %39, %29
%41 = and i32 %26, 24
%42 = or i32 %41, %38
%43 = or i32 %42, %29
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0), i32 %26, i32 %28, i32 %32, i32 %35, i32 %40, i32 %43)
%45 = add nuw nsw i32 %26, 1
%46 = icmp eq i32 %45, 32
br i1 %46, label %47, label %25
47: ; preds = %25
%48 = load i32, i32* @EXIT_SUCCESS
%49 = tail call i32 @exit(i32 %48)
unreachable
}