#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 */
scalar_t__ EOF;
int day(int, int);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ scanf(char *, int *, int *);
int main() {
  int a, b;
  while (scanf("%d%d", &a, &b) != EOF) {
    if (a == 12 && b == 24) {
      printf("E vespera de natal!\n");
    } else if (a == 12 && b == 25) {
      printf("E natal!\n");
    } else if (a == 12 && b > 25) {
      printf("Ja passou!\n");
    } else if (a == 12 && b < 24) {
      printf("Faltam %d dias para o natal!\n", 25 - b);
    } else {
      printf("Faltam %d dias para o natal!\n", day(a, b));
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    0x2e8e(%rip),%rcx
cmp    (%rcx),%rax
je     1236 <main+0x106>
cmpl   $0xc,-0x8(%rbp)
jne    118a <main+0x5a>
cmpl   $0x18,-0xc(%rbp)
jne    118a <main+0x5a>
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1231 <main+0x101>
cmpl   $0xc,-0x8(%rbp)
jne    11b1 <main+0x81>
cmpl   $0x19,-0xc(%rbp)
jne    11b1 <main+0x81>
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    122c <main+0xfc>
cmpl   $0xc,-0x8(%rbp)
jne    11d8 <main+0xa8>
cmpl   $0x19,-0xc(%rbp)
jle    11d8 <main+0xa8>
lea    0xe58(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1227 <main+0xf7>
cmpl   $0xc,-0x8(%rbp)
jne    1207 <main+0xd7>
cmpl   $0x18,-0xc(%rbp)
jge    1207 <main+0xd7>
mov    $0x19,%esi
sub    -0xc(%rbp),%esi
lea    0xe35(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1222 <main+0xf2>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <day@plt>
mov    %eax,%esi
lea    0xe15(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1227 <main+0xf7>
jmp    122c <main+0xfc>
jmp    1231 <main+0x101>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xeae(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x2e82(%rip),%rbp
cmp    0x0(%rbp),%rax
jne    117d <main+0x3d>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xeb3(%rip),%r14
lea    0xe75(%rip),%r15
lea    0x4(%rsp),%r12
mov    %rsp,%rbx
lea    0xe94(%rip),%r13
jmp    11bc <main+0x7c>
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1050 <scanf@plt>
cmp    0x0(%rbp),%rax
je     116c <main+0x2c>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
cmp    $0xc,%edi
jne    11cd <main+0x8d>
cmp    $0x18,%esi
je     11a0 <main+0x60>
cmp    $0xc,%edi
jne    11e0 <main+0xa0>
cmp    $0x19,%esi
jne    11e0 <main+0xa0>
mov    %r13,%rdi
jmp    11a3 <main+0x63>
nopl   0x0(%rax)
cmp    $0xc,%edi
jne    11f3 <main+0xb3>
cmp    $0x1a,%esi
jl     11f3 <main+0xb3>
lea    0xe32(%rip),%rdi
jmp    11a3 <main+0x63>
cmp    $0xc,%edi
jne    1206 <main+0xc6>
cmp    $0x17,%esi
jg     1206 <main+0xc6>
mov    $0x19,%eax
sub    %esi,%eax
jmp    120b <main+0xcb>
call   1060 <day@plt>
lea    0xdf3(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11a8 <main+0x68>

LLVM IR (-O0):
@.str = [5 x i8] c"%d%d\00"
@EOF = global i64 0
@.str.1 = [21 x i8] c"E vespera de natal!\0A\00"
@.str.2 = [10 x i8] c"E natal!\0A\00"
@.str.3 = [12 x i8] c"Ja passou!\0A\00"
@.str.4 = [30 x i8] c"Faltam %d dias para o natal!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
br label %4
4: ; preds = %50, %0
%5 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%6 = load i64, i64* @EOF
%7 = icmp ne i64 %5, %6
br i1 %7, label %8, label %51
8: ; preds = %4
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 12
br i1 %10, label %11, label %16
11: ; preds = %8
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 24
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %50
16: ; preds = %11, %8
%17 = load i32, i32* %2
%18 = icmp eq i32 %17, 12
br i1 %18, label %19, label %24
19: ; preds = %16
%20 = load i32, i32* %3
%21 = icmp eq i32 %20, 25
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %49
24: ; preds = %19, %16
%25 = load i32, i32* %2
%26 = icmp eq i32 %25, 12
br i1 %26, label %27, label %32
27: ; preds = %24
%28 = load i32, i32* %3
%29 = icmp sgt i32 %28, 25
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
br label %48
32: ; preds = %27, %24
%33 = load i32, i32* %2
%34 = icmp eq i32 %33, 12
br i1 %34, label %35, label %42
35: ; preds = %32
%36 = load i32, i32* %3
%37 = icmp slt i32 %36, 24
br i1 %37, label %38, label %42
38: ; preds = %35
%39 = load i32, i32* %3
%40 = sub nsw i32 25, %39
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), i32 %40)
br label %47
42: ; preds = %35, %32
%43 = load i32, i32* %2
%44 = load i32, i32* %3
%45 = call i32 @day(i32 %43, i32 %44)
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), i32 %45)
br label %47
47: ; preds = %42, %38
br label %48
48: ; preds = %47, %30
br label %49
49: ; preds = %48, %22
br label %50
50: ; preds = %49, %14
br label %4
51: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@EOF = global i64 0
@.str.4 = [30 x i8] c"Faltam %d dias para o natal!\0A\00"
@str = [11 x i8] c"Ja passou!\00"
@str.5 = [9 x i8] c"E natal!\00"
@str.6 = [20 x i8] c"E vespera de natal!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i64, i64* @EOF
%7 = icmp eq i64 %5, %6
br i1 %7, label %39, label %8
8: ; preds = %0, %35
%9 = load i32, i32* %1
%10 = icmp eq i32 %9, 12
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, 24
%13 = select i1 %10, i1 %12, i1 false
br i1 %13, label %14, label %16
14: ; preds = %8
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.6, i64 0, i64 0))
br label %35
16: ; preds = %8
%17 = icmp eq i32 %11, 25
%18 = select i1 %10, i1 %17, i1 false
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.5, i64 0, i64 0))
br label %35
21: ; preds = %16
%22 = icmp sgt i32 %11, 25
%23 = select i1 %10, i1 %22, i1 false
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
br label %35
26: ; preds = %21
%27 = icmp slt i32 %11, 24
%28 = select i1 %10, i1 %27, i1 false
br i1 %28, label %29, label %32
29: ; preds = %26
%30 = sub nsw i32 25, %11
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), i32 %30)
br label %35
32: ; preds = %26
%33 = call i32 @day(i32 %9, i32 %11)
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), i32 %33)
br label %35
35: ; preds = %19, %29, %32, %24, %14
%36 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%37 = load i64, i64* @EOF
%38 = icmp eq i64 %36, %37
br i1 %38, label %39, label %8
39: ; preds = %35, %0
ret i32 0
}