#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_putline(char, char, char, int);
int colle(int icolonne, int iligne) {
  int i;
  i = 0;
  if ((icolonne == 0) || (iligne == 0)) {
    return (0);
  }
  ft_putline('A', 'B', 'A', icolonne);
  if (iligne > 2) {
    while (i < iligne - 1) {
      ft_putline('B', ' ', 'B', icolonne);
      i++;
    }
  }
  if (iligne > 1) {
    ft_putline('C', 'B', 'C', icolonne);
  }
  return (0);
}


x86 assembly (clang, -O0):
<colle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1139 <colle+0x29>
cmpl   $0x0,-0xc(%rbp)
jne    1145 <colle+0x35>
movl   $0x0,-0x4(%rbp)
jmp    11c5 <colle+0xb5>
mov    -0x8(%rbp),%ecx
mov    $0x41,%edx
mov    $0x42,%esi
mov    %edx,%edi
call   1030 <ft_putline@plt>
cmpl   $0x2,-0xc(%rbp)
jle    11a0 <colle+0x90>
jmp    1168 <colle+0x58>
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    119b <colle+0x8b>
mov    -0x8(%rbp),%ecx
mov    $0x42,%edx
mov    $0x20,%esi
mov    %edx,%edi
call   1030 <ft_putline@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1168 <colle+0x58>
jmp    11a0 <colle+0x90>
cmpl   $0x1,-0xc(%rbp)
jle    11be <colle+0xae>
mov    -0x8(%rbp),%ecx
mov    $0x43,%edx
mov    $0x42,%esi
mov    %edx,%edi
call   1030 <ft_putline@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<colle>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
je     1187 <colle+0x77>
mov    %esi,%r14d
test   %esi,%esi
je     1187 <colle+0x77>
mov    %edi,%ebx
mov    $0x41,%edi
mov    $0x42,%esi
mov    $0x41,%edx
mov    %ebx,%ecx
call   1030 <ft_putline@plt>
cmp    $0x3,%r14d
jl     116b <colle+0x5b>
lea    -0x1(%r14),%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x42,%edi
mov    $0x20,%esi
mov    $0x42,%edx
mov    %ebx,%ecx
call   1030 <ft_putline@plt>
add    $0xffffffff,%ebp
jne    1150 <colle+0x40>
cmp    $0x2,%r14d
jl     1187 <colle+0x77>
mov    $0x43,%edi
mov    $0x42,%esi
mov    $0x43,%edx
mov    %ebx,%ecx
call   1030 <ft_putline@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @colle(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 0, i32* %6
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = load i32, i32* %5
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9, %2
store i32 0, i32* %3
br label %37
13: ; preds = %9
%14 = load i32, i32* %4
%15 = call i32 @ft_putline(i8 signext 65, i8 signext 66, i8 signext 65, i32 %14)
%16 = load i32, i32* %5
%17 = icmp sgt i32 %16, 2
br i1 %17, label %18, label %30
18: ; preds = %13
br label %19
19: ; preds = %24, %18
%20 = load i32, i32* %6
%21 = load i32, i32* %5
%22 = sub nsw i32 %21, 1
%23 = icmp slt i32 %20, %22
br i1 %23, label %24, label %29
24: ; preds = %19
%25 = load i32, i32* %4
%26 = call i32 @ft_putline(i8 signext 66, i8 signext 32, i8 signext 66, i32 %25)
%27 = load i32, i32* %6
%28 = add nsw i32 %27, 1
store i32 %28, i32* %6
br label %19
29: ; preds = %19
br label %30
30: ; preds = %29, %13
%31 = load i32, i32* %5
%32 = icmp sgt i32 %31, 1
br i1 %32, label %33, label %36
33: ; preds = %30
%34 = load i32, i32* %4
%35 = call i32 @ft_putline(i8 signext 67, i8 signext 66, i8 signext 67, i32 %34)
br label %36
36: ; preds = %33, %30
store i32 0, i32* %3
br label %37
37: ; preds = %36, %12
%38 = load i32, i32* %3
ret i32 %38
}

LLVM IR (-O2):
define i32 @colle(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
%4 = icmp eq i32 %1, 0
%5 = or i1 %3, %4
br i1 %5, label %20, label %6
6: ; preds = %2
%7 = tail call i32 @ft_putline(i8 signext 65, i8 signext 66, i8 signext 65, i32 %0)
%8 = icmp sgt i32 %1, 2
br i1 %8, label %9, label %16
9: ; preds = %6
%10 = add nsw i32 %1, -1
br label %11
11: ; preds = %9, %11
%12 = phi i32 [ %14, %11 ], [ 0, %9 ]
%13 = tail call i32 @ft_putline(i8 signext 66, i8 signext 32, i8 signext 66, i32 %0)
%14 = add nuw nsw i32 %12, 1
%15 = icmp eq i32 %14, %10
br i1 %15, label %16, label %11
16: ; preds = %11, %6
%17 = icmp sgt i32 %1, 1
br i1 %17, label %18, label %20
18: ; preds = %16
%19 = tail call i32 @ft_putline(i8 signext 67, i8 signext 66, i8 signext 67, i32 %0)
br label %20
20: ; preds = %16, %18, %2
ret i32 0
}