#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 int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *,
                           unsigned int, unsigned int, unsigned int,
                           unsigned int);
void ismapRect(FILE *ismap, const char *url, unsigned int x1, unsigned int y1,
               unsigned int x2, unsigned int y2) {
  if (ismap && url) {
    assert(x1 <= x2);
    assert(y1 <= y2);
    fprintf(ismap, "rect %s %d,%d %d,%d\n", url, x1, y1, x2, y2);
  }
}


x86 assembly (clang, -O0):
<ismapRect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     119f <ismapRect+0x7f>
cmpq   $0x0,-0x10(%rbp)
je     119f <ismapRect+0x7f>
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x18(%rbp),%eax
cmp    -0x20(%rbp),%eax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
mov    -0x20(%rbp),%eax
lea    0xe69(%rip),%rsi
mov    %eax,(%rsp)
call   1040 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ismapRect>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %rdi,%rdi
je     1182 <ismapRect+0x62>
mov    %rsi,%rbp
test   %rsi,%rsi
je     1182 <ismapRect+0x62>
mov    %r9d,%r13d
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %edx,%r12d
mov    %rdi,%rbx
xor    %edi,%edi
cmp    %r8d,%edx
setbe  %dil
call   1030 <assert@plt>
xor    %edi,%edi
cmp    %r13d,%r15d
setbe  %dil
call   1030 <assert@plt>
mov    %r13d,(%rsp)
lea    0xe92(%rip),%rsi
mov    %rbx,%rdi
mov    %rbp,%rdx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %r14d,%r9d
call   1040 <fprintf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [21 x i8] c"rect %s %d,%d %d,%d\0A\00"
define void @ismapRect(i32* %0, i8* %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32* %0, i32** %7
store i8* %1, i8** %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32*, i32** %7
%14 = icmp ne i32* %13, null
br i1 %14, label %15, label %36
15: ; preds = %6
%16 = load i8*, i8** %8
%17 = icmp ne i8* %16, null
br i1 %17, label %18, label %36
18: ; preds = %15
%19 = load i32, i32* %9
%20 = load i32, i32* %11
%21 = icmp ule i32 %19, %20
%22 = zext i1 %21 to i32
%23 = call i32 @assert(i32 %22)
%24 = load i32, i32* %10
%25 = load i32, i32* %12
%26 = icmp ule i32 %24, %25
%27 = zext i1 %26 to i32
%28 = call i32 @assert(i32 %27)
%29 = load i32*, i32** %7
%30 = load i8*, i8** %8
%31 = load i32, i32* %9
%32 = load i32, i32* %10
%33 = load i32, i32* %11
%34 = load i32, i32* %12
%35 = call i32 @fprintf(i32* %29, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %30, i32 %31, i32 %32, i32 %33, i32 %34)
br label %36
36: ; preds = %18, %15, %6
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"rect %s %d,%d %d,%d\0A\00"
define void @ismapRect(i32* %0, i8* %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = icmp ne i32* %0, null
%8 = icmp ne i8* %1, null
%9 = and i1 %7, %8
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = icmp ule i32 %2, %4
%12 = zext i1 %11 to i32
%13 = tail call i32 @assert(i32 %12)
%14 = icmp ule i32 %3, %5
%15 = zext i1 %14 to i32
%16 = tail call i32 @assert(i32 %15)
%17 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2, i32 %3, i32 %4, i32 %5)
br label %18
18: ; preds = %10, %6
ret void
}