#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*/ putchar(char);
void printRow(int rowNum, int maxRow) {
  for (int i = 0; i < (maxRow - rowNum); i++) {
    putchar(' ');
  }
  for (int i = 0; i < 2 * rowNum - 1; i++) {
    putchar('*');
  }
  putchar('\n');
}


x86 assembly (clang, -O0):
<printRow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
cmp    %ecx,%eax
jge    114e <printRow+0x3e>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1125 <printRow+0x15>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1181 <printRow+0x71>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1155 <printRow+0x45>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printRow>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
sub    %edi,%ebp
test   %ebp,%ebp
jle    112f <printRow+0x1f>
nopl   (%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    1120 <printRow+0x10>
test   %ebx,%ebx
jle    115f <printRow+0x4f>
lea    (%rbx,%rbx,1),%eax
add    $0xffffffff,%eax
cmp    $0x2,%eax
mov    $0x1,%ebx
cmovge %eax,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1150 <printRow+0x40>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @printRow(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %7
7: ; preds = %15, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = load i32, i32* %3
%11 = sub nsw i32 %9, %10
%12 = icmp slt i32 %8, %11
br i1 %12, label %13, label %18
13: ; preds = %7
%14 = call i32 @putchar(i8 signext 32)
br label %15
15: ; preds = %13
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %7
18: ; preds = %7
store i32 0, i32* %6
br label %19
19: ; preds = %27, %18
%20 = load i32, i32* %6
%21 = load i32, i32* %3
%22 = mul nsw i32 2, %21
%23 = sub nsw i32 %22, 1
%24 = icmp slt i32 %20, %23
br i1 %24, label %25, label %30
25: ; preds = %19
%26 = call i32 @putchar(i8 signext 42)
br label %27
27: ; preds = %25
%28 = load i32, i32* %6
%29 = add nsw i32 %28, 1
store i32 %29, i32* %6
br label %19
30: ; preds = %19
%31 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @printRow(i32 %0, i32 %1) {
%3 = sub i32 %1, %0
%4 = icmp sgt i32 %3, 0
br i1 %4, label %11, label %5
5: ; preds = %11, %2
%6 = icmp sgt i32 %0, 0
br i1 %6, label %7, label %16
7: ; preds = %5
%8 = shl nuw nsw i32 %0, 1
%9 = add i32 %8, -1
%10 = call i32 @llvm.smax.i32(i32 %9, i32 1)
br label %18
11: ; preds = %2, %11
%12 = phi i32 [ %14, %11 ], [ 0, %2 ]
%13 = tail call i32 @putchar(i8 signext 32)
%14 = add nuw nsw i32 %12, 1
%15 = icmp eq i32 %14, %3
br i1 %15, label %5, label %11
16: ; preds = %18, %5
%17 = tail call i32 @putchar(i8 signext 10)
ret void
18: ; preds = %7, %18
%19 = phi i32 [ %21, %18 ], [ 0, %7 ]
%20 = tail call i32 @putchar(i8 signext 42)
%21 = add nuw nsw i32 %19, 1
%22 = icmp eq i32 %21, %10
br i1 %22, label %16, label %18
}