#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 dummy;
};
struct irc {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ sendMsgChan(struct irc *, char *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void sendHours(struct irc *bot) {
  char msg[1024];
  time_t agora = time(NULL);
  struct tm *ptr_tm = localtime(&agora);
  strftime(msg, 1024 - 1, "%H:%M:%S\n", ptr_tm);
  sendMsgChan(bot, msg);
}


x86 assembly (clang, -O0):
<sendHours>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,-0x414(%rbp)
lea    -0x414(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x420(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x420(%rbp),%rcx
mov    $0x3ff,%esi
lea    0xe75(%rip),%rdx
call   1060 <strftime@plt>
mov    -0x8(%rbp),%rdi
lea    -0x410(%rbp),%rsi
call   1040 <sendMsgChan@plt>
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendHours>:
push   %r14
push   %rbx
sub    $0x418,%rsp
mov    %rdi,%r14
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <localtime@plt>
lea    0xe97(%rip),%rdx
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x3ff,%esi
mov    %rax,%rcx
call   1060 <strftime@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <sendMsgChan@plt>
add    $0x418,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.irc = type { i32 }
%struct.tm = type { i32 }
@.str = [10 x i8] c"%H:%M:%S\0A\00"
define void @sendHours(%struct.irc* %0) {
%2 = alloca %struct.irc*
%3 = alloca [1024 x i8]
%4 = alloca i32
%5 = alloca %struct.tm*
store %struct.irc* %0, %struct.irc** %2
%6 = call i32 @time(i32* null)
store i32 %6, i32* %4
%7 = call %struct.tm* @localtime(i32* %4)
store %struct.tm* %7, %struct.tm** %5
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%9 = load %struct.tm*, %struct.tm** %5
%10 = call i32 @strftime(i8* %8, i32 1023, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), %struct.tm* %9)
%11 = load %struct.irc*, %struct.irc** %2
%12 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%13 = call i32 @sendMsgChan(%struct.irc* %11, i8* %12)
ret void
}

LLVM IR (-O2):
%struct.irc = type { i32 }
%struct.tm = type { i32 }
@.str = [10 x i8] c"%H:%M:%S\0A\00"
define void @sendHours(%struct.irc* %0) {
%2 = alloca [1024 x i8]
%3 = alloca i32
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%5 = bitcast i32* %3 to i8*
%6 = tail call i32 @time(i32* null)
store i32 %6, i32* %3
%7 = call %struct.tm* @localtime(i32* %3)
%8 = call i32 @strftime(i8* %4, i32 1023, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), %struct.tm* %7)
%9 = call i32 @sendMsgChan(%struct.irc* %0, i8* %4)
ret void
}