#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 */

/* Variables and functions */
int /*<<< orphan*/ strncpy_s(char *, size_t, char *, size_t);
void uninitvar_strncpy_s(char *Ct, size_t N1, char *S, size_t N2) {
  char dest[42];
  char *s;
  size_t n1;
  size_t n2;
  size_t n3;
  size_t n4;
  (void)strncpy_s(dest, n1, s, n2);
  (void)strncpy_s(Ct, n3, S, N2);
  (void)strncpy_s(Ct, N1, s, N2);
  (void)strncpy_s(Ct, N1, S, n4);
  (void)strncpy_s(Ct, N1, S, N2);
  (void)strncpy_s(dest, N1, S, N2);
}


x86 assembly (clang, -O0):
<uninitvar_strncpy_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x58(%rbp),%rdx
mov    -0x68(%rbp),%rcx
call   1030 <strncpy_s@plt>
mov    -0x8(%rbp),%rdi
mov    -0x70(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <strncpy_s@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x58(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <strncpy_s@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x78(%rbp),%rcx
call   1030 <strncpy_s@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <strncpy_s@plt>
lea    -0x50(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <strncpy_s@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_strncpy_s>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x30,%rsp
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
mov    %rsp,%r13
mov    %r13,%rdi
call   1030 <strncpy_s@plt>
mov    %rbx,%rdi
mov    %r15,%rdx
mov    %r14,%rcx
call   1030 <strncpy_s@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r14,%rcx
call   1030 <strncpy_s@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
call   1030 <strncpy_s@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1030 <strncpy_s@plt>
mov    %r13,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1030 <strncpy_s@plt>
add    $0x30,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @uninitvar_strncpy_s(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
%9 = alloca [42 x i8]
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%15 = getelementptr inbounds [42 x i8], [42 x i8]* %9, i64 0, i64 0
%16 = load i64, i64* %11
%17 = load i8*, i8** %10
%18 = load i64, i64* %12
%19 = call i32 @strncpy_s(i8* %15, i64 %16, i8* %17, i64 %18)
%20 = load i8*, i8** %5
%21 = load i64, i64* %13
%22 = load i8*, i8** %7
%23 = load i64, i64* %8
%24 = call i32 @strncpy_s(i8* %20, i64 %21, i8* %22, i64 %23)
%25 = load i8*, i8** %5
%26 = load i64, i64* %6
%27 = load i8*, i8** %10
%28 = load i64, i64* %8
%29 = call i32 @strncpy_s(i8* %25, i64 %26, i8* %27, i64 %28)
%30 = load i8*, i8** %5
%31 = load i64, i64* %6
%32 = load i8*, i8** %7
%33 = load i64, i64* %14
%34 = call i32 @strncpy_s(i8* %30, i64 %31, i8* %32, i64 %33)
%35 = load i8*, i8** %5
%36 = load i64, i64* %6
%37 = load i8*, i8** %7
%38 = load i64, i64* %8
%39 = call i32 @strncpy_s(i8* %35, i64 %36, i8* %37, i64 %38)
%40 = getelementptr inbounds [42 x i8], [42 x i8]* %9, i64 0, i64 0
%41 = load i64, i64* %6
%42 = load i8*, i8** %7
%43 = load i64, i64* %8
%44 = call i32 @strncpy_s(i8* %40, i64 %41, i8* %42, i64 %43)
ret void
}

LLVM IR (-O2):
define void @uninitvar_strncpy_s(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = alloca [42 x i8]
%6 = getelementptr inbounds [42 x i8], [42 x i8]* %5, i64 0, i64 0
%7 = call i32 @strncpy_s(i8* %6, i64 undef, i8* undef, i64 undef)
%8 = call i32 @strncpy_s(i8* %0, i64 undef, i8* %2, i64 %3)
%9 = call i32 @strncpy_s(i8* %0, i64 %1, i8* undef, i64 %3)
%10 = call i32 @strncpy_s(i8* %0, i64 %1, i8* %2, i64 undef)
%11 = call i32 @strncpy_s(i8* %0, i64 %1, i8* %2, i64 %3)
%12 = call i32 @strncpy_s(i8* %6, i64 %1, i8* %2, i64 %3)
ret void
}