#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*/ ztime(char **);
char *ck_time() {
  static char tbuf[10];
  char *p;
  int x;
  ztime(&p);
  if (!p)
    return ("");
  if (*p) {
    for (x = 11; x < 19; x++)
      tbuf[x - 11] = p[x];
    tbuf[8] = '\0';
  }
  return (tbuf);
}


x86 assembly (clang, -O0):
<ck_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
call   1030 <ztime@plt>
cmpq   $0x0,-0x10(%rbp)
jne    113c <ck_time+0x2c>
lea    0xecd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1198 <ck_time+0x88>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     118d <ck_time+0x7d>
movl   $0xb,-0x14(%rbp)
cmpl   $0x13,-0x14(%rbp)
jge    1186 <ck_time+0x76>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x14(%rbp),%eax
sub    $0xb,%eax
movslq %eax,%rcx
lea    0x2eb4(%rip),%rax
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1150 <ck_time+0x40>
movb   $0x0,0x2ea4(%rip)
lea    0x2e95(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ck_time>:
push   %rax
mov    %rsp,%rdi
call   1030 <ztime@plt>
mov    (%rsp),%rcx
test   %rcx,%rcx
je     117f <ck_time+0x6f>
lea    0x2f00(%rip),%rax
cmpb   $0x0,(%rcx)
je     117d <ck_time+0x6d>
mov    0xb(%rcx),%dl
mov    %dl,0x2ef2(%rip)
mov    0xc(%rcx),%dl
mov    %dl,0x2eea(%rip)
mov    0xd(%rcx),%dl
mov    %dl,0x2ee2(%rip)
mov    0xe(%rcx),%dl
mov    %dl,0x2eda(%rip)
mov    0xf(%rcx),%dl
mov    %dl,0x2ed2(%rip)
mov    0x10(%rcx),%dl
mov    %dl,0x2eca(%rip)
mov    0x11(%rcx),%dl
mov    %dl,0x2ec2(%rip)
mov    0x12(%rcx),%cl
mov    %cl,0x2eba(%rip)
movb   $0x0,0x2eb4(%rip)
pop    %rcx
ret
lea    0xe7a(%rip),%rax
pop    %rcx
ret

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

LLVM IR (-O2):
@ck_time.tbuf = internal global [10 x i8] zeroinitializer
@.str = [1 x i8] zeroinitializer
define i8* @ck_time() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
%3 = call i32 @ztime(i8** %1)
%4 = load i8*, i8** %1
%5 = icmp eq i8* %4, null
br i1 %5, label %26, label %6
6: ; preds = %0
%7 = load i8, i8* %4
%8 = icmp eq i8 %7, 0
br i1 %8, label %26, label %9
9: ; preds = %6
%10 = getelementptr inbounds i8, i8* %4, i64 11
%11 = load i8, i8* %10
store i8 %11, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @ck_time.tbuf, i64 0, i64 0)
%12 = getelementptr inbounds i8, i8* %4, i64 12
%13 = load i8, i8* %12
store i8 %13, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @ck_time.tbuf, i64 0, i64 1)
%14 = getelementptr inbounds i8, i8* %4, i64 13
%15 = load i8, i8* %14
store i8 %15, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @ck_time.tbuf, i64 0, i64 2)
%16 = getelementptr inbounds i8, i8* %4, i64 14
%17 = load i8, i8* %16
store i8 %17, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @ck_time.tbuf, i64 0, i64 3)
%18 = getelementptr inbounds i8, i8* %4, i64 15
%19 = load i8, i8* %18
store i8 %19, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @ck_time.tbuf, i64 0, i64 4)
%20 = getelementptr inbounds i8, i8* %4, i64 16
%21 = load i8, i8* %20
store i8 %21, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @ck_time.tbuf, i64 0, i64 5)
%22 = getelementptr inbounds i8, i8* %4, i64 17
%23 = load i8, i8* %22
store i8 %23, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @ck_time.tbuf, i64 0, i64 6)
%24 = getelementptr inbounds i8, i8* %4, i64 18
%25 = load i8, i8* %24
store i8 %25, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @ck_time.tbuf, i64 0, i64 7)
store i8 0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @ck_time.tbuf, i64 0, i64 8)
br label %26
26: ; preds = %6, %9, %0
%27 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %0 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @ck_time.tbuf, i64 0, i64 0), %9 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @ck_time.tbuf, i64 0, i64 0), %6 ]
ret i8* %27
}