#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*/ printf(char *, long long);
int main() {
  long long int factoriel, a, b;
  factoriel = 10;
  b = 1;
  for (a = factoriel; a > 1; a--) {
    b = b * a;
    printf("%lld * ", a);
  }
  printf("1 = %lld \n", b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0xa,-0x10(%rbp)
movq   $0x1,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x1,-0x18(%rbp)
jle    1170 <main+0x60>
mov    -0x20(%rbp),%rax
imul   -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
jmp    1137 <main+0x27>
mov    -0x20(%rbp),%rsi
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    $0xa,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0x9,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0x8,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0x7,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0x6,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0x5,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0x4,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0x3,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0x2,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xe74(%rip),%rdi
mov    $0x375f00,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%lld * \00"
@.str.1 = [11 x i8] c"1 = %lld \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i32 0, i32* %1
store i64 10, i64* %2
store i64 1, i64* %4
%5 = load i64, i64* %2
store i64 %5, i64* %3
br label %6
6: ; preds = %15, %0
%7 = load i64, i64* %3
%8 = icmp sgt i64 %7, 1
br i1 %8, label %9, label %18
9: ; preds = %6
%10 = load i64, i64* %4
%11 = load i64, i64* %3
%12 = mul nsw i64 %10, %11
store i64 %12, i64* %4
%13 = load i64, i64* %3
%14 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 %13)
br label %15
15: ; preds = %9
%16 = load i64, i64* %3
%17 = add nsw i64 %16, -1
store i64 %17, i64* %3
br label %6
18: ; preds = %6
%19 = load i64, i64* %4
%20 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i64 %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%lld * \00"
@.str.1 = [11 x i8] c"1 = %lld \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 9)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 8)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 7)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 6)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 4)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 3)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 2)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i64 3628800)
ret i32 0
}