#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*/ affiche(int **, int, int);
int /*<<< orphan*/ affiche_fichier(int **, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ duplication(int **, int **, int, int);
int /*<<< orphan*/ generation_suivante_M(int **, int **, int, int, int *,
                                         int *);
int /*<<< orphan*/ printf(char *, int);
void jeu_M(int **tab1, int n, int m, int B[9], int S[9], int ng) {
  int i;
  int **tab2 = NULL;
  FILE *fichier = NULL;
  for (i = 0; i < ng; i++) {
    duplication(tab1, tab2, n, m);
    generation_suivante_M(tab1, tab2, n, m, &B[9], &S[9]);
    printf("\nAffichage pour la generation %d\n", i + 1);
    affiche(tab2, n, m);
    affiche_fichier(tab2, n, m, fichier);
  }
}


x86 assembly (clang, -O0):
<jeu_M>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
movq   $0x0,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1209 <jeu_M+0xb9>
mov    -0x8(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1060 <duplication@plt>
mov    -0x8(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x18(%rbp),%r8
add    $0x24,%r8
mov    -0x20(%rbp),%r9
add    $0x24,%r9
call   1070 <generation_suivante_M@plt>
mov    -0x28(%rbp),%esi
add    $0x1,%esi
lea    0xe2c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x30(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1050 <affiche@plt>
mov    -0x30(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x38(%rbp),%rcx
call   1040 <affiche_fichier@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1185 <jeu_M+0x35>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jeu_M>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8,(%rsp)
test   %r9d,%r9d
jle    11ef <jeu_M+0x9f>
mov    %r9d,%r12d
mov    %rcx,%r15
mov    %edx,%ebp
mov    %esi,%ebx
mov    %rdi,%r13
add    $0x24,%r15
addq   $0x24,(%rsp)
neg    %r12d
mov    $0x1,%r14d
nopw   0x0(%rax,%rax,1)
mov    %r13,%rdi
xor    %esi,%esi
mov    %ebx,%edx
mov    %ebp,%ecx
call   1060 <duplication@plt>
mov    %r13,%rdi
xor    %esi,%esi
mov    %ebx,%edx
mov    %ebp,%ecx
mov    %r15,%r8
mov    (%rsp),%r9
call   1070 <generation_suivante_M@plt>
lea    0xe46(%rip),%rdi
mov    %r14d,%esi
call   1030 <printf@plt>
xor    %edi,%edi
mov    %ebx,%esi
mov    %ebp,%edx
call   1050 <affiche@plt>
xor    %edi,%edi
mov    %ebx,%esi
mov    %ebp,%edx
xor    %ecx,%ecx
call   1040 <affiche_fichier@plt>
lea    (%r12,%r14,1),%eax
add    $0x1,%eax
mov    %r14d,%ecx
add    $0x1,%ecx
mov    %ecx,%r14d
cmp    $0x1,%eax
jne    1190 <jeu_M+0x40>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [34 x i8] c"\0AAffichage pour la generation %d\0A\00"
define void @jeu_M(i32** %0, i32 %1, i32 %2, i32* %3, i32* %4, i32 %5) {
%7 = alloca i32**
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32**
%15 = alloca i32*
store i32** %0, i32*** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32* %3, i32** %10
store i32* %4, i32** %11
store i32 %5, i32* %12
store i32** null, i32*** %14
store i32* null, i32** %15
store i32 0, i32* %13
br label %16
16: ; preds = %47, %6
%17 = load i32, i32* %13
%18 = load i32, i32* %12
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %50
20: ; preds = %16
%21 = load i32**, i32*** %7
%22 = load i32**, i32*** %14
%23 = load i32, i32* %8
%24 = load i32, i32* %9
%25 = call i32 @duplication(i32** %21, i32** %22, i32 %23, i32 %24)
%26 = load i32**, i32*** %7
%27 = load i32**, i32*** %14
%28 = load i32, i32* %8
%29 = load i32, i32* %9
%30 = load i32*, i32** %10
%31 = getelementptr inbounds i32, i32* %30, i64 9
%32 = load i32*, i32** %11
%33 = getelementptr inbounds i32, i32* %32, i64 9
%34 = call i32 @generation_suivante_M(i32** %26, i32** %27, i32 %28, i32 %29, i32* %31, i32* %33)
%35 = load i32, i32* %13
%36 = add nsw i32 %35, 1
%37 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %36)
%38 = load i32**, i32*** %14
%39 = load i32, i32* %8
%40 = load i32, i32* %9
%41 = call i32 @affiche(i32** %38, i32 %39, i32 %40)
%42 = load i32**, i32*** %14
%43 = load i32, i32* %8
%44 = load i32, i32* %9
%45 = load i32*, i32** %15
%46 = call i32 @affiche_fichier(i32** %42, i32 %43, i32 %44, i32* %45)
br label %47
47: ; preds = %20
%48 = load i32, i32* %13
%49 = add nsw i32 %48, 1
store i32 %49, i32* %13
br label %16
50: ; preds = %16
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"\0AAffichage pour la generation %d\0A\00"
define void @jeu_M(i32** %0, i32 %1, i32 %2, i32* %3, i32* %4, i32 %5) {
%7 = icmp sgt i32 %5, 0
br i1 %7, label %8, label %20
8: ; preds = %6
%9 = getelementptr inbounds i32, i32* %3, i64 9
%10 = getelementptr inbounds i32, i32* %4, i64 9
br label %11
11: ; preds = %8, %11
%12 = phi i32 [ 0, %8 ], [ %15, %11 ]
%13 = tail call i32 @duplication(i32** %0, i32** null, i32 %1, i32 %2)
%14 = tail call i32 @generation_suivante_M(i32** %0, i32** null, i32 %1, i32 %2, i32* %9, i32* %10)
%15 = add nuw nsw i32 %12, 1
%16 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = tail call i32 @affiche(i32** null, i32 %1, i32 %2)
%18 = tail call i32 @affiche_fichier(i32** null, i32 %1, i32 %2, i32* null)
%19 = icmp eq i32 %15, %5
br i1 %19, label %20, label %11
20: ; preds = %11, %6
ret void
}