#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 *, ...);
void printPass(int seatNum) {
  printf("\n---------------------------------------\n");
  if (seatNum < 5)
    printf("              FIRST CLASS\n");
  else
    printf("             ECONOMY CLASS\n");
  printf("---------------------------------------\n");
  printf("Flight LH907\tBoarding\tSeat No\n");
  printf("To Boston\t  9:10am\t%4d\n", seatNum + 1);
  printf("\nDeparture 9:40am at Gate 15\n");
  printf("---------------------------------------\n\n");
}


x86 assembly (clang, -O0):
<printPass>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x5,-0x4(%rbp)
jge    1146 <printPass+0x36>
lea    0xef0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1154 <printPass+0x44>
lea    0xef8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
add    $0x1,%esi
lea    0xf03(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf1d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printPass>:
push   %rbx
mov    %edi,%ebx
lea    0xeee(%rip),%rdi
call   1030 <puts@plt>
cmp    $0x5,%ebx
lea    0xf87(%rip),%rax
lea    0xf01(%rip),%rdi
cmovl  %rax,%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
lea    0xf00(%rip),%rdi
call   1030 <puts@plt>
add    $0x1,%ebx
lea    0xe95(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeff(%rip),%rdi
call   1030 <puts@plt>
lea    0xf10(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"\0A---------------------------------------\0A\00"
@.str.1 = [27 x i8] c" FIRST CLASS\0A\00"
@.str.2 = [28 x i8] c" ECONOMY CLASS\0A\00"
@.str.3 = [41 x i8] c"---------------------------------------\0A\00"
@.str.4 = [31 x i8] c"Flight LH907\09Boarding\09Seat No\0A\00"
@.str.5 = [24 x i8] c"To Boston\09 9:10am\09%4d\0A\00"
@.str.6 = [30 x i8] c"\0ADeparture 9:40am at Gate 15\0A\00"
@.str.7 = [42 x i8] c"---------------------------------------\0A\0A\00"
define void @printPass(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 5
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
br label %10
8: ; preds = %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %14)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.5 = [24 x i8] c"To Boston\09 9:10am\09%4d\0A\00"
@str = [41 x i8] c"\0A---------------------------------------\00"
@str.8 = [27 x i8] c" ECONOMY CLASS\00"
@str.9 = [40 x i8] c"---------------------------------------\00"
@str.10 = [30 x i8] c"Flight LH907\09Boarding\09Seat No\00"
@str.11 = [29 x i8] c"\0ADeparture 9:40am at Gate 15\00"
@str.12 = [41 x i8] c"---------------------------------------\0A\00"
@str.13 = [26 x i8] c" FIRST CLASS\00"
define void @printPass(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%3 = icmp slt i32 %0, 5
%4 = select i1 %3, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.13, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @str.8, i64 0, i64 0)
%5 = tail call i32 @puts(i8* dereferenceable(1) %4)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.9, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.10, i64 0, i64 0))
%8 = add nsw i32 %0, 1
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %8)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.11, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.12, i64 0, i64 0))
ret void
}