#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*/ forwd(int);
int /*<<< orphan*/ turnleft(int);
int /*<<< orphan*/ turnright(int);
void star_6(int len) {
  int i;
  for (i = 0; i < 6; i++) {
    forwd(len);
    turnright(120);
    forwd(len);
    turnleft(60);
  }
}


x86 assembly (clang, -O0):
<star_6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x6,-0x8(%rbp)
jge    117e <star_6+0x4e>
mov    -0x4(%rbp),%edi
call   1050 <forwd@plt>
mov    $0x78,%edi
call   1040 <turnright@plt>
mov    -0x4(%rbp),%edi
call   1050 <forwd@plt>
mov    $0x3c,%edi
call   1030 <turnleft@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1142 <star_6+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<star_6>:
push   %rbx
mov    %edi,%ebx
call   1050 <forwd@plt>
mov    $0x78,%edi
call   1040 <turnright@plt>
mov    %ebx,%edi
call   1050 <forwd@plt>
mov    $0x3c,%edi
call   1030 <turnleft@plt>
mov    %ebx,%edi
call   1050 <forwd@plt>
mov    $0x78,%edi
call   1040 <turnright@plt>
mov    %ebx,%edi
call   1050 <forwd@plt>
mov    $0x3c,%edi
call   1030 <turnleft@plt>
mov    %ebx,%edi
call   1050 <forwd@plt>
mov    $0x78,%edi
call   1040 <turnright@plt>
mov    %ebx,%edi
call   1050 <forwd@plt>
mov    $0x3c,%edi
call   1030 <turnleft@plt>
mov    %ebx,%edi
call   1050 <forwd@plt>
mov    $0x78,%edi
call   1040 <turnright@plt>
mov    %ebx,%edi
call   1050 <forwd@plt>
mov    $0x3c,%edi
call   1030 <turnleft@plt>
mov    %ebx,%edi
call   1050 <forwd@plt>
mov    $0x78,%edi
call   1040 <turnright@plt>
mov    %ebx,%edi
call   1050 <forwd@plt>
mov    $0x3c,%edi
call   1030 <turnleft@plt>
mov    %ebx,%edi
call   1050 <forwd@plt>
mov    $0x78,%edi
call   1040 <turnright@plt>
mov    %ebx,%edi
call   1050 <forwd@plt>
mov    $0x3c,%edi
pop    %rbx
jmp    1030 <turnleft@plt>

LLVM IR (-O0):
define void @star_6(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %14, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 6
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load i32, i32* %2
%9 = call i32 @forwd(i32 %8)
%10 = call i32 @turnright(i32 120)
%11 = load i32, i32* %2
%12 = call i32 @forwd(i32 %11)
%13 = call i32 @turnleft(i32 60)
br label %14
14: ; preds = %7
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %4
17: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @star_6(i32 %0) {
%2 = tail call i32 @forwd(i32 %0)
%3 = tail call i32 @turnright(i32 120)
%4 = tail call i32 @forwd(i32 %0)
%5 = tail call i32 @turnleft(i32 60)
%6 = tail call i32 @forwd(i32 %0)
%7 = tail call i32 @turnright(i32 120)
%8 = tail call i32 @forwd(i32 %0)
%9 = tail call i32 @turnleft(i32 60)
%10 = tail call i32 @forwd(i32 %0)
%11 = tail call i32 @turnright(i32 120)
%12 = tail call i32 @forwd(i32 %0)
%13 = tail call i32 @turnleft(i32 60)
%14 = tail call i32 @forwd(i32 %0)
%15 = tail call i32 @turnright(i32 120)
%16 = tail call i32 @forwd(i32 %0)
%17 = tail call i32 @turnleft(i32 60)
%18 = tail call i32 @forwd(i32 %0)
%19 = tail call i32 @turnright(i32 120)
%20 = tail call i32 @forwd(i32 %0)
%21 = tail call i32 @turnleft(i32 60)
%22 = tail call i32 @forwd(i32 %0)
%23 = tail call i32 @turnright(i32 120)
%24 = tail call i32 @forwd(i32 %0)
%25 = tail call i32 @turnleft(i32 60)
ret void
}