#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(int, int);
int /*<<< orphan*/ ft_space();
void ft_print_comb2(void) {
  int a;
  int b;
  a = 0;
  b = 0;
  while (a <= 98) {
    if (b != 100)
      b++;
    if (b == 100) {
      a += 1;
      b = a + 1;
    }
    if (a <= 98) {
      ft_print(a, b);
      if (a != 98)
        ft_space();
    }
  }
}


x86 assembly (clang, -O0):
<ft_print_comb2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x62,-0x4(%rbp)
jg     119f <ft_print_comb2+0x7f>
cmpl   $0x64,-0x8(%rbp)
je     1153 <ft_print_comb2+0x33>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jne    116f <ft_print_comb2+0x4f>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x62,-0x4(%rbp)
jg     119a <ft_print_comb2+0x7a>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <ft_print@plt>
cmpl   $0x62,-0x4(%rbp)
je     1195 <ft_print_comb2+0x75>
mov    $0x0,%al
call   1030 <ft_space@plt>
jmp    119a <ft_print_comb2+0x7a>
jmp    1136 <ft_print_comb2+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_print_comb2>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
xor    %r14d,%r14d
jmp    1153 <ft_print_comb2+0x33>
xchg   %ax,%ax
lea    0x1(%rbx),%eax
cmp    $0x64,%ebx
cmove  %ebx,%eax
lea    0x2(%r14),%ebx
xor    %ecx,%ecx
cmp    $0x64,%eax
sete   %cl
cmovne %eax,%ebx
add    %r14d,%ecx
mov    %ecx,%r14d
cmp    $0x63,%ecx
jae    116c <ft_print_comb2+0x4c>
mov    %r14d,%edi
mov    %ebx,%esi
call   1040 <ft_print@plt>
cmp    $0x62,%r14d
je     1130 <ft_print_comb2+0x10>
xor    %eax,%eax
call   1030 <ft_space@plt>
jmp    1130 <ft_print_comb2+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @ft_print_comb2() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %32, %0
%4 = load i32, i32* %1
%5 = icmp sle i32 %4, 98
br i1 %5, label %6, label %33
6: ; preds = %3
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 100
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %12
12: ; preds = %9, %6
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 100
br i1 %14, label %15, label %20
15: ; preds = %12
%16 = load i32, i32* %1
%17 = add nsw i32 %16, 1
store i32 %17, i32* %1
%18 = load i32, i32* %1
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
br label %20
20: ; preds = %15, %12
%21 = load i32, i32* %1
%22 = icmp sle i32 %21, 98
br i1 %22, label %23, label %32
23: ; preds = %20
%24 = load i32, i32* %1
%25 = load i32, i32* %2
%26 = call i32 @ft_print(i32 %24, i32 %25)
%27 = load i32, i32* %1
%28 = icmp ne i32 %27, 98
br i1 %28, label %29, label %31
29: ; preds = %23
%30 = call i32 (...) @ft_space()
br label %31
31: ; preds = %29, %23
br label %32
32: ; preds = %31, %20
br label %3
33: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @ft_print_comb2() {
br label %1
1: ; preds = %0, %8
%2 = phi i32 [ 1, %0 ], [ %16, %8 ]
%3 = phi i32 [ 0, %0 ], [ %15, %8 ]
%4 = tail call i32 @ft_print(i32 %3, i32 %2)
%5 = icmp eq i32 %3, 98
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 (...) @ft_space()
br label %8
8: ; preds = %1, %6
%9 = icmp eq i32 %2, 100
%10 = add nsw i32 %2, 1
%11 = select i1 %9, i32 100, i32 %10
%12 = icmp eq i32 %11, 100
%13 = add nuw nsw i32 %3, 2
%14 = zext i1 %12 to i32
%15 = add nuw nsw i32 %3, %14
%16 = select i1 %12, i32 %13, i32 %11
%17 = icmp ult i32 %15, 99
br i1 %17, label %1, label %18
18: ; preds = %8
ret void
}