#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_clm(int /*<<< orphan*/, char, char, char);
int /*<<< orphan*/ which_clm(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_clm(which_clm(i, x), 'o', '-', 'o');
      else if (j == y - 1)
        put_clm(which_clm(i, x), 'o', '-', 'o');
      else
        put_clm(which_clm(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    120e <rush+0xde>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11f6 <rush+0xc6>
cmpl   $0x0,-0x10(%rbp)
jne    1191 <rush+0x61>
mov    -0xc(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <which_clm@plt>
mov    %eax,%edi
mov    $0x6f,%ecx
mov    $0x2d,%edx
mov    %ecx,%esi
call   1040 <put_clm@plt>
jmp    11e8 <rush+0xb8>
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    11c5 <rush+0x95>
mov    -0xc(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <which_clm@plt>
mov    %eax,%edi
mov    $0x6f,%ecx
mov    $0x2d,%edx
mov    %ecx,%esi
call   1040 <put_clm@plt>
jmp    11e3 <rush+0xb3>
mov    -0xc(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <which_clm@plt>
mov    %eax,%edi
mov    $0x7c,%ecx
mov    $0x20,%edx
mov    %ecx,%esi
call   1040 <put_clm@plt>
jmp    11e8 <rush+0xb8>
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    11b4 <rush+0x84>
mov    %esi,%r14d
mov    %edi,%r12d
lea    -0x1(%r14),%r15d
xor    %ebp,%ebp
jmp    1162 <rush+0x32>
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1050 <ft_putchar@plt>
add    $0x1,%ebp
cmp    %r14d,%ebp
je     11b4 <rush+0x84>
test   %r12d,%r12d
jle    1150 <rush+0x20>
xor    %ebx,%ebx
jmp    118e <rush+0x5e>
nopl   0x0(%rax,%rax,1)
mov    %eax,%edi
mov    $0x6f,%esi
mov    $0x2d,%edx
mov    $0x6f,%ecx
call   1040 <put_clm@plt>
add    $0x1,%ebx
cmp    %ebx,%r12d
je     1150 <rush+0x20>
mov    %ebx,%edi
mov    %r12d,%esi
call   1030 <which_clm@plt>
test   %ebp,%ebp
je     1170 <rush+0x40>
cmp    %r15d,%ebp
je     1170 <rush+0x40>
mov    %eax,%edi
mov    $0x7c,%esi
mov    $0x20,%edx
mov    $0x7c,%ecx
jmp    1181 <rush+0x51>
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_clm(i32 %20, i32 %21)
%23 = call i32 @put_clm(i32 %22, i8 signext 111, i8 signext 45, i8 signext 111)
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_clm(i32 %30, i32 %31)
%33 = call i32 @put_clm(i32 %32, i8 signext 111, i8 signext 45, i8 signext 111)
br label %39
34: ; preds = %24
%35 = load i32, i32* %5
%36 = load i32, i32* %3
%37 = call i32 @which_clm(i32 %35, i32 %36)
%38 = call i32 @put_clm(i32 %37, i8 signext 124, i8 signext 32, i8 signext 124)
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_clm(i32 %13, i32 %0)
br i1 %10, label %15, label %17
15: ; preds = %12
%16 = tail call i32 @put_clm(i32 %14, i8 signext 111, i8 signext 45, i8 signext 111)
br label %22
17: ; preds = %12
br i1 %11, label %18, label %20
18: ; preds = %17
%19 = tail call i32 @put_clm(i32 %14, i8 signext 111, i8 signext 45, i8 signext 111)
br label %22
20: ; preds = %17
%21 = tail call i32 @put_clm(i32 %14, i8 signext 124, i8 signext 32, i8 signext 124)
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
}