#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 */
long factorial(int);
unsigned int next_permutation(unsigned int);
int /*<<< orphan*/ printf(char *, ...);
void generate_shuffle() {
  int i;
  printf("static const uint8_t shuffle_permutations[9] = {1");
  for (i = 1; i < 8; i++) {
    long combinations = factorial(8) / (factorial(8 - i) * factorial(i));
    printf(", %li", combinations);
  }
  printf(", 1};\n");
  printf("static const uint8_t shuffle[9][70] = {\n");
  for (i = 0; i <= 8; i++) {
    printf(" // %i bits set\n", i);
    unsigned char init = i == 0 ? 0 : (0x1 << i) - 1;
    printf(" {0x%02X", (int)init);
    unsigned int c = next_permutation(init);
    int num;
    for (num = 1; num < 70; c = next_permutation(c), num++) {
      printf(num % 10 == 0 ? ",\n  " : ", ");
      printf("0x%02X", c <= 255 ? (int)c : 0);
    }
    printf(i < 8 ? "},\n" : "}\n};\n\n");
  }
}


x86 assembly (clang, -O0):
<generate_shuffle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x4(%rbp)
cmpl   $0x8,-0x4(%rbp)
jge    11b6 <generate_shuffle+0x86>
mov    $0x8,%edi
call   1040 <factorial@plt>
mov    %rax,-0x28(%rbp)
mov    $0x8,%edi
sub    -0x4(%rbp),%edi
call   1040 <factorial@plt>
mov    %rax,-0x30(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <factorial@plt>
mov    -0x30(%rbp),%rcx
mov    %rax,%rdx
mov    -0x28(%rbp),%rax
imul   %rdx,%rcx
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    114d <generate_shuffle+0x1d>
lea    0xe7b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x8,-0x4(%rbp)
jg     12ed <generate_shuffle+0x1bd>
mov    -0x4(%rbp),%esi
lea    0xe7b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
cmpl   $0x0,-0x4(%rbp)
jne    1208 <generate_shuffle+0xd8>
xor    %eax,%eax
mov    %eax,-0x34(%rbp)
jmp    1218 <generate_shuffle+0xe8>
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
sub    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%esi
lea    0xe50(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movzbl -0x11(%rbp),%edi
call   1030 <next_permutation@plt>
mov    %eax,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
cmpl   $0x46,-0x1c(%rbp)
jge    12c0 <generate_shuffle+0x190>
mov    -0x1c(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
lea    0xe28(%rip),%rdi
lea    0xe1c(%rip),%rax
cmp    $0x0,%edx
cmove  %rax,%rdi
mov    $0x0,%al
call   1050 <printf@plt>
cmpl   $0xff,-0x18(%rbp)
ja     128c <generate_shuffle+0x15c>
mov    -0x18(%rbp),%eax
mov    %eax,-0x38(%rbp)
jmp    1296 <generate_shuffle+0x166>
xor    %eax,%eax
mov    %eax,-0x38(%rbp)
jmp    1296 <generate_shuffle+0x166>
mov    -0x38(%rbp),%esi
lea    0xddb(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%edi
call   1030 <next_permutation@plt>
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1243 <generate_shuffle+0x113>
mov    -0x4(%rbp),%ecx
lea    0xdc4(%rip),%rdi
lea    0xdb9(%rip),%rax
cmp    $0x8,%ecx
cmovl  %rax,%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11d9 <generate_shuffle+0xa9>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generate_shuffle>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xeae(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x8,%edi
call   1050 <factorial@plt>
mov    %rax,%rbx
mov    $0x7,%edi
call   1050 <factorial@plt>
mov    %rax,%rbp
mov    $0x1,%edi
call   1050 <factorial@plt>
mov    %rax,%rcx
imul   %rbp,%rcx
mov    %rbx,%rax
or     %rcx,%rax
shr    $0x20,%rax
je     119a <generate_shuffle+0x5a>
mov    %rbx,%rax
cqto
idiv   %rcx
jmp    11a0 <generate_shuffle+0x60>
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
lea    0xe8b(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x8,%edi
call   1050 <factorial@plt>
mov    %rax,%rbx
mov    $0x6,%edi
call   1050 <factorial@plt>
mov    %rax,%rbp
mov    $0x2,%edi
call   1050 <factorial@plt>
mov    %rax,%rcx
imul   %rbp,%rcx
mov    %rbx,%rax
or     %rcx,%rax
shr    $0x20,%rax
je     11f2 <generate_shuffle+0xb2>
mov    %rbx,%rax
cqto
idiv   %rcx
jmp    11f8 <generate_shuffle+0xb8>
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
lea    0xe33(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x8,%edi
call   1050 <factorial@plt>
mov    %rax,%rbx
mov    $0x5,%edi
call   1050 <factorial@plt>
mov    %rax,%rbp
mov    $0x3,%edi
call   1050 <factorial@plt>
mov    %rax,%rcx
imul   %rbp,%rcx
mov    %rbx,%rax
or     %rcx,%rax
shr    $0x20,%rax
je     124a <generate_shuffle+0x10a>
mov    %rbx,%rax
cqto
idiv   %rcx
jmp    1250 <generate_shuffle+0x110>
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
lea    0xddb(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x8,%edi
call   1050 <factorial@plt>
mov    %rax,%rbx
mov    $0x4,%edi
call   1050 <factorial@plt>
mov    %rax,%rbp
mov    $0x4,%edi
call   1050 <factorial@plt>
mov    %rax,%rcx
imul   %rbp,%rcx
mov    %rbx,%rax
or     %rcx,%rax
shr    $0x20,%rax
je     12a2 <generate_shuffle+0x162>
mov    %rbx,%rax
cqto
idiv   %rcx
jmp    12a8 <generate_shuffle+0x168>
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
lea    0xd83(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x8,%edi
call   1050 <factorial@plt>
mov    %rax,%rbx
mov    $0x3,%edi
call   1050 <factorial@plt>
mov    %rax,%rbp
mov    $0x5,%edi
call   1050 <factorial@plt>
mov    %rax,%rcx
imul   %rbp,%rcx
mov    %rbx,%rax
or     %rcx,%rax
shr    $0x20,%rax
je     12fa <generate_shuffle+0x1ba>
mov    %rbx,%rax
cqto
idiv   %rcx
jmp    1300 <generate_shuffle+0x1c0>
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
lea    0xd2b(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x8,%edi
call   1050 <factorial@plt>
mov    %rax,%rbx
mov    $0x2,%edi
call   1050 <factorial@plt>
mov    %rax,%rbp
mov    $0x6,%edi
call   1050 <factorial@plt>
mov    %rax,%rcx
imul   %rbp,%rcx
mov    %rbx,%rax
or     %rcx,%rax
shr    $0x20,%rax
je     1352 <generate_shuffle+0x212>
mov    %rbx,%rax
cqto
idiv   %rcx
jmp    1358 <generate_shuffle+0x218>
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
lea    0xcd3(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x8,%edi
call   1050 <factorial@plt>
mov    %rax,%rbx
mov    $0x1,%edi
call   1050 <factorial@plt>
mov    %rax,%rbp
mov    $0x7,%edi
call   1050 <factorial@plt>
mov    %rax,%rcx
imul   %rbp,%rcx
mov    %rbx,%rax
or     %rcx,%rax
shr    $0x20,%rax
je     13aa <generate_shuffle+0x26a>
mov    %rbx,%rax
cqto
idiv   %rcx
jmp    13b0 <generate_shuffle+0x270>
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
lea    0xc7b(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xc9d(%rip),%rdi
call   1040 <puts@plt>
lea    0xc97(%rip),%rdi
call   1040 <puts@plt>
lea    0xc77(%rip),%r14
lea    0xc64(%rip),%r13
xor    %ebx,%ebx
nopl   0x0(%rax)
lea    0xc41(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xffffffff,%eax
mov    %ebx,%ecx
shl    %cl,%eax
test   %ebx,%ebx
not    %eax
movzbl %al,%ebp
mov    %ebx,0x4(%rsp)
cmove  %ebx,%ebp
lea    0xc2b(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %ebp,%edi
call   1030 <next_permutation@plt>
mov    %eax,%ebp
mov    $0x1,%r15b
xor    %r12d,%r12d
lea    0xc15(%rip),%rbx
nopl   (%rax)
movzbl %r15b,%r15d
imul   $0xcd,%r15d,%eax
shr    $0xa,%eax
and    $0xfffffffe,%eax
lea    (%rax,%rax,4),%eax
neg    %eax
or     $0x1,%al
cmp    %r12b,%al
mov    %r14,%rdi
cmove  %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
cmp    $0x100,%ebp
mov    $0x0,%esi
cmovb  %ebp,%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %ebp,%edi
call   1030 <next_permutation@plt>
mov    %eax,%ebp
add    $0xffffffff,%r12d
add    $0x1,%r15b
cmp    $0xffffffbb,%r12d
jne    1440 <generate_shuffle+0x300>
mov    0x4(%rsp),%ebx
cmp    $0x8,%ebx
lea    0xbb8(%rip),%rdi
lea    0xbad(%rip),%rax
cmovb  %rax,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%ebx
cmp    $0x9,%ebx
jne    13f0 <generate_shuffle+0x2b0>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [50 x i8] c"static const uint8_t shuffle_permutations[9] = {1\00"
@.str.1 = [6 x i8] c", %li\00"
@.str.2 = [7 x i8] c", 1};\0A\00"
@.str.3 = [41 x i8] c"static const uint8_t shuffle[9][70] = {\0A\00"
@.str.4 = [17 x i8] c" // %i bits set\0A\00"
@.str.5 = [9 x i8] c" {0x%02X\00"
@.str.6 = [5 x i8] c",\0A \00"
@.str.7 = [3 x i8] c", \00"
@.str.8 = [7 x i8] c"0x%02X\00"
@.str.9 = [4 x i8] c"},\0A\00"
@.str.10 = [7 x i8] c"}\0A};\0A\0A\00"
define void @generate_shuffle() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %1
br label %7
7: ; preds = %21, %0
%8 = load i32, i32* %1
%9 = icmp slt i32 %8, 8
br i1 %9, label %10, label %24
10: ; preds = %7
%11 = call i64 @factorial(i32 8)
%12 = load i32, i32* %1
%13 = sub nsw i32 8, %12
%14 = call i64 @factorial(i32 %13)
%15 = load i32, i32* %1
%16 = call i64 @factorial(i32 %15)
%17 = mul nsw i64 %14, %16
%18 = sdiv i64 %11, %17
store i64 %18, i64* %2
%19 = load i64, i64* %2
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %19)
br label %21
21: ; preds = %10
%22 = load i32, i32* %1
%23 = add nsw i32 %22, 1
store i32 %23, i32* %1
br label %7
24: ; preds = %7
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %1
br label %27
27: ; preds = %78, %24
%28 = load i32, i32* %1
%29 = icmp sle i32 %28, 8
br i1 %29, label %30, label %81
30: ; preds = %27
%31 = load i32, i32* %1
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %31)
%33 = load i32, i32* %1
%34 = icmp eq i32 %33, 0
br i1 %34, label %35, label %36
35: ; preds = %30
br label %40
36: ; preds = %30
%37 = load i32, i32* %1
%38 = shl i32 1, %37
%39 = sub nsw i32 %38, 1
br label %40
40: ; preds = %36, %35
%41 = phi i32 [ 0, %35 ], [ %39, %36 ]
%42 = trunc i32 %41 to i8
store i8 %42, i8* %3
%43 = load i8, i8* %3
%44 = zext i8 %43 to i32
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 %44)
%46 = load i8, i8* %3
%47 = zext i8 %46 to i32
%48 = call i32 @next_permutation(i32 %47)
store i32 %48, i32* %4
store i32 1, i32* %5
br label %49
49: ; preds = %67, %40
%50 = load i32, i32* %5
%51 = icmp slt i32 %50, 70
br i1 %51, label %52, label %72
52: ; preds = %49
%53 = load i32, i32* %5
%54 = srem i32 %53, 10
%55 = icmp eq i32 %54, 0
%56 = zext i1 %55 to i64
%57 = select i1 %55, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0)
%58 = call i32 (i8*, ...) @printf(i8* %57)
%59 = load i32, i32* %4
%60 = icmp ule i32 %59, 255
br i1 %60, label %61, label %63
61: ; preds = %52
%62 = load i32, i32* %4
br label %64
63: ; preds = %52
br label %64
64: ; preds = %63, %61
%65 = phi i32 [ %62, %61 ], [ 0, %63 ]
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i32 %65)
br label %67
67: ; preds = %64
%68 = load i32, i32* %4
%69 = call i32 @next_permutation(i32 %68)
store i32 %69, i32* %4
%70 = load i32, i32* %5
%71 = add nsw i32 %70, 1
store i32 %71, i32* %5
br label %49
72: ; preds = %49
%73 = load i32, i32* %1
%74 = icmp slt i32 %73, 8
%75 = zext i1 %74 to i64
%76 = select i1 %74, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0)
%77 = call i32 (i8*, ...) @printf(i8* %76)
br label %78
78: ; preds = %72
%79 = load i32, i32* %1
%80 = add nsw i32 %79, 1
store i32 %80, i32* %1
br label %27
81: ; preds = %27
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"static const uint8_t shuffle_permutations[9] = {1\00"
@.str.1 = [6 x i8] c", %li\00"
@.str.4 = [17 x i8] c" // %i bits set\0A\00"
@.str.5 = [9 x i8] c" {0x%02X\00"
@.str.6 = [5 x i8] c",\0A \00"
@.str.7 = [3 x i8] c", \00"
@.str.8 = [7 x i8] c"0x%02X\00"
@.str.9 = [4 x i8] c"},\0A\00"
@.str.10 = [7 x i8] c"}\0A};\0A\0A\00"
@str = [6 x i8] c", 1};\00"
@str.11 = [40 x i8] c"static const uint8_t shuffle[9][70] = {\00"
define void @generate_shuffle() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%2 = tail call i64 @factorial(i32 8)
%3 = tail call i64 @factorial(i32 7)
%4 = tail call i64 @factorial(i32 1)
%5 = mul nsw i64 %4, %3
%6 = sdiv i64 %2, %5
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %6)
%8 = tail call i64 @factorial(i32 8)
%9 = tail call i64 @factorial(i32 6)
%10 = tail call i64 @factorial(i32 2)
%11 = mul nsw i64 %10, %9
%12 = sdiv i64 %8, %11
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %12)
%14 = tail call i64 @factorial(i32 8)
%15 = tail call i64 @factorial(i32 5)
%16 = tail call i64 @factorial(i32 3)
%17 = mul nsw i64 %16, %15
%18 = sdiv i64 %14, %17
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %18)
%20 = tail call i64 @factorial(i32 8)
%21 = tail call i64 @factorial(i32 4)
%22 = tail call i64 @factorial(i32 4)
%23 = mul nsw i64 %22, %21
%24 = sdiv i64 %20, %23
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %24)
%26 = tail call i64 @factorial(i32 8)
%27 = tail call i64 @factorial(i32 3)
%28 = tail call i64 @factorial(i32 5)
%29 = mul nsw i64 %28, %27
%30 = sdiv i64 %26, %29
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %30)
%32 = tail call i64 @factorial(i32 8)
%33 = tail call i64 @factorial(i32 2)
%34 = tail call i64 @factorial(i32 6)
%35 = mul nsw i64 %34, %33
%36 = sdiv i64 %32, %35
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %36)
%38 = tail call i64 @factorial(i32 8)
%39 = tail call i64 @factorial(i32 1)
%40 = tail call i64 @factorial(i32 7)
%41 = mul nsw i64 %40, %39
%42 = sdiv i64 %38, %41
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %42)
%44 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%45 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.11, i64 0, i64 0))
br label %46
46: ; preds = %0, %70
%47 = phi i32 [ 0, %0 ], [ %74, %70 ]
%48 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %47)
%49 = icmp eq i32 %47, 0
%50 = shl nsw i32 -1, %47
%51 = and i32 %50, 255
%52 = xor i32 %51, 255
%53 = select i1 %49, i32 0, i32 %52
%54 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 %53)
%55 = tail call i32 @next_permutation(i32 %53)
br label %56
56: ; preds = %46, %56
%57 = phi i32 [ 1, %46 ], [ %68, %56 ]
%58 = phi i32 [ %55, %46 ], [ %67, %56 ]
%59 = trunc i32 %57 to i8
%60 = urem i8 %59, 10
%61 = icmp eq i8 %60, 0
%62 = select i1 %61, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0)
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %62)
%64 = icmp ult i32 %58, 256
%65 = select i1 %64, i32 %58, i32 0
%66 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i32 %65)
%67 = tail call i32 @next_permutation(i32 %58)
%68 = add nuw nsw i32 %57, 1
%69 = icmp eq i32 %68, 70
br i1 %69, label %70, label %56
70: ; preds = %56
%71 = icmp ult i32 %47, 8
%72 = select i1 %71, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0)
%73 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %72)
%74 = add nuw nsw i32 %47, 1
%75 = icmp eq i32 %74, 9
br i1 %75, label %76, label %46
76: ; preds = %70
ret void
}