#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_putchar(char);
int /*<<< orphan*/ put_row(int /*<<< orphan*/, char, char, char);
int /*<<< orphan*/ which_row(int, int);
void rush(int x, int y) {
  int i;
  int j;
  j = 0;
  while (j < y) {
    i = 0;
    while (i < x) {
      if (j == 0)
        put_row(which_row(i, x), '/', '*', '\\');
      else if (j == y - 1)
        put_row(which_row(i, x), '\\', '*', '/');
      else
        put_row(which_row(i, x), '*', ' ', '*');
      i++;
    }
    ft_putchar('\n');
    j++;
  }
}


x86 assembly (clang, -O0):
<rush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1214 <rush+0xe4>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11fc <rush+0xcc>
cmpl   $0x0,-0x10(%rbp)
jne    1194 <rush+0x64>
mov    -0xc(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <which_row@plt>
mov    %eax,%edi
mov    $0x2f,%esi
mov    $0x2a,%edx
mov    $0x5c,%ecx
call   1040 <put_row@plt>
jmp    11ee <rush+0xbe>
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    11cb <rush+0x9b>
mov    -0xc(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <which_row@plt>
mov    %eax,%edi
mov    $0x5c,%esi
mov    $0x2a,%edx
mov    $0x2f,%ecx
call   1040 <put_row@plt>
jmp    11e9 <rush+0xb9>
mov    -0xc(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <which_row@plt>
mov    %eax,%edi
mov    $0x2a,%ecx
mov    $0x20,%edx
mov    %ecx,%esi
call   1040 <put_row@plt>
jmp    11ee <rush+0xbe>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1158 <rush+0x28>
mov    $0xa,%edi
call   1050 <ft_putchar@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1145 <rush+0x15>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rush>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
test   %esi,%esi
jle    11d1 <rush+0xa1>
mov    %esi,%r14d
mov    %edi,%r12d
lea    -0x1(%r14),%r15d
xor    %ebp,%ebp
jmp    1162 <rush+0x32>
xchg   %ax,%ax
mov    $0xa,%edi
call   1050 <ft_putchar@plt>
add    $0x1,%ebp
cmp    %r14d,%ebp
je     11d1 <rush+0xa1>
test   %r12d,%r12d
jle    1150 <rush+0x20>
xor    %ebx,%ebx
jmp    118c <rush+0x5c>
nopl   0x0(%rax,%rax,1)
mov    $0x2f,%esi
mov    $0x2a,%edx
mov    $0x5c,%ecx
call   1040 <put_row@plt>
add    $0x1,%ebx
cmp    %ebx,%r12d
je     1150 <rush+0x20>
mov    %ebx,%edi
mov    %r12d,%esi
call   1030 <which_row@plt>
mov    %eax,%edi
test   %ebp,%ebp
je     1170 <rush+0x40>
cmp    %r15d,%ebp
jne    11c0 <rush+0x90>
mov    $0x5c,%esi
mov    $0x2a,%edx
mov    $0x2f,%ecx
jmp    117f <rush+0x4f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x2a,%esi
mov    $0x20,%edx
mov    $0x2a,%ecx
jmp    117f <rush+0x4f>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @rush(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %29
4: ; preds = %2
%5 = icmp sgt i32 %0, 0
%6 = add nsw i32 %1, -1
br label %7
7: ; preds = %4, %25
%8 = phi i32 [ 0, %4 ], [ %27, %25 ]
br i1 %5, label %9, label %25
9: ; preds = %7
%10 = icmp eq i32 %8, 0
%11 = icmp eq i32 %8, %6
br label %12
12: ; preds = %9, %22
%13 = phi i32 [ 0, %9 ], [ %23, %22 ]
%14 = tail call i32 @which_row(i32 %13, i32 %0)
br i1 %10, label %15, label %17
15: ; preds = %12
%16 = tail call i32 @put_row(i32 %14, i8 signext 47, i8 signext 42, i8 signext 92)
br label %22
17: ; preds = %12
br i1 %11, label %18, label %20
18: ; preds = %17
%19 = tail call i32 @put_row(i32 %14, i8 signext 92, i8 signext 42, i8 signext 47)
br label %22
20: ; preds = %17
%21 = tail call i32 @put_row(i32 %14, i8 signext 42, i8 signext 32, i8 signext 42)
br label %22
22: ; preds = %18, %20, %15
%23 = add nuw nsw i32 %13, 1
%24 = icmp eq i32 %23, %0
br i1 %24, label %25, label %12
25: ; preds = %22, %7
%26 = tail call i32 @ft_putchar(i8 signext 10)
%27 = add nuw nsw i32 %8, 1
%28 = icmp eq i32 %27, %1
br i1 %28, label %29, label %7
29: ; preds = %25, %2
ret void
}