#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*/ draw_line(int, int, int, int, int);
void leftright_sign(int x, int y) {
  int i;
  for (i = 5; i < 32 - 5; i++) {
    draw_line(x + 3, y + i, x + 18 + 3, y + 16, 0x05);
    draw_line(x + 3, y + i, x + 18 + 3, y + 16, 0x05);
    draw_line(x - 3, y + i, x - 18 - 3, y + 16, 0x05);
    draw_line(x - 3, y + i, x - 18 - 3, y + 16, 0x05);
  }
}


x86 assembly (clang, -O0):
<leftright_sign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
cmpl   $0x1b,-0xc(%rbp)
jge    11d5 <leftright_sign+0xc5>
mov    -0x4(%rbp),%edi
add    $0x3,%edi
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
mov    -0x4(%rbp),%edx
add    $0x12,%edx
add    $0x3,%edx
mov    -0x8(%rbp),%ecx
add    $0x10,%ecx
mov    $0x5,%r8d
call   1030 <draw_line@plt>
mov    -0x4(%rbp),%edi
add    $0x3,%edi
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
mov    -0x4(%rbp),%edx
add    $0x12,%edx
add    $0x3,%edx
mov    -0x8(%rbp),%ecx
add    $0x10,%ecx
mov    $0x5,%r8d
call   1030 <draw_line@plt>
mov    -0x4(%rbp),%edi
sub    $0x3,%edi
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
mov    -0x4(%rbp),%edx
sub    $0x12,%edx
sub    $0x3,%edx
mov    -0x8(%rbp),%ecx
add    $0x10,%ecx
mov    $0x5,%r8d
call   1030 <draw_line@plt>
mov    -0x4(%rbp),%edi
sub    $0x3,%edi
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
mov    -0x4(%rbp),%edx
sub    $0x12,%edx
sub    $0x3,%edx
mov    -0x8(%rbp),%ecx
add    $0x10,%ecx
mov    $0x5,%r8d
call   1030 <draw_line@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1125 <leftright_sign+0x15>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<leftright_sign>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0x3(%rdi),%eax
mov    %eax,0x14(%rsp)
lea    0x15(%rdi),%eax
mov    %eax,0x10(%rsp)
mov    %rsi,0x20(%rsp)
lea    0x10(%rsi),%eax
mov    %eax,0x8(%rsp)
lea    -0x3(%rdi),%eax
mov    %eax,0xc(%rsp)
add    $0xffffffeb,%edi
mov    %rdi,0x18(%rsp)
mov    $0x5,%r15d
mov    0x10(%rsp),%r13d
mov    0x8(%rsp),%ebx
mov    0xc(%rsp),%ebp
nopw   0x0(%rax,%rax,1)
mov    0x20(%rsp),%rax
lea    (%rax,%r15,1),%r14d
mov    0x14(%rsp),%r12d
mov    %r12d,%edi
mov    %r14d,%esi
mov    %r13d,%edx
mov    %ebx,%ecx
mov    $0x5,%r8d
call   1030 <draw_line@plt>
mov    %r12d,%edi
mov    %r14d,%esi
mov    %r13d,%edx
mov    %ebx,%ecx
mov    $0x5,%r8d
call   1030 <draw_line@plt>
mov    %ebp,%edi
mov    %r14d,%esi
mov    0x18(%rsp),%r12
mov    %r12d,%edx
mov    %ebx,%ecx
mov    $0x5,%r8d
call   1030 <draw_line@plt>
mov    %ebp,%edi
mov    %r14d,%esi
mov    %r12d,%edx
mov    %ebx,%ecx
mov    $0x5,%r8d
call   1030 <draw_line@plt>
add    $0x1,%r15d
cmp    $0x1b,%r15d
jne    1160 <leftright_sign+0x50>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @leftright_sign(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 5, i32* %5
br label %6
6: ; preds = %54, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 27
br i1 %8, label %9, label %57
9: ; preds = %6
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 3
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = add nsw i32 %12, %13
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 18
%17 = add nsw i32 %16, 3
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 16
%20 = call i32 @draw_line(i32 %11, i32 %14, i32 %17, i32 %19, i32 5)
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 3
%23 = load i32, i32* %4
%24 = load i32, i32* %5
%25 = add nsw i32 %23, %24
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 18
%28 = add nsw i32 %27, 3
%29 = load i32, i32* %4
%30 = add nsw i32 %29, 16
%31 = call i32 @draw_line(i32 %22, i32 %25, i32 %28, i32 %30, i32 5)
%32 = load i32, i32* %3
%33 = sub nsw i32 %32, 3
%34 = load i32, i32* %4
%35 = load i32, i32* %5
%36 = add nsw i32 %34, %35
%37 = load i32, i32* %3
%38 = sub nsw i32 %37, 18
%39 = sub nsw i32 %38, 3
%40 = load i32, i32* %4
%41 = add nsw i32 %40, 16
%42 = call i32 @draw_line(i32 %33, i32 %36, i32 %39, i32 %41, i32 5)
%43 = load i32, i32* %3
%44 = sub nsw i32 %43, 3
%45 = load i32, i32* %4
%46 = load i32, i32* %5
%47 = add nsw i32 %45, %46
%48 = load i32, i32* %3
%49 = sub nsw i32 %48, 18
%50 = sub nsw i32 %49, 3
%51 = load i32, i32* %4
%52 = add nsw i32 %51, 16
%53 = call i32 @draw_line(i32 %44, i32 %47, i32 %50, i32 %52, i32 5)
br label %54
54: ; preds = %9
%55 = load i32, i32* %5
%56 = add nsw i32 %55, 1
store i32 %56, i32* %5
br label %6
57: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @leftright_sign(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 3
%4 = add nsw i32 %0, 21
%5 = add nsw i32 %1, 16
%6 = add nsw i32 %0, -3
%7 = add nsw i32 %0, -21
br label %8
8: ; preds = %2, %8
%9 = phi i32 [ 5, %2 ], [ %15, %8 ]
%10 = add nsw i32 %9, %1
%11 = tail call i32 @draw_line(i32 %3, i32 %10, i32 %4, i32 %5, i32 5)
%12 = tail call i32 @draw_line(i32 %3, i32 %10, i32 %4, i32 %5, i32 5)
%13 = tail call i32 @draw_line(i32 %6, i32 %10, i32 %7, i32 %5, i32 5)
%14 = tail call i32 @draw_line(i32 %6, i32 %10, i32 %7, i32 %5, i32 5)
%15 = add nuw nsw i32 %9, 1
%16 = icmp eq i32 %15, 27
br i1 %16, label %17, label %8
17: ; preds = %8
ret void
}