#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 starbar(void) {
  int count;
  for (count = 1; count <= 40; count++)
    putchar('*');
  putchar('\n');
}


x86 assembly (clang, -O0):
<starbar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
cmpl   $0x28,-0x4(%rbp)
jg     1141 <starbar+0x31>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <starbar+0xf>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<starbar>:
push   %rax
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @starbar() {
%1 = alloca i32
store i32 1, i32* %1
br label %2
2: ; preds = %7, %0
%3 = load i32, i32* %1
%4 = icmp sle i32 %3, 40
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = call i32 @putchar(i8 signext 42)
br label %7
7: ; preds = %5
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %2
10: ; preds = %2
%11 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @starbar() {
%1 = tail call i32 @putchar(i8 signext 42)
%2 = tail call i32 @putchar(i8 signext 42)
%3 = tail call i32 @putchar(i8 signext 42)
%4 = tail call i32 @putchar(i8 signext 42)
%5 = tail call i32 @putchar(i8 signext 42)
%6 = tail call i32 @putchar(i8 signext 42)
%7 = tail call i32 @putchar(i8 signext 42)
%8 = tail call i32 @putchar(i8 signext 42)
%9 = tail call i32 @putchar(i8 signext 42)
%10 = tail call i32 @putchar(i8 signext 42)
%11 = tail call i32 @putchar(i8 signext 42)
%12 = tail call i32 @putchar(i8 signext 42)
%13 = tail call i32 @putchar(i8 signext 42)
%14 = tail call i32 @putchar(i8 signext 42)
%15 = tail call i32 @putchar(i8 signext 42)
%16 = tail call i32 @putchar(i8 signext 42)
%17 = tail call i32 @putchar(i8 signext 42)
%18 = tail call i32 @putchar(i8 signext 42)
%19 = tail call i32 @putchar(i8 signext 42)
%20 = tail call i32 @putchar(i8 signext 42)
%21 = tail call i32 @putchar(i8 signext 42)
%22 = tail call i32 @putchar(i8 signext 42)
%23 = tail call i32 @putchar(i8 signext 42)
%24 = tail call i32 @putchar(i8 signext 42)
%25 = tail call i32 @putchar(i8 signext 42)
%26 = tail call i32 @putchar(i8 signext 42)
%27 = tail call i32 @putchar(i8 signext 42)
%28 = tail call i32 @putchar(i8 signext 42)
%29 = tail call i32 @putchar(i8 signext 42)
%30 = tail call i32 @putchar(i8 signext 42)
%31 = tail call i32 @putchar(i8 signext 42)
%32 = tail call i32 @putchar(i8 signext 42)
%33 = tail call i32 @putchar(i8 signext 42)
%34 = tail call i32 @putchar(i8 signext 42)
%35 = tail call i32 @putchar(i8 signext 42)
%36 = tail call i32 @putchar(i8 signext 42)
%37 = tail call i32 @putchar(i8 signext 42)
%38 = tail call i32 @putchar(i8 signext 42)
%39 = tail call i32 @putchar(i8 signext 42)
%40 = tail call i32 @putchar(i8 signext 42)
%41 = tail call i32 @putchar(i8 signext 10)
ret void
}