#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*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  char *jours[7] = {"Samedi",   "Dimanche", "Lundi",   "Mardi",
                    "Mercredi", "Jeudi",    "Vendredi"};
  char *mois[12] = {"Janvier",   "Fevrier", "Mars",     "Avril",
                    "Mai",       "Juin",    "Juillet",  "Aout",
                    "Septembre", "Octobre", "Novembre", "Decembre"};
  int j, m, a;
  printf("entrer le nombre du année: ");
  scanf("%d", &a);
  do {
    printf("entrer le nombre du mois: ");
    scanf("%d", &m);
  } while (m < 1 || m > 12);
  int end_of_month = 31;
  if (m == 2) {
    if (a % 4 == 0)
      end_of_month = 29;
    else if (a % 100 == 0)
      end_of_month = 28;
    else if (a % 400 == 0)
      end_of_month = 29;
    else
      end_of_month = 28;
  } else {
    int i = 4;
    while (i <= 12) {
      if (m == i)
        end_of_month = 30;
      if (i == 6)
        i += 3;
      else
        i += 2;
    }
  }
  do {
    printf("entrer le nombre du jour: ");
    scanf("%d", &j);
  } while (j < 1 || j > end_of_month);
  printf("la date entree est: %s %d %s %d\n", jours[(j - 1) % 7], j,
         mois[m - 1], a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    0x2c33(%rip),%rsi
mov    $0x38,%edx
call   1040 <memcpy@plt>
lea    -0xa0(%rbp),%rdi
lea    0x2c5b(%rip),%rsi
mov    $0x60,%edx
call   1040 <memcpy@plt>
lea    0xf13(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf22(%rip),%rdi
lea    -0xac(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xf12(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf01(%rip),%rdi
lea    -0xa8(%rbp),%rsi
call   1050 <scanf@plt>
mov    $0x1,%al
cmpl   $0x1,-0xa8(%rbp)
mov    %al,-0xb5(%rbp)
jl     11d6 <main+0xa6>
cmpl   $0xc,-0xa8(%rbp)
setg   %al
mov    %al,-0xb5(%rbp)
mov    -0xb5(%rbp),%al
test   $0x1,%al
jne    1190 <main+0x60>
movl   $0x1f,-0xb0(%rbp)
cmpl   $0x2,-0xa8(%rbp)
jne    1286 <main+0x156>
mov    -0xac(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1221 <main+0xf1>
movl   $0x1d,-0xb0(%rbp)
jmp    1281 <main+0x151>
mov    -0xac(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1247 <main+0x117>
movl   $0x1c,-0xb0(%rbp)
jmp    127c <main+0x14c>
mov    -0xac(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    126d <main+0x13d>
movl   $0x1d,-0xb0(%rbp)
jmp    1277 <main+0x147>
movl   $0x1c,-0xb0(%rbp)
jmp    127c <main+0x14c>
jmp    1281 <main+0x151>
jmp    12f3 <main+0x1c3>
movl   $0x4,-0xb4(%rbp)
cmpl   $0xc,-0xb4(%rbp)
jg     12ee <main+0x1be>
mov    -0xa8(%rbp),%eax
cmp    -0xb4(%rbp),%eax
jne    12b9 <main+0x189>
movl   $0x1e,-0xb0(%rbp)
cmpl   $0x6,-0xb4(%rbp)
jne    12da <main+0x1aa>
mov    -0xb4(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0xb4(%rbp)
jmp    12e9 <main+0x1b9>
mov    -0xb4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xb4(%rbp)
jmp    1290 <main+0x160>
jmp    12f3 <main+0x1c3>
jmp    12f8 <main+0x1c8>
lea    0xdc5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd99(%rip),%rdi
lea    -0xa4(%rbp),%rsi
call   1050 <scanf@plt>
mov    $0x1,%al
cmpl   $0x1,-0xa4(%rbp)
mov    %al,-0xb6(%rbp)
jl     1343 <main+0x213>
mov    -0xa4(%rbp),%eax
cmp    -0xb0(%rbp),%eax
setg   %al
mov    %al,-0xb6(%rbp)
mov    -0xb6(%rbp),%al
test   $0x1,%al
jne    12f8 <main+0x1c8>
mov    -0xa4(%rbp),%eax
sub    $0x1,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
mov    -0x40(%rbp,%rax,8),%rsi
mov    -0xa4(%rbp),%edx
mov    -0xa8(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0xa0(%rbp,%rax,8),%rcx
ff
mov    -0xac(%rbp),%r8d
lea    0xd4e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xf58(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf67(%rip),%r14
lea    0xc(%rsp),%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
lea    0xf56(%rip),%r15
lea    0x10(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0x10(%rsp),%eax
lea    -0xd(%rax),%ecx
cmp    $0xfffffff4,%ecx
jb     1160 <main+0x40>
cmp    $0x2,%eax
jne    11b9 <main+0x99>
mov    0xc(%rsp),%eax
test   $0x3,%al
je     11dc <main+0xbc>
imul   $0xc28f5c29,%eax,%eax
add    $0x51eb850,%eax
mov    %eax,%ecx
ror    $0x2,%ecx
cmp    $0x28f5c29,%ecx
jb     11e3 <main+0xc3>
ror    $0x4,%eax
xor    %ebp,%ebp
cmp    $0xa3d70b,%eax
setb   %bpl
or     $0x1c,%ebp
jmp    11e8 <main+0xc8>
mov    %eax,%ecx
and    $0xfffffffd,%ecx
cmp    $0x4,%ecx
sete   %cl
cmp    $0x9,%eax
sete   %dl
cmp    $0xb,%eax
sete   %al
or     %dl,%al
or     %cl,%al
movzbl %al,%ebp
xor    $0x1f,%ebp
jmp    11e8 <main+0xc8>
mov    $0x1d,%ebp
jmp    11e8 <main+0xc8>
mov    $0x1c,%ebp
lea    0xed5(%rip),%r14
lea    0xeb0(%rip),%r15
lea    0x14(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0x14(%rsp),%edx
test   %edx,%edx
jle    1200 <main+0xe0>
cmp    %ebp,%edx
jg     1200 <main+0xe0>
lea    -0x1(%rdx),%eax
imul   $0x24924925,%rax,%rcx
shr    $0x20,%rcx
sub    %ecx,%eax
shr    %eax
add    %ecx,%eax
shr    $0x2,%eax
lea    0x0(,%rax,8),%ecx
sub    %ecx,%eax
add    %edx,%eax
add    $0xffffffff,%eax
lea    0xeb3(%rip),%rcx
movslq (%rcx,%rax,4),%rsi
add    %rcx,%rsi
movslq 0x10(%rsp),%rax
lea    0xebc(%rip),%rdi
movslq -0x4(%rdi,%rax,4),%rcx
add    %rdi,%rcx
mov    0xc(%rsp),%r8d
lea    0xe6b(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"Samedi\00"
@.str.1 = [9 x i8] c"Dimanche\00"
@.str.2 = [6 x i8] c"Lundi\00"
@.str.3 = [6 x i8] c"Mardi\00"
@.str.4 = [9 x i8] c"Mercredi\00"
@.str.5 = [6 x i8] c"Jeudi\00"
@.str.6 = [9 x i8] c"Vendredi\00"
@__const.main.jours = [7 x i8*] [i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i32 0, i32 0)]
@.str.7 = [8 x i8] c"Janvier\00"
@.str.8 = [8 x i8] c"Fevrier\00"
@.str.9 = [5 x i8] c"Mars\00"
@.str.10 = [6 x i8] c"Avril\00"
@.str.11 = [4 x i8] c"Mai\00"
@.str.12 = [5 x i8] c"Juin\00"
@.str.13 = [8 x i8] c"Juillet\00"
@.str.14 = [5 x i8] c"Aout\00"
@.str.15 = [10 x i8] c"Septembre\00"
@.str.16 = [8 x i8] c"Octobre\00"
@.str.17 = [9 x i8] c"Novembre\00"
@.str.18 = [9 x i8] c"Decembre\00"
@__const.main.mois = [12 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.18, i32 0, i32 0)]
@.str.19 = [29 x i8] c"entrer le nombre du ann\C3\A9e: \00"
@.str.20 = [3 x i8] c"%d\00"
@.str.21 = [27 x i8] c"entrer le nombre du mois: \00"
@.str.22 = [27 x i8] c"entrer le nombre du jour: \00"
@.str.23 = [33 x i8] c"la date entree est: %s %d %s %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [7 x i8*]
%3 = alloca [12 x i8*]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
%9 = bitcast [7 x i8*]* %2 to i8*
%10 = bitcast [12 x i8*]* %3 to i8*
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.19, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i32* %6)
br label %13
13: ; preds = %22, %0
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.21, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i32* %5)
br label %16
16: ; preds = %13
%17 = load i32, i32* %5
%18 = icmp slt i32 %17, 1
br i1 %18, label %22, label %19
19: ; preds = %16
%20 = load i32, i32* %5
%21 = icmp sgt i32 %20, 12
br label %22
22: ; preds = %19, %16
%23 = phi i1 [ true, %16 ], [ %21, %19 ]
br i1 %23, label %13, label %24
24: ; preds = %22
store i32 31, i32* %7
%25 = load i32, i32* %5
%26 = icmp eq i32 %25, 2
br i1 %26, label %27, label %46
27: ; preds = %24
%28 = load i32, i32* %6
%29 = srem i32 %28, 4
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %32
31: ; preds = %27
store i32 29, i32* %7
br label %45
32: ; preds = %27
%33 = load i32, i32* %6
%34 = srem i32 %33, 100
%35 = icmp eq i32 %34, 0
br i1 %35, label %36, label %37
36: ; preds = %32
store i32 28, i32* %7
br label %44
37: ; preds = %32
%38 = load i32, i32* %6
%39 = srem i32 %38, 400
%40 = icmp eq i32 %39, 0
br i1 %40, label %41, label %42
41: ; preds = %37
store i32 29, i32* %7
br label %43
42: ; preds = %37
store i32 28, i32* %7
br label %43
43: ; preds = %42, %41
br label %44
44: ; preds = %43, %36
br label %45
45: ; preds = %44, %31
br label %66
46: ; preds = %24
store i32 4, i32* %8
br label %47
47: ; preds = %64, %46
%48 = load i32, i32* %8
%49 = icmp sle i32 %48, 12
br i1 %49, label %50, label %65
50: ; preds = %47
%51 = load i32, i32* %5
%52 = load i32, i32* %8
%53 = icmp eq i32 %51, %52
br i1 %53, label %54, label %55
54: ; preds = %50
store i32 30, i32* %7
br label %55
55: ; preds = %54, %50
%56 = load i32, i32* %8
%57 = icmp eq i32 %56, 6
br i1 %57, label %58, label %61
58: ; preds = %55
%59 = load i32, i32* %8
%60 = add nsw i32 %59, 3
store i32 %60, i32* %8
br label %64
61: ; preds = %55
%62 = load i32, i32* %8
%63 = add nsw i32 %62, 2
store i32 %63, i32* %8
br label %64
64: ; preds = %61, %58
br label %47
65: ; preds = %47
br label %66
66: ; preds = %65, %45
br label %67
67: ; preds = %77, %66
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.22, i64 0, i64 0))
%69 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i32* %4)
br label %70
70: ; preds = %67
%71 = load i32, i32* %4
%72 = icmp slt i32 %71, 1
br i1 %72, label %77, label %73
73: ; preds = %70
%74 = load i32, i32* %4
%75 = load i32, i32* %7
%76 = icmp sgt i32 %74, %75
br label %77
77: ; preds = %73, %70
%78 = phi i1 [ true, %70 ], [ %76, %73 ]
br i1 %78, label %67, label %79
79: ; preds = %77
%80 = load i32, i32* %4
%81 = sub nsw i32 %80, 1
%82 = srem i32 %81, 7
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds [7 x i8*], [7 x i8*]* %2, i64 0, i64 %83
%85 = load i8*, i8** %84
%86 = load i32, i32* %4
%87 = load i32, i32* %5
%88 = sub nsw i32 %87, 1
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds [12 x i8*], [12 x i8*]* %3, i64 0, i64 %89
%91 = load i8*, i8** %90
%92 = load i32, i32* %6
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.23, i64 0, i64 0), i8* %85, i32 %86, i8* %91, i32 %92)
%94 = load i32, i32* %1
ret i32 %94
}

LLVM IR (-O2):
@.str = [7 x i8] c"Samedi\00"
@.str.1 = [9 x i8] c"Dimanche\00"
@.str.2 = [6 x i8] c"Lundi\00"
@.str.3 = [6 x i8] c"Mardi\00"
@.str.4 = [9 x i8] c"Mercredi\00"
@.str.5 = [6 x i8] c"Jeudi\00"
@.str.6 = [9 x i8] c"Vendredi\00"
@reltable.main = [7 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str to i64), i64 ptrtoint ([7 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.1 to i64), i64 ptrtoint ([7 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.2 to i64), i64 ptrtoint ([7 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.3 to i64), i64 ptrtoint ([7 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.4 to i64), i64 ptrtoint ([7 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.5 to i64), i64 ptrtoint ([7 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.6 to i64), i64 ptrtoint ([7 x i32]* @reltable.main to i64)) to i32)]
@.str.7 = [8 x i8] c"Janvier\00"
@.str.8 = [8 x i8] c"Fevrier\00"
@.str.9 = [5 x i8] c"Mars\00"
@.str.10 = [6 x i8] c"Avril\00"
@.str.11 = [4 x i8] c"Mai\00"
@.str.12 = [5 x i8] c"Juin\00"
@.str.13 = [8 x i8] c"Juillet\00"
@.str.14 = [5 x i8] c"Aout\00"
@.str.15 = [10 x i8] c"Septembre\00"
@.str.16 = [8 x i8] c"Octobre\00"
@.str.17 = [9 x i8] c"Novembre\00"
@.str.18 = [9 x i8] c"Decembre\00"
@reltable.main.24 = [12 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.7 to i64), i64 ptrtoint ([12 x i32]* @reltable.main.24 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.8 to i64), i64 ptrtoint ([12 x i32]* @reltable.main.24 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.9 to i64), i64 ptrtoint ([12 x i32]* @reltable.main.24 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.10 to i64), i64 ptrtoint ([12 x i32]* @reltable.main.24 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.11 to i64), i64 ptrtoint ([12 x i32]* @reltable.main.24 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.12 to i64), i64 ptrtoint ([12 x i32]* @reltable.main.24 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.13 to i64), i64 ptrtoint ([12 x i32]* @reltable.main.24 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.14 to i64), i64 ptrtoint ([12 x i32]* @reltable.main.24 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.15 to i64), i64 ptrtoint ([12 x i32]* @reltable.main.24 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.16 to i64), i64 ptrtoint ([12 x i32]* @reltable.main.24 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.17 to i64), i64 ptrtoint ([12 x i32]* @reltable.main.24 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.18 to i64), i64 ptrtoint ([12 x i32]* @reltable.main.24 to i64)) to i32)]
@.str.19 = [29 x i8] c"entrer le nombre du ann\C3\A9e: \00"
@.str.20 = [3 x i8] c"%d\00"
@.str.21 = [27 x i8] c"entrer le nombre du mois: \00"
@.str.22 = [27 x i8] c"entrer le nombre du jour: \00"
@.str.23 = [33 x i8] c"la date entree est: %s %d %s %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.19, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i32* %3)
br label %9
9: ; preds = %9, %0
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.21, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i32* %2)
%12 = load i32, i32* %2
%13 = add i32 %12, -13
%14 = icmp ult i32 %13, -12
br i1 %14, label %9, label %15
15: ; preds = %9
%16 = icmp eq i32 %12, 2
br i1 %16, label %25, label %17
17: ; preds = %15
%18 = and i32 %12, -3
%19 = icmp eq i32 %18, 4
%20 = icmp eq i32 %12, 9
%21 = or i1 %20, %19
%22 = icmp eq i32 %12, 11
%23 = select i1 %22, i1 true, i1 %21
%24 = select i1 %23, i32 30, i32 31
br label %36
25: ; preds = %15
%26 = load i32, i32* %3
%27 = and i32 %26, 3
%28 = icmp eq i32 %27, 0
br i1 %28, label %36, label %29
29: ; preds = %25
%30 = srem i32 %26, 100
%31 = icmp eq i32 %30, 0
br i1 %31, label %36, label %32
32: ; preds = %29
%33 = srem i32 %26, 400
%34 = icmp eq i32 %33, 0
%35 = select i1 %34, i32 29, i32 28
br label %36
36: ; preds = %17, %32, %29, %25
%37 = phi i32 [ 29, %25 ], [ 28, %29 ], [ %35, %32 ], [ %24, %17 ]
br label %38
38: ; preds = %38, %36
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.22, i64 0, i64 0))
%40 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i32* %1)
%41 = load i32, i32* %1
%42 = icmp slt i32 %41, 1
%43 = icmp sgt i32 %41, %37
%44 = select i1 %42, i1 true, i1 %43
br i1 %44, label %38, label %45
45: ; preds = %38
%46 = add nsw i32 %41, -1
%47 = urem i32 %46, 7
%48 = zext i32 %47 to i64
%49 = shl i64 %48, 2
%50 = call i8* @llvm.load.relative.i64(i8* bitcast ([7 x i32]* @reltable.main to i8*), i64 %49)
%51 = load i32, i32* %2
%52 = add nsw i32 %51, -1
%53 = sext i32 %52 to i64
%54 = shl i64 %53, 2
%55 = call i8* @llvm.load.relative.i64(i8* bitcast ([12 x i32]* @reltable.main.24 to i8*), i64 %54)
%56 = load i32, i32* %3
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.23, i64 0, i64 0), i8* %50, i32 %41, i8* %55, i32 %56)
ret i32 0
}