#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 */
struct aeEventLoop {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, struct aeEventLoop *, ...);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int time_cb(struct aeEventLoop *l, long long id, void *data) {
  printf("now is %ld\n", time(NULL));
  printf("I'm time_cb,here [EventLoop: %p],[id : %lld],[data: %p] \n", l, id,
         data);
  return 5 * 1000;
}


x86 assembly (clang, -O0):
<time_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
movslq %eax,%rsi
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1388,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_cb>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
xor    %edi,%edi
call   1040 <time@plt>
movslq %eax,%rsi
lea    0xec1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1388,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.aeEventLoop = type { i32 }
@.str = [12 x i8] c"now is %ld\0A\00"
@.str.1 = [58 x i8] c"I'm time_cb,here [EventLoop: %p],[id : %lld],[data: %p] \0A\00"
define i32 @time_cb(%struct.aeEventLoop* %0, i64 %1, i8* %2) {
%4 = alloca %struct.aeEventLoop*
%5 = alloca i64
%6 = alloca i8*
store %struct.aeEventLoop* %0, %struct.aeEventLoop** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%7 = call i32 @time(i32* null)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to %struct.aeEventLoop*
%10 = call i32 (i8*, %struct.aeEventLoop*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), %struct.aeEventLoop* %9)
%11 = load %struct.aeEventLoop*, %struct.aeEventLoop** %4
%12 = load i64, i64* %5
%13 = load i8*, i8** %6
%14 = call i32 (i8*, %struct.aeEventLoop*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0), %struct.aeEventLoop* %11, i64 %12, i8* %13)
ret i32 5000
}

LLVM IR (-O2):
%struct.aeEventLoop = type { i32 }
@.str = [12 x i8] c"now is %ld\0A\00"
@.str.1 = [58 x i8] c"I'm time_cb,here [EventLoop: %p],[id : %lld],[data: %p] \0A\00"
define i32 @time_cb(%struct.aeEventLoop* %0, i64 %1, i8* %2) {
%4 = tail call i32 @time(i32* null)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to %struct.aeEventLoop*
%7 = tail call i32 (i8*, %struct.aeEventLoop*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), %struct.aeEventLoop* %6)
%8 = tail call i32 (i8*, %struct.aeEventLoop*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0), %struct.aeEventLoop* %0, i64 %1, i8* %2)
ret i32 5000
}