#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*/ affiche(char *);
int /*<<< orphan*/ afficheInt(int);
scalar_t__ malloc(int);
scalar_t__ recherche0(int *, int *, int *, int **, int);
scalar_t__ recherche1(int *, int *, int *, int *, int *, int **, int, int);
scalar_t__ recherche2(int *, int *, int *, int *, int *, int *, int *, int **,
                      int, int);
int terminus(int *, int *, int *, int **, int);
void recherche(int depart, int arrivee, int nb_ligne, int nb_arret, int *ligne,
               char **arret, int **mat) {
  int *chg1 = (int *)malloc(sizeof(int));
  int *chg2 = (int *)malloc(sizeof(int));
  int *lg1 = (int *)malloc(sizeof(int));
  int *lg2 = (int *)malloc(sizeof(int));
  int *lg3 = (int *)malloc(sizeof(int));
  int direction;
  if (recherche0(&depart, &arrivee, lg1, mat, nb_ligne) != 0) {
    direction = terminus(lg1, &depart, &arrivee, mat, nb_arret);
    affiche("Pas de changement\n Monter a");
    affiche(arret[depart]);
    affiche(" \nPrendre ligne");
    afficheInt(ligne[*lg1]);
    affiche("vers");
    affiche(arret[direction]);
    affiche(" \n  Descendre a");
    affiche(arret[arrivee]);
    affiche(" \n");
  } else {
    if (recherche1(&depart, &arrivee, chg1, lg1, lg2, mat, nb_ligne,
                   nb_arret) != 0) {
      direction = terminus(lg1, &depart, chg1, mat, nb_arret);
      affiche("1 changement :\n  Monter a");
      affiche(arret[depart]);
      affiche("\n  Prendre ligne");
      afficheInt(ligne[*lg1]);
      affiche(" vers ");
      affiche(arret[direction]);
      affiche("\n  Descendre a ");
      affiche(arret[*chg1]);
      affiche("\n");
      direction = terminus(lg2, chg1, &arrivee, mat, nb_arret);
      affiche("Prendre ligne");
      afficheInt(ligne[*lg2]);
      affiche(" vers ");
      affiche(arret[direction]);
      affiche(" \n   Descendre a ");
      affiche(arret[arrivee]);
      affiche(" \n");
    } else {
      if (recherche2(&depart, &arrivee, chg1, chg2, lg1, lg2, lg3, mat,
                     nb_ligne, nb_arret) == 0) {
        affiche("Pas d'itinéraire possible avec moins de deux changements\n");
      } else {
        direction = terminus(lg1, &depart, chg1, mat, nb_arret);
        affiche("2 changements :\n  Monter a ");
        affiche(arret[depart]);
        affiche("\n\tPrendre ligne ");
        afficheInt(ligne[*lg1]);
        affiche(" vers ");
        affiche(arret[direction]);
        affiche("\n  Descendre a ");
        affiche(arret[*chg1]);
        affiche("\n");
        direction = terminus(lg2, chg1, chg2, mat, nb_arret);
        affiche("\tPrendre ligne ");
        afficheInt(ligne[*lg2]);
        affiche(" vers ");
        affiche(arret[direction]);
        affiche(" \n  Descendre a ");
        affiche(arret[*chg2]);
        affiche(" \n");
        direction = terminus(lg3, chg2, &arrivee, mat, nb_arret);
        affiche("\tPrendre ligne ");
        afficheInt(ligne[*lg3]);
        affiche(" vers ");
        affiche(arret[direction]);
        affiche("\n  Descendre a ");
        affiche(arret[arrivee]);
        affiche(" \n");
      }
    }
  }
}


x86 assembly (clang, -O0):
<recherche>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x78,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    $0x4,%edi
call   1070 <malloc@plt>
mov    %rax,-0x30(%rbp)
mov    $0x4,%edi
call   1070 <malloc@plt>
mov    %rax,-0x38(%rbp)
mov    $0x4,%edi
call   1070 <malloc@plt>
mov    %rax,-0x40(%rbp)
mov    $0x4,%edi
call   1070 <malloc@plt>
mov    %rax,-0x48(%rbp)
mov    $0x4,%edi
call   1070 <malloc@plt>
mov    %rax,-0x50(%rbp)
mov    -0x40(%rbp),%rdx
mov    0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <recherche0@plt>
cmp    $0x0,%rax
je     129d <recherche+0x12d>
mov    -0x40(%rbp),%rdi
mov    0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8d
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1090 <terminus@plt>
mov    %eax,-0x54(%rbp)
lea    0xde3(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x28(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <affiche@plt>
lea    0xde2(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x20(%rbp),%rax
mov    -0x40(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <afficheInt@plt>
lea    0xdd3(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x28(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <affiche@plt>
lea    0xdbb(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x28(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <affiche@plt>
lea    0xdae(%rip),%rdi
call   1060 <affiche@plt>
jmp    1603 <recherche+0x493>
mov    -0x30(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    0x10(%rbp),%r9
mov    -0x14(%rbp),%r10d
mov    -0x18(%rbp),%eax
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1080 <recherche1@plt>
cmp    $0x0,%rax
je     13fa <recherche+0x28a>
mov    -0x40(%rbp),%rdi
mov    -0x30(%rbp),%rdx
mov    0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8d
lea    -0xc(%rbp),%rsi
call   1090 <terminus@plt>
mov    %eax,-0x54(%rbp)
lea    0xd4e(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x28(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <affiche@plt>
lea    0xd4b(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x20(%rbp),%rax
mov    -0x40(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <afficheInt@plt>
lea    0xd3d(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x28(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <affiche@plt>
lea    0xda2(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <affiche@plt>
lea    0xcd3(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x48(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8d
lea    -0x10(%rbp),%rdx
call   1090 <terminus@plt>
mov    %eax,-0x54(%rbp)
lea    0xc87(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x20(%rbp),%rax
mov    -0x48(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <afficheInt@plt>
lea    0xcb9(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x28(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <affiche@plt>
lea    0xca3(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x28(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <affiche@plt>
lea    0xc51(%rip),%rdi
call   1060 <affiche@plt>
jmp    15fe <recherche+0x48e>
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x40(%rbp),%r8
mov    -0x48(%rbp),%r9
mov    -0x50(%rbp),%rbx
mov    0x10(%rbp),%r11
mov    -0x14(%rbp),%r10d
mov    -0x18(%rbp),%eax
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1040 <recherche2@plt>
cmp    $0x0,%rax
jne    1453 <recherche+0x2e3>
lea    0xc3f(%rip),%rdi
call   1060 <affiche@plt>
jmp    15f9 <recherche+0x489>
mov    -0x40(%rbp),%rdi
mov    -0x30(%rbp),%rdx
mov    0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8d
lea    -0xc(%rbp),%rsi
call   1090 <terminus@plt>
mov    %eax,-0x54(%rbp)
lea    0xc4d(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x28(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <affiche@plt>
lea    0xc4c(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x20(%rbp),%rax
mov    -0x40(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <afficheInt@plt>
lea    0xbbd(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x28(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <affiche@plt>
lea    0xc22(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <affiche@plt>
lea    0xb53(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x48(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8d
call   1090 <terminus@plt>
mov    %eax,-0x54(%rbp)
lea    0xbc9(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x20(%rbp),%rax
mov    -0x48(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <afficheInt@plt>
lea    0xb39(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x28(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <affiche@plt>
lea    0xb9d(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x28(%rbp),%rax
mov    -0x38(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <affiche@plt>
lea    0xace(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x50(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8d
lea    -0x10(%rbp),%rdx
call   1090 <terminus@plt>
mov    %eax,-0x54(%rbp)
lea    0xb45(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x20(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <afficheInt@plt>
lea    0xab5(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x28(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <affiche@plt>
lea    0xb1a(%rip),%rdi
call   1060 <affiche@plt>
mov    -0x28(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <affiche@plt>
lea    0xa4d(%rip),%rdi
call   1060 <affiche@plt>
jmp    15fe <recherche+0x48e>
jmp    1603 <recherche+0x493>
add    $0x78,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<recherche>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r9,%r15
mov    %r8,0x30(%rsp)
mov    %rcx,0x18(%rsp)
mov    %edx,%r14d
mov    0x80(%rsp),%rbp
mov    %edi,0x8(%rsp)
mov    %esi,0xc(%rsp)
mov    $0x4,%edi
call   1070 <malloc@plt>
mov    %rax,0x10(%rsp)
mov    $0x4,%edi
call   1070 <malloc@plt>
mov    %rax,%rbx
mov    $0x4,%edi
call   1070 <malloc@plt>
mov    %rax,%r13
mov    $0x4,%edi
call   1070 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    $0x4,%edi
call   1070 <malloc@plt>
mov    %rax,%r12
lea    0x8(%rsp),%rdi
lea    0xc(%rsp),%rsi
mov    %r13,%rdx
mov    %rbp,%rcx
mov    %r14d,%r8d
call   1050 <recherche0@plt>
test   %rax,%rax
je     125f <recherche+0xef>
lea    0x8(%rsp),%rsi
lea    0xc(%rsp),%rdx
mov    %r13,%rdi
mov    0x80(%rsp),%rcx
mov    0x18(%rsp),%r8
call   1090 <terminus@plt>
mov    %eax,%ebx
lea    0xdd8(%rip),%rdi
call   1060 <affiche@plt>
movslq 0x8(%rsp),%rax
mov    (%r15,%rax,8),%rdi
call   1060 <affiche@plt>
mov    0x30(%rsp),%r14
lea    0xdea(%rip),%rax
mov    %rax,0x28(%rsp)
lea    0xdd9(%rip),%r12
lea    0xdc2(%rip),%rbp
jmp    1506 <recherche+0x396>
lea    0x8(%rsp),%rdi
lea    0xc(%rsp),%rsi
mov    0x10(%rsp),%rdx
mov    %r13,%rcx
mov    0x20(%rsp),%r8
mov    0x80(%rsp),%r9
push   0x18(%rsp)
push   %r14
call   1080 <recherche1@plt>
add    $0x10,%rsp
test   %rax,%rax
je     1371 <recherche+0x201>
lea    0x8(%rsp),%rsi
mov    %r13,%rdi
mov    0x10(%rsp),%rbx
mov    %rbx,%rdx
mov    0x80(%rsp),%rcx
mov    0x18(%rsp),%r8
call   1090 <terminus@plt>
mov    %eax,%r14d
lea    0xd82(%rip),%rdi
call   1060 <affiche@plt>
movslq 0x8(%rsp),%rax
mov    (%r15,%rax,8),%rdi
call   1060 <affiche@plt>
lea    0xd82(%rip),%rdi
call   1060 <affiche@plt>
movslq 0x0(%r13),%rax
mov    0x30(%rsp),%rbp
mov    0x0(%rbp,%rax,4),%edi
call   1030 <afficheInt@plt>
lea    0xd75(%rip),%rdi
mov    %rdi,%r12
call   1060 <affiche@plt>
movslq %r14d,%rax
mov    (%r15,%rax,8),%rdi
call   1060 <affiche@plt>
lea    0xddc(%rip),%rdi
call   1060 <affiche@plt>
movslq (%rbx),%rax
mov    (%r15,%rax,8),%rdi
call   1060 <affiche@plt>
lea    0xd15(%rip),%rdi
call   1060 <affiche@plt>
lea    0xc(%rsp),%rdx
mov    0x20(%rsp),%r13
mov    %r13,%rdi
mov    %rbx,%rsi
mov    0x80(%rsp),%rcx
mov    0x18(%rsp),%r8
call   1090 <terminus@plt>
mov    %eax,%ebx
mov    %rbp,%r14
lea    0xd16(%rip),%rax
mov    %rax,0x28(%rsp)
lea    0xcb2(%rip),%rbp
jmp    1506 <recherche+0x396>
lea    0x8(%rsp),%rdi
lea    0xc(%rsp),%rsi
mov    0x10(%rsp),%rdx
mov    %rbx,%rcx
mov    %r13,%r8
mov    0x20(%rsp),%r9
push   0x18(%rsp)
push   %r14
push   0x90(%rsp)
mov    %r12,%rbp
push   %r12
call   1040 <recherche2@plt>
add    $0x20,%rsp
test   %rax,%rax
je     1562 <recherche+0x3f2>
lea    0x8(%rsp),%rsi
mov    %r13,%rdi
mov    0x10(%rsp),%rdx
mov    %rbx,0x38(%rsp)
mov    0x80(%rsp),%rcx
mov    0x18(%rsp),%r12
mov    %r12d,%r8d
call   1090 <terminus@plt>
mov    %rbp,0x40(%rsp)
mov    %eax,%r14d
lea    0xcde(%rip),%rdi
call   1060 <affiche@plt>
movslq 0x8(%rsp),%rax
mov    (%r15,%rax,8),%rdi
call   1060 <affiche@plt>
lea    0xce0(%rip),%rdi
call   1060 <affiche@plt>
movslq 0x0(%r13),%rax
mov    0x30(%rsp),%rbx
mov    (%rbx,%rax,4),%edi
call   1030 <afficheInt@plt>
lea    0xc53(%rip),%rdi
call   1060 <affiche@plt>
movslq %r14d,%rax
mov    (%r15,%rax,8),%rdi
call   1060 <affiche@plt>
mov    %rbx,%r14
lea    0xcba(%rip),%rdi
mov    %rdi,0x28(%rsp)
call   1060 <affiche@plt>
mov    0x10(%rsp),%rbx
movslq (%rbx),%rax
mov    (%r15,%rax,8),%rdi
call   1060 <affiche@plt>
lea    0xbe9(%rip),%rdi
call   1060 <affiche@plt>
mov    0x20(%rsp),%r13
mov    %r13,%rdi
mov    %rbx,%rsi
mov    0x38(%rsp),%rbx
mov    %rbx,%rdx
mov    0x80(%rsp),%rcx
mov    %r12d,%r8d
call   1090 <terminus@plt>
mov    %eax,0x10(%rsp)
lea    0xc54(%rip),%rbp
mov    %rbp,%rdi
call   1060 <affiche@plt>
movslq 0x0(%r13),%rax
mov    (%r14,%rax,4),%edi
call   1030 <afficheInt@plt>
lea    0xbc7(%rip),%rdi
mov    %rdi,%r12
call   1060 <affiche@plt>
movslq 0x10(%rsp),%rax
mov    (%r15,%rax,8),%rdi
call   1060 <affiche@plt>
lea    0xc2b(%rip),%rdi
call   1060 <affiche@plt>
movslq (%rbx),%rax
mov    (%r15,%rax,8),%rdi
call   1060 <affiche@plt>
lea    0xb64(%rip),%rdi
call   1060 <affiche@plt>
lea    0xc(%rsp),%rdx
mov    0x40(%rsp),%r13
mov    %r13,%rdi
mov    %rbx,%rsi
mov    0x80(%rsp),%rcx
mov    0x18(%rsp),%r8
call   1090 <terminus@plt>
mov    %eax,%ebx
mov    %rbp,%rdi
call   1060 <affiche@plt>
movslq 0x0(%r13),%rax
mov    (%r14,%rax,4),%edi
call   1030 <afficheInt@plt>
mov    %r12,%rdi
call   1060 <affiche@plt>
movslq %ebx,%rax
mov    (%r15,%rax,8),%rdi
call   1060 <affiche@plt>
mov    0x28(%rsp),%rdi
call   1060 <affiche@plt>
movslq 0xc(%rsp),%rax
mov    (%r15,%rax,8),%rdi
call   1060 <affiche@plt>
lea    0xaf3(%rip),%rdi
call   1060 <affiche@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xb1f(%rip),%rdi
jmp    154e <recherche+0x3de>

LLVM IR (-O0):
@.str = [28 x i8] c"Pas de changement\0A Monter a\00"
@.str.1 = [16 x i8] c" \0APrendre ligne\00"
@.str.2 = [5 x i8] c"vers\00"
@.str.3 = [16 x i8] c" \0A Descendre a\00"
@.str.4 = [3 x i8] c" \0A\00"
@.str.5 = [26 x i8] c"1 changement :\0A Monter a\00"
@.str.6 = [17 x i8] c"\0A Prendre ligne\00"
@.str.7 = [7 x i8] c" vers \00"
@.str.8 = [16 x i8] c"\0A Descendre a \00"
@.str.9 = [2 x i8] c"\0A\00"
@.str.10 = [14 x i8] c"Prendre ligne\00"
@.str.11 = [18 x i8] c" \0A Descendre a \00"
@.str.12 = [59 x i8] c"Pas d'itin\C3\A9raire possible avec moins de deux changements\0A\00"
@.str.13 = [28 x i8] c"2 changements :\0A Monter a \00"
@.str.14 = [17 x i8] c"\0A\09Prendre ligne \00"
@.str.15 = [16 x i8] c"\09Prendre ligne \00"
@.str.16 = [17 x i8] c" \0A Descendre a \00"
define void @recherche(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i8** %5, i32** %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i8**
%14 = alloca i32**
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca i32*
%18 = alloca i32*
%19 = alloca i32*
%20 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i8** %5, i8*** %13
store i32** %6, i32*** %14
%21 = call i64 @malloc(i32 4)
%22 = inttoptr i64 %21 to i32*
store i32* %22, i32** %15
%23 = call i64 @malloc(i32 4)
%24 = inttoptr i64 %23 to i32*
store i32* %24, i32** %16
%25 = call i64 @malloc(i32 4)
%26 = inttoptr i64 %25 to i32*
store i32* %26, i32** %17
%27 = call i64 @malloc(i32 4)
%28 = inttoptr i64 %27 to i32*
store i32* %28, i32** %18
%29 = call i64 @malloc(i32 4)
%30 = inttoptr i64 %29 to i32*
store i32* %30, i32** %19
%31 = load i32*, i32** %17
%32 = load i32**, i32*** %14
%33 = load i32, i32* %10
%34 = call i64 @recherche0(i32* %8, i32* %9, i32* %31, i32** %32, i32 %33)
%35 = icmp ne i64 %34, 0
br i1 %35, label %36, label %71
36: ; preds = %7
%37 = load i32*, i32** %17
%38 = load i32**, i32*** %14
%39 = load i32, i32* %11
%40 = call i32 @terminus(i32* %37, i32* %8, i32* %9, i32** %38, i32 %39)
store i32 %40, i32* %20
%41 = call i32 @affiche(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%42 = load i8**, i8*** %13
%43 = load i32, i32* %8
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i8*, i8** %42, i64 %44
%46 = load i8*, i8** %45
%47 = call i32 @affiche(i8* %46)
%48 = call i32 @affiche(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%49 = load i32*, i32** %12
%50 = load i32*, i32** %17
%51 = load i32, i32* %50
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds i32, i32* %49, i64 %52
%54 = load i32, i32* %53
%55 = call i32 @afficheInt(i32 %54)
%56 = call i32 @affiche(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%57 = load i8**, i8*** %13
%58 = load i32, i32* %20
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds i8*, i8** %57, i64 %59
%61 = load i8*, i8** %60
%62 = call i32 @affiche(i8* %61)
%63 = call i32 @affiche(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%64 = load i8**, i8*** %13
%65 = load i32, i32* %9
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds i8*, i8** %64, i64 %66
%68 = load i8*, i8** %67
%69 = call i32 @affiche(i8* %68)
%70 = call i32 @affiche(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %255
71: ; preds = %7
%72 = load i32*, i32** %15
%73 = load i32*, i32** %17
%74 = load i32*, i32** %18
%75 = load i32**, i32*** %14
%76 = load i32, i32* %10
%77 = load i32, i32* %11
%78 = call i64 @recherche1(i32* %8, i32* %9, i32* %72, i32* %73, i32* %74, i32** %75, i32 %76, i32 %77)
%79 = icmp ne i64 %78, 0
br i1 %79, label %80, label %145
80: ; preds = %71
%81 = load i32*, i32** %17
%82 = load i32*, i32** %15
%83 = load i32**, i32*** %14
%84 = load i32, i32* %11
%85 = call i32 @terminus(i32* %81, i32* %8, i32* %82, i32** %83, i32 %84)
store i32 %85, i32* %20
%86 = call i32 @affiche(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0))
%87 = load i8**, i8*** %13
%88 = load i32, i32* %8
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds i8*, i8** %87, i64 %89
%91 = load i8*, i8** %90
%92 = call i32 @affiche(i8* %91)
%93 = call i32 @affiche(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0))
%94 = load i32*, i32** %12
%95 = load i32*, i32** %17
%96 = load i32, i32* %95
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds i32, i32* %94, i64 %97
%99 = load i32, i32* %98
%100 = call i32 @afficheInt(i32 %99)
%101 = call i32 @affiche(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%102 = load i8**, i8*** %13
%103 = load i32, i32* %20
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds i8*, i8** %102, i64 %104
%106 = load i8*, i8** %105
%107 = call i32 @affiche(i8* %106)
%108 = call i32 @affiche(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%109 = load i8**, i8*** %13
%110 = load i32*, i32** %15
%111 = load i32, i32* %110
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds i8*, i8** %109, i64 %112
%114 = load i8*, i8** %113
%115 = call i32 @affiche(i8* %114)
%116 = call i32 @affiche(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%117 = load i32*, i32** %18
%118 = load i32*, i32** %15
%119 = load i32**, i32*** %14
%120 = load i32, i32* %11
%121 = call i32 @terminus(i32* %117, i32* %118, i32* %9, i32** %119, i32 %120)
store i32 %121, i32* %20
%122 = call i32 @affiche(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
%123 = load i32*, i32** %12
%124 = load i32*, i32** %18
%125 = load i32, i32* %124
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds i32, i32* %123, i64 %126
%128 = load i32, i32* %127
%129 = call i32 @afficheInt(i32 %128)
%130 = call i32 @affiche(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%131 = load i8**, i8*** %13
%132 = load i32, i32* %20
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds i8*, i8** %131, i64 %133
%135 = load i8*, i8** %134
%136 = call i32 @affiche(i8* %135)
%137 = call i32 @affiche(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0))
%138 = load i8**, i8*** %13
%139 = load i32, i32* %9
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds i8*, i8** %138, i64 %140
%142 = load i8*, i8** %141
%143 = call i32 @affiche(i8* %142)
%144 = call i32 @affiche(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %254
145: ; preds = %71
%146 = load i32*, i32** %15
%147 = load i32*, i32** %16
%148 = load i32*, i32** %17
%149 = load i32*, i32** %18
%150 = load i32*, i32** %19
%151 = load i32**, i32*** %14
%152 = load i32, i32* %10
%153 = load i32, i32* %11
%154 = call i64 @recherche2(i32* %8, i32* %9, i32* %146, i32* %147, i32* %148, i32* %149, i32* %150, i32** %151, i32 %152, i32 %153)
%155 = icmp eq i64 %154, 0
br i1 %155, label %156, label %158
156: ; preds = %145
%157 = call i32 @affiche(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.12, i64 0, i64 0))
br label %253
158: ; preds = %145
%159 = load i32*, i32** %17
%160 = load i32*, i32** %15
%161 = load i32**, i32*** %14
%162 = load i32, i32* %11
%163 = call i32 @terminus(i32* %159, i32* %8, i32* %160, i32** %161, i32 %162)
store i32 %163, i32* %20
%164 = call i32 @affiche(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0))
%165 = load i8**, i8*** %13
%166 = load i32, i32* %8
%167 = sext i32 %166 to i64
%168 = getelementptr inbounds i8*, i8** %165, i64 %167
%169 = load i8*, i8** %168
%170 = call i32 @affiche(i8* %169)
%171 = call i32 @affiche(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0))
%172 = load i32*, i32** %12
%173 = load i32*, i32** %17
%174 = load i32, i32* %173
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds i32, i32* %172, i64 %175
%177 = load i32, i32* %176
%178 = call i32 @afficheInt(i32 %177)
%179 = call i32 @affiche(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%180 = load i8**, i8*** %13
%181 = load i32, i32* %20
%182 = sext i32 %181 to i64
%183 = getelementptr inbounds i8*, i8** %180, i64 %182
%184 = load i8*, i8** %183
%185 = call i32 @affiche(i8* %184)
%186 = call i32 @affiche(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%187 = load i8**, i8*** %13
%188 = load i32*, i32** %15
%189 = load i32, i32* %188
%190 = sext i32 %189 to i64
%191 = getelementptr inbounds i8*, i8** %187, i64 %190
%192 = load i8*, i8** %191
%193 = call i32 @affiche(i8* %192)
%194 = call i32 @affiche(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%195 = load i32*, i32** %18
%196 = load i32*, i32** %15
%197 = load i32*, i32** %16
%198 = load i32**, i32*** %14
%199 = load i32, i32* %11
%200 = call i32 @terminus(i32* %195, i32* %196, i32* %197, i32** %198, i32 %199)
store i32 %200, i32* %20
%201 = call i32 @affiche(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0))
%202 = load i32*, i32** %12
%203 = load i32*, i32** %18
%204 = load i32, i32* %203
%205 = sext i32 %204 to i64
%206 = getelementptr inbounds i32, i32* %202, i64 %205
%207 = load i32, i32* %206
%208 = call i32 @afficheInt(i32 %207)
%209 = call i32 @affiche(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%210 = load i8**, i8*** %13
%211 = load i32, i32* %20
%212 = sext i32 %211 to i64
%213 = getelementptr inbounds i8*, i8** %210, i64 %212
%214 = load i8*, i8** %213
%215 = call i32 @affiche(i8* %214)
%216 = call i32 @affiche(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.16, i64 0, i64 0))
%217 = load i8**, i8*** %13
%218 = load i32*, i32** %16
%219 = load i32, i32* %218
%220 = sext i32 %219 to i64
%221 = getelementptr inbounds i8*, i8** %217, i64 %220
%222 = load i8*, i8** %221
%223 = call i32 @affiche(i8* %222)
%224 = call i32 @affiche(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%225 = load i32*, i32** %19
%226 = load i32*, i32** %16
%227 = load i32**, i32*** %14
%228 = load i32, i32* %11
%229 = call i32 @terminus(i32* %225, i32* %226, i32* %9, i32** %227, i32 %228)
store i32 %229, i32* %20
%230 = call i32 @affiche(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0))
%231 = load i32*, i32** %12
%232 = load i32*, i32** %19
%233 = load i32, i32* %232
%234 = sext i32 %233 to i64
%235 = getelementptr inbounds i32, i32* %231, i64 %234
%236 = load i32, i32* %235
%237 = call i32 @afficheInt(i32 %236)
%238 = call i32 @affiche(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%239 = load i8**, i8*** %13
%240 = load i32, i32* %20
%241 = sext i32 %240 to i64
%242 = getelementptr inbounds i8*, i8** %239, i64 %241
%243 = load i8*, i8** %242
%244 = call i32 @affiche(i8* %243)
%245 = call i32 @affiche(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%246 = load i8**, i8*** %13
%247 = load i32, i32* %9
%248 = sext i32 %247 to i64
%249 = getelementptr inbounds i8*, i8** %246, i64 %248
%250 = load i8*, i8** %249
%251 = call i32 @affiche(i8* %250)
%252 = call i32 @affiche(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %253
253: ; preds = %158, %156
br label %254
254: ; preds = %253, %80
br label %255
255: ; preds = %254, %36
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"Pas de changement\0A Monter a\00"
@.str.1 = [16 x i8] c" \0APrendre ligne\00"
@.str.2 = [5 x i8] c"vers\00"
@.str.3 = [16 x i8] c" \0A Descendre a\00"
@.str.4 = [3 x i8] c" \0A\00"
@.str.5 = [26 x i8] c"1 changement :\0A Monter a\00"
@.str.6 = [17 x i8] c"\0A Prendre ligne\00"
@.str.7 = [7 x i8] c" vers \00"
@.str.8 = [16 x i8] c"\0A Descendre a \00"
@.str.9 = [2 x i8] c"\0A\00"
@.str.10 = [14 x i8] c"Prendre ligne\00"
@.str.11 = [18 x i8] c" \0A Descendre a \00"
@.str.12 = [59 x i8] c"Pas d'itin\C3\A9raire possible avec moins de deux changements\0A\00"
@.str.13 = [28 x i8] c"2 changements :\0A Monter a \00"
@.str.14 = [17 x i8] c"\0A\09Prendre ligne \00"
@.str.15 = [16 x i8] c"\09Prendre ligne \00"
@.str.16 = [17 x i8] c" \0A Descendre a \00"
define void @recherche(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture %4, i8** nocapture %5, i32** %6) {
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
%10 = tail call i64 @malloc(i32 4)
%11 = inttoptr i64 %10 to i32*
%12 = tail call i64 @malloc(i32 4)
%13 = inttoptr i64 %12 to i32*
%14 = tail call i64 @malloc(i32 4)
%15 = inttoptr i64 %14 to i32*
%16 = tail call i64 @malloc(i32 4)
%17 = inttoptr i64 %16 to i32*
%18 = tail call i64 @malloc(i32 4)
%19 = inttoptr i64 %18 to i32*
%20 = call i64 @recherche0(i32* %8, i32* %9, i32* %15, i32** %6, i32 %2)
%21 = icmp eq i64 %20, 0
br i1 %21, label %30, label %22
22: ; preds = %7
%23 = call i32 @terminus(i32* %15, i32* %8, i32* %9, i32** %6, i32 %3)
%24 = call i32 @affiche(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%25 = load i32, i32* %8
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8*, i8** %5, i64 %26
%28 = load i8*, i8** %27
%29 = call i32 @affiche(i8* %28)
br label %109
30: ; preds = %7
%31 = call i64 @recherche1(i32* %8, i32* %9, i32* %11, i32* %15, i32* %17, i32** %6, i32 %2, i32 %3)
%32 = icmp eq i64 %31, 0
br i1 %32, label %60, label %33
33: ; preds = %30
%34 = call i32 @terminus(i32* %15, i32* %8, i32* %11, i32** %6, i32 %3)
%35 = call i32 @affiche(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0))
%36 = load i32, i32* %8
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i8*, i8** %5, i64 %37
%39 = load i8*, i8** %38
%40 = call i32 @affiche(i8* %39)
%41 = call i32 @affiche(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0))
%42 = load i32, i32* %15
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i32, i32* %4, i64 %43
%45 = load i32, i32* %44
%46 = call i32 @afficheInt(i32 %45)
%47 = call i32 @affiche(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%48 = sext i32 %34 to i64
%49 = getelementptr inbounds i8*, i8** %5, i64 %48
%50 = load i8*, i8** %49
%51 = call i32 @affiche(i8* %50)
%52 = call i32 @affiche(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%53 = load i32, i32* %11
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds i8*, i8** %5, i64 %54
%56 = load i8*, i8** %55
%57 = call i32 @affiche(i8* %56)
%58 = call i32 @affiche(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%59 = call i32 @terminus(i32* %17, i32* %11, i32* %9, i32** %6, i32 %3)
br label %109
60: ; preds = %30
%61 = call i64 @recherche2(i32* %8, i32* %9, i32* %11, i32* %13, i32* %15, i32* %17, i32* %19, i32** %6, i32 %2, i32 %3)
%62 = icmp eq i64 %61, 0
br i1 %62, label %132, label %63
63: ; preds = %60
%64 = call i32 @terminus(i32* %15, i32* %8, i32* %11, i32** %6, i32 %3)
%65 = call i32 @affiche(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0))
%66 = load i32, i32* %8
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds i8*, i8** %5, i64 %67
%69 = load i8*, i8** %68
%70 = call i32 @affiche(i8* %69)
%71 = call i32 @affiche(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0))
%72 = load i32, i32* %15
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds i32, i32* %4, i64 %73
%75 = load i32, i32* %74
%76 = call i32 @afficheInt(i32 %75)
%77 = call i32 @affiche(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%78 = sext i32 %64 to i64
%79 = getelementptr inbounds i8*, i8** %5, i64 %78
%80 = load i8*, i8** %79
%81 = call i32 @affiche(i8* %80)
%82 = call i32 @affiche(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%83 = load i32, i32* %11
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds i8*, i8** %5, i64 %84
%86 = load i8*, i8** %85
%87 = call i32 @affiche(i8* %86)
%88 = call i32 @affiche(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%89 = call i32 @terminus(i32* %17, i32* %11, i32* %13, i32** %6, i32 %3)
%90 = call i32 @affiche(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0))
%91 = load i32, i32* %17
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds i32, i32* %4, i64 %92
%94 = load i32, i32* %93
%95 = call i32 @afficheInt(i32 %94)
%96 = call i32 @affiche(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%97 = sext i32 %89 to i64
%98 = getelementptr inbounds i8*, i8** %5, i64 %97
%99 = load i8*, i8** %98
%100 = call i32 @affiche(i8* %99)
%101 = call i32 @affiche(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.16, i64 0, i64 0))
%102 = load i32, i32* %13
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds i8*, i8** %5, i64 %103
%105 = load i8*, i8** %104
%106 = call i32 @affiche(i8* %105)
%107 = call i32 @affiche(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%108 = call i32 @terminus(i32* %19, i32* %13, i32* %9, i32** %6, i32 %3)
br label %109
109: ; preds = %22, %63, %33
%110 = phi i8* [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), %22 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), %63 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), %33 ]
%111 = phi i32* [ %15, %22 ], [ %19, %63 ], [ %17, %33 ]
%112 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), %22 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), %63 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), %33 ]
%113 = phi i32 [ %23, %22 ], [ %108, %63 ], [ %59, %33 ]
%114 = phi i8* [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), %22 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), %63 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), %33 ]
%115 = call i32 @affiche(i8* %110)
%116 = load i32, i32* %111
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds i32, i32* %4, i64 %117
%119 = load i32, i32* %118
%120 = call i32 @afficheInt(i32 %119)
%121 = call i32 @affiche(i8* %112)
%122 = sext i32 %113 to i64
%123 = getelementptr inbounds i8*, i8** %5, i64 %122
%124 = load i8*, i8** %123
%125 = call i32 @affiche(i8* %124)
%126 = call i32 @affiche(i8* %114)
%127 = load i32, i32* %9
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds i8*, i8** %5, i64 %128
%130 = load i8*, i8** %129
%131 = call i32 @affiche(i8* %130)
br label %132
132: ; preds = %109, %60
%133 = phi i8* [ getelementptr inbounds ([59 x i8], [59 x i8]* @.str.12, i64 0, i64 0), %60 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), %109 ]
%134 = call i32 @affiche(i8* %133)
ret void
}