#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ecrire_mois(int /*<<< orphan*/ *, int, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
void generation_temperatures(FILE *fichier, int anDebut, int anFin) {
  int an, mois;
  for (an = anDebut; an <= anFin; ++an) {
    fprintf(fichier, "%d :\n", an);
    for (mois = 1; mois <= 12; ++mois)
      ecrire_mois(fichier, an, mois);
  }
}


x86 assembly (clang, -O0):
<generation_temperatures>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1198 <generation_temperatures+0x78>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xeae(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x1,-0x18(%rbp)
cmpl   $0xc,-0x18(%rbp)
jg     1185 <generation_temperatures+0x65>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1040 <ecrire_mois@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    115e <generation_temperatures+0x3e>
jmp    118a <generation_temperatures+0x6a>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1138 <generation_temperatures+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generation_temperatures>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jg     121d <generation_temperatures+0xfd>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
add    $0x1,%r14d
lea    0xebe(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %ebp,%edx
call   1030 <fprintf@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
call   1040 <ecrire_mois@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x2,%edx
call   1040 <ecrire_mois@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x3,%edx
call   1040 <ecrire_mois@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x4,%edx
call   1040 <ecrire_mois@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x5,%edx
call   1040 <ecrire_mois@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x6,%edx
call   1040 <ecrire_mois@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x7,%edx
call   1040 <ecrire_mois@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x8,%edx
call   1040 <ecrire_mois@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x9,%edx
call   1040 <ecrire_mois@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0xa,%edx
call   1040 <ecrire_mois@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0xb,%edx
call   1040 <ecrire_mois@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0xc,%edx
call   1040 <ecrire_mois@plt>
add    $0x1,%ebp
cmp    %ebp,%r14d
jne    1150 <generation_temperatures+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d :\0A\00"
define void @generation_temperatures(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %5
store i32 %9, i32* %7
br label %10
10: ; preds = %30, %3
%11 = load i32, i32* %7
%12 = load i32, i32* %6
%13 = icmp sle i32 %11, %12
br i1 %13, label %14, label %33
14: ; preds = %10
%15 = load i32*, i32** %4
%16 = load i32, i32* %7
%17 = call i32 @fprintf(i32* %15, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %16)
store i32 1, i32* %8
br label %18
18: ; preds = %26, %14
%19 = load i32, i32* %8
%20 = icmp sle i32 %19, 12
br i1 %20, label %21, label %29
21: ; preds = %18
%22 = load i32*, i32** %4
%23 = load i32, i32* %7
%24 = load i32, i32* %8
%25 = call i32 @ecrire_mois(i32* %22, i32 %23, i32 %24)
br label %26
26: ; preds = %21
%27 = load i32, i32* %8
%28 = add nsw i32 %27, 1
store i32 %28, i32* %8
br label %18
29: ; preds = %18
br label %30
30: ; preds = %29
%31 = load i32, i32* %7
%32 = add nsw i32 %31, 1
store i32 %32, i32* %7
br label %10
33: ; preds = %10
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d :\0A\00"
define void @generation_temperatures(i32* %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, %2
br i1 %4, label %22, label %5
5: ; preds = %3, %5
%6 = phi i32 [ %20, %5 ], [ %1, %3 ]
%7 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = tail call i32 @ecrire_mois(i32* %0, i32 %6, i32 1)
%9 = tail call i32 @ecrire_mois(i32* %0, i32 %6, i32 2)
%10 = tail call i32 @ecrire_mois(i32* %0, i32 %6, i32 3)
%11 = tail call i32 @ecrire_mois(i32* %0, i32 %6, i32 4)
%12 = tail call i32 @ecrire_mois(i32* %0, i32 %6, i32 5)
%13 = tail call i32 @ecrire_mois(i32* %0, i32 %6, i32 6)
%14 = tail call i32 @ecrire_mois(i32* %0, i32 %6, i32 7)
%15 = tail call i32 @ecrire_mois(i32* %0, i32 %6, i32 8)
%16 = tail call i32 @ecrire_mois(i32* %0, i32 %6, i32 9)
%17 = tail call i32 @ecrire_mois(i32* %0, i32 %6, i32 10)
%18 = tail call i32 @ecrire_mois(i32* %0, i32 %6, i32 11)
%19 = tail call i32 @ecrire_mois(i32* %0, i32 %6, i32 12)
%20 = add i32 %6, 1
%21 = icmp eq i32 %6, %2
br i1 %21, label %22, label %5
22: ; preds = %5, %3
ret void
}