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

/* Variables and functions */
int /*<<< orphan*/ ctime_r(int /*<<< orphan*/ *, char *);
void ctime_r_test(time_t *timep, char *bufSizeUnknown) {
  time_t time_t_uninit_data;
  time_t *time_t_uninit_pointer;
  char bufSize5[5];
  char bufSize25[25];
  char bufSize26[26];
  char bufSize100[100];
  ctime_r(timep, bufSize5);
  ctime_r(timep, bufSize25);
  ctime_r(timep, bufSize26);
  ctime_r(timep, bufSize100);
  ctime_r(&time_t_uninit_data, bufSize100);
  ctime_r(time_t_uninit_pointer, bufSize100);
  ctime_r(timep, bufSizeUnknown);
}


x86 assembly (clang, -O0):
<ctime_r_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x25(%rbp),%rsi
call   1030 <ctime_r@plt>
mov    -0x8(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1030 <ctime_r@plt>
mov    -0x8(%rbp),%rdi
lea    -0x60(%rbp),%rsi
call   1030 <ctime_r@plt>
mov    -0x8(%rbp),%rdi
lea    -0xd0(%rbp),%rsi
call   1030 <ctime_r@plt>
lea    -0xd0(%rbp),%rsi
lea    -0x14(%rbp),%rdi
call   1030 <ctime_r@plt>
mov    -0x20(%rbp),%rdi
lea    -0xd0(%rbp),%rsi
call   1030 <ctime_r@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <ctime_r@plt>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctime_r_test>:
push   %r15
push   %r14
push   %rbx
sub    $0xc0,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xb(%rsp),%rsi
call   1030 <ctime_r@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <ctime_r@plt>
lea    0x30(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <ctime_r@plt>
lea    0x50(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <ctime_r@plt>
lea    0x4(%rsp),%rdi
mov    %r15,%rsi
call   1030 <ctime_r@plt>
mov    %r15,%rsi
call   1030 <ctime_r@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <ctime_r@plt>
add    $0xc0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @ctime_r_test(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca [5 x i8]
%8 = alloca [25 x i8]
%9 = alloca [26 x i8]
%10 = alloca [100 x i8]
store i32* %0, i32** %3
store i8* %1, i8** %4
%11 = load i32*, i32** %3
%12 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 0
%13 = call i32 @ctime_r(i32* %11, i8* %12)
%14 = load i32*, i32** %3
%15 = getelementptr inbounds [25 x i8], [25 x i8]* %8, i64 0, i64 0
%16 = call i32 @ctime_r(i32* %14, i8* %15)
%17 = load i32*, i32** %3
%18 = getelementptr inbounds [26 x i8], [26 x i8]* %9, i64 0, i64 0
%19 = call i32 @ctime_r(i32* %17, i8* %18)
%20 = load i32*, i32** %3
%21 = getelementptr inbounds [100 x i8], [100 x i8]* %10, i64 0, i64 0
%22 = call i32 @ctime_r(i32* %20, i8* %21)
%23 = getelementptr inbounds [100 x i8], [100 x i8]* %10, i64 0, i64 0
%24 = call i32 @ctime_r(i32* %5, i8* %23)
%25 = load i32*, i32** %6
%26 = getelementptr inbounds [100 x i8], [100 x i8]* %10, i64 0, i64 0
%27 = call i32 @ctime_r(i32* %25, i8* %26)
%28 = load i32*, i32** %3
%29 = load i8*, i8** %4
%30 = call i32 @ctime_r(i32* %28, i8* %29)
ret void
}

LLVM IR (-O2):
define void @ctime_r_test(i32* %0, i8* %1) {
%3 = alloca i32
%4 = alloca [5 x i8]
%5 = alloca [25 x i8]
%6 = alloca [26 x i8]
%7 = alloca [100 x i8]
%8 = bitcast i32* %3 to i8*
%9 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [25 x i8], [25 x i8]* %5, i64 0, i64 0
%11 = getelementptr inbounds [26 x i8], [26 x i8]* %6, i64 0, i64 0
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%13 = call i32 @ctime_r(i32* %0, i8* %9)
%14 = call i32 @ctime_r(i32* %0, i8* %10)
%15 = call i32 @ctime_r(i32* %0, i8* %11)
%16 = call i32 @ctime_r(i32* %0, i8* %12)
%17 = call i32 @ctime_r(i32* %3, i8* %12)
%18 = call i32 @ctime_r(i32* undef, i8* %12)
%19 = call i32 @ctime_r(i32* %0, i8* %1)
ret void
}