#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 displayQueue(int Q[], int front, int rear) {
  int i;
  for (i = 0; i <= rear; i++) {
    if (i == front)
      printf("[F]");
    if (Q[i] == -9999999)
      printf("\t--");
    else
      printf("\t %d", Q[i]);
    if (i == rear)
      printf("[R]");
  }
}


x86 assembly (clang, -O0):
<displayQueue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     11bd <displayQueue+0xad>
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    114f <displayQueue+0x3f>
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpl   $0xff676981,(%rax,%rcx,4)
jne    1177 <displayQueue+0x67>
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1190 <displayQueue+0x80>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11aa <displayQueue+0x9a>
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11af <displayQueue+0x9f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1129 <displayQueue+0x19>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<displayQueue>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %edx,%edx
js     119f <displayQueue+0x8f>
mov    %edx,%ebx
mov    %rdi,%r14
mov    %esi,%r15d
mov    %edx,%r12d
add    $0x1,%ebx
lea    0xed0(%rip),%rbp
xor    %r13d,%r13d
jmp    1149 <displayQueue+0x39>
nopl   (%rax)
add    $0x1,%r13
cmp    %r13,%rbx
je     119f <displayQueue+0x8f>
cmp    %r13,%r15
jne    115c <displayQueue+0x4c>
lea    0xeab(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%r14,%r13,4),%esi
cmp    $0xff676981,%esi
jne    1180 <displayQueue+0x70>
lea    0xe95(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
cmp    %r13,%r12
jne    1140 <displayQueue+0x30>
jmp    118f <displayQueue+0x7f>
nopl   (%rax)
mov    %rbp,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
cmp    %r13,%r12
jne    1140 <displayQueue+0x30>
lea    0xe77(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    1140 <displayQueue+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"[F]\00"
@.str.1 = [4 x i8] c"\09--\00"
@.str.2 = [5 x i8] c"\09 %d\00"
@.str.3 = [4 x i8] c"[R]\00"
define void @displayQueue(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %2, 0
br i1 %4, label %30, label %5
5: ; preds = %3
%6 = zext i32 %1 to i64
%7 = zext i32 %2 to i64
%8 = add nuw i32 %2, 1
%9 = zext i32 %8 to i64
br label %10
10: ; preds = %5, %27
%11 = phi i64 [ 0, %5 ], [ %28, %27 ]
%12 = icmp eq i64 %11, %6
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %10
%16 = getelementptr inbounds i32, i32* %0, i64 %11
%17 = load i32, i32* %16
%18 = icmp eq i32 %17, -9999999
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %23
21: ; preds = %15
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %17)
br label %23
23: ; preds = %21, %19
%24 = icmp eq i64 %11, %7
br i1 %24, label %25, label %27
25: ; preds = %23
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %27
27: ; preds = %23, %25
%28 = add nuw nsw i64 %11, 1
%29 = icmp eq i64 %28, %9
br i1 %29, label %30, label %10
30: ; preds = %27, %3
ret void
}