#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 */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ COLOR_PAIR(int);
char *getCurtime();
int /*<<< orphan*/ mvwprintw(int /*<<< orphan*/ *, int, int /*<<< orphan*/,
                             char *, char *);
int /*<<< orphan*/ wattroff(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ wattron(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ wrefresh(int /*<<< orphan*/ *);
void print_curtime(WINDOW *win, int y, int color) {
  char *cur_time;
  cur_time = getCurtime();
  wattron(win, COLOR_PAIR(color));
  mvwprintw(win, y, 0, "%s", cur_time);
  wrefresh(win);
  wattroff(win, COLOR_PAIR(color));
}


x86 assembly (clang, -O0):
<print_curtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    $0x0,%al
call   1080 <getCurtime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%edi
call   1040 <COLOR_PAIR@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%esi
call   1070 <wattron@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%r8
xor    %edx,%edx
lea    0xe54(%rip),%rcx
call   1050 <mvwprintw@plt>
mov    -0x8(%rbp),%rdi
call   1030 <wrefresh@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%edi
call   1040 <COLOR_PAIR@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
call   1060 <wattroff@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_curtime>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %esi,%r14d
mov    %rdi,%rbx
xor    %eax,%eax
call   1080 <getCurtime@plt>
mov    %rax,%r15
mov    %ebp,%edi
call   1040 <COLOR_PAIR@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1070 <wattron@plt>
lea    0xe6f(%rip),%rcx
mov    %rbx,%rdi
mov    %r14d,%esi
xor    %edx,%edx
mov    %r15,%r8
call   1050 <mvwprintw@plt>
mov    %rbx,%rdi
call   1030 <wrefresh@plt>
mov    %ebp,%edi
call   1040 <COLOR_PAIR@plt>
mov    %rbx,%rdi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <wattroff@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @print_curtime(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = call i8* (...) @getCurtime()
store i8* %8, i8** %7
%9 = load i32*, i32** %4
%10 = load i32, i32* %6
%11 = call i32 @COLOR_PAIR(i32 %10)
%12 = call i32 @wattron(i32* %9, i32 %11)
%13 = load i32*, i32** %4
%14 = load i32, i32* %5
%15 = load i8*, i8** %7
%16 = call i32 @mvwprintw(i32* %13, i32 %14, i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %15)
%17 = load i32*, i32** %4
%18 = call i32 @wrefresh(i32* %17)
%19 = load i32*, i32** %4
%20 = load i32, i32* %6
%21 = call i32 @COLOR_PAIR(i32 %20)
%22 = call i32 @wattroff(i32* %19, i32 %21)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @print_curtime(i32* %0, i32 %1, i32 %2) {
%4 = tail call i8* (...) @getCurtime()
%5 = tail call i32 @COLOR_PAIR(i32 %2)
%6 = tail call i32 @wattron(i32* %0, i32 %5)
%7 = tail call i32 @mvwprintw(i32* %0, i32 %1, i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%8 = tail call i32 @wrefresh(i32* %0)
%9 = tail call i32 @COLOR_PAIR(i32 %2)
%10 = tail call i32 @wattroff(i32* %0, i32 %9)
ret void
}