#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 */
typedef scalar_t__ GLint;

/* Variables and functions */
int /*<<< orphan*/ Circle_draw(scalar_t__, scalar_t__, scalar_t__);
void Cylinder_draw() {
  GLint xc = 100, yc = 100, r = 50;
  GLint i, n = 50;
  for (i = 0; i < n; i += 3) {
    Circle_draw(xc, yc + i, r);
  }
}


x86 assembly (clang, -O0):
<Cylinder_draw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movq   $0x64,-0x8(%rbp)
movq   $0x64,-0x10(%rbp)
movq   $0x32,-0x18(%rbp)
movq   $0x32,-0x28(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jge    1174 <Cylinder_draw+0x64>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <Circle_draw@plt>
mov    -0x20(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x20(%rbp)
jmp    1140 <Cylinder_draw+0x30>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cylinder_draw>:
push   %rax
mov    $0x64,%edi
mov    $0x64,%esi
mov    $0x32,%edx
call   1030 <Circle_draw@plt>
mov    $0x64,%edi
mov    $0x67,%esi
mov    $0x32,%edx
call   1030 <Circle_draw@plt>
mov    $0x64,%edi
mov    $0x6a,%esi
mov    $0x32,%edx
call   1030 <Circle_draw@plt>
mov    $0x64,%edi
mov    $0x6d,%esi
mov    $0x32,%edx
call   1030 <Circle_draw@plt>
mov    $0x64,%edi
mov    $0x70,%esi
mov    $0x32,%edx
call   1030 <Circle_draw@plt>
mov    $0x64,%edi
mov    $0x73,%esi
mov    $0x32,%edx
call   1030 <Circle_draw@plt>
mov    $0x64,%edi
mov    $0x76,%esi
mov    $0x32,%edx
call   1030 <Circle_draw@plt>
mov    $0x64,%edi
mov    $0x79,%esi
mov    $0x32,%edx
call   1030 <Circle_draw@plt>
mov    $0x64,%edi
mov    $0x7c,%esi
mov    $0x32,%edx
call   1030 <Circle_draw@plt>
mov    $0x64,%edi
mov    $0x7f,%esi
mov    $0x32,%edx
call   1030 <Circle_draw@plt>
mov    $0x64,%edi
mov    $0x82,%esi
mov    $0x32,%edx
call   1030 <Circle_draw@plt>
mov    $0x64,%edi
mov    $0x85,%esi
mov    $0x32,%edx
call   1030 <Circle_draw@plt>
mov    $0x64,%edi
mov    $0x88,%esi
mov    $0x32,%edx
call   1030 <Circle_draw@plt>
mov    $0x64,%edi
mov    $0x8b,%esi
mov    $0x32,%edx
call   1030 <Circle_draw@plt>
mov    $0x64,%edi
mov    $0x8e,%esi
mov    $0x32,%edx
call   1030 <Circle_draw@plt>
mov    $0x64,%edi
mov    $0x91,%esi
mov    $0x32,%edx
call   1030 <Circle_draw@plt>
mov    $0x64,%edi
mov    $0x94,%esi
mov    $0x32,%edx
pop    %rax
jmp    1030 <Circle_draw@plt>

LLVM IR (-O0):
define void @Cylinder_draw() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 100, i64* %1
store i64 100, i64* %2
store i64 50, i64* %3
store i64 50, i64* %5
store i64 0, i64* %4
br label %6
6: ; preds = %17, %0
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = icmp slt i64 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i64, i64* %1
%12 = load i64, i64* %2
%13 = load i64, i64* %4
%14 = add nsw i64 %12, %13
%15 = load i64, i64* %3
%16 = call i32 @Circle_draw(i64 %11, i64 %14, i64 %15)
br label %17
17: ; preds = %10
%18 = load i64, i64* %4
%19 = add nsw i64 %18, 3
store i64 %19, i64* %4
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @Cylinder_draw() {
%1 = tail call i32 @Circle_draw(i64 100, i64 100, i64 50)
%2 = tail call i32 @Circle_draw(i64 100, i64 103, i64 50)
%3 = tail call i32 @Circle_draw(i64 100, i64 106, i64 50)
%4 = tail call i32 @Circle_draw(i64 100, i64 109, i64 50)
%5 = tail call i32 @Circle_draw(i64 100, i64 112, i64 50)
%6 = tail call i32 @Circle_draw(i64 100, i64 115, i64 50)
%7 = tail call i32 @Circle_draw(i64 100, i64 118, i64 50)
%8 = tail call i32 @Circle_draw(i64 100, i64 121, i64 50)
%9 = tail call i32 @Circle_draw(i64 100, i64 124, i64 50)
%10 = tail call i32 @Circle_draw(i64 100, i64 127, i64 50)
%11 = tail call i32 @Circle_draw(i64 100, i64 130, i64 50)
%12 = tail call i32 @Circle_draw(i64 100, i64 133, i64 50)
%13 = tail call i32 @Circle_draw(i64 100, i64 136, i64 50)
%14 = tail call i32 @Circle_draw(i64 100, i64 139, i64 50)
%15 = tail call i32 @Circle_draw(i64 100, i64 142, i64 50)
%16 = tail call i32 @Circle_draw(i64 100, i64 145, i64 50)
%17 = tail call i32 @Circle_draw(i64 100, i64 148, i64 50)
ret void
}