#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);
int main(void) {
  typedef enum { JAN = -2, FEB, MAR, APR = 4, MAY } mymonth;
  mymonth m = APR;
  printf("m = %d\n", m);
  printf("JAN = %d\n", JAN);
  printf("FEB = %d\n", FEB);
  printf("MAR = %d\n", MAR);
  printf("APR = %d\n", APR);
  printf("MAY = %d\n", MAY);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
mov    $0xfffffffe,%esi
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
mov    $0xffffffff,%esi
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xeb3(%rip),%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
mov    $0xfffffffe,%esi
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0xffffffff,%esi
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"m = %d\0A\00"
@.str.1 = [10 x i8] c"JAN = %d\0A\00"
@.str.2 = [10 x i8] c"FEB = %d\0A\00"
@.str.3 = [10 x i8] c"MAR = %d\0A\00"
@.str.4 = [10 x i8] c"APR = %d\0A\00"
@.str.5 = [10 x i8] c"MAY = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 4, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 -2)
%6 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 -1)
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 0)
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 4)
%9 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 5)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"m = %d\0A\00"
@.str.1 = [10 x i8] c"JAN = %d\0A\00"
@.str.2 = [10 x i8] c"FEB = %d\0A\00"
@.str.3 = [10 x i8] c"MAR = %d\0A\00"
@.str.4 = [10 x i8] c"APR = %d\0A\00"
@.str.5 = [10 x i8] c"MAY = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 -2)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 -1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 5)
ret i32 0
}