#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*/ checkGetDoomsday(int, int);
void testGetDoomsday() {
  checkGetDoomsday(1600, 2);
  checkGetDoomsday(1600, 2);
  checkGetDoomsday(1601, 3);
  checkGetDoomsday(1610, 0);
  checkGetDoomsday(1850, 4);
  checkGetDoomsday(1985, 4);
  checkGetDoomsday(1995, 2);
  checkGetDoomsday(1996, 4);
  checkGetDoomsday(1997, 5);
  checkGetDoomsday(1998, 6);
  checkGetDoomsday(2000, 2);
}


x86 assembly (clang, -O0):
<testGetDoomsday>:
push   %rbp
mov    %rsp,%rbp
mov    $0x640,%edi
mov    $0x2,%esi
call   1030 <checkGetDoomsday@plt>
mov    $0x640,%edi
mov    $0x2,%esi
call   1030 <checkGetDoomsday@plt>
mov    $0x641,%edi
mov    $0x3,%esi
call   1030 <checkGetDoomsday@plt>
mov    $0x64a,%edi
xor    %esi,%esi
call   1030 <checkGetDoomsday@plt>
mov    $0x73a,%edi
mov    $0x4,%esi
call   1030 <checkGetDoomsday@plt>
mov    $0x7c1,%edi
mov    $0x4,%esi
call   1030 <checkGetDoomsday@plt>
mov    $0x7cb,%edi
mov    $0x2,%esi
call   1030 <checkGetDoomsday@plt>
mov    $0x7cc,%edi
mov    $0x4,%esi
call   1030 <checkGetDoomsday@plt>
mov    $0x7cd,%edi
mov    $0x5,%esi
call   1030 <checkGetDoomsday@plt>
mov    $0x7ce,%edi
mov    $0x6,%esi
call   1030 <checkGetDoomsday@plt>
mov    $0x7d0,%edi
mov    $0x2,%esi
call   1030 <checkGetDoomsday@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testGetDoomsday>:
push   %rax
mov    $0x640,%edi
mov    $0x2,%esi
call   1030 <checkGetDoomsday@plt>
mov    $0x640,%edi
mov    $0x2,%esi
call   1030 <checkGetDoomsday@plt>
mov    $0x641,%edi
mov    $0x3,%esi
call   1030 <checkGetDoomsday@plt>
mov    $0x64a,%edi
xor    %esi,%esi
call   1030 <checkGetDoomsday@plt>
mov    $0x73a,%edi
mov    $0x4,%esi
call   1030 <checkGetDoomsday@plt>
mov    $0x7c1,%edi
mov    $0x4,%esi
call   1030 <checkGetDoomsday@plt>
mov    $0x7cb,%edi
mov    $0x2,%esi
call   1030 <checkGetDoomsday@plt>
mov    $0x7cc,%edi
mov    $0x4,%esi
call   1030 <checkGetDoomsday@plt>
mov    $0x7cd,%edi
mov    $0x5,%esi
call   1030 <checkGetDoomsday@plt>
mov    $0x7ce,%edi
mov    $0x6,%esi
call   1030 <checkGetDoomsday@plt>
mov    $0x7d0,%edi
mov    $0x2,%esi
pop    %rax
jmp    1030 <checkGetDoomsday@plt>

LLVM IR (-O0):
define void @testGetDoomsday() {
%1 = call i32 @checkGetDoomsday(i32 1600, i32 2)
%2 = call i32 @checkGetDoomsday(i32 1600, i32 2)
%3 = call i32 @checkGetDoomsday(i32 1601, i32 3)
%4 = call i32 @checkGetDoomsday(i32 1610, i32 0)
%5 = call i32 @checkGetDoomsday(i32 1850, i32 4)
%6 = call i32 @checkGetDoomsday(i32 1985, i32 4)
%7 = call i32 @checkGetDoomsday(i32 1995, i32 2)
%8 = call i32 @checkGetDoomsday(i32 1996, i32 4)
%9 = call i32 @checkGetDoomsday(i32 1997, i32 5)
%10 = call i32 @checkGetDoomsday(i32 1998, i32 6)
%11 = call i32 @checkGetDoomsday(i32 2000, i32 2)
ret void
}

LLVM IR (-O2):
define void @testGetDoomsday() {
%1 = tail call i32 @checkGetDoomsday(i32 1600, i32 2)
%2 = tail call i32 @checkGetDoomsday(i32 1600, i32 2)
%3 = tail call i32 @checkGetDoomsday(i32 1601, i32 3)
%4 = tail call i32 @checkGetDoomsday(i32 1610, i32 0)
%5 = tail call i32 @checkGetDoomsday(i32 1850, i32 4)
%6 = tail call i32 @checkGetDoomsday(i32 1985, i32 4)
%7 = tail call i32 @checkGetDoomsday(i32 1995, i32 2)
%8 = tail call i32 @checkGetDoomsday(i32 1996, i32 4)
%9 = tail call i32 @checkGetDoomsday(i32 1997, i32 5)
%10 = tail call i32 @checkGetDoomsday(i32 1998, i32 6)
%11 = tail call i32 @checkGetDoomsday(i32 2000, i32 2)
ret void
}