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

/* Variables and functions */
int /*<<< orphan*/ mbstowcs(int /*<<< orphan*/ *, char const *, int);
void uninitvar_mbstowcs(wchar_t *d, const char *s, size_t m) {
  wchar_t *dest;
  char *src;
  size_t max;
  (void)mbstowcs(dest, s, m);
  (void)mbstowcs(d, src, m);
  (void)mbstowcs(d, s, max);
  (void)mbstowcs(d, s, m);
  wchar_t buf[100];
  (void)mbstowcs(buf, s, 100);
}


x86 assembly (clang, -O0):
<uninitvar_mbstowcs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    %eax,%edx
call   1030 <mbstowcs@plt>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    %eax,%edx
call   1030 <mbstowcs@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x30(%rbp),%rax
mov    %eax,%edx
call   1030 <mbstowcs@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    %eax,%edx
call   1030 <mbstowcs@plt>
lea    -0x1c0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x64,%edx
call   1030 <mbstowcs@plt>
add    $0x1c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_mbstowcs>:
push   %r15
push   %r14
push   %rbx
sub    $0x190,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
call   1030 <mbstowcs@plt>
mov    %r15,%rdi
mov    %r14d,%edx
call   1030 <mbstowcs@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <mbstowcs@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1030 <mbstowcs@plt>
mov    %rsp,%rdi
mov    %rbx,%rsi
mov    $0x64,%edx
call   1030 <mbstowcs@plt>
add    $0x190,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @uninitvar_mbstowcs(i32* %0, i8* %1, i64 %2) {
%4 = alloca [100 x i32]
%5 = trunc i64 %2 to i32
%6 = tail call i32 @mbstowcs(i32* undef, i8* %1, i32 %5)
%7 = tail call i32 @mbstowcs(i32* %0, i8* undef, i32 %5)
%8 = tail call i32 @mbstowcs(i32* %0, i8* %1, i32 undef)
%9 = tail call i32 @mbstowcs(i32* %0, i8* %1, i32 %5)
%10 = bitcast [100 x i32]* %4 to i8*
%11 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 0
%12 = call i32 @mbstowcs(i32* %11, i8* %1, i32 100)
ret void
}