void ft_print_reverse_alphabet(void) {
  char z;
  z = 'z';
  while (z >= 'a') {
    ft_putchar(z);
    z--;
  }
  ft_putchar("\n");
}


x86 assembly (clang, -O0):
<ft_print_reverse_alphabet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x7a,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1141 <ft_print_reverse_alphabet+0x31>
movsbl -0x1(%rbp),%edi
mov    $0x0,%al
call   1030 <ft_putchar@plt>
mov    -0x1(%rbp),%al
add    $0xff,%al
mov    %al,-0x1(%rbp)
jmp    111c <ft_print_reverse_alphabet+0xc>
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_print_reverse_alphabet>:
push   %rax
mov    $0x7a,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x79,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x78,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x77,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x76,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x75,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x74,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x73,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x72,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x71,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x70,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x6f,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x6e,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x6d,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x6c,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x6b,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x6a,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x69,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x68,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x67,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x66,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x65,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x64,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x63,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x62,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
mov    $0x61,%edi
xor    %eax,%eax
call   1030 <ft_putchar@plt>
lea    0xdb0(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1030 <ft_putchar@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @ft_print_reverse_alphabet() {
%1 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 122)
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 121)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 120)
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 119)
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 118)
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 117)
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 116)
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 115)
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 114)
%10 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 113)
%11 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 112)
%12 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 111)
%13 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 110)
%14 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 109)
%15 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 108)
%16 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 107)
%17 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 106)
%18 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 105)
%19 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 104)
%20 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 103)
%21 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 102)
%22 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 101)
%23 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 100)
%24 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 99)
%25 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 98)
%26 = tail call i32 (i32, ...) bitcast (i32 (...)* @ft_putchar to i32 (i32, ...)*)(i32 97)
%27 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ft_putchar to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}