#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*/ ezPlot(unsigned char, unsigned char);
void ezRect(unsigned char x, unsigned char y, unsigned char w,
            unsigned char h) {
  unsigned char i, j;
  for (j = x; j < x + w; j++) {
    for (i = y; i < y + h; i++) {
      ezPlot(j, i);
    }
  }
}


x86 assembly (clang, -O0):
<ezRect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %cl,%al
mov    %dl,%cl
mov    %sil,%dl
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %dl,-0x2(%rbp)
mov    %cl,-0x3(%rbp)
mov    %al,-0x4(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x6(%rbp)
movzbl -0x6(%rbp),%eax
movzbl -0x1(%rbp),%ecx
movzbl -0x3(%rbp),%edx
add    %edx,%ecx
cmp    %ecx,%eax
jge    1195 <ezRect+0x85>
mov    -0x2(%rbp),%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
movzbl -0x2(%rbp),%ecx
movzbl -0x4(%rbp),%edx
add    %edx,%ecx
cmp    %ecx,%eax
jge    1183 <ezRect+0x73>
mov    -0x6(%rbp),%al
movzbl %al,%edi
movzbl -0x5(%rbp),%esi
call   1030 <ezPlot@plt>
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
jmp    1151 <ezRect+0x41>
jmp    1188 <ezRect+0x78>
mov    -0x6(%rbp),%al
add    $0x1,%al
mov    %al,-0x6(%rbp)
jmp    1135 <ezRect+0x25>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ezRect>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %edx,%edx
je     117d <ezRect+0x6d>
mov    %ecx,%r15d
mov    %edx,%r12d
mov    %esi,%r14d
mov    %edi,%ebx
add    %edi,%r12d
movzbl %r14b,%eax
movzbl %r15b,%r13d
add    %eax,%r13d
jmp    114b <ezRect+0x3b>
nopw   0x0(%rax,%rax,1)
add    $0x1,%bl
movzbl %bl,%eax
cmp    %eax,%r12d
jbe    117d <ezRect+0x6d>
test   %r15b,%r15b
je     1140 <ezRect+0x30>
mov    %r14d,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl %bl,%edi
movzbl %bpl,%ebp
mov    %ebp,%esi
call   1030 <ezPlot@plt>
add    $0x1,%bpl
movzbl %bpl,%eax
cmp    %eax,%r13d
ja     1160 <ezRect+0x50>
jmp    1140 <ezRect+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @ezRect(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
store i8 %0, i8* %5
store i8 %1, i8* %6
store i8 %2, i8* %7
store i8 %3, i8* %8
%11 = load i8, i8* %5
store i8 %11, i8* %10
br label %12
12: ; preds = %40, %4
%13 = load i8, i8* %10
%14 = zext i8 %13 to i32
%15 = load i8, i8* %5
%16 = zext i8 %15 to i32
%17 = load i8, i8* %7
%18 = zext i8 %17 to i32
%19 = add nsw i32 %16, %18
%20 = icmp slt i32 %14, %19
br i1 %20, label %21, label %43
21: ; preds = %12
%22 = load i8, i8* %6
store i8 %22, i8* %9
br label %23
23: ; preds = %36, %21
%24 = load i8, i8* %9
%25 = zext i8 %24 to i32
%26 = load i8, i8* %6
%27 = zext i8 %26 to i32
%28 = load i8, i8* %8
%29 = zext i8 %28 to i32
%30 = add nsw i32 %27, %29
%31 = icmp slt i32 %25, %30
br i1 %31, label %32, label %39
32: ; preds = %23
%33 = load i8, i8* %10
%34 = load i8, i8* %9
%35 = call i32 @ezPlot(i8 zeroext %33, i8 zeroext %34)
br label %36
36: ; preds = %32
%37 = load i8, i8* %9
%38 = add i8 %37, 1
store i8 %38, i8* %9
br label %23
39: ; preds = %23
br label %40
40: ; preds = %39
%41 = load i8, i8* %10
%42 = add i8 %41, 1
store i8 %42, i8* %10
br label %12
43: ; preds = %12
ret void
}

LLVM IR (-O2):
define void @ezRect(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = zext i8 %0 to i32
%6 = zext i8 %2 to i32
%7 = add nuw nsw i32 %6, %5
%8 = icmp eq i8 %2, 0
br i1 %8, label %26, label %9
9: ; preds = %4
%10 = zext i8 %1 to i32
%11 = zext i8 %3 to i32
%12 = add nuw nsw i32 %11, %10
%13 = icmp eq i8 %3, 0
br label %14
14: ; preds = %9, %22
%15 = phi i8 [ %0, %9 ], [ %23, %22 ]
br i1 %13, label %22, label %16
16: ; preds = %14, %16
%17 = phi i8 [ %19, %16 ], [ %1, %14 ]
%18 = tail call i32 @ezPlot(i8 zeroext %15, i8 zeroext %17)
%19 = add i8 %17, 1
%20 = zext i8 %19 to i32
%21 = icmp ugt i32 %12, %20
br i1 %21, label %16, label %22
22: ; preds = %16, %14
%23 = add i8 %15, 1
%24 = zext i8 %23 to i32
%25 = icmp ugt i32 %7, %24
br i1 %25, label %14, label %26
26: ; preds = %22, %4
ret void
}