#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*/ e_make_xrect(int, int, int, int, int);
int e_make_xr_rahmen(int xa, int ya, int xe, int ye, int sw) {
  if (!sw) {
    e_make_xrect(xa, ya, xe, ye, 0);
    e_make_xrect(xa, ya, xe, ye, 2);
  } else {
    e_make_xrect(xa + 1, ya, xe - 1, ya, 0);
    e_make_xrect(xa + 1, ye, xe - 1, ye, 0);
    e_make_xrect(xa, ya + 1, xa, ye - 1, 0);
    e_make_xrect(xe, ya + 1, xe, ye - 1, 0);
    e_make_xrect(xa, ya, xa, ya, 0);
    e_make_xrect(xe, ya, xe, ya, 0);
    e_make_xrect(xe, ye, xe, ye, 0);
    e_make_xrect(xa, ye, xa, ye, 0);
  }
  return (sw);
}


x86 assembly (clang, -O0):
<e_make_xr_rahmen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1162 <e_make_xr_rahmen+0x52>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
xor    %r8d,%r8d
call   1030 <e_make_xrect@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    $0x2,%r8d
call   1030 <e_make_xrect@plt>
jmp    121a <e_make_xr_rahmen+0x10a>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
mov    -0x8(%rbp),%ecx
xor    %r8d,%r8d
call   1030 <e_make_xrect@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
mov    -0x10(%rbp),%ecx
xor    %r8d,%r8d
call   1030 <e_make_xrect@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
xor    %r8d,%r8d
call   1030 <e_make_xrect@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
xor    %r8d,%r8d
call   1030 <e_make_xrect@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
xor    %r8d,%r8d
call   1030 <e_make_xrect@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
xor    %r8d,%r8d
call   1030 <e_make_xrect@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
xor    %r8d,%r8d
call   1030 <e_make_xrect@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%ecx
xor    %r8d,%r8d
call   1030 <e_make_xrect@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<e_make_xr_rahmen>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %edx,%ebx
mov    %esi,%ebp
mov    %edi,%r12d
test   %r8d,%r8d
je     11dd <e_make_xr_rahmen+0xcd>
lea    0x1(%r12),%r13d
mov    %r14d,0x4(%rsp)
lea    -0x1(%rbx),%r14d
mov    %r13d,%edi
mov    %ebp,%esi
mov    %r14d,%edx
mov    %ebp,%ecx
xor    %r8d,%r8d
call   1030 <e_make_xrect@plt>
mov    %r13d,%edi
mov    %r15d,%esi
mov    %r14d,%edx
mov    %r15d,%ecx
xor    %r8d,%r8d
call   1030 <e_make_xrect@plt>
lea    0x1(%rbp),%r14d
lea    -0x1(%r15),%r13d
mov    %r12d,%edi
mov    %r14d,%esi
mov    %r12d,%edx
mov    %r13d,%ecx
xor    %r8d,%r8d
call   1030 <e_make_xrect@plt>
mov    %ebx,%edi
mov    %r14d,%esi
mov    0x4(%rsp),%r14d
mov    %ebx,%edx
mov    %r13d,%ecx
xor    %r8d,%r8d
call   1030 <e_make_xrect@plt>
mov    %r12d,%edi
mov    %ebp,%esi
mov    %r12d,%edx
mov    %ebp,%ecx
xor    %r8d,%r8d
call   1030 <e_make_xrect@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    %ebp,%ecx
xor    %r8d,%r8d
call   1030 <e_make_xrect@plt>
mov    %ebx,%edi
mov    %r15d,%esi
mov    %ebx,%edx
mov    %r15d,%ecx
xor    %r8d,%r8d
call   1030 <e_make_xrect@plt>
mov    %r12d,%edi
mov    %r15d,%esi
mov    %r12d,%edx
mov    %r15d,%ecx
xor    %r8d,%r8d
jmp    11ff <e_make_xr_rahmen+0xef>
mov    %r12d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    %r15d,%ecx
xor    %r8d,%r8d
call   1030 <e_make_xrect@plt>
mov    %r12d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    $0x2,%r8d
call   1030 <e_make_xrect@plt>
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @e_make_xr_rahmen(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %10
%12 = icmp ne i32 %11, 0
br i1 %12, label %24, label %13
13: ; preds = %5
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = load i32, i32* %8
%17 = load i32, i32* %9
%18 = call i32 @e_make_xrect(i32 %14, i32 %15, i32 %16, i32 %17, i32 0)
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = load i32, i32* %8
%22 = load i32, i32* %9
%23 = call i32 @e_make_xrect(i32 %19, i32 %20, i32 %21, i32 %22, i32 2)
br label %73
24: ; preds = %5
%25 = load i32, i32* %6
%26 = add nsw i32 %25, 1
%27 = load i32, i32* %7
%28 = load i32, i32* %8
%29 = sub nsw i32 %28, 1
%30 = load i32, i32* %7
%31 = call i32 @e_make_xrect(i32 %26, i32 %27, i32 %29, i32 %30, i32 0)
%32 = load i32, i32* %6
%33 = add nsw i32 %32, 1
%34 = load i32, i32* %9
%35 = load i32, i32* %8
%36 = sub nsw i32 %35, 1
%37 = load i32, i32* %9
%38 = call i32 @e_make_xrect(i32 %33, i32 %34, i32 %36, i32 %37, i32 0)
%39 = load i32, i32* %6
%40 = load i32, i32* %7
%41 = add nsw i32 %40, 1
%42 = load i32, i32* %6
%43 = load i32, i32* %9
%44 = sub nsw i32 %43, 1
%45 = call i32 @e_make_xrect(i32 %39, i32 %41, i32 %42, i32 %44, i32 0)
%46 = load i32, i32* %8
%47 = load i32, i32* %7
%48 = add nsw i32 %47, 1
%49 = load i32, i32* %8
%50 = load i32, i32* %9
%51 = sub nsw i32 %50, 1
%52 = call i32 @e_make_xrect(i32 %46, i32 %48, i32 %49, i32 %51, i32 0)
%53 = load i32, i32* %6
%54 = load i32, i32* %7
%55 = load i32, i32* %6
%56 = load i32, i32* %7
%57 = call i32 @e_make_xrect(i32 %53, i32 %54, i32 %55, i32 %56, i32 0)
%58 = load i32, i32* %8
%59 = load i32, i32* %7
%60 = load i32, i32* %8
%61 = load i32, i32* %7
%62 = call i32 @e_make_xrect(i32 %58, i32 %59, i32 %60, i32 %61, i32 0)
%63 = load i32, i32* %8
%64 = load i32, i32* %9
%65 = load i32, i32* %8
%66 = load i32, i32* %9
%67 = call i32 @e_make_xrect(i32 %63, i32 %64, i32 %65, i32 %66, i32 0)
%68 = load i32, i32* %6
%69 = load i32, i32* %9
%70 = load i32, i32* %6
%71 = load i32, i32* %9
%72 = call i32 @e_make_xrect(i32 %68, i32 %69, i32 %70, i32 %71, i32 0)
br label %73
73: ; preds = %24, %13
%74 = load i32, i32* %10
ret i32 %74
}

LLVM IR (-O2):
define i32 @e_make_xr_rahmen(i32 %0, i32 %1, i32 %2, i32 %3, i32 returned %4) {
%6 = icmp eq i32 %4, 0
br i1 %6, label %7, label %10
7: ; preds = %5
%8 = tail call i32 @e_make_xrect(i32 %0, i32 %1, i32 %2, i32 %3, i32 0)
%9 = tail call i32 @e_make_xrect(i32 %0, i32 %1, i32 %2, i32 %3, i32 2)
br label %23
10: ; preds = %5
%11 = add nsw i32 %0, 1
%12 = add nsw i32 %2, -1
%13 = tail call i32 @e_make_xrect(i32 %11, i32 %1, i32 %12, i32 %1, i32 0)
%14 = tail call i32 @e_make_xrect(i32 %11, i32 %3, i32 %12, i32 %3, i32 0)
%15 = add nsw i32 %1, 1
%16 = add nsw i32 %3, -1
%17 = tail call i32 @e_make_xrect(i32 %0, i32 %15, i32 %0, i32 %16, i32 0)
%18 = tail call i32 @e_make_xrect(i32 %2, i32 %15, i32 %2, i32 %16, i32 0)
%19 = tail call i32 @e_make_xrect(i32 %0, i32 %1, i32 %0, i32 %1, i32 0)
%20 = tail call i32 @e_make_xrect(i32 %2, i32 %1, i32 %2, i32 %1, i32 0)
%21 = tail call i32 @e_make_xrect(i32 %2, i32 %3, i32 %2, i32 %3, i32 0)
%22 = tail call i32 @e_make_xrect(i32 %0, i32 %3, i32 %0, i32 %3, i32 0)
br label %23
23: ; preds = %10, %7
ret i32 %4
}