#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 printZeile(int blanks, int stars) {
  for (int i = 0; i < blanks; ++i) {
    printf(" ");
  }
  for (int i = 0; i < stars; ++i) {
    printf("*");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<printZeile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    114b <printZeile+0x3b>
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1125 <printZeile+0x15>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1178 <printZeile+0x68>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1152 <printZeile+0x42>
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printZeile>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
test   %edi,%edi
jle    112f <printZeile+0x1f>
mov    %edi,%ebp
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    1120 <printZeile+0x10>
test   %ebx,%ebx
jle    114f <printZeile+0x3f>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1140 <printZeile+0x30>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [2 x i8] c"*\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @printZeile(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 = %13, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %3
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11
%14 = load i32, i32* %5
%15 = add nsw i32 %14, 1
store i32 %15, i32* %5
br label %7
16: ; preds = %7
store i32 0, i32* %6
br label %17
17: ; preds = %23, %16
%18 = load i32, i32* %6
%19 = load i32, i32* %4
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %26
21: ; preds = %17
%22 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %23
23: ; preds = %21
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 1
store i32 %25, i32* %6
br label %17
26: ; preds = %17
%27 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
define void @printZeile(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %6, label %4
4: ; preds = %6, %2
%5 = icmp sgt i32 %1, 0
br i1 %5, label %13, label %11
6: ; preds = %2, %6
%7 = phi i32 [ %9, %6 ], [ 0, %2 ]
%8 = tail call i32 @putchar(i32 32)
%9 = add nuw nsw i32 %7, 1
%10 = icmp eq i32 %9, %0
br i1 %10, label %4, label %6
11: ; preds = %13, %4
%12 = tail call i32 @putchar(i32 10)
ret void
13: ; preds = %4, %13
%14 = phi i32 [ %16, %13 ], [ 0, %4 ]
%15 = tail call i32 @putchar(i32 42)
%16 = add nuw nsw i32 %14, 1
%17 = icmp eq i32 %16, %1
br i1 %17, label %11, label %13
}