#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*/ print(int, int, int, int);
void ft_print_comb2(void) {
  int t[4];
  t[0] = 48;
  while (t[0] < 58) {
    t[1] = 48;
    while (t[1] < 58) {
      t[2] = 48;
      while (t[2] < 58) {
        t[3] = 48;
        while (t[3] < 58) {
          print(t[0], t[1], t[2], t[3]);
          t[3]++;
        }
        t[2]++;
      }
      t[1]++;
    }
    t[0]++;
  }
}


x86 assembly (clang, -O0):
<ft_print_comb2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x30,-0x10(%rbp)
cmpl   $0x3a,-0x10(%rbp)
jge    11a5 <ft_print_comb2+0x95>
movl   $0x30,-0xc(%rbp)
cmpl   $0x3a,-0xc(%rbp)
jge    1197 <ft_print_comb2+0x87>
movl   $0x30,-0x8(%rbp)
cmpl   $0x3a,-0x8(%rbp)
jge    1189 <ft_print_comb2+0x79>
movl   $0x30,-0x4(%rbp)
cmpl   $0x3a,-0x4(%rbp)
jge    117b <ft_print_comb2+0x6b>
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%ecx
call   1030 <print@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1152 <ft_print_comb2+0x42>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1141 <ft_print_comb2+0x31>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1130 <ft_print_comb2+0x20>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111f <ft_print_comb2+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_print_comb2>:
push   %rbp
push   %r14
push   %rbx
mov    $0x30,%r14d
nopw   0x0(%rax,%rax,1)
mov    $0x30,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x30,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    $0x30,%ecx
call   1030 <print@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    $0x31,%ecx
call   1030 <print@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    $0x32,%ecx
call   1030 <print@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    $0x33,%ecx
call   1030 <print@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    $0x34,%ecx
call   1030 <print@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    $0x35,%ecx
call   1030 <print@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    $0x36,%ecx
call   1030 <print@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    $0x37,%ecx
call   1030 <print@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    $0x38,%ecx
call   1030 <print@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    $0x39,%ecx
call   1030 <print@plt>
add    $0x1,%ebx
cmp    $0x3a,%ebx
jne    1140 <ft_print_comb2+0x30>
add    $0x1,%ebp
cmp    $0x3a,%ebp
jne    1130 <ft_print_comb2+0x20>
add    $0x1,%r14d
cmp    $0x3a,%r14d
jne    1120 <ft_print_comb2+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @ft_print_comb2() {
%1 = alloca [4 x i32]
%2 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
store i32 48, i32* %2
br label %3
3: ; preds = %46, %0
%4 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%5 = load i32, i32* %4
%6 = icmp slt i32 %5, 58
br i1 %6, label %7, label %50
7: ; preds = %3
%8 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 1
store i32 48, i32* %8
br label %9
9: ; preds = %42, %7
%10 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 1
%11 = load i32, i32* %10
%12 = icmp slt i32 %11, 58
br i1 %12, label %13, label %46
13: ; preds = %9
%14 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 2
store i32 48, i32* %14
br label %15
15: ; preds = %38, %13
%16 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 2
%17 = load i32, i32* %16
%18 = icmp slt i32 %17, 58
br i1 %18, label %19, label %42
19: ; preds = %15
%20 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 3
store i32 48, i32* %20
br label %21
21: ; preds = %25, %19
%22 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 3
%23 = load i32, i32* %22
%24 = icmp slt i32 %23, 58
br i1 %24, label %25, label %38
25: ; preds = %21
%26 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%27 = load i32, i32* %26
%28 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 1
%29 = load i32, i32* %28
%30 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 2
%31 = load i32, i32* %30
%32 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 3
%33 = load i32, i32* %32
%34 = call i32 @print(i32 %27, i32 %29, i32 %31, i32 %33)
%35 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 3
%36 = load i32, i32* %35
%37 = add nsw i32 %36, 1
store i32 %37, i32* %35
br label %21
38: ; preds = %21
%39 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 2
%40 = load i32, i32* %39
%41 = add nsw i32 %40, 1
store i32 %41, i32* %39
br label %15
42: ; preds = %15
%43 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 1
%44 = load i32, i32* %43
%45 = add nsw i32 %44, 1
store i32 %45, i32* %43
br label %9
46: ; preds = %9
%47 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%48 = load i32, i32* %47
%49 = add nsw i32 %48, 1
store i32 %49, i32* %47
br label %3
50: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @ft_print_comb2() {
br label %1
1: ; preds = %0, %22
%2 = phi i32 [ 48, %0 ], [ %23, %22 ]
br label %3
3: ; preds = %1, %19
%4 = phi i32 [ 48, %1 ], [ %20, %19 ]
br label %5
5: ; preds = %3, %5
%6 = phi i32 [ 48, %3 ], [ %17, %5 ]
%7 = tail call i32 @print(i32 %2, i32 %4, i32 %6, i32 48)
%8 = tail call i32 @print(i32 %2, i32 %4, i32 %6, i32 49)
%9 = tail call i32 @print(i32 %2, i32 %4, i32 %6, i32 50)
%10 = tail call i32 @print(i32 %2, i32 %4, i32 %6, i32 51)
%11 = tail call i32 @print(i32 %2, i32 %4, i32 %6, i32 52)
%12 = tail call i32 @print(i32 %2, i32 %4, i32 %6, i32 53)
%13 = tail call i32 @print(i32 %2, i32 %4, i32 %6, i32 54)
%14 = tail call i32 @print(i32 %2, i32 %4, i32 %6, i32 55)
%15 = tail call i32 @print(i32 %2, i32 %4, i32 %6, i32 56)
%16 = tail call i32 @print(i32 %2, i32 %4, i32 %6, i32 57)
%17 = add nuw nsw i32 %6, 1
%18 = icmp eq i32 %17, 58
br i1 %18, label %19, label %5
19: ; preds = %5
%20 = add nuw nsw i32 %4, 1
%21 = icmp eq i32 %20, 58
br i1 %21, label %22, label %3
22: ; preds = %19
%23 = add nuw nsw i32 %2, 1
%24 = icmp eq i32 %23, 58
br i1 %24, label %25, label %1
25: ; preds = %22
ret void
}