#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;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void get_time(char *now_h, char *now_m) {
  struct tm *ptr;
  time_t lt;
  lt = time(NULL);
  ptr = localtime(&lt);
  strftime(now_h, 100, "%H", ptr);
  strftime(now_m, 100, "%M", ptr);
}


x86 assembly (clang, -O0):
<get_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0x1c(%rbp)
lea    -0x1c(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x64,%esi
lea    0xe93(%rip),%rdx
call   1050 <strftime@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x64,%esi
lea    0xe7d(%rip),%rdx
call   1050 <strftime@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

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