#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;
struct tm {
  int tm_hour;
  int tm_min;
  int tm_sec;
};

/* Variables and functions */
int Evt_time(void const *);
struct tm *gmtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *Evt_time2charP(const void *my) {
  time_t tempo;
  struct tm *gmTime;
  static char buffer[80];
  tempo = time(NULL);
  gmTime = gmtime(&tempo);
  gmTime->tm_hour = (Evt_time(my) >> 16) & 0xff;
  gmTime->tm_min = (Evt_time(my) >> 8) & 0xff;
  gmTime->tm_sec = (Evt_time(my) >> 0) & 0xff;
  strftime(buffer, 80, "%H:%M:%S", gmTime);
  return buffer;
}


x86 assembly (clang, -O0):
<Evt_time2charP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
call   1060 <gmtime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <Evt_time@plt>
mov    %eax,%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <Evt_time@plt>
mov    %eax,%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <Evt_time@plt>
mov    %eax,%ecx
sar    $0x0,%ecx
and    $0xff,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x18(%rbp),%rcx
lea    0x2e90(%rip),%rdi
mov    $0x50,%esi
lea    0xe34(%rip),%rdx
call   1050 <strftime@plt>
lea    0x2e78(%rip),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Evt_time2charP>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1060 <gmtime@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <Evt_time@plt>
shr    $0x10,%eax
movzbl %al,%eax
mov    %eax,(%rbx)
mov    %r14,%rdi
call   1030 <Evt_time@plt>
movzbl %ah,%eax
mov    %eax,0x4(%rbx)
mov    %r14,%rdi
call   1030 <Evt_time@plt>
movzbl %al,%eax
mov    %eax,0x8(%rbx)
lea    0x2ebe(%rip),%r14
lea    0xe67(%rip),%rdx
mov    %r14,%rdi
mov    $0x50,%esi
mov    %rbx,%rcx
call   1050 <strftime@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32 }
@Evt_time2charP.buffer = internal global [80 x i8] zeroinitializer
@.str = [9 x i8] c"%H:%M:%S\00"
define i8* @Evt_time2charP(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca %struct.tm*
store i8* %0, i8** %2
%5 = call i32 @time(i32* null)
store i32 %5, i32* %3
%6 = call %struct.tm* @gmtime(i32* %3)
store %struct.tm* %6, %struct.tm** %4
%7 = load i8*, i8** %2
%8 = call i32 @Evt_time(i8* %7)
%9 = ashr i32 %8, 16
%10 = and i32 %9, 255
%11 = load %struct.tm*, %struct.tm** %4
%12 = getelementptr inbounds %struct.tm, %struct.tm* %11, i32 0, i32 0
store i32 %10, i32* %12
%13 = load i8*, i8** %2
%14 = call i32 @Evt_time(i8* %13)
%15 = ashr i32 %14, 8
%16 = and i32 %15, 255
%17 = load %struct.tm*, %struct.tm** %4
%18 = getelementptr inbounds %struct.tm, %struct.tm* %17, i32 0, i32 1
store i32 %16, i32* %18
%19 = load i8*, i8** %2
%20 = call i32 @Evt_time(i8* %19)
%21 = ashr i32 %20, 0
%22 = and i32 %21, 255
%23 = load %struct.tm*, %struct.tm** %4
%24 = getelementptr inbounds %struct.tm, %struct.tm* %23, i32 0, i32 2
store i32 %22, i32* %24
%25 = load %struct.tm*, %struct.tm** %4
%26 = call i32 @strftime(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @Evt_time2charP.buffer, i64 0, i64 0), i32 80, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %struct.tm* %25)
ret i8* getelementptr inbounds ([80 x i8], [80 x i8]* @Evt_time2charP.buffer, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32 }
@Evt_time2charP.buffer = internal global [80 x i8] zeroinitializer
@.str = [9 x i8] c"%H:%M:%S\00"
define i8* @Evt_time2charP(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @time(i32* null)
store i32 %4, i32* %2
%5 = call %struct.tm* @gmtime(i32* %2)
%6 = call i32 @Evt_time(i8* %0)
%7 = lshr i32 %6, 16
%8 = and i32 %7, 255
%9 = getelementptr inbounds %struct.tm, %struct.tm* %5, i64 0, i32 0
store i32 %8, i32* %9
%10 = call i32 @Evt_time(i8* %0)
%11 = lshr i32 %10, 8
%12 = and i32 %11, 255
%13 = getelementptr inbounds %struct.tm, %struct.tm* %5, i64 0, i32 1
store i32 %12, i32* %13
%14 = call i32 @Evt_time(i8* %0)
%15 = and i32 %14, 255
%16 = getelementptr inbounds %struct.tm, %struct.tm* %5, i64 0, i32 2
store i32 %15, i32* %16
%17 = call i32 @strftime(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @Evt_time2charP.buffer, i64 0, i64 0), i32 80, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %struct.tm* %5)
ret i8* getelementptr inbounds ([80 x i8], [80 x i8]* @Evt_time2charP.buffer, i64 0, i64 0)
}