#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 printdashes(int s1_e0) {
  size_t i = 0;
  if (s1_e0)
    printf("\n\n");
  while (i++ < 70)
    printf("-");
  if (!s1_e0)
    printf("\n\n");
  else
    printf("\n");
}


x86 assembly (clang, -O0):
<printdashes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1139 <printdashes+0x29>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
jmp    113e <printdashes+0x2e>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
cmp    $0x46,%rax
jae    1168 <printdashes+0x58>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
jmp    113e <printdashes+0x2e>
cmpl   $0x0,-0x4(%rbp)
jne    1183 <printdashes+0x73>
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
jmp    118f <printdashes+0x7f>
lea    0xe77(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printdashes>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
test   %edi,%edi
je     1135 <printdashes+0x15>
lea    0xed0(%rip),%rdi
call   1040 <puts@plt>
mov    $0x46,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x2d,%edi
call   1030 <putchar@plt>
add    $0xffffffffffffffff,%rbx
jne    1140 <printdashes+0x20>
test   %ebp,%ebp
je     1164 <printdashes+0x44>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>
lea    0xe95(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"\0A\0A\00"
@.str.1 = [2 x i8] c"-\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @printdashes(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
store i64 0, i64* %3
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
br label %9
9: ; preds = %13, %8
%10 = load i64, i64* %3
%11 = add i64 %10, 1
store i64 %11, i64* %3
%12 = icmp ult i64 %10, 70
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %9
15: ; preds = %9
%16 = load i32, i32* %2
%17 = icmp ne i32 %16, 0
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %22
20: ; preds = %15
%21 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %22
22: ; preds = %20, %18
ret void
}

LLVM IR (-O2):
@str.3 = [2 x i8] c"\0A\00"
define void @printdashes(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.3, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
br label %6
6: ; preds = %5, %6
%7 = phi i64 [ %8, %6 ], [ 0, %5 ]
%8 = add nuw nsw i64 %7, 1
%9 = tail call i32 @putchar(i32 45)
%10 = icmp eq i64 %8, 70
br i1 %10, label %11, label %6
11: ; preds = %6
br i1 %2, label %12, label %14
12: ; preds = %11
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.3, i64 0, i64 0))
br label %16
14: ; preds = %11
%15 = tail call i32 @putchar(i32 10)
br label %16
16: ; preds = %14, %12
ret void
}