#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 O_APPEND;
int O_CREAT;
int O_EXCL;
int O_NOCTTY;
int O_NONBLOCK;
int O_RDONLY;
int O_RDWR;
int O_TRUNC;
int O_WRONLY;
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("O_RDONLY:%d\n", O_RDONLY);
  printf("O_WRONLY:%d\n", O_WRONLY);
  printf("O_RDWR:%d\n", O_RDWR);
  printf("O_NONBLOCK:%d\n", O_NONBLOCK);
  printf("O_APPEND:%d\n", O_APPEND);
  printf("O_CREAT:%d\n", O_CREAT);
  printf("O_EXCL:%d\n", O_EXCL);
  printf("O_TRUNC:%d\n", O_TRUNC);
  printf("O_NOCTTY:%d\n", O_NOCTTY);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%esi
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%esi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e29(%rip),%rax
mov    (%rax),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e17(%rip),%rax
mov    (%rax),%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e42(%rip),%rax
mov    (%rax),%esi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
mov    0x2df5(%rip),%rax
mov    (%rax),%esi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e73(%rip),%rax
mov    (%rax),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%esi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e2c(%rip),%rax
mov    (%rax),%esi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e1a(%rip),%rax
mov    (%rax),%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e45(%rip),%rax
mov    (%rax),%esi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
mov    0x2df8(%rip),%rax
mov    (%rax),%esi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"O_RDONLY:%d\0A\00"
@O_RDONLY = global i32 0
@.str.1 = [13 x i8] c"O_WRONLY:%d\0A\00"
@O_WRONLY = global i32 0
@.str.2 = [11 x i8] c"O_RDWR:%d\0A\00"
@O_RDWR = global i32 0
@.str.3 = [15 x i8] c"O_NONBLOCK:%d\0A\00"
@O_NONBLOCK = global i32 0
@.str.4 = [13 x i8] c"O_APPEND:%d\0A\00"
@O_APPEND = global i32 0
@.str.5 = [12 x i8] c"O_CREAT:%d\0A\00"
@O_CREAT = global i32 0
@.str.6 = [11 x i8] c"O_EXCL:%d\0A\00"
@O_EXCL = global i32 0
@.str.7 = [12 x i8] c"O_TRUNC:%d\0A\00"
@O_TRUNC = global i32 0
@.str.8 = [13 x i8] c"O_NOCTTY:%d\0A\00"
@O_NOCTTY = global i32 0
define i32 @main() {
%1 = load i32, i32* @O_RDONLY
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @O_WRONLY
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @O_RDWR
%6 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @O_NONBLOCK
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @O_APPEND
%10 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @O_CREAT
%12 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = load i32, i32* @O_EXCL
%14 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 %13)
%15 = load i32, i32* @O_TRUNC
%16 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32 %15)
%17 = load i32, i32* @O_NOCTTY
%18 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i32 %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"O_RDONLY:%d\0A\00"
@O_RDONLY = global i32 0
@.str.1 = [13 x i8] c"O_WRONLY:%d\0A\00"
@O_WRONLY = global i32 0
@.str.2 = [11 x i8] c"O_RDWR:%d\0A\00"
@O_RDWR = global i32 0
@.str.3 = [15 x i8] c"O_NONBLOCK:%d\0A\00"
@O_NONBLOCK = global i32 0
@.str.4 = [13 x i8] c"O_APPEND:%d\0A\00"
@O_APPEND = global i32 0
@.str.5 = [12 x i8] c"O_CREAT:%d\0A\00"
@O_CREAT = global i32 0
@.str.6 = [11 x i8] c"O_EXCL:%d\0A\00"
@O_EXCL = global i32 0
@.str.7 = [12 x i8] c"O_TRUNC:%d\0A\00"
@O_TRUNC = global i32 0
@.str.8 = [13 x i8] c"O_NOCTTY:%d\0A\00"
@O_NOCTTY = global i32 0
define i32 @main() {
%1 = load i32, i32* @O_RDONLY
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @O_WRONLY
%4 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @O_RDWR
%6 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @O_NONBLOCK
%8 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @O_APPEND
%10 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @O_CREAT
%12 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = load i32, i32* @O_EXCL
%14 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 %13)
%15 = load i32, i32* @O_TRUNC
%16 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32 %15)
%17 = load i32, i32* @O_NOCTTY
%18 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i32 %17)
ret i32 0
}