#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, char *, char *);
int main(void) {
  for (int i = 1; i < 51; ++i) {
    printf("%d %s %s\n", i, i % 2 ? "" : "Huff", i % 5 ? "" : "Puff");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x33,-0x8(%rbp)
jge    1197 <main+0x87>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
lea    0xec5(%rip),%rax
lea    0xebd(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
mov    -0x10(%rbp),%rdx
lea    0xea0(%rip),%rcx
lea    0xe93(%rip),%rax
cmp    $0x0,%edi
cmovne %rax,%rcx
lea    0xe7c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    $0x1,%ebx
lea    0xee5(%rip),%r15
lea    0xedd(%rip),%r12
lea    0xedc(%rip),%r13
lea    0xec6(%rip),%r14
jmp    1152 <main+0x42>
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x33,%ebx
je     1179 <main+0x69>
movzbl %bl,%eax
imul   $0xcd,%eax,%ecx
shr    $0xa,%ecx
lea    (%rcx,%rcx,4),%esi
neg    %esi
test   $0x1,%al
mov    %r12,%rdx
cmove  %r15,%rdx
mov    %r13,%rcx
add    %al,%sil
je     1140 <main+0x30>
mov    %r12,%rcx
jmp    1140 <main+0x30>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%d %s %s\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [5 x i8] c"Huff\00"
@.str.3 = [5 x i8] c"Puff\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %3
3: ; preds = %19, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 51
br i1 %5, label %6, label %22
6: ; preds = %3
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = srem i32 %8, 2
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i64
%12 = select i1 %10, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0)
%13 = load i32, i32* %2
%14 = srem i32 %13, 5
%15 = icmp ne i32 %14, 0
%16 = zext i1 %15 to i64
%17 = select i1 %15, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0)
%18 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %7, i8* %12, i8* %17)
br label %19
19: ; preds = %6
%20 = load i32, i32* %2
%21 = add nsw i32 %20, 1
store i32 %21, i32* %2
br label %3
22: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%d %s %s\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [5 x i8] c"Huff\00"
@.str.3 = [5 x i8] c"Puff\00"
define i32 @main() {
br label %2
1: ; preds = %2
ret i32 0
2: ; preds = %0, %2
%3 = phi i32 [ 1, %0 ], [ %12, %2 ]
%4 = and i32 %3, 1
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
%7 = trunc i32 %3 to i8
%8 = urem i8 %7, 5
%9 = icmp eq i8 %8, 0
%10 = select i1 %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3, i8* %6, i8* %10)
%12 = add nuw nsw i32 %3, 1
%13 = icmp eq i32 %12, 51
br i1 %13, label %1, label %2
}