#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*/ assombrir_image(char *, char *, int);
int /*<<< orphan*/ hough(char *, char *);
int /*<<< orphan*/ normalisation_image(char *, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sobel(char *, char *);
int /*<<< orphan*/ system(char *);
int main(void) {
  printf("* Assombrissement de l'image train.pgm...\n");
  assombrir_image("train.pgm", "train_noirci.bmp", 120);
  printf("  Assombrissement de l'image reussie.\n\n");
  printf("* Normalisation de l'image noircie...\n");
  normalisation_image("train_noirci.bmp", "train_normalise.bmp");
  printf("  Creation de l'image normalisee reussie.\n");
  printf("* Creation de la sortie du filtre de Sobel...\n");
  sobel("train_normalise.bmp", "train_sobel.bmp");
  printf("  Creation de l'image filtre de Sobel reussie.\n");
  printf("* HOUGH.\n");
  hough("train_sobel.bmp", "hough.bmp");
  system("PAUSE");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe8a(%rip),%rdi
call   1050 <printf@plt>
lea    0xea9(%rip),%rdi
lea    0xeac(%rip),%rsi
mov    $0x78,%edx
call   1030 <assombrir_image@plt>
lea    0xeac(%rip),%rdi
call   1050 <printf@plt>
lea    0xec8(%rip),%rdi
call   1050 <printf@plt>
lea    0xe83(%rip),%rdi
lea    0xedc(%rip),%rsi
call   1080 <normalisation_image@plt>
lea    0xee4(%rip),%rdi
call   1050 <printf@plt>
lea    0xf03(%rip),%rdi
call   1050 <printf@plt>
lea    0xeb8(%rip),%rdi
lea    0xf1f(%rip),%rsi
call   1060 <sobel@plt>
lea    0xf23(%rip),%rdi
call   1050 <printf@plt>
lea    0xf47(%rip),%rdi
call   1050 <printf@plt>
lea    0xefb(%rip),%rdi
lea    0xf3e(%rip),%rsi
call   1070 <hough@plt>
lea    0xf3c(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xee4(%rip),%rdi
call   1030 <puts@plt>
lea    0xe89(%rip),%rdi
lea    0xe8c(%rip),%r14
mov    %r14,%rsi
mov    $0x78,%edx
call   1040 <assombrir_image@plt>
lea    0xee7(%rip),%rdi
call   1030 <puts@plt>
lea    0xf02(%rip),%rdi
call   1030 <puts@plt>
lea    0xe71(%rip),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1080 <normalisation_image@plt>
lea    0xf0a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf28(%rip),%rdi
call   1030 <puts@plt>
lea    0xe5b(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <sobel@plt>
lea    0xf38(%rip),%rdi
call   1030 <puts@plt>
lea    0xf5b(%rip),%rdi
call   1030 <puts@plt>
lea    0xe41(%rip),%rsi
mov    %r14,%rdi
call   1070 <hough@plt>
lea    0xe3c(%rip),%rdi
call   1050 <system@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [43 x i8] c"* Assombrissement de l'image train.pgm...\0A\00"
@.str.1 = [10 x i8] c"train.pgm\00"
@.str.2 = [17 x i8] c"train_noirci.bmp\00"
@.str.3 = [40 x i8] c" Assombrissement de l'image reussie.\0A\0A\00"
@.str.4 = [39 x i8] c"* Normalisation de l'image noircie...\0A\00"
@.str.5 = [20 x i8] c"train_normalise.bmp\00"
@.str.6 = [43 x i8] c" Creation de l'image normalisee reussie.\0A\00"
@.str.7 = [47 x i8] c"* Creation de la sortie du filtre de Sobel...\0A\00"
@.str.8 = [16 x i8] c"train_sobel.bmp\00"
@.str.9 = [48 x i8] c" Creation de l'image filtre de Sobel reussie.\0A\00"
@.str.10 = [10 x i8] c"* HOUGH.\0A\00"
@.str.11 = [10 x i8] c"hough.bmp\00"
@.str.12 = [6 x i8] c"PAUSE\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @assombrir_image(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 120)
%4 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @normalisation_image(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @sobel(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @hough(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c"train.pgm\00"
@.str.2 = [17 x i8] c"train_noirci.bmp\00"
@.str.5 = [20 x i8] c"train_normalise.bmp\00"
@.str.8 = [16 x i8] c"train_sobel.bmp\00"
@.str.11 = [10 x i8] c"hough.bmp\00"
@.str.12 = [6 x i8] c"PAUSE\00"
@str = [42 x i8] c"* Assombrissement de l'image train.pgm...\00"
@str.13 = [39 x i8] c" Assombrissement de l'image reussie.\0A\00"
@str.14 = [38 x i8] c"* Normalisation de l'image noircie...\00"
@str.15 = [42 x i8] c" Creation de l'image normalisee reussie.\00"
@str.16 = [46 x i8] c"* Creation de la sortie du filtre de Sobel...\00"
@str.17 = [47 x i8] c" Creation de l'image filtre de Sobel reussie.\00"
@str.18 = [9 x i8] c"* HOUGH.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @assombrir_image(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 120)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.13, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.14, i64 0, i64 0))
%5 = tail call i32 @normalisation_image(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.15, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.16, i64 0, i64 0))
%8 = tail call i32 @sobel(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.17, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.18, i64 0, i64 0))
%11 = tail call i32 @hough(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0))
%12 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0))
ret i32 0
}