#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_print_char(int, int, int, int);
int /*<<< orphan*/ ft_putchar(char);
void rush(int w, int h) {
  int i;
  int j;
  i = 1;
  while (i <= h) {
    j = 1;
    while (j <= w) {
      ft_print_char(w, h, i, j);
      j++;
    }
    ft_putchar('\n');
    i++;
  }
  ft_putchar('\n');
}


x86 assembly (clang, -O0):
<rush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     118b <rush+0x6b>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1173 <rush+0x53>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1040 <ft_print_char@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1148 <rush+0x28>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1135 <rush+0x15>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
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    1184 <rush+0x64>
mov    %esi,%r14d
mov    %edi,%r15d
mov    %edi,%r12d
neg    %r12d
mov    $0x1,%ebx
jmp    1154 <rush+0x34>
nop
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
lea    0x1(%rbx),%eax
cmp    %r14d,%ebx
mov    %eax,%ebx
je     1184 <rush+0x64>
test   %r15d,%r15d
jle    1140 <rush+0x20>
mov    $0x1,%ebp
xchg   %ax,%ax
mov    %r15d,%edi
mov    %r14d,%esi
mov    %ebx,%edx
mov    %ebp,%ecx
call   1040 <ft_print_char@plt>
lea    (%r12,%rbp,1),%eax
add    $0x1,%eax
mov    %ebp,%ecx
add    $0x1,%ecx
mov    %ecx,%ebp
cmp    $0x1,%eax
jne    1160 <rush+0x40>
jmp    1140 <rush+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <ft_putchar@plt>

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 1, i32* %5
br label %7
7: ; preds = %24, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = icmp sle i32 %8, %9
br i1 %10, label %11, label %28
11: ; preds = %7
store i32 1, i32* %6
br label %12
12: ; preds = %16, %11
%13 = load i32, i32* %6
%14 = load i32, i32* %3
%15 = icmp sle i32 %13, %14
br i1 %15, label %16, label %24
16: ; preds = %12
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = load i32, i32* %5
%20 = load i32, i32* %6
%21 = call i32 @ft_print_char(i32 %17, i32 %18, i32 %19, i32 %20)
%22 = load i32, i32* %6
%23 = add nsw i32 %22, 1
store i32 %23, i32* %6
br label %12
24: ; preds = %12
%25 = call i32 @ft_putchar(i8 signext 10)
%26 = load i32, i32* %5
%27 = add nsw i32 %26, 1
store i32 %27, i32* %5
br label %7
28: ; preds = %7
%29 = call i32 @ft_putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @rush(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 1
br i1 %3, label %17, label %4
4: ; preds = %2
%5 = icmp slt i32 %0, 1
br label %6
6: ; preds = %4, %13
%7 = phi i32 [ 1, %4 ], [ %15, %13 ]
br i1 %5, label %13, label %8
8: ; preds = %6, %8
%9 = phi i32 [ %11, %8 ], [ 1, %6 ]
%10 = tail call i32 @ft_print_char(i32 %0, i32 %1, i32 %7, i32 %9)
%11 = add nuw i32 %9, 1
%12 = icmp eq i32 %9, %0
br i1 %12, label %13, label %8
13: ; preds = %8, %6
%14 = tail call i32 @ft_putchar(i8 signext 10)
%15 = add nuw i32 %7, 1
%16 = icmp eq i32 %7, %1
br i1 %16, label %17, label %6
17: ; preds = %13, %2
%18 = tail call i32 @ft_putchar(i8 signext 10)
ret void
}