#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*/ set(int /*<<< orphan*/, int, int, int, int /*<<< orphan*/,
                       int);
void negative_scaler_vertical(int ystart) {
  int i;
  for (i = 1; i < 120; i++)
    set(0, ystart - 2 * i, 720, ystart + 2 * i, 0, 0x0001);
  for (i = 120; i > 1; i--)
    set(0, ystart - 2 * i, 720, ystart + 2 * i, 0, 0x0001);
}


x86 assembly (clang, -O0):
<negative_scaler_vertical>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x78,-0x8(%rbp)
jge    1166 <negative_scaler_vertical+0x56>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
sub    %eax,%esi
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
add    %eax,%ecx
xor    %r8d,%r8d
mov    $0x2d0,%edx
mov    $0x1,%r9d
mov    %r8d,%edi
call   1030 <set@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <negative_scaler_vertical+0x12>
movl   $0x78,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    11b1 <negative_scaler_vertical+0xa1>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
sub    %eax,%esi
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
add    %eax,%ecx
xor    %r8d,%r8d
mov    $0x2d0,%edx
mov    $0x1,%r9d
mov    %r8d,%edi
call   1030 <set@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    116d <negative_scaler_vertical+0x5d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<negative_scaler_vertical>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
lea    -0x2(%r14),%ebp
mov    $0x2,%ebx
lea    (%r14,%rbx,1),%ecx
xor    %edi,%edi
mov    %ebp,%esi
mov    $0x2d0,%edx
xor    %r8d,%r8d
mov    $0x1,%r9d
call   1030 <set@plt>
add    $0x2,%ebx
add    $0xfffffffe,%ebp
cmp    $0xf0,%ebx
jne    1120 <negative_scaler_vertical+0x10>
lea    -0xf0(%r14),%ebp
add    $0xf0,%r14d
mov    $0x79,%ebx
nopl   0x0(%rax)
xor    %edi,%edi
mov    %ebp,%esi
mov    $0x2d0,%edx
mov    %r14d,%ecx
xor    %r8d,%r8d
mov    $0x1,%r9d
call   1030 <set@plt>
add    $0xffffffff,%ebx
add    $0x2,%ebp
add    $0xfffffffe,%r14d
cmp    $0x2,%ebx
ja     1160 <negative_scaler_vertical+0x50>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @negative_scaler_vertical(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
br label %4
4: ; preds = %17, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 120
br i1 %6, label %7, label %20
7: ; preds = %4
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = mul nsw i32 2, %9
%11 = sub nsw i32 %8, %10
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = mul nsw i32 2, %13
%15 = add nsw i32 %12, %14
%16 = call i32 @set(i32 0, i32 %11, i32 720, i32 %15, i32 0, i32 1)
br label %17
17: ; preds = %7
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %4
20: ; preds = %4
store i32 120, i32* %3
br label %21
21: ; preds = %34, %20
%22 = load i32, i32* %3
%23 = icmp sgt i32 %22, 1
br i1 %23, label %24, label %37
24: ; preds = %21
%25 = load i32, i32* %2
%26 = load i32, i32* %3
%27 = mul nsw i32 2, %26
%28 = sub nsw i32 %25, %27
%29 = load i32, i32* %2
%30 = load i32, i32* %3
%31 = mul nsw i32 2, %30
%32 = add nsw i32 %29, %31
%33 = call i32 @set(i32 0, i32 %28, i32 720, i32 %32, i32 0, i32 1)
br label %34
34: ; preds = %24
%35 = load i32, i32* %3
%36 = add nsw i32 %35, -1
store i32 %36, i32* %3
br label %21
37: ; preds = %21
ret void
}

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