#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*/ printf(char *, int, int, int);
void practice_1(void) {
  int i, j, k;
  for (i = 1; i < 5; i++) {
    for (j = 1; j < 5; j++) {
      for (k = 1; k < 5; k++) {
        if (i != k && i != j && j != k) {
          printf("%d,%d,%d\n", i, j, k);
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<practice_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    11bd <practice_1+0xad>
movl   $0x1,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    11aa <practice_1+0x9a>
movl   $0x1,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    1197 <practice_1+0x87>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1184 <practice_1+0x74>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1184 <practice_1+0x74>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1184 <practice_1+0x74>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
jmp    1189 <practice_1+0x79>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1141 <practice_1+0x31>
jmp    119c <practice_1+0x8c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1130 <practice_1+0x20>
jmp    11af <practice_1+0x9f>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <practice_1+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<practice_1>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    $0x1,%r12d
xor    %r15d,%r15d
lea    0xed8(%rip),%r14
jmp    1142 <practice_1+0x32>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r12d
add    $0xffffffff,%r15d
cmp    $0x5,%r12d
je     11ed <practice_1+0xdd>
mov    $0x1,%ebx
jmp    1158 <practice_1+0x48>
nopl   0x0(%rax)
add    $0x1,%ebx
cmp    $0x5,%ebx
je     1130 <practice_1+0x20>
lea    (%r15,%rbx,1),%ebp
cmp    $0x1,%r12d
je     117e <practice_1+0x6e>
cmp    $0x1,%ebp
je     117e <practice_1+0x6e>
cmp    $0x1,%ebx
je     117e <practice_1+0x6e>
mov    %r14,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    $0x1,%ecx
call   1030 <printf@plt>
cmp    $0x2,%r12d
je     11a0 <practice_1+0x90>
cmp    $0x1,%ebp
je     11a0 <practice_1+0x90>
cmp    $0x2,%ebx
je     11a0 <practice_1+0x90>
mov    %r14,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    $0x2,%ecx
call   1030 <printf@plt>
cmp    $0x3,%r12d
je     11c2 <practice_1+0xb2>
cmp    $0x1,%ebp
je     11c2 <practice_1+0xb2>
cmp    $0x3,%ebx
je     11c2 <practice_1+0xb2>
mov    %r14,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    $0x3,%ecx
call   1030 <printf@plt>
cmp    $0x4,%r12d
je     1150 <practice_1+0x40>
cmp    $0x1,%ebp
je     1150 <practice_1+0x40>
cmp    $0x4,%ebx
je     1150 <practice_1+0x40>
mov    %r14,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    $0x4,%ecx
call   1030 <printf@plt>
jmp    1150 <practice_1+0x40>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%d,%d,%d\0A\00"
define void @practice_1() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 1, i32* %1
br label %4
4: ; preds = %41, %0
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 5
br i1 %6, label %7, label %44
7: ; preds = %4
store i32 1, i32* %2
br label %8
8: ; preds = %37, %7
%9 = load i32, i32* %2
%10 = icmp slt i32 %9, 5
br i1 %10, label %11, label %40
11: ; preds = %8
store i32 1, i32* %3
br label %12
12: ; preds = %33, %11
%13 = load i32, i32* %3
%14 = icmp slt i32 %13, 5
br i1 %14, label %15, label %36
15: ; preds = %12
%16 = load i32, i32* %1
%17 = load i32, i32* %3
%18 = icmp ne i32 %16, %17
br i1 %18, label %19, label %32
19: ; preds = %15
%20 = load i32, i32* %1
%21 = load i32, i32* %2
%22 = icmp ne i32 %20, %21
br i1 %22, label %23, label %32
23: ; preds = %19
%24 = load i32, i32* %2
%25 = load i32, i32* %3
%26 = icmp ne i32 %24, %25
br i1 %26, label %27, label %32
27: ; preds = %23
%28 = load i32, i32* %1
%29 = load i32, i32* %2
%30 = load i32, i32* %3
%31 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %28, i32 %29, i32 %30)
br label %32
32: ; preds = %27, %23, %19, %15
br label %33
33: ; preds = %32
%34 = load i32, i32* %3
%35 = add nsw i32 %34, 1
store i32 %35, i32* %3
br label %12
36: ; preds = %12
br label %37
37: ; preds = %36
%38 = load i32, i32* %2
%39 = add nsw i32 %38, 1
store i32 %39, i32* %2
br label %8
40: ; preds = %8
br label %41
41: ; preds = %40
%42 = load i32, i32* %1
%43 = add nsw i32 %42, 1
store i32 %43, i32* %1
br label %4
44: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%d,%d,%d\0A\00"
define void @practice_1() {
br label %1
1: ; preds = %0, %36
%2 = phi i32 [ 1, %0 ], [ %37, %36 ]
%3 = icmp eq i32 %2, 1
%4 = icmp eq i32 %2, 2
%5 = icmp eq i32 %2, 3
%6 = icmp eq i32 %2, 4
br label %7
7: ; preds = %1, %33
%8 = phi i32 [ 1, %1 ], [ %34, %33 ]
%9 = icmp eq i32 %2, %8
%10 = select i1 %3, i1 true, i1 %9
%11 = icmp eq i32 %8, 1
%12 = select i1 %10, i1 true, i1 %11
br i1 %12, label %15, label %13
13: ; preds = %7
%14 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %8, i32 1)
br label %15
15: ; preds = %7, %13
%16 = select i1 %4, i1 true, i1 %9
%17 = icmp eq i32 %8, 2
%18 = select i1 %16, i1 true, i1 %17
br i1 %18, label %21, label %19
19: ; preds = %15
%20 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %8, i32 2)
br label %21
21: ; preds = %19, %15
%22 = select i1 %5, i1 true, i1 %9
%23 = icmp eq i32 %8, 3
%24 = select i1 %22, i1 true, i1 %23
br i1 %24, label %27, label %25
25: ; preds = %21
%26 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %8, i32 3)
br label %27
27: ; preds = %25, %21
%28 = select i1 %6, i1 true, i1 %9
%29 = icmp eq i32 %8, 4
%30 = select i1 %28, i1 true, i1 %29
br i1 %30, label %33, label %31
31: ; preds = %27
%32 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %8, i32 4)
br label %33
33: ; preds = %31, %27
%34 = add nuw nsw i32 %8, 1
%35 = icmp eq i32 %34, 5
br i1 %35, label %36, label %7
36: ; preds = %33
%37 = add nuw nsw i32 %2, 1
%38 = icmp eq i32 %37, 5
br i1 %38, label %39, label %1
39: ; preds = %36
ret void
}