#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*/ fill(int, int, int, int, int);
int /*<<< orphan*/ rect(int, int, int, int, int);
void draw_pillar(int x, int gap) {
  if (x >= 320)
    return;
  fill(0x07E0, x + 2, 2, 46, gap - 4);
  fill(0x07E0, x + 2, gap + 92, 46, 136 - gap);
  rect(0x0000, x, 0, 50, gap);
  rect(0x0000, x + 1, 1, 48, gap - 2);
  rect(0x0000, x, gap + 90, 50, 140 - gap);
  rect(0x0000, x + 1, gap + 91, 48, 138 - gap);
}


x86 assembly (clang, -O0):
<draw_pillar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x140,-0x4(%rbp)
jl     1140 <draw_pillar+0x20>
jmp    11fc <draw_pillar+0xdc>
mov    -0x4(%rbp),%esi
add    $0x2,%esi
mov    -0x8(%rbp),%r8d
sub    $0x4,%r8d
mov    $0x7e0,%edi
mov    $0x2,%edx
mov    $0x2e,%ecx
call   1040 <fill@plt>
mov    -0x4(%rbp),%esi
add    $0x2,%esi
mov    -0x8(%rbp),%edx
add    $0x5c,%edx
mov    $0x88,%r8d
sub    -0x8(%rbp),%r8d
mov    $0x7e0,%edi
mov    $0x2e,%ecx
call   1040 <fill@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%r8d
xor    %edx,%edx
mov    $0x32,%ecx
mov    %edx,%edi
call   1030 <rect@plt>
mov    -0x4(%rbp),%esi
add    $0x1,%esi
mov    -0x8(%rbp),%r8d
sub    $0x2,%r8d
xor    %edi,%edi
mov    $0x1,%edx
mov    $0x30,%ecx
call   1030 <rect@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
add    $0x5a,%edx
mov    $0x8c,%r8d
sub    -0x8(%rbp),%r8d
xor    %edi,%edi
mov    $0x32,%ecx
call   1030 <rect@plt>
mov    -0x4(%rbp),%esi
add    $0x1,%esi
mov    -0x8(%rbp),%edx
add    $0x5b,%edx
mov    $0x8a,%r8d
sub    -0x8(%rbp),%r8d
xor    %edi,%edi
mov    $0x30,%ecx
call   1030 <rect@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_pillar>:
cmp    $0x13f,%edi
jle    1129 <draw_pillar+0x9>
ret
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%r14d
lea    0x2(%r14),%ebp
lea    -0x4(%rbx),%r8d
mov    $0x7e0,%edi
mov    %ebp,%esi
mov    $0x2,%edx
mov    $0x2e,%ecx
call   1040 <fill@plt>
lea    0x5c(%rbx),%edx
mov    $0x88,%r8d
sub    %ebx,%r8d
mov    $0x7e0,%edi
mov    %ebp,%esi
mov    $0x2e,%ecx
call   1040 <fill@plt>
xor    %edi,%edi
mov    %r14d,%esi
xor    %edx,%edx
mov    $0x32,%ecx
mov    %ebx,%r8d
call   1030 <rect@plt>
lea    0x1(%r14),%ebp
lea    -0x2(%rbx),%r8d
xor    %edi,%edi
mov    %ebp,%esi
mov    $0x1,%edx
mov    $0x30,%ecx
call   1030 <rect@plt>
lea    0x5a(%rbx),%edx
mov    $0x8c,%r8d
sub    %ebx,%r8d
xor    %edi,%edi
mov    %r14d,%esi
mov    $0x32,%ecx
call   1030 <rect@plt>
mov    $0x8a,%r8d
sub    %ebx,%r8d
add    $0x5b,%ebx
xor    %edi,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    $0x30,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <rect@plt>

LLVM IR (-O0):
define void @draw_pillar(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp sge i32 %5, 320
br i1 %6, label %7, label %8
7: ; preds = %2
br label %42
8: ; preds = %2
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 2
%11 = load i32, i32* %4
%12 = sub nsw i32 %11, 4
%13 = call i32 @fill(i32 2016, i32 %10, i32 2, i32 46, i32 %12)
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 2
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 92
%18 = load i32, i32* %4
%19 = sub nsw i32 136, %18
%20 = call i32 @fill(i32 2016, i32 %15, i32 %17, i32 46, i32 %19)
%21 = load i32, i32* %3
%22 = load i32, i32* %4
%23 = call i32 @rect(i32 0, i32 %21, i32 0, i32 50, i32 %22)
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
%26 = load i32, i32* %4
%27 = sub nsw i32 %26, 2
%28 = call i32 @rect(i32 0, i32 %25, i32 1, i32 48, i32 %27)
%29 = load i32, i32* %3
%30 = load i32, i32* %4
%31 = add nsw i32 %30, 90
%32 = load i32, i32* %4
%33 = sub nsw i32 140, %32
%34 = call i32 @rect(i32 0, i32 %29, i32 %31, i32 50, i32 %33)
%35 = load i32, i32* %3
%36 = add nsw i32 %35, 1
%37 = load i32, i32* %4
%38 = add nsw i32 %37, 91
%39 = load i32, i32* %4
%40 = sub nsw i32 138, %39
%41 = call i32 @rect(i32 0, i32 %36, i32 %38, i32 48, i32 %40)
br label %42
42: ; preds = %8, %7
ret void
}

LLVM IR (-O2):
define void @draw_pillar(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 319
br i1 %3, label %21, label %4
4: ; preds = %2
%5 = add nsw i32 %0, 2
%6 = add nsw i32 %1, -4
%7 = tail call i32 @fill(i32 2016, i32 %5, i32 2, i32 46, i32 %6)
%8 = add nsw i32 %1, 92
%9 = sub nsw i32 136, %1
%10 = tail call i32 @fill(i32 2016, i32 %5, i32 %8, i32 46, i32 %9)
%11 = tail call i32 @rect(i32 0, i32 %0, i32 0, i32 50, i32 %1)
%12 = add nsw i32 %0, 1
%13 = add nsw i32 %1, -2
%14 = tail call i32 @rect(i32 0, i32 %12, i32 1, i32 48, i32 %13)
%15 = add nsw i32 %1, 90
%16 = sub nsw i32 140, %1
%17 = tail call i32 @rect(i32 0, i32 %0, i32 %15, i32 50, i32 %16)
%18 = add nsw i32 %1, 91
%19 = sub nsw i32 138, %1
%20 = tail call i32 @rect(i32 0, i32 %12, i32 %18, i32 48, i32 %19)
br label %21
21: ; preds = %2, %4
ret void
}