#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*/ ft_cube(int, int);
int /*<<< orphan*/ write(int, char *, int);
int rush(int x, int y) {
  if (x <= 0 || y <= 0) {
    write(2, "Invalid size \n", 13);
    return (0);
  }
  if ((x == y && x > 1 && y > 1) || x >= 4) {
    ft_cube(x - 1, y);
    return (0);
  } else {
    ft_cube(x, y);
    return (0);
  }
}


x86 assembly (clang, -O0):
<rush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1142 <rush+0x22>
cmpl   $0x0,-0xc(%rbp)
jg     1164 <rush+0x44>
mov    $0x2,%edi
lea    0xeb2(%rip),%rsi
mov    $0xd,%edx
call   1030 <write@plt>
movl   $0x0,-0x4(%rbp)
jmp    11ba <rush+0x9a>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1184 <rush+0x64>
cmpl   $0x1,-0x8(%rbp)
jle    1184 <rush+0x64>
cmpl   $0x1,-0xc(%rbp)
jg     118e <rush+0x6e>
cmpl   $0x4,-0x8(%rbp)
jl     11a8 <rush+0x88>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
call   1040 <ft_cube@plt>
movl   $0x0,-0x4(%rbp)
jmp    11ba <rush+0x9a>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <ft_cube@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rush>:
push   %rax
test   %edi,%edi
jle    114f <rush+0x2f>
test   %esi,%esi
jle    114f <rush+0x2f>
cmp    %esi,%edi
sete   %al
cmp    $0x2,%edi
setae  %cl
cmp    $0x2,%esi
setae  %dl
cmp    $0x3,%edi
ja     1145 <rush+0x25>
and    %al,%cl
and    %cl,%dl
je     1148 <rush+0x28>
add    $0xffffffff,%edi
call   1040 <ft_cube@plt>
jmp    1165 <rush+0x45>
lea    0xeaa(%rip),%rsi
mov    $0x2,%edi
mov    $0xd,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Invalid size \0A\00"
define i32 @rush(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp sle i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i32, i32* %5
%10 = icmp sle i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8, %2
%12 = call i32 @write(i32 2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 13)
store i32 0, i32* %3
br label %35
13: ; preds = %8
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = icmp eq i32 %14, %15
br i1 %16, label %17, label %23
17: ; preds = %13
%18 = load i32, i32* %4
%19 = icmp sgt i32 %18, 1
br i1 %19, label %20, label %23
20: ; preds = %17
%21 = load i32, i32* %5
%22 = icmp sgt i32 %21, 1
br i1 %22, label %26, label %23
23: ; preds = %20, %17, %13
%24 = load i32, i32* %4
%25 = icmp sge i32 %24, 4
br i1 %25, label %26, label %31
26: ; preds = %23, %20
%27 = load i32, i32* %4
%28 = sub nsw i32 %27, 1
%29 = load i32, i32* %5
%30 = call i32 @ft_cube(i32 %28, i32 %29)
store i32 0, i32* %3
br label %35
31: ; preds = %23
%32 = load i32, i32* %4
%33 = load i32, i32* %5
%34 = call i32 @ft_cube(i32 %32, i32 %33)
store i32 0, i32* %3
br label %35
35: ; preds = %31, %26, %11
%36 = load i32, i32* %3
ret i32 %36
}

LLVM IR (-O2):
@.str = [15 x i8] c"Invalid size \0A\00"
define i32 @rush(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 1
%4 = icmp slt i32 %1, 1
%5 = or i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 13)
br label %21
8: ; preds = %2
%9 = icmp eq i32 %0, %1
%10 = icmp ugt i32 %0, 1
%11 = and i1 %10, %9
%12 = icmp ugt i32 %1, 1
%13 = and i1 %12, %11
%14 = icmp ugt i32 %0, 3
%15 = or i1 %14, %13
br i1 %15, label %16, label %19
16: ; preds = %8
%17 = add nsw i32 %0, -1
%18 = tail call i32 @ft_cube(i32 %17, i32 %1)
br label %21
19: ; preds = %8
%20 = tail call i32 @ft_cube(i32 %0, i32 %1)
br label %21
21: ; preds = %19, %16, %6
ret i32 0
}