#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);
void print(char a, char b, char c, char d) {
  if (((a * 10) + b) < ((c * 10) + d)) {
    ft_putchar(a);
    ft_putchar(b);
    ft_putchar(' ');
    ft_putchar(c);
    ft_putchar(d);
    if (!(a == 57 && b == 56 && c == 57 && d == 57)) {
      ft_putchar(',');
      ft_putchar(' ');
    }
  }
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %cl,%al
mov    %dl,%cl
mov    %sil,%dl
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %dl,-0x2(%rbp)
mov    %cl,-0x3(%rbp)
mov    %al,-0x4(%rbp)
movsbl -0x1(%rbp),%eax
imul   $0xa,%eax,%eax
movsbl -0x2(%rbp),%ecx
add    %ecx,%eax
movsbl -0x3(%rbp),%ecx
imul   $0xa,%ecx,%ecx
movsbl -0x4(%rbp),%edx
add    %edx,%ecx
cmp    %ecx,%eax
jge    11cc <print+0xbc>
movsbl -0x1(%rbp),%edi
call   1030 <ft_putchar@plt>
movsbl -0x2(%rbp),%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
movsbl -0x3(%rbp),%edi
call   1030 <ft_putchar@plt>
movsbl -0x4(%rbp),%edi
call   1030 <ft_putchar@plt>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
jne    11b3 <print+0xa3>
movsbl -0x2(%rbp),%eax
cmp    $0x38,%eax
jne    11b3 <print+0xa3>
movsbl -0x3(%rbp),%eax
cmp    $0x39,%eax
jne    11b3 <print+0xa3>
movsbl -0x4(%rbp),%eax
cmp    $0x39,%eax
je     11c7 <print+0xb7>
mov    $0x2c,%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
jmp    11cc <print+0xbc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %esi,%ebx
lea    (%rdi,%rdi,4),%eax
lea    (%rbx,%rax,2),%eax
lea    (%r15,%r15,4),%ecx
lea    (%r14,%rcx,2),%ecx
cmp    %ecx,%eax
jge    1177 <print+0x67>
movsbl %dil,%ebp
mov    %ebp,%edi
call   1030 <ft_putchar@plt>
movsbl %bl,%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
movsbl %r15b,%edi
call   1030 <ft_putchar@plt>
movsbl %r14b,%edi
call   1030 <ft_putchar@plt>
cmp    $0x39,%bpl
jne    1182 <print+0x72>
cmp    $0x38,%bl
jne    1182 <print+0x72>
cmp    $0x39,%r15b
jne    1182 <print+0x72>
cmp    $0x39,%r14b
jne    1182 <print+0x72>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x2c,%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <ft_putchar@plt>

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

LLVM IR (-O2):
define void @print(i8 signext %0, i8 signext %1, i8 signext %2, i8 signext %3) {
%5 = sext i8 %0 to i32
%6 = mul nsw i32 %5, 10
%7 = sext i8 %1 to i32
%8 = add nsw i32 %6, %7
%9 = sext i8 %2 to i32
%10 = mul nsw i32 %9, 10
%11 = sext i8 %3 to i32
%12 = add nsw i32 %10, %11
%13 = icmp slt i32 %8, %12
br i1 %13, label %14, label %30
14: ; preds = %4
%15 = tail call i32 @ft_putchar(i8 signext %0)
%16 = tail call i32 @ft_putchar(i8 signext %1)
%17 = tail call i32 @ft_putchar(i8 signext 32)
%18 = tail call i32 @ft_putchar(i8 signext %2)
%19 = tail call i32 @ft_putchar(i8 signext %3)
%20 = icmp eq i8 %0, 57
%21 = icmp eq i8 %1, 56
%22 = and i1 %20, %21
%23 = icmp eq i8 %2, 57
%24 = and i1 %22, %23
%25 = icmp eq i8 %3, 57
%26 = and i1 %24, %25
br i1 %26, label %30, label %27
27: ; preds = %14
%28 = tail call i32 @ft_putchar(i8 signext 44)
%29 = tail call i32 @ft_putchar(i8 signext 32)
br label %30
30: ; preds = %27, %14, %4
ret void
}