#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*/ assertTrue(char *, int);
scalar_t__ strcmp(char *, char *);
int do_dynamic_array(int size) {
  char *a[size];
  int i;
  for (i = 0; i < size; ++i) {
    a[i] = "Hello world";
  }
  assertTrue("strcmp(a[size-1], \"Hello world\") == 0",
             strcmp(a[size - 1], "Hello world") == 0);
  ;
}


x86 assembly (clang, -O0):
<do_dynamic_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1186 <do_dynamic_array+0x66>
mov    -0x28(%rbp),%rax
movslq -0x1c(%rbp),%rcx
lea    0xe8c(%rip),%rdx
mov    %rdx,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1159 <do_dynamic_array+0x39>
mov    -0x28(%rbp),%rax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe62(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe56(%rip),%rdi
call   1030 <assertTrue@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_dynamic_array>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,%r9d
mov    %rsp,%rcx
lea    0xf(,%r9,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,%rsp
test   %edi,%edi
jle    127d <do_dynamic_array+0x15d>
cmp    $0x4,%edi
jae    1150 <do_dynamic_array+0x30>
xor    %edx,%edx
jmp    125b <do_dynamic_array+0x13b>
mov    %r9d,%edx
and    $0xfffffffc,%edx
lea    -0x4(%rdx),%rax
mov    %rax,%r10
shr    $0x2,%r10
add    $0x1,%r10
mov    %r10d,%r8d
and    $0x7,%r8d
cmp    $0x1c,%rax
jae    1179 <do_dynamic_array+0x59>
xor    %eax,%eax
jmp    1215 <do_dynamic_array+0xf5>
and    $0xfffffffffffffff8,%r10
xor    %eax,%eax
lea    0xe7a(%rip),%rsi
movq   %rsi,%xmm0
pshufd $0x44,%xmm0,%xmm0
movdqa %xmm0,(%rcx,%rax,8)
movdqa %xmm0,0x10(%rcx,%rax,8)
movdqa %xmm0,0x20(%rcx,%rax,8)
movdqa %xmm0,0x30(%rcx,%rax,8)
movdqa %xmm0,0x40(%rcx,%rax,8)
movdqa %xmm0,0x50(%rcx,%rax,8)
movdqa %xmm0,0x60(%rcx,%rax,8)
movdqa %xmm0,0x70(%rcx,%rax,8)
movdqa %xmm0,0x80(%rcx,%rax,8)
movdqa %xmm0,0x90(%rcx,%rax,8)
movdqa %xmm0,0xa0(%rcx,%rax,8)
movdqa %xmm0,0xb0(%rcx,%rax,8)
movdqa %xmm0,0xc0(%rcx,%rax,8)
movdqa %xmm0,0xd0(%rcx,%rax,8)
movdqa %xmm0,0xe0(%rcx,%rax,8)
movdqa %xmm0,0xf0(%rcx,%rax,8)
add    $0x20,%rax
add    $0xfffffffffffffff8,%r10
jne    1190 <do_dynamic_array+0x70>
test   %r8,%r8
je     1256 <do_dynamic_array+0x136>
lea    (%rcx,%rax,8),%r10
add    $0x10,%r10
shl    $0x5,%r8
xor    %esi,%esi
lea    0xdd1(%rip),%rax
movq   %rax,%xmm0
pshufd $0x44,%xmm0,%xmm0
nopl   0x0(%rax)
movdqa %xmm0,-0x10(%r10,%rsi,1)
movdqa %xmm0,(%r10,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%r8
jne    1240 <do_dynamic_array+0x120>
cmp    %r9,%rdx
je     127d <do_dynamic_array+0x15d>
lea    0xd9e(%rip),%rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rax,(%rcx,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%r9
jne    1270 <do_dynamic_array+0x150>
movslq %edi,%rax
mov    -0x8(%rcx,%rax,8),%rdi
lea    0xd74(%rip),%rsi
call   1040 <strcmp@plt>
xor    %esi,%esi
test   %rax,%rax
sete   %sil
lea    0xd6b(%rip),%rdi
mov    %rbp,%rsp
pop    %rbp
jmp    1030 <assertTrue@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Hello world\00"
@.str.1 = [38 x i8] c"strcmp(a[size-1], \22Hello world\22) == 0\00"
define i32 @do_dynamic_array(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = call i8* @llvm.stacksave()
store i8* %9, i8** %4
%10 = alloca i8*, i64 %8
store i64 %8, i64* %5
store i32 0, i32* %6
br label %11
11: ; preds = %19, %1
%12 = load i32, i32* %6
%13 = load i32, i32* %3
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %22
15: ; preds = %11
%16 = load i32, i32* %6
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8*, i8** %10, i64 %17
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %18
br label %19
19: ; preds = %15
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %6
br label %11
22: ; preds = %11
%23 = load i32, i32* %3
%24 = sub nsw i32 %23, 1
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8*, i8** %10, i64 %25
%27 = load i8*, i8** %26
%28 = call i64 @strcmp(i8* %27, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%29 = icmp eq i64 %28, 0
%30 = zext i1 %29 to i32
%31 = call i32 @assertTrue(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 %30)
%32 = load i8*, i8** %4
%33 = load i32, i32* %2
ret i32 %33
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello world\00"
@.str.1 = [38 x i8] c"strcmp(a[size-1], \22Hello world\22) == 0\00"
define i32 @do_dynamic_array(i32 %0) {
%2 = zext i32 %0 to i64
%3 = alloca i8*, i64 %2
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %83
5: ; preds = %1
%6 = icmp ult i32 %0, 4
br i1 %6, label %76, label %7
7: ; preds = %5
%8 = and i64 %2, 4294967292
%9 = add nsw i64 %8, -4
%10 = lshr exact i64 %9, 2
%11 = add nuw nsw i64 %10, 1
%12 = and i64 %11, 7
%13 = icmp ult i64 %9, 28
br i1 %13, label %61, label %14
14: ; preds = %7
%15 = and i64 %11, 9223372036854775800
br label %16
16: ; preds = %16, %14
%17 = phi i64 [ 0, %14 ], [ %58, %16 ]
%18 = phi i64 [ 0, %14 ], [ %59, %16 ]
%19 = getelementptr inbounds i8*, i8** %3, i64 %17
%20 = bitcast i8** %19 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)>, <2 x i8*>* %20
%21 = getelementptr inbounds i8*, i8** %19, i64 2
%22 = bitcast i8** %21 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)>, <2 x i8*>* %22
%23 = or i64 %17, 4
%24 = getelementptr inbounds i8*, i8** %3, i64 %23
%25 = bitcast i8** %24 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)>, <2 x i8*>* %25
%26 = getelementptr inbounds i8*, i8** %24, i64 2
%27 = bitcast i8** %26 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)>, <2 x i8*>* %27
%28 = or i64 %17, 8
%29 = getelementptr inbounds i8*, i8** %3, i64 %28
%30 = bitcast i8** %29 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)>, <2 x i8*>* %30
%31 = getelementptr inbounds i8*, i8** %29, i64 2
%32 = bitcast i8** %31 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)>, <2 x i8*>* %32
%33 = or i64 %17, 12
%34 = getelementptr inbounds i8*, i8** %3, i64 %33
%35 = bitcast i8** %34 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)>, <2 x i8*>* %35
%36 = getelementptr inbounds i8*, i8** %34, i64 2
%37 = bitcast i8** %36 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)>, <2 x i8*>* %37
%38 = or i64 %17, 16
%39 = getelementptr inbounds i8*, i8** %3, i64 %38
%40 = bitcast i8** %39 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)>, <2 x i8*>* %40
%41 = getelementptr inbounds i8*, i8** %39, i64 2
%42 = bitcast i8** %41 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)>, <2 x i8*>* %42
%43 = or i64 %17, 20
%44 = getelementptr inbounds i8*, i8** %3, i64 %43
%45 = bitcast i8** %44 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)>, <2 x i8*>* %45
%46 = getelementptr inbounds i8*, i8** %44, i64 2
%47 = bitcast i8** %46 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)>, <2 x i8*>* %47
%48 = or i64 %17, 24
%49 = getelementptr inbounds i8*, i8** %3, i64 %48
%50 = bitcast i8** %49 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)>, <2 x i8*>* %50
%51 = getelementptr inbounds i8*, i8** %49, i64 2
%52 = bitcast i8** %51 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)>, <2 x i8*>* %52
%53 = or i64 %17, 28
%54 = getelementptr inbounds i8*, i8** %3, i64 %53
%55 = bitcast i8** %54 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)>, <2 x i8*>* %55
%56 = getelementptr inbounds i8*, i8** %54, i64 2
%57 = bitcast i8** %56 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)>, <2 x i8*>* %57
%58 = add nuw i64 %17, 32
%59 = add i64 %18, 8
%60 = icmp eq i64 %59, %15
br i1 %60, label %61, label %16
61: ; preds = %16, %7
%62 = phi i64 [ 0, %7 ], [ %58, %16 ]
%63 = icmp eq i64 %12, 0
br i1 %63, label %74, label %64
64: ; preds = %61, %64
%65 = phi i64 [ %71, %64 ], [ %62, %61 ]
%66 = phi i64 [ %72, %64 ], [ 0, %61 ]
%67 = getelementptr inbounds i8*, i8** %3, i64 %65
%68 = bitcast i8** %67 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)>, <2 x i8*>* %68
%69 = getelementptr inbounds i8*, i8** %67, i64 2
%70 = bitcast i8** %69 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)>, <2 x i8*>* %70
%71 = add nuw i64 %65, 4
%72 = add i64 %66, 1
%73 = icmp eq i64 %72, %12
br i1 %73, label %74, label %64
74: ; preds = %64, %61
%75 = icmp eq i64 %8, %2
br i1 %75, label %83, label %76
76: ; preds = %5, %74
%77 = phi i64 [ 0, %5 ], [ %8, %74 ]
br label %78
78: ; preds = %76, %78
%79 = phi i64 [ %81, %78 ], [ %77, %76 ]
%80 = getelementptr inbounds i8*, i8** %3, i64 %79
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %80
%81 = add nuw nsw i64 %79, 1
%82 = icmp eq i64 %81, %2
br i1 %82, label %83, label %78
83: ; preds = %78, %74, %1
%84 = add nsw i32 %0, -1
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds i8*, i8** %3, i64 %85
%87 = load i8*, i8** %86
%88 = tail call i64 @strcmp(i8* %87, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%89 = icmp eq i64 %88, 0
%90 = zext i1 %89 to i32
%91 = tail call i32 @assertTrue(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 %90)
ret i32 undef
}