#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 pirntRow(const int b[], int low, int mid, int high) {
  int i;
  for (i = 0; i < 15; i++) {
    if (i < low || i > high) {
      printf("    ");
    } else if (i == mid) {
      printf("%3d*", b[i]);
    } else {
      printf("%3d ", b[i]);
    }
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<pirntRow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0xf,-0x18(%rbp)
jge    11bc <pirntRow+0xac>
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     114e <pirntRow+0x3e>
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    1161 <pirntRow+0x51>
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a9 <pirntRow+0x99>
mov    -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    118b <pirntRow+0x7b>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a4 <pirntRow+0x94>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe6d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a9 <pirntRow+0x99>
jmp    11ae <pirntRow+0x9e>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112c <pirntRow+0x1c>
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pirntRow>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r13
movslq %ecx,%rbx
mov    %edx,%ebp
movslq %esi,%r15
lea    0xec3(%rip),%r14
xor    %r12d,%r12d
jmp    1164 <pirntRow+0x44>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r12
cmp    $0xf,%r12
je     11a5 <pirntRow+0x85>
cmp    %r15,%r12
jl     1150 <pirntRow+0x30>
cmp    %rbx,%r12
jg     1150 <pirntRow+0x30>
cmp    %r12,%rbp
jne    1190 <pirntRow+0x70>
mov    0x0(%r13,%rbp,4),%esi
lea    0xe86(%rip),%rdi
jmp    119c <pirntRow+0x7c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x0(%r13,%r12,4),%esi
lea    0xe6e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    115a <pirntRow+0x3a>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

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

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