#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 */
int /*<<< orphan*/ LC_TIME;
int /*<<< orphan*/ localtime_r(int /*<<< orphan*/ *, struct tm *);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
int /*<<< orphan*/ strftime(char *, size_t, char *, struct tm *);
void get_indonesian_local_time_string(time_t *t, char *result, size_t max) {
  setlocale(LC_TIME, "id_ID");
  struct tm tm;
  localtime_r(t, &tm);
  strftime(result, max, "%A, %d %B %Y - %H:%M:%S %Z", &tm);
}


x86 assembly (clang, -O0):
<get_indonesian_local_time_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
lea    0xeac(%rip),%rsi
call   1040 <setlocale@plt>
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <localtime_r@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xe91(%rip),%rdx
lea    -0x20(%rbp),%rcx
call   1050 <strftime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_indonesian_local_time_string>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
lea    0xeaf(%rip),%rsi
call   1040 <setlocale@plt>
mov    %rsp,%r12
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <localtime_r@plt>
lea    0xe9b(%rip),%rdx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %r12,%rcx
call   1050 <strftime@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@LC_TIME = global i32 0
@.str = [6 x i8] c"id_ID\00"
@.str.1 = [27 x i8] c"%A, %d %B %Y - %H:%M:%S %Z\00"
define void @get_indonesian_local_time_string(i32* %0, i8* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca %struct.tm
store i32* %0, i32** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i32, i32* @LC_TIME
%9 = call i32 @setlocale(i32 %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%10 = load i32*, i32** %4
%11 = call i32 @localtime_r(i32* %10, %struct.tm* %7)
%12 = load i8*, i8** %5
%13 = load i64, i64* %6
%14 = call i32 @strftime(i8* %12, i64 %13, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), %struct.tm* %7)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@LC_TIME = global i32 0
@.str = [6 x i8] c"id_ID\00"
@.str.1 = [27 x i8] c"%A, %d %B %Y - %H:%M:%S %Z\00"
define void @get_indonesian_local_time_string(i32* %0, i8* %1, i64 %2) {
%4 = alloca %struct.tm
%5 = load i32, i32* @LC_TIME
%6 = tail call i32 @setlocale(i32 %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%7 = bitcast %struct.tm* %4 to i8*
%8 = call i32 @localtime_r(i32* %0, %struct.tm* %4)
%9 = call i32 @strftime(i8* %1, i64 %2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), %struct.tm* %4)
ret void
}