#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 /*<<< orphan*/ putchar(scalar_t__);
scalar_t__ puts(char *);
main() {
  int i = 1, x;
  while (i++ < 3, putchar(puts("paul") - puts("ball")))
    printf("very");
  printf("easy");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0xeaa(%rip),%rdi
call   1040 <puts@plt>
mov    %rax,-0x18(%rbp)
lea    0xe9f(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%rdi
sub    %rax,%rdi
call   1030 <putchar@plt>
cmp    $0x0,%eax
je     1191 <main+0x61>
lea    0xe83(%rip),%rdi
call   1050 <printf@plt>
jmp    1146 <main+0x16>
lea    0xe77(%rip),%rdi
call   1050 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xec1(%rip),%rdi
call   1040 <puts@plt>
mov    %rax,%rbx
lea    0xeb7(%rip),%rdi
call   1040 <puts@plt>
sub    %rax,%rbx
mov    %rbx,%rdi
call   1030 <putchar@plt>
test   %eax,%eax
je     11aa <main+0x7a>
lea    0xea1(%rip),%r14
lea    0xe90(%rip),%r15
lea    0xe8e(%rip),%r12
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1050 <printf@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %rax,%rbx
mov    %r12,%rdi
call   1040 <puts@plt>
sub    %rax,%rbx
mov    %rbx,%rdi
call   1030 <putchar@plt>
test   %eax,%eax
jne    1180 <main+0x50>
lea    0xe5e(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"paul\00"
@.str.1 = [5 x i8] c"ball\00"
@.str.2 = [5 x i8] c"very\00"
@.str.3 = [5 x i8] c"easy\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %4
4: ; preds = %14, %0
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
store i32 %6, i32* %2
%7 = icmp slt i32 %5, 3
%8 = zext i1 %7 to i32
%9 = call i64 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%10 = call i64 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%11 = sub nsw i64 %9, %10
%12 = call i32 @putchar(i64 %11)
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %4
%15 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %4
16: ; preds = %4
%17 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
@.str = [5 x i8] c"paul\00"
@.str.1 = [5 x i8] c"ball\00"
@.str.2 = [5 x i8] c"very\00"
@.str.3 = [5 x i8] c"easy\00"
define i32 @main() {
%1 = tail call i64 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i64 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%3 = sub nsw i64 %1, %2
%4 = tail call i32 @putchar(i64 %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %0, %6
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i64 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%9 = tail call i64 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%10 = sub nsw i64 %8, %9
%11 = tail call i32 @putchar(i64 %10)
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %0
%14 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}