#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 EXIT_SUCCESS;
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ getch();
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ printw(char *, ...);
int /*<<< orphan*/ refresh();
int main(void) {
  char version[] = "5.7";
  char os_name[] = "OpenBSD";
  size_t day = 1;
  size_t month = 6;
  size_t year = 2015;
  initscr();
  printw("%s %s", os_name, version);
  printw(" - last update: %zu/%zu/%zu", month, day, year);
  refresh();
  getch();
  endwin();
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xe9b(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xe95(%rip),%rax
mov    %rax,-0x10(%rbp)
movq   $0x1,-0x18(%rbp)
movq   $0x6,-0x20(%rbp)
movq   $0x7df,-0x28(%rbp)
mov    $0x0,%al
call   1030 <initscr@plt>
lea    -0x10(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1040 <printw@plt>
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x28(%rbp),%rcx
lea    0xe57(%rip),%rdi
mov    $0x0,%al
call   1040 <printw@plt>
mov    $0x0,%al
call   1050 <refresh@plt>
mov    $0x0,%al
call   1060 <getch@plt>
mov    $0x0,%al
call   1070 <endwin@plt>
mov    0x2e02(%rip),%rax
mov    (%rax),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x372e35,0xc(%rsp)
movabs $0x4453426e65704f,%rax
mov    %rax,0x10(%rsp)
xor    %eax,%eax
call   1030 <initscr@plt>
lea    0xe87(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
xor    %eax,%eax
call   1040 <printw@plt>
lea    0xe75(%rip),%rdi
mov    $0x6,%esi
mov    $0x1,%edx
mov    $0x7df,%ecx
xor    %eax,%eax
call   1040 <printw@plt>
xor    %eax,%eax
call   1050 <refresh@plt>
xor    %eax,%eax
call   1060 <getch@plt>
xor    %eax,%eax
call   1070 <endwin@plt>
mov    0x2e1d(%rip),%rax
mov    (%rax),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.version = [4 x i8] c"5.7\00"
@__const.main.os_name = [8 x i8] c"OpenBSD\00"
@.str = [6 x i8] c"%s %s\00"
@.str.1 = [28 x i8] c" - last update: %zu/%zu/%zu\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8]
%3 = alloca [8 x i8]
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i32 0, i32* %1
%7 = bitcast [4 x i8]* %2 to i8*
%8 = bitcast [8 x i8]* %3 to i8*
store i64 1, i64* %4
store i64 6, i64* %5
store i64 2015, i64* %6
%9 = call i32 (...) @initscr()
%10 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%12 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11)
%13 = load i64, i64* %5
%14 = load i64, i64* %4
%15 = load i64, i64* %6
%16 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i64 %13, i64 %14, i64 %15)
%17 = call i32 (...) @refresh()
%18 = call i32 (...) @getch()
%19 = call i32 (...) @endwin()
%20 = load i32, i32* @EXIT_SUCCESS
ret i32 %20
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s %s\00"
@.str.1 = [28 x i8] c" - last update: %zu/%zu/%zu\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = bitcast i32* %1 to i8*
store i32 3616309, i32* %1
%4 = bitcast i64* %2 to i8*
store i64 19231843201413199, i64* %2
%5 = tail call i32 (...) @initscr()
%6 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64* %2, i32* %1)
%7 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i64 6, i64 1, i64 2015)
%8 = call i32 (...) @refresh()
%9 = call i32 (...) @getch()
%10 = call i32 (...) @endwin()
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}