#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 EXIT_SUCCESS;
int /*<<< orphan*/ algorithm(int, int, int **, int **, int, int, int);
int /*<<< orphan*/ input_format(int);
int input_nbJ(int);
int input_nbS(int);
int input_verbose();
int input_zoom(int);
int /*<<< orphan*/ number_of_lines(int, int, int, int, int, int, int **);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ problems_nbJ_nbS(int, int);
int /*<<< orphan*/ scan_array(int, int, int, int **);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(int argc, const char *argv[]) {
  int nbJ = 0, nbS = 0, verbose = 0, zoom = 0;
  int nbL = 0, nbC = 0;
  verbose = input_verbose();
  nbJ = input_nbJ(verbose);
  nbS = input_nbS(verbose);
  problems_nbJ_nbS(nbJ, nbS);
  zoom = input_zoom(verbose);
  input_format(verbose);
  if (verbose)
    printf("Donner les dimensions du monde\n");
  scanf("%d %d", &nbC, &nbL);
  int dim[nbL][nbC];
  int image[nbL][nbC];
  int number_of_plot_lines = zoom * nbL;
  scan_array(verbose, nbL, nbC, dim);
  number_of_lines(number_of_plot_lines, zoom, nbL, nbJ, nbS, nbC, dim);
  algorithm(nbL, nbC, image, dim, zoom, nbJ, nbS);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    $0x0,%al
call   1030 <input_verbose@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   10c0 <input_nbJ@plt>
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%edi
call   1070 <input_nbS@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   10b0 <problems_nbJ_nbS@plt>
mov    -0x1c(%rbp),%edi
call   1050 <input_zoom@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%edi
call   10d0 <input_format@plt>
cmpl   $0x0,-0x1c(%rbp)
je     1244 <main+0x94>
lea    0xdc1(%rip),%rdi
call   1060 <printf@plt>
lea    0xdd5(%rip),%rdi
lea    -0x28(%rbp),%rsi
lea    -0x24(%rbp),%rdx
call   1080 <scanf@plt>
mov    -0x24(%rbp),%eax
mov    %eax,%edx
mov    -0x28(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rdx,%rcx
imul   %rax,%rcx
lea    0xf(,%rcx,4),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rcx
sub    %rsi,%rcx
mov    %rcx,-0x60(%rbp)
mov    %rcx,%rsp
mov    %rdx,-0x38(%rbp)
mov    %rax,-0x40(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,%edx
mov    -0x28(%rbp),%eax
mov    %rdx,%rsi
imul   %rax,%rsi
lea    0xf(,%rsi,4),%rdi
and    $0xfffffffffffffff0,%rdi
mov    %rsp,%rsi
sub    %rdi,%rsi
mov    %rsi,-0x68(%rbp)
mov    %rsi,%rsp
mov    %rdx,-0x48(%rbp)
mov    %rax,-0x50(%rbp)
mov    -0x20(%rbp),%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
call   1090 <scan_array@plt>
mov    -0x60(%rbp),%rax
mov    -0x54(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x28(%rbp),%r9d
sub    $0x10,%rsp
mov    %rax,(%rsp)
call   10a0 <number_of_lines@plt>
mov    -0x68(%rbp),%rdx
mov    -0x60(%rbp),%rcx
add    $0x10,%rsp
mov    -0x24(%rbp),%edi
mov    -0x28(%rbp),%esi
mov    -0x20(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    -0x18(%rbp),%eax
sub    $0x10,%rsp
mov    %eax,(%rsp)
call   1040 <algorithm@plt>
add    $0x10,%rsp
mov    0x2cb0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x2c(%rbp)
xor    %eax,%eax
call   1030 <input_verbose@plt>
mov    %eax,%r13d
mov    %eax,%edi
call   10c0 <input_nbJ@plt>
mov    %eax,%ebx
mov    %r13d,%edi
call   1070 <input_nbS@plt>
mov    %ebx,-0x34(%rbp)
mov    %ebx,%edi
mov    %rax,-0x48(%rbp)
mov    %eax,%esi
call   10b0 <problems_nbJ_nbS@plt>
mov    %r13d,%edi
call   1060 <input_zoom@plt>
mov    %eax,%r15d
mov    %r13d,%edi
call   10d0 <input_format@plt>
test   %r13d,%r13d
je     121e <main+0x6e>
lea    0xded(%rip),%rdi
call   1040 <puts@plt>
lea    0xddb(%rip),%rdi
lea    -0x2c(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1080 <scanf@plt>
mov    %rsp,-0x40(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x2c(%rbp),%ecx
imul   %rax,%rcx
lea    0xf(,%rcx,4),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,%rsp
mov    -0x30(%rbp),%esi
mov    -0x2c(%rbp),%edx
mov    %rdx,%rax
imul   %rsi,%rax
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%r14
sub    %rax,%r14
mov    %r14,%rsp
mov    %r15d,%r12d
imul   %esi,%r12d
mov    %r13d,%edi
mov    %rbx,%rcx
call   1090 <scan_array@plt>
mov    -0x30(%rbp),%edx
mov    -0x2c(%rbp),%r9d
sub    $0x8,%rsp
mov    %r12d,%edi
mov    %r15d,%esi
mov    -0x34(%rbp),%r12d
mov    %r12d,%ecx
mov    -0x48(%rbp),%r13
mov    %r13d,%r8d
push   %rbx
call   10a0 <number_of_lines@plt>
add    $0x10,%rsp
mov    -0x30(%rbp),%edi
mov    -0x2c(%rbp),%esi
sub    $0x8,%rsp
mov    %r14,%rdx
mov    %rbx,%rcx
mov    %r15d,%r8d
mov    %r12d,%r9d
push   %r13
call   1050 <algorithm@plt>
add    $0x10,%rsp
mov    0x2d06(%rip),%rax
mov    (%rax),%eax
mov    -0x40(%rbp),%rsp
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Donner les dimensions du monde\0A\00"
@.str.1 = [6 x i8] c"%d %d\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
%18 = call i32 (...) @input_verbose()
store i32 %18, i32* %8
%19 = load i32, i32* %8
%20 = call i32 @input_nbJ(i32 %19)
store i32 %20, i32* %6
%21 = load i32, i32* %8
%22 = call i32 @input_nbS(i32 %21)
store i32 %22, i32* %7
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = call i32 @problems_nbJ_nbS(i32 %23, i32 %24)
%26 = load i32, i32* %8
%27 = call i32 @input_zoom(i32 %26)
store i32 %27, i32* %9
%28 = load i32, i32* %8
%29 = call i32 @input_format(i32 %28)
%30 = load i32, i32* %8
%31 = icmp ne i32 %30, 0
br i1 %31, label %32, label %34
32: ; preds = %2
%33 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %34
34: ; preds = %32, %2
%35 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %11, i32* %10)
%36 = load i32, i32* %10
%37 = zext i32 %36 to i64
%38 = load i32, i32* %11
%39 = zext i32 %38 to i64
%40 = call i8* @llvm.stacksave()
store i8* %40, i8** %12
%41 = mul nuw i64 %37, %39
%42 = alloca i32, i64 %41
store i64 %37, i64* %13
store i64 %39, i64* %14
%43 = load i32, i32* %10
%44 = zext i32 %43 to i64
%45 = load i32, i32* %11
%46 = zext i32 %45 to i64
%47 = mul nuw i64 %44, %46
%48 = alloca i32, i64 %47
store i64 %44, i64* %15
store i64 %46, i64* %16
%49 = load i32, i32* %9
%50 = load i32, i32* %10
%51 = mul nsw i32 %49, %50
store i32 %51, i32* %17
%52 = load i32, i32* %8
%53 = load i32, i32* %10
%54 = load i32, i32* %11
%55 = bitcast i32* %42 to i32**
%56 = call i32 @scan_array(i32 %52, i32 %53, i32 %54, i32** %55)
%57 = load i32, i32* %17
%58 = load i32, i32* %9
%59 = load i32, i32* %10
%60 = load i32, i32* %6
%61 = load i32, i32* %7
%62 = load i32, i32* %11
%63 = bitcast i32* %42 to i32**
%64 = call i32 @number_of_lines(i32 %57, i32 %58, i32 %59, i32 %60, i32 %61, i32 %62, i32** %63)
%65 = load i32, i32* %10
%66 = load i32, i32* %11
%67 = bitcast i32* %48 to i32**
%68 = bitcast i32* %42 to i32**
%69 = load i32, i32* %9
%70 = load i32, i32* %6
%71 = load i32, i32* %7
%72 = call i32 @algorithm(i32 %65, i32 %66, i32** %67, i32** %68, i32 %69, i32 %70, i32 %71)
%73 = load i32, i32* @EXIT_SUCCESS
store i32 %73, i32* %3
%74 = load i8*, i8** %12
%75 = load i32, i32* %3
ret i32 %75
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"%d %d\00"
@EXIT_SUCCESS = global i32 0
@str = [31 x i8] c"Donner les dimensions du monde\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%6 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%7 = tail call i32 (...) @input_verbose()
%8 = tail call i32 @input_nbJ(i32 %7)
%9 = tail call i32 @input_nbS(i32 %7)
%10 = tail call i32 @problems_nbJ_nbS(i32 %8, i32 %9)
%11 = tail call i32 @input_zoom(i32 %7)
%12 = tail call i32 @input_format(i32 %7)
%13 = icmp eq i32 %7, 0
br i1 %13, label %16, label %14
14: ; preds = %2
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
br label %16
16: ; preds = %14, %2
%17 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %4, i32* %3)
%18 = load i32, i32* %3
%19 = zext i32 %18 to i64
%20 = load i32, i32* %4
%21 = zext i32 %20 to i64
%22 = call i8* @llvm.stacksave()
%23 = mul nuw i64 %21, %19
%24 = alloca i32, i64 %23
%25 = load i32, i32* %3
%26 = zext i32 %25 to i64
%27 = load i32, i32* %4
%28 = zext i32 %27 to i64
%29 = mul nuw i64 %28, %26
%30 = alloca i32, i64 %29
%31 = mul nsw i32 %25, %11
%32 = bitcast i32* %24 to i32**
%33 = call i32 @scan_array(i32 %7, i32 %25, i32 %27, i32** %32)
%34 = load i32, i32* %3
%35 = load i32, i32* %4
%36 = call i32 @number_of_lines(i32 %31, i32 %11, i32 %34, i32 %8, i32 %9, i32 %35, i32** %32)
%37 = load i32, i32* %3
%38 = load i32, i32* %4
%39 = bitcast i32* %30 to i32**
%40 = call i32 @algorithm(i32 %37, i32 %38, i32** %39, i32** %32, i32 %11, i32 %8, i32 %9)
%41 = load i32, i32* @EXIT_SUCCESS
ret i32 %41
}