#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*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ ctime(int /*<<< orphan*/ *);
scalar_t__ malloc(int);
int /*<<< orphan*/ strcpy(char *, int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
const char *Hours(void) {
  time_t now;
  int i = 11, c;
  char tmp[25];
  char *nowtime = (char *)malloc(sizeof(char) * 25);
  now = time(NULL);
  strcpy(tmp, ctime(&now));
  for (c = 0; c < 8; c++) {
    nowtime[c] = tmp[i];
    i++;
  }
  nowtime[8] = '\0';
  return nowtime;
}


x86 assembly (clang, -O0):
<Hours>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0xb,-0x8(%rbp)
mov    $0x19,%edi
call   1060 <malloc@plt>
mov    %rax,-0x38(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,-0x4(%rbp)
lea    -0x30(%rbp),%rax
mov    %rax,-0x40(%rbp)
lea    -0x4(%rbp),%rdi
call   1040 <ctime@plt>
mov    -0x40(%rbp),%rdi
mov    %eax,%esi
call   1030 <strcpy@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    11c0 <Hours+0x80>
movslq -0x8(%rbp),%rax
mov    -0x30(%rbp,%rax,1),%dl
mov    -0x38(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    118c <Hours+0x4c>
mov    -0x38(%rbp),%rax
movb   $0x0,0x8(%rax)
mov    -0x38(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Hours>:
push   %rbx
sub    $0x30,%rsp
mov    $0x19,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1040 <ctime@plt>
lea    0x10(%rsp),%rdi
mov    %eax,%esi
call   1030 <strcpy@plt>
mov    0x1b(%rsp),%al
mov    %al,(%rbx)
mov    0x1c(%rsp),%al
mov    %al,0x1(%rbx)
mov    0x1d(%rsp),%al
mov    %al,0x2(%rbx)
mov    0x1e(%rsp),%al
mov    %al,0x3(%rbx)
mov    0x1f(%rsp),%al
mov    %al,0x4(%rbx)
mov    0x20(%rsp),%al
mov    %al,0x5(%rbx)
mov    0x21(%rsp),%al
mov    %al,0x6(%rbx)
mov    0x22(%rsp),%al
mov    %al,0x7(%rbx)
movb   $0x0,0x8(%rbx)
mov    %rbx,%rax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @Hours() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [25 x i8]
%5 = alloca i8*
store i32 11, i32* %2
%6 = call i64 @malloc(i32 25)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %5
%8 = call i32 @time(i32* null)
store i32 %8, i32* %1
%9 = getelementptr inbounds [25 x i8], [25 x i8]* %4, i64 0, i64 0
%10 = call i32 @ctime(i32* %1)
%11 = call i32 @strcpy(i8* %9, i32 %10)
store i32 0, i32* %3
br label %12
12: ; preds = %26, %0
%13 = load i32, i32* %3
%14 = icmp slt i32 %13, 8
br i1 %14, label %15, label %29
15: ; preds = %12
%16 = load i32, i32* %2
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [25 x i8], [25 x i8]* %4, i64 0, i64 %17
%19 = load i8, i8* %18
%20 = load i8*, i8** %5
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
store i8 %19, i8* %23
%24 = load i32, i32* %2
%25 = add nsw i32 %24, 1
store i32 %25, i32* %2
br label %26
26: ; preds = %15
%27 = load i32, i32* %3
%28 = add nsw i32 %27, 1
store i32 %28, i32* %3
br label %12
29: ; preds = %12
%30 = load i8*, i8** %5
%31 = getelementptr inbounds i8, i8* %30, i64 8
store i8 0, i8* %31
%32 = load i8*, i8** %5
ret i8* %32
}

LLVM IR (-O2):
define i8* @Hours() {
%1 = alloca i32
%2 = alloca [25 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%5 = tail call i64 @malloc(i32 25)
%6 = inttoptr i64 %5 to i8*
%7 = tail call i32 @time(i32* null)
store i32 %7, i32* %1
%8 = call i32 @ctime(i32* %1)
%9 = call i32 @strcpy(i8* %4, i32 %8)
%10 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 11
%11 = load i8, i8* %10
store i8 %11, i8* %6
%12 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 12
%13 = load i8, i8* %12
%14 = getelementptr inbounds i8, i8* %6, i64 1
store i8 %13, i8* %14
%15 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 13
%16 = load i8, i8* %15
%17 = getelementptr inbounds i8, i8* %6, i64 2
store i8 %16, i8* %17
%18 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 14
%19 = load i8, i8* %18
%20 = getelementptr inbounds i8, i8* %6, i64 3
store i8 %19, i8* %20
%21 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 15
%22 = load i8, i8* %21
%23 = getelementptr inbounds i8, i8* %6, i64 4
store i8 %22, i8* %23
%24 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 16
%25 = load i8, i8* %24
%26 = getelementptr inbounds i8, i8* %6, i64 5
store i8 %25, i8* %26
%27 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 17
%28 = load i8, i8* %27
%29 = getelementptr inbounds i8, i8* %6, i64 6
store i8 %28, i8* %29
%30 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 18
%31 = load i8, i8* %30
%32 = getelementptr inbounds i8, i8* %6, i64 7
store i8 %31, i8* %32
%33 = getelementptr inbounds i8, i8* %6, i64 8
store i8 0, i8* %33
ret i8* %6
}