#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*/ puts(char *);
void printRow(const int b[], size_t low, size_t mid, size_t high) {
  size_t i;
  for (i = 0; i < 15; ++i) {
    if (i < low || i > high) {
      printf("%s", "    ");
    } else if (i == mid) {
      printf("%3d*", b[i]);
    } else {
      printf("%3d ", b[i]);
    }
  }
  puts("");
}


x86 assembly (clang, -O0):
<printRow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
cmpq   $0xf,-0x28(%rbp)
jae    11e1 <printRow+0xc1>
mov    -0x28(%rbp),%rax
cmp    -0x10(%rbp),%rax
jb     1167 <printRow+0x47>
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
jbe    1181 <printRow+0x61>
lea    0xe92(%rip),%rdi
lea    0xe8e(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11cb <printRow+0xab>
mov    -0x28(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    11ad <printRow+0x8d>
mov    -0x8(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe67(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11c6 <printRow+0xa6>
mov    -0x8(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11cb <printRow+0xab>
jmp    11d0 <printRow+0xb0>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1140 <printRow+0x20>
lea    0xe1f(%rip),%rdi
call   1030 <puts@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printRow>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %rdi,%r12
lea    0xec5(%rip),%rbp
xor    %r13d,%r13d
jmp    116b <printRow+0x4b>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0xea9(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r13
cmp    $0xf,%r13
je     11a4 <printRow+0x84>
cmp    %rbx,%r13
jb     1150 <printRow+0x30>
cmp    %r14,%r13
ja     1150 <printRow+0x30>
cmp    %r13,%r15
jne    1190 <printRow+0x70>
mov    (%r12,%r15,4),%esi
lea    0xe83(%rip),%rdi
jmp    119b <printRow+0x7b>
nopw   0x0(%rax,%rax,1)
mov    (%r12,%r13,4),%esi
lea    0xe72(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1161 <printRow+0x41>
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 = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c" \00"
@.str.2 = [5 x i8] c"%3d*\00"
@.str.3 = [5 x i8] c"%3d \00"
@.str.4 = [1 x i8] zeroinitializer
define void @printRow(i32* %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i32*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
store i32* %0, i32** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
store i64 0, i64* %9
br label %10
10: ; preds = %41, %4
%11 = load i64, i64* %9
%12 = icmp ult i64 %11, 15
br i1 %12, label %13, label %44
13: ; preds = %10
%14 = load i64, i64* %9
%15 = load i64, i64* %6
%16 = icmp ult i64 %14, %15
br i1 %16, label %21, label %17
17: ; preds = %13
%18 = load i64, i64* %9
%19 = load i64, i64* %8
%20 = icmp ugt i64 %18, %19
br i1 %20, label %21, label %23
21: ; preds = %17, %13
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %40
23: ; preds = %17
%24 = load i64, i64* %9
%25 = load i64, i64* %7
%26 = icmp eq i64 %24, %25
br i1 %26, label %27, label %33
27: ; preds = %23
%28 = load i32*, i32** %5
%29 = load i64, i64* %9
%30 = getelementptr inbounds i32, i32* %28, i64 %29
%31 = load i32, i32* %30
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %31)
br label %39
33: ; preds = %23
%34 = load i32*, i32** %5
%35 = load i64, i64* %9
%36 = getelementptr inbounds i32, i32* %34, i64 %35
%37 = load i32, i32* %36
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %37)
br label %39
39: ; preds = %33, %27
br label %40
40: ; preds = %39, %21
br label %41
41: ; preds = %40
%42 = load i64, i64* %9
%43 = add i64 %42, 1
store i64 %43, i64* %9
br label %10
44: ; preds = %10
%45 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
ret void
}

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