; ModuleID = '/tmp/tmpe4Pk1F/a.out.bc'
target datalayout = "e-p:32:32-i64:64-v128:32:128-n32-S128"
target triple = "asmjs-unknown-emscripten"

; Check aligned operations that are of non-aligned sizes (e.g., memcpy of 7 bytes at alignment 4)

@.str = private unnamed_addr constant [13 x i8] c"hello worlds\00", align 1 ; [#uses=1 type=[13 x i8]*]

; [#uses=0]
define i32 @main() {
entry:
  %retval = alloca i32, align 4                   ; [#uses=3 type=i32*]
  %str = alloca i8*, align 4                      ; [#uses=25 type=i8**]
  %len = alloca i32, align 4                      ; [#uses=38 type=i32*]
  %saved_stack = alloca i8*                       ; [#uses=2 type=i8**]
  %cleanup.dest.slot = alloca i32                 ; [#uses=1 type=i32*]
  store i32 0, i32* %retval
  store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i32 0, i32 0), i8** %str, align 4  %0 = load i8*, i8** %str, align 4  %call = call i32 @strlen(i8* %0)  store i32 %call, i32* %len, align 4  %1 = load i32, i32* %len, align 4  %add = add nsw i32 %1, 1  %2 = call i8* @llvm.stacksave()  store i8* %2, i8** %saved_stack  %vla = alloca i8, i32 %add, align 1  %3 = load i32, i32* %len, align 4  call void @llvm.memset.p0i8.i32(i8* %vla, i8 46, i32 %3, i32 4, i1 false)  %4 = load i32, i32* %len, align 4  %arrayidx = getelementptr inbounds i8, i8* %vla, i32 %4  store i8 0, i8* %arrayidx  %call1 = call i32 @puts(i8* %vla)  %5 = load i32, i32* %len, align 4  call void @llvm.memset.p0i8.i32(i8* %vla, i8 46, i32 %5, i32 4, i1 false)  %6 = load i32, i32* %len, align 4  %arrayidx2 = getelementptr inbounds i8, i8* %vla, i32 %6  store i8 0, i8* %arrayidx2  %7 = load i8*, i8** %str, align 4  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vla, i8* %7, i32 0, i32 4, i1 false)  %call3 = call i32 @puts(i8* %vla)  %8 = load i32, i32* %len, align 4  call void @llvm.memset.p0i8.i32(i8* %vla, i8 46, i32 %8, i32 4, i1 false)  %9 = load i32, i32* %len, align 4  %arrayidx4 = getelementptr inbounds i8, i8* %vla, i32 %9  store i8 0, i8* %arrayidx4  %10 = load i8*, i8** %str, align 4  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vla, i8* %10, i32 1, i32 4, i1 false)  %call5 = call i32 @puts(i8* %vla)  %11 = load i32, i32* %len, align 4  call void @llvm.memset.p0i8.i32(i8* %vla, i8 46, i32 %11, i32 4, i1 false)  %12 = load i32, i32* %len, align 4  %arrayidx6 = getelementptr inbounds i8, i8* %vla, i32 %12  store i8 0, i8* %arrayidx6  %13 = load i8*, i8** %str, align 4  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vla, i8* %13, i32 2, i32 4, i1 false)  %call7 = call i32 @puts(i8* %vla)  %14 = load i32, i32* %len, align 4  call void @llvm.memset.p0i8.i32(i8* %vla, i8 46, i32 %14, i32 4, i1 false)  %15 = load i32, i32* %len, align 4  %arrayidx8 = getelementptr inbounds i8, i8* %vla, i32 %15  store i8 0, i8* %arrayidx8  %16 = load i8*, i8** %str, align 4  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vla, i8* %16, i32 3, i32 4, i1 false)  %call9 = call i32 @puts(i8* %vla)  %17 = load i32, i32* %len, align 4  call void @llvm.memset.p0i8.i32(i8* %vla, i8 46, i32 %17, i32 4, i1 false)  %18 = load i32, i32* %len, align 4  %arrayidx10 = getelementptr inbounds i8, i8* %vla, i32 %18  store i8 0, i8* %arrayidx10  %19 = load i8*, i8** %str, align 4  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vla, i8* %19, i32 4, i32 4, i1 false)  %call11 = call i32 @puts(i8* %vla)  %20 = load i32, i32* %len, align 4  call void @llvm.memset.p0i8.i32(i8* %vla, i8 46, i32 %20, i32 4, i1 false)  %21 = load i32, i32* %len, align 4  %arrayidx12 = getelementptr inbounds i8, i8* %vla, i32 %21  store i8 0, i8* %arrayidx12  %22 = load i8*, i8** %str, align 4  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vla, i8* %22, i32 5, i32 4, i1 false)  %call13 = call i32 @puts(i8* %vla)  %23 = load i32, i32* %len, align 4  call void @llvm.memset.p0i8.i32(i8* %vla, i8 46, i32 %23, i32 4, i1 false)  %24 = load i32, i32* %len, align 4  %arrayidx14 = getelementptr inbounds i8, i8* %vla, i32 %24  store i8 0, i8* %arrayidx14  %25 = load i8*, i8** %str, align 4  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vla, i8* %25, i32 6, i32 4, i1 false)  %call15 = call i32 @puts(i8* %vla)  %26 = load i32, i32* %len, align 4  call void @llvm.memset.p0i8.i32(i8* %vla, i8 46, i32 %26, i32 4, i1 false)  %27 = load i32, i32* %len, align 4  %arrayidx16 = getelementptr inbounds i8, i8* %vla, i32 %27  store i8 0, i8* %arrayidx16  %28 = load i8*, i8** %str, align 4  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vla, i8* %28, i32 7, i32 4, i1 false)  %call17 = call i32 @puts(i8* %vla)  %29 = load i32, i32* %len, align 4  call void @llvm.memset.p0i8.i32(i8* %vla, i8 46, i32 %29, i32 4, i1 false)  %30 = load i32, i32* %len, align 4  %arrayidx18 = getelementptr inbounds i8, i8* %vla, i32 %30  store i8 0, i8* %arrayidx18  %31 = load i8*, i8** %str, align 4  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vla, i8* %31, i32 8, i32 4, i1 false)  %call19 = call i32 @puts(i8* %vla)  %32 = load i32, i32* %len, align 4  call void @llvm.memset.p0i8.i32(i8* %vla, i8 46, i32 %32, i32 4, i1 false)  %33 = load i32, i32* %len, align 4  %arrayidx20 = getelementptr inbounds i8, i8* %vla, i32 %33  store i8 0, i8* %arrayidx20  %34 = load i8*, i8** %str, align 4  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vla, i8* %34, i32 9, i32 4, i1 false)  %call21 = call i32 @puts(i8* %vla)  %35 = load i32, i32* %len, align 4  call void @llvm.memset.p0i8.i32(i8* %vla, i8 46, i32 %35, i32 4, i1 false)  %36 = load i32, i32* %len, align 4  %arrayidx22 = getelementptr inbounds i8, i8* %vla, i32 %36  store i8 0, i8* %arrayidx22  %37 = load i8*, i8** %str, align 4  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vla, i8* %37, i32 10, i32 4, i1 false)  %call23 = call i32 @puts(i8* %vla)  %38 = load i8*, i8** %str, align 4  %39 = load i32, i32* %len, align 4  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vla, i8* %38, i32 %39, i32 4, i1 false)  %call24 = call i32 @puts(i8* %vla)  %40 = load i8*, i8** %str, align 4  %41 = load i32, i32* %len, align 4  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vla, i8* %40, i32 %41, i32 4, i1 false)  call void @llvm.memset.p0i8.i32(i8* %vla, i8 46, i32 0, i32 4, i1 false)  %arrayidx25 = getelementptr inbounds i8, i8* %vla, i32 0  store i8 0, i8* %arrayidx25  %call26 = call i32 @puts(i8* %vla)  %42 = load i8*, i8** %str, align 4  %43 = load i32, i32* %len, align 4  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vla, i8* %42, i32 %43, i32 4, i1 false)  call void @llvm.memset.p0i8.i32(i8* %vla, i8 46, i32 1, i32 4, i1 false)  %arrayidx27 = getelementptr inbounds i8, i8* %vla, i32 1  store i8 0, i8* %arrayidx27  %call28 = call i32 @puts(i8* %vla)  %44 = load i8*, i8** %str, align 4  %45 = load i32, i32* %len, align 4  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vla, i8* %44, i32 %45, i32 4, i1 false)  call void @llvm.memset.p0i8.i32(i8* %vla, i8 46, i32 2, i32 4, i1 false)  %arrayidx29 = getelementptr inbounds i8, i8* %vla, i32 2  store i8 0, i8* %arrayidx29  %call30 = call i32 @puts(i8* %vla)  %46 = load i8*, i8** %str, align 4  %47 = load i32, i32* %len, align 4  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vla, i8* %46, i32 %47, i32 4, i1 false)  call void @llvm.memset.p0i8.i32(i8* %vla, i8 46, i32 3, i32 4, i1 false)  %arrayidx31 = getelementptr inbounds i8, i8* %vla, i32 3  store i8 0, i8* %arrayidx31  %call32 = call i32 @puts(i8* %vla)  %48 = load i8*, i8** %str, align 4  %49 = load i32, i32* %len, align 4  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vla, i8* %48, i32 %49, i32 4, i1 false)  call void @llvm.memset.p0i8.i32(i8* %vla, i8 46, i32 4, i32 4, i1 false)  %arrayidx33 = getelementptr inbounds i8, i8* %vla, i32 4  store i8 0, i8* %arrayidx33  %call34 = call i32 @puts(i8* %vla)  %50 = load i8*, i8** %str, align 4  %51 = load i32, i32* %len, align 4  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vla, i8* %50, i32 %51, i32 4, i1 false)  call void @llvm.memset.p0i8.i32(i8* %vla, i8 46, i32 5, i32 4, i1 false)  %arrayidx35 = getelementptr inbounds i8, i8* %vla, i32 5  store i8 0, i8* %arrayidx35  %call36 = call i32 @puts(i8* %vla)  %52 = load i8*, i8** %str, align 4  %53 = load i32, i32* %len, align 4  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vla, i8* %52, i32 %53, i32 4, i1 false)  call void @llvm.memset.p0i8.i32(i8* %vla, i8 46, i32 6, i32 4, i1 false)  %arrayidx37 = getelementptr inbounds i8, i8* %vla, i32 6  store i8 0, i8* %arrayidx37  %call38 = call i32 @puts(i8* %vla)  %54 = load i8*, i8** %str, align 4  %55 = load i32, i32* %len, align 4  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vla, i8* %54, i32 %55, i32 4, i1 false)  call void @llvm.memset.p0i8.i32(i8* %vla, i8 46, i32 7, i32 4, i1 false)  %arrayidx39 = getelementptr inbounds i8, i8* %vla, i32 7  store i8 0, i8* %arrayidx39  %call40 = call i32 @puts(i8* %vla)  %56 = load i8*, i8** %str, align 4  %57 = load i32, i32* %len, align 4  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vla, i8* %56, i32 %57, i32 4, i1 false)  call void @llvm.memset.p0i8.i32(i8* %vla, i8 46, i32 8, i32 4, i1 false)  %arrayidx41 = getelementptr inbounds i8, i8* %vla, i32 8  store i8 0, i8* %arrayidx41  %call42 = call i32 @puts(i8* %vla)  %58 = load i8*, i8** %str, align 4  %59 = load i32, i32* %len, align 4  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vla, i8* %58, i32 %59, i32 4, i1 false)  call void @llvm.memset.p0i8.i32(i8* %vla, i8 46, i32 9, i32 4, i1 false)  %arrayidx43 = getelementptr inbounds i8, i8* %vla, i32 9  store i8 0, i8* %arrayidx43  %call44 = call i32 @puts(i8* %vla)  %60 = load i8*, i8** %str, align 4  %61 = load i32, i32* %len, align 4  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %vla, i8* %60, i32 %61, i32 4, i1 false)  call void @llvm.memset.p0i8.i32(i8* %vla, i8 46, i32 10, i32 4, i1 false)  %arrayidx45 = getelementptr inbounds i8, i8* %vla, i32 10  store i8 0, i8* %arrayidx45  %call46 = call i32 @puts(i8* %vla)  store i32 0, i32* %retval  store i32 1, i32* %cleanup.dest.slot
  %62 = load i8*, i8** %saved_stack  call void @llvm.stackrestore(i8* %62)  %63 = load i32, i32* %retval  ret i32 %63}

; [#uses=1]
declare i32 @strlen(i8*)

; [#uses=1]
declare i8* @llvm.stacksave() nounwind

; [#uses=23]
declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind

; [#uses=24]
declare i32 @puts(i8*)

; [#uses=23]
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind

; [#uses=1]
declare void @llvm.stackrestore(i8*) nounwind


