#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*/ write(int, char *, int);
void ft_print_numbers(void) {
  char number;
  number = '0';
  while (number <= '9') {
    write(1, &number, 1);
    number++;
  }
  write(1, "\n", 1);
}


x86 assembly (clang, -O0):
<ft_print_numbers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x30,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
jg     1146 <ft_print_numbers+0x36>
mov    $0x1,%edx
lea    -0x1(%rbp),%rsi
mov    %edx,%edi
call   1030 <write@plt>
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
jmp    111c <ft_print_numbers+0xc>
mov    $0x1,%edx
lea    0xeae(%rip),%rsi
mov    %edx,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_print_numbers>:
push   %rbx
sub    $0x10,%rsp
movb   $0x30,0xf(%rsp)
lea    0xf(%rsp),%rbx
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
movb   $0x31,0xf(%rsp)
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
movb   $0x32,0xf(%rsp)
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
movb   $0x33,0xf(%rsp)
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
movb   $0x34,0xf(%rsp)
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
movb   $0x35,0xf(%rsp)
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
movb   $0x36,0xf(%rsp)
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
movb   $0x37,0xf(%rsp)
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
movb   $0x38,0xf(%rsp)
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
movb   $0x39,0xf(%rsp)
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
lea    0xdf9(%rip),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
add    $0x10,%rsp
pop    %rbx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @ft_print_numbers() {
%1 = alloca i8
store i8 48, i8* %1
br label %2
2: ; preds = %6, %0
%3 = load i8, i8* %1
%4 = sext i8 %3 to i32
%5 = icmp sle i32 %4, 57
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = call i32 @write(i32 1, i8* %1, i32 1)
%8 = load i8, i8* %1
%9 = add i8 %8, 1
store i8 %9, i8* %1
br label %2
10: ; preds = %2
%11 = call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @ft_print_numbers() {
%1 = alloca i8
store i8 48, i8* %1
%2 = call i32 @write(i32 1, i8* %1, i32 1)
store i8 49, i8* %1
%3 = call i32 @write(i32 1, i8* %1, i32 1)
store i8 50, i8* %1
%4 = call i32 @write(i32 1, i8* %1, i32 1)
store i8 51, i8* %1
%5 = call i32 @write(i32 1, i8* %1, i32 1)
store i8 52, i8* %1
%6 = call i32 @write(i32 1, i8* %1, i32 1)
store i8 53, i8* %1
%7 = call i32 @write(i32 1, i8* %1, i32 1)
store i8 54, i8* %1
%8 = call i32 @write(i32 1, i8* %1, i32 1)
store i8 55, i8* %1
%9 = call i32 @write(i32 1, i8* %1, i32 1)
store i8 56, i8* %1
%10 = call i32 @write(i32 1, i8* %1, i32 1)
store i8 57, i8* %1
%11 = call i32 @write(i32 1, i8* %1, i32 1)
%12 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}