#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 position_escalier(int, int *, int);
int nouvelle_position(int num_fils, int positionjoueur, int resultatde,
                      int *danslescalier) {
  int nouvelle_position = 0;
  if (positionjoueur == 0 && resultatde == 6) {
    switch (num_fils) {
    case 1:
      nouvelle_position = 1;
      break;
    case 2:
      nouvelle_position = 15;
      break;
    case 3:
      nouvelle_position = 29;
      break;
    case 4:
      nouvelle_position = 43;
      break;
    }
  } else if (positionjoueur != 0) {
    switch (num_fils) {
    case 1:
      if (positionjoueur == 56 || danslescalier[1] == 1) {
        danslescalier[1] = 1;
        nouvelle_position =
            position_escalier(num_fils, &positionjoueur, resultatde);
      } else {
        if (positionjoueur + resultatde > 56) {
          nouvelle_position = 56;
        } else {
          nouvelle_position = positionjoueur + resultatde;
        }
      }
      break;
    case 2:
      if (positionjoueur == 14 || danslescalier[2] == 1) {
        danslescalier[2] = 1;
        nouvelle_position =
            position_escalier(num_fils, &positionjoueur, resultatde);
      } else {
        if ((positionjoueur + resultatde) > 56) {
          positionjoueur = (positionjoueur + resultatde) % 56;
          if (positionjoueur > 14) {
            nouvelle_position = 14;
          } else {
            nouvelle_position = positionjoueur;
          }
        } else {
          nouvelle_position = positionjoueur + resultatde;
        }
      }
      break;
    case 3:
      if (positionjoueur == 28 || danslescalier[3] == 1) {
        danslescalier[3] = 1;
        nouvelle_position =
            position_escalier(num_fils, &positionjoueur, resultatde);
      } else {
        if ((positionjoueur + resultatde) > 56) {
          positionjoueur = (positionjoueur + resultatde) % 56;
          if (positionjoueur > 28) {
            nouvelle_position = 28;
          } else {
            nouvelle_position = positionjoueur;
          }
        } else {
          nouvelle_position = positionjoueur + resultatde;
        }
      }
      break;
    case 4:
      if (positionjoueur == 42 || danslescalier[4] == 1) {
        danslescalier[4] = 1;
        nouvelle_position =
            position_escalier(num_fils, &positionjoueur, resultatde);
      } else {
        if ((positionjoueur + resultatde) > 56) {
          positionjoueur = (positionjoueur + resultatde) % 56;
          if (positionjoueur > 42) {
            nouvelle_position = 42;
          } else {
            nouvelle_position = positionjoueur;
          }
        } else {
          nouvelle_position = positionjoueur + resultatde;
        }
      }
      break;
    }
  }
  return nouvelle_position;
}


x86 assembly (clang, -O0):
<nouvelle_position>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1199 <nouvelle_position+0x89>
cmpl   $0x6,-0xc(%rbp)
jne    1199 <nouvelle_position+0x89>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x28(%rbp)
sub    $0x3,%eax
ja     1194 <nouvelle_position+0x84>
mov    -0x28(%rbp),%rax
lea    0xeb0(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x1c(%rbp)
jmp    1194 <nouvelle_position+0x84>
movl   $0xf,-0x1c(%rbp)
jmp    1194 <nouvelle_position+0x84>
movl   $0x1d,-0x1c(%rbp)
jmp    1194 <nouvelle_position+0x84>
movl   $0x2b,-0x1c(%rbp)
jmp    13e8 <nouvelle_position+0x2d8>
cmpl   $0x0,-0x8(%rbp)
je     13e3 <nouvelle_position+0x2d3>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x30(%rbp)
sub    $0x3,%eax
ja     13de <nouvelle_position+0x2ce>
mov    -0x30(%rbp),%rax
lea    0xe3d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
cmpl   $0x38,-0x8(%rbp)
je     11e4 <nouvelle_position+0xd4>
mov    -0x18(%rbp),%rax
cmpl   $0x1,0x4(%rax)
jne    1206 <nouvelle_position+0xf6>
mov    -0x18(%rbp),%rax
movl   $0x1,0x4(%rax)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%edx
lea    -0x8(%rbp),%rsi
call   1030 <position_escalier@plt>
mov    %eax,-0x1c(%rbp)
jmp    122f <nouvelle_position+0x11f>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cmp    $0x38,%eax
jle    1221 <nouvelle_position+0x111>
movl   $0x38,-0x1c(%rbp)
jmp    122a <nouvelle_position+0x11a>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    122f <nouvelle_position+0x11f>
jmp    13de <nouvelle_position+0x2ce>
cmpl   $0xe,-0x8(%rbp)
je     124c <nouvelle_position+0x13c>
mov    -0x18(%rbp),%rax
cmpl   $0x1,0x8(%rax)
jne    126e <nouvelle_position+0x15e>
mov    -0x18(%rbp),%rax
movl   $0x1,0x8(%rax)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%edx
lea    -0x8(%rbp),%rsi
call   1030 <position_escalier@plt>
mov    %eax,-0x1c(%rbp)
jmp    12bd <nouvelle_position+0x1ad>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cmp    $0x38,%eax
jle    12af <nouvelle_position+0x19f>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    $0x38,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
cmpl   $0xe,-0x8(%rbp)
jle    12a4 <nouvelle_position+0x194>
movl   $0xe,-0x1c(%rbp)
jmp    12aa <nouvelle_position+0x19a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    12b8 <nouvelle_position+0x1a8>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    12bd <nouvelle_position+0x1ad>
jmp    13de <nouvelle_position+0x2ce>
cmpl   $0x1c,-0x8(%rbp)
je     12da <nouvelle_position+0x1ca>
mov    -0x18(%rbp),%rax
cmpl   $0x1,0xc(%rax)
jne    12fc <nouvelle_position+0x1ec>
mov    -0x18(%rbp),%rax
movl   $0x1,0xc(%rax)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%edx
lea    -0x8(%rbp),%rsi
call   1030 <position_escalier@plt>
mov    %eax,-0x1c(%rbp)
jmp    134b <nouvelle_position+0x23b>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cmp    $0x38,%eax
jle    133d <nouvelle_position+0x22d>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    $0x38,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
cmpl   $0x1c,-0x8(%rbp)
jle    1332 <nouvelle_position+0x222>
movl   $0x1c,-0x1c(%rbp)
jmp    1338 <nouvelle_position+0x228>
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1346 <nouvelle_position+0x236>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    134b <nouvelle_position+0x23b>
jmp    13de <nouvelle_position+0x2ce>
cmpl   $0x2a,-0x8(%rbp)
je     1368 <nouvelle_position+0x258>
mov    -0x18(%rbp),%rax
cmpl   $0x1,0x10(%rax)
jne    138a <nouvelle_position+0x27a>
mov    -0x18(%rbp),%rax
movl   $0x1,0x10(%rax)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%edx
lea    -0x8(%rbp),%rsi
call   1030 <position_escalier@plt>
mov    %eax,-0x1c(%rbp)
jmp    13d9 <nouvelle_position+0x2c9>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cmp    $0x38,%eax
jle    13cb <nouvelle_position+0x2bb>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    $0x38,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
cmpl   $0x2a,-0x8(%rbp)
jle    13c0 <nouvelle_position+0x2b0>
movl   $0x2a,-0x1c(%rbp)
jmp    13c6 <nouvelle_position+0x2b6>
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    13d4 <nouvelle_position+0x2c4>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    13d9 <nouvelle_position+0x2c9>
jmp    13de <nouvelle_position+0x2ce>
jmp    13e3 <nouvelle_position+0x2d3>
jmp    13e8 <nouvelle_position+0x2d8>
mov    -0x1c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nouvelle_position>:
push   %rax
mov    %esi,0x4(%rsp)
test   %esi,%esi
jne    113a <nouvelle_position+0x2a>
cmp    $0x6,%edx
jne    113a <nouvelle_position+0x2a>
add    $0xffffffff,%edi
xor    %eax,%eax
cmp    $0x4,%edi
jae    1273 <nouvelle_position+0x163>
mov    %edi,%eax
shl    $0x4,%eax
sub    %edi,%eax
sub    %edi,%eax
or     $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
test   %esi,%esi
je     1273 <nouvelle_position+0x163>
add    $0xffffffff,%edi
cmp    $0x3,%edi
ja     1273 <nouvelle_position+0x163>
lea    0xea9(%rip),%rax
movslq (%rax,%rdi,4),%rdi
add    %rax,%rdi
jmp    *%rdi
cmp    $0x38,%esi
je     116f <nouvelle_position+0x5f>
cmpl   $0x1,0x4(%rcx)
jne    1239 <nouvelle_position+0x129>
movl   $0x1,0x4(%rcx)
lea    0x4(%rsp),%rsi
mov    $0x1,%edi
jmp    11da <nouvelle_position+0xca>
cmp    $0x1c,%esi
je     118d <nouvelle_position+0x7d>
cmpl   $0x1,0xc(%rcx)
jne    11e1 <nouvelle_position+0xd1>
movl   $0x1,0xc(%rcx)
lea    0x4(%rsp),%rsi
mov    $0x3,%edi
jmp    11da <nouvelle_position+0xca>
cmp    $0x2a,%esi
je     11ab <nouvelle_position+0x9b>
cmpl   $0x1,0x10(%rcx)
jne    120f <nouvelle_position+0xff>
movl   $0x1,0x10(%rcx)
lea    0x4(%rsp),%rsi
mov    $0x4,%edi
jmp    11da <nouvelle_position+0xca>
cmp    $0xe,%esi
je     11c9 <nouvelle_position+0xb9>
cmpl   $0x1,0x8(%rcx)
jne    1248 <nouvelle_position+0x138>
movl   $0x1,0x8(%rcx)
lea    0x4(%rsp),%rsi
mov    $0x2,%edi
call   1030 <position_escalier@plt>
pop    %rcx
ret
add    %esi,%edx
cmp    $0x39,%edx
jl     1275 <nouvelle_position+0x165>
mov    %edx,%eax
shr    $0x3,%eax
imul   $0x24924925,%rax,%rax
shr    $0x20,%rax
imul   $0x38,%eax,%eax
sub    %eax,%edx
mov    %edx,0x4(%rsp)
cmp    $0x1c,%edx
mov    $0x1c,%eax
jmp    1270 <nouvelle_position+0x160>
add    %esi,%edx
cmp    $0x39,%edx
jl     1275 <nouvelle_position+0x165>
mov    %edx,%eax
shr    $0x3,%eax
imul   $0x24924925,%rax,%rax
shr    $0x20,%rax
imul   $0x38,%eax,%eax
sub    %eax,%edx
mov    %edx,0x4(%rsp)
cmp    $0x2a,%edx
mov    $0x2a,%eax
jmp    1270 <nouvelle_position+0x160>
add    %esi,%edx
cmp    $0x38,%edx
mov    $0x38,%eax
cmovl  %edx,%eax
pop    %rcx
ret
add    %esi,%edx
cmp    $0x39,%edx
jl     1275 <nouvelle_position+0x165>
mov    %edx,%eax
shr    $0x3,%eax
imul   $0x24924925,%rax,%rax
shr    $0x20,%rax
imul   $0x38,%eax,%eax
sub    %eax,%edx
mov    %edx,0x4(%rsp)
cmp    $0xe,%edx
mov    $0xe,%eax
cmovb  %edx,%eax
pop    %rcx
ret
mov    %edx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @nouvelle_position(i32 %0, i32 %1, i32 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32* %3, i32** %8
store i32 0, i32* %9
%10 = load i32, i32* %6
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %22
12: ; preds = %4
%13 = load i32, i32* %7
%14 = icmp eq i32 %13, 6
br i1 %14, label %15, label %22
15: ; preds = %12
%16 = load i32, i32* %5
switch i32 %16, label %21 [
i32 1, label %17
i32 2, label %18
i32 3, label %19
i32 4, label %20
]
17: ; preds = %15
store i32 1, i32* %9
br label %21
18: ; preds = %15
store i32 15, i32* %9
br label %21
19: ; preds = %15
store i32 29, i32* %9
br label %21
20: ; preds = %15
store i32 43, i32* %9
br label %21
21: ; preds = %15, %20, %19, %18, %17
br label %163
22: ; preds = %12, %4
%23 = load i32, i32* %6
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %162
25: ; preds = %22
%26 = load i32, i32* %5
switch i32 %26, label %161 [
i32 1, label %27
i32 2, label %53
i32 3, label %89
i32 4, label %125
]
27: ; preds = %25
%28 = load i32, i32* %6
%29 = icmp eq i32 %28, 56
br i1 %29, label %35, label %30
30: ; preds = %27
%31 = load i32*, i32** %8
%32 = getelementptr inbounds i32, i32* %31, i64 1
%33 = load i32, i32* %32
%34 = icmp eq i32 %33, 1
br i1 %34, label %35, label %41
35: ; preds = %30, %27
%36 = load i32*, i32** %8
%37 = getelementptr inbounds i32, i32* %36, i64 1
store i32 1, i32* %37
%38 = load i32, i32* %5
%39 = load i32, i32* %7
%40 = call i32 @position_escalier(i32 %38, i32* %6, i32 %39)
store i32 %40, i32* %9
br label %52
41: ; preds = %30
%42 = load i32, i32* %6
%43 = load i32, i32* %7
%44 = add nsw i32 %42, %43
%45 = icmp sgt i32 %44, 56
br i1 %45, label %46, label %47
46: ; preds = %41
store i32 56, i32* %9
br label %51
47: ; preds = %41
%48 = load i32, i32* %6
%49 = load i32, i32* %7
%50 = add nsw i32 %48, %49
store i32 %50, i32* %9
br label %51
51: ; preds = %47, %46
br label %52
52: ; preds = %51, %35
br label %161
53: ; preds = %25
%54 = load i32, i32* %6
%55 = icmp eq i32 %54, 14
br i1 %55, label %61, label %56
56: ; preds = %53
%57 = load i32*, i32** %8
%58 = getelementptr inbounds i32, i32* %57, i64 2
%59 = load i32, i32* %58
%60 = icmp eq i32 %59, 1
br i1 %60, label %61, label %67
61: ; preds = %56, %53
%62 = load i32*, i32** %8
%63 = getelementptr inbounds i32, i32* %62, i64 2
store i32 1, i32* %63
%64 = load i32, i32* %5
%65 = load i32, i32* %7
%66 = call i32 @position_escalier(i32 %64, i32* %6, i32 %65)
store i32 %66, i32* %9
br label %88
67: ; preds = %56
%68 = load i32, i32* %6
%69 = load i32, i32* %7
%70 = add nsw i32 %68, %69
%71 = icmp sgt i32 %70, 56
br i1 %71, label %72, label %83
72: ; preds = %67
%73 = load i32, i32* %6
%74 = load i32, i32* %7
%75 = add nsw i32 %73, %74
%76 = srem i32 %75, 56
store i32 %76, i32* %6
%77 = load i32, i32* %6
%78 = icmp sgt i32 %77, 14
br i1 %78, label %79, label %80
79: ; preds = %72
store i32 14, i32* %9
br label %82
80: ; preds = %72
%81 = load i32, i32* %6
store i32 %81, i32* %9
br label %82
82: ; preds = %80, %79
br label %87
83: ; preds = %67
%84 = load i32, i32* %6
%85 = load i32, i32* %7
%86 = add nsw i32 %84, %85
store i32 %86, i32* %9
br label %87
87: ; preds = %83, %82
br label %88
88: ; preds = %87, %61
br label %161
89: ; preds = %25
%90 = load i32, i32* %6
%91 = icmp eq i32 %90, 28
br i1 %91, label %97, label %92
92: ; preds = %89
%93 = load i32*, i32** %8
%94 = getelementptr inbounds i32, i32* %93, i64 3
%95 = load i32, i32* %94
%96 = icmp eq i32 %95, 1
br i1 %96, label %97, label %103
97: ; preds = %92, %89
%98 = load i32*, i32** %8
%99 = getelementptr inbounds i32, i32* %98, i64 3
store i32 1, i32* %99
%100 = load i32, i32* %5
%101 = load i32, i32* %7
%102 = call i32 @position_escalier(i32 %100, i32* %6, i32 %101)
store i32 %102, i32* %9
br label %124
103: ; preds = %92
%104 = load i32, i32* %6
%105 = load i32, i32* %7
%106 = add nsw i32 %104, %105
%107 = icmp sgt i32 %106, 56
br i1 %107, label %108, label %119
108: ; preds = %103
%109 = load i32, i32* %6
%110 = load i32, i32* %7
%111 = add nsw i32 %109, %110
%112 = srem i32 %111, 56
store i32 %112, i32* %6
%113 = load i32, i32* %6
%114 = icmp sgt i32 %113, 28
br i1 %114, label %115, label %116
115: ; preds = %108
store i32 28, i32* %9
br label %118
116: ; preds = %108
%117 = load i32, i32* %6
store i32 %117, i32* %9
br label %118
118: ; preds = %116, %115
br label %123
119: ; preds = %103
%120 = load i32, i32* %6
%121 = load i32, i32* %7
%122 = add nsw i32 %120, %121
store i32 %122, i32* %9
br label %123
123: ; preds = %119, %118
br label %124
124: ; preds = %123, %97
br label %161
125: ; preds = %25
%126 = load i32, i32* %6
%127 = icmp eq i32 %126, 42
br i1 %127, label %133, label %128
128: ; preds = %125
%129 = load i32*, i32** %8
%130 = getelementptr inbounds i32, i32* %129, i64 4
%131 = load i32, i32* %130
%132 = icmp eq i32 %131, 1
br i1 %132, label %133, label %139
133: ; preds = %128, %125
%134 = load i32*, i32** %8
%135 = getelementptr inbounds i32, i32* %134, i64 4
store i32 1, i32* %135
%136 = load i32, i32* %5
%137 = load i32, i32* %7
%138 = call i32 @position_escalier(i32 %136, i32* %6, i32 %137)
store i32 %138, i32* %9
br label %160
139: ; preds = %128
%140 = load i32, i32* %6
%141 = load i32, i32* %7
%142 = add nsw i32 %140, %141
%143 = icmp sgt i32 %142, 56
br i1 %143, label %144, label %155
144: ; preds = %139
%145 = load i32, i32* %6
%146 = load i32, i32* %7
%147 = add nsw i32 %145, %146
%148 = srem i32 %147, 56
store i32 %148, i32* %6
%149 = load i32, i32* %6
%150 = icmp sgt i32 %149, 42
br i1 %150, label %151, label %152
151: ; preds = %144
store i32 42, i32* %9
br label %154
152: ; preds = %144
%153 = load i32, i32* %6
store i32 %153, i32* %9
br label %154
154: ; preds = %152, %151
br label %159
155: ; preds = %139
%156 = load i32, i32* %6
%157 = load i32, i32* %7
%158 = add nsw i32 %156, %157
store i32 %158, i32* %9
br label %159
159: ; preds = %155, %154
br label %160
160: ; preds = %159, %133
br label %161
161: ; preds = %25, %160, %124, %88, %52
br label %162
162: ; preds = %161, %22
br label %163
163: ; preds = %162, %21
%164 = load i32, i32* %9
ret i32 %164
}

LLVM IR (-O2):
define i32 @nouvelle_position(i32 %0, i32 %1, i32 %2, i32* nocapture %3) {
%5 = alloca i32
store i32 %1, i32* %5
%6 = icmp eq i32 %1, 0
%7 = icmp eq i32 %2, 6
%8 = and i1 %6, %7
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = add i32 %0, -1
%11 = icmp ult i32 %10, 4
br i1 %11, label %75, label %78
12: ; preds = %4
br i1 %6, label %78, label %13
13: ; preds = %12
switch i32 %0, label %78 [
i32 1, label %14
i32 2, label %27
i32 3, label %43
i32 4, label %59
]
14: ; preds = %13
%15 = icmp eq i32 %1, 56
br i1 %15, label %20, label %16
16: ; preds = %14
%17 = getelementptr inbounds i32, i32* %3, i64 1
%18 = load i32, i32* %17
%19 = icmp eq i32 %18, 1
br i1 %19, label %20, label %23
20: ; preds = %16, %14
%21 = getelementptr inbounds i32, i32* %3, i64 1
store i32 1, i32* %21
%22 = call i32 @position_escalier(i32 1, i32* %5, i32 %2)
br label %78
23: ; preds = %16
%24 = add nsw i32 %2, %1
%25 = icmp slt i32 %24, 56
%26 = select i1 %25, i32 %24, i32 56
br label %78
27: ; preds = %13
%28 = icmp eq i32 %1, 14
br i1 %28, label %33, label %29
29: ; preds = %27
%30 = getelementptr inbounds i32, i32* %3, i64 2
%31 = load i32, i32* %30
%32 = icmp eq i32 %31, 1
br i1 %32, label %33, label %36
33: ; preds = %29, %27
%34 = getelementptr inbounds i32, i32* %3, i64 2
store i32 1, i32* %34
%35 = call i32 @position_escalier(i32 2, i32* %5, i32 %2)
br label %78
36: ; preds = %29
%37 = add nsw i32 %2, %1
%38 = icmp sgt i32 %37, 56
br i1 %38, label %39, label %78
39: ; preds = %36
%40 = urem i32 %37, 56
store i32 %40, i32* %5
%41 = icmp ult i32 %40, 14
%42 = select i1 %41, i32 %40, i32 14
br label %78
43: ; preds = %13
%44 = icmp eq i32 %1, 28
br i1 %44, label %49, label %45
45: ; preds = %43
%46 = getelementptr inbounds i32, i32* %3, i64 3
%47 = load i32, i32* %46
%48 = icmp eq i32 %47, 1
br i1 %48, label %49, label %52
49: ; preds = %45, %43
%50 = getelementptr inbounds i32, i32* %3, i64 3
store i32 1, i32* %50
%51 = call i32 @position_escalier(i32 3, i32* %5, i32 %2)
br label %78
52: ; preds = %45
%53 = add nsw i32 %2, %1
%54 = icmp sgt i32 %53, 56
br i1 %54, label %55, label %78
55: ; preds = %52
%56 = urem i32 %53, 56
store i32 %56, i32* %5
%57 = icmp ult i32 %56, 28
%58 = select i1 %57, i32 %56, i32 28
br label %78
59: ; preds = %13
%60 = icmp eq i32 %1, 42
br i1 %60, label %65, label %61
61: ; preds = %59
%62 = getelementptr inbounds i32, i32* %3, i64 4
%63 = load i32, i32* %62
%64 = icmp eq i32 %63, 1
br i1 %64, label %65, label %68
65: ; preds = %61, %59
%66 = getelementptr inbounds i32, i32* %3, i64 4
store i32 1, i32* %66
%67 = call i32 @position_escalier(i32 4, i32* %5, i32 %2)
br label %78
68: ; preds = %61
%69 = add nsw i32 %2, %1
%70 = icmp sgt i32 %69, 56
br i1 %70, label %71, label %78
71: ; preds = %68
%72 = urem i32 %69, 56
store i32 %72, i32* %5
%73 = icmp ult i32 %72, 42
%74 = select i1 %73, i32 %72, i32 42
br label %78
75: ; preds = %9
%76 = mul i32 %10, 14
%77 = or i32 %76, 1
br label %78
78: ; preds = %75, %9, %68, %71, %52, %55, %36, %39, %23, %12, %65, %49, %33, %20, %13
%79 = phi i32 [ 0, %9 ], [ 0, %13 ], [ %67, %65 ], [ %51, %49 ], [ %35, %33 ], [ %22, %20 ], [ 0, %12 ], [ %26, %23 ], [ %42, %39 ], [ %37, %36 ], [ %58, %55 ], [ %53, %52 ], [ %74, %71 ], [ %69, %68 ], [ %77, %75 ]
ret i32 %79
}