#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 */
scalar_t__ malloc(int);
int *string2() {
  int *p = (int *)malloc(100 * sizeof(int));
  int i = 0;
  while (i <= 98) {
    p[i] = i + 5;
    i = i + 1;
  }
  p[99] = 0;
  return p;
}


x86 assembly (clang, -O0):
<string2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x190,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x62,-0xc(%rbp)
jg     1156 <string2+0x46>
mov    -0xc(%rbp),%edx
add    $0x5,%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <string2+0x1d>
mov    -0x8(%rbp),%rax
movl   $0x0,0x18c(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string2>:
push   %rax
mov    $0x190,%edi
call   1030 <malloc@plt>
movaps 0xede(%rip),%xmm0
movups %xmm0,(%rax)
movaps 0xee4(%rip),%xmm0
movups %xmm0,0x10(%rax)
movaps 0xee9(%rip),%xmm0
movups %xmm0,0x20(%rax)
movaps 0xeee(%rip),%xmm0
movups %xmm0,0x30(%rax)
movaps 0xef3(%rip),%xmm0
movups %xmm0,0x40(%rax)
movaps 0xef8(%rip),%xmm0
movups %xmm0,0x50(%rax)
movaps 0xefd(%rip),%xmm0
movups %xmm0,0x60(%rax)
movaps 0xf02(%rip),%xmm0
movups %xmm0,0x70(%rax)
movaps 0xf07(%rip),%xmm0
movups %xmm0,0x80(%rax)
movaps 0xf09(%rip),%xmm0
movups %xmm0,0x90(%rax)
movaps 0xf0b(%rip),%xmm0
movups %xmm0,0xa0(%rax)
movaps 0xf0d(%rip),%xmm0
movups %xmm0,0xb0(%rax)
movaps 0xf0f(%rip),%xmm0
movups %xmm0,0xc0(%rax)
movaps 0xf11(%rip),%xmm0
movups %xmm0,0xd0(%rax)
movaps 0xf13(%rip),%xmm0
movups %xmm0,0xe0(%rax)
movaps 0xf15(%rip),%xmm0
movups %xmm0,0xf0(%rax)
movaps 0xf17(%rip),%xmm0
movups %xmm0,0x100(%rax)
movaps 0xf19(%rip),%xmm0
movups %xmm0,0x110(%rax)
movaps 0xf1b(%rip),%xmm0
movups %xmm0,0x120(%rax)
movaps 0xf1d(%rip),%xmm0
movups %xmm0,0x130(%rax)
movaps 0xf1f(%rip),%xmm0
movups %xmm0,0x140(%rax)
movaps 0xf21(%rip),%xmm0
movups %xmm0,0x150(%rax)
movaps 0xf23(%rip),%xmm0
movups %xmm0,0x160(%rax)
movaps 0xf25(%rip),%xmm0
movups %xmm0,0x170(%rax)
movaps 0xf27(%rip),%xmm0
movups %xmm0,0x180(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define i32* @string2() {
%1 = alloca i32*
%2 = alloca i32
%3 = call i64 @malloc(i32 400)
%4 = inttoptr i64 %3 to i32*
store i32* %4, i32** %1
store i32 0, i32* %2
br label %5
5: ; preds = %8, %0
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 98
br i1 %7, label %8, label %17
8: ; preds = %5
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 5
%11 = load i32*, i32** %1
%12 = load i32, i32* %2
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
store i32 %10, i32* %14
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %5
17: ; preds = %5
%18 = load i32*, i32** %1
%19 = getelementptr inbounds i32, i32* %18, i64 99
store i32 0, i32* %19
%20 = load i32*, i32** %1
ret i32* %20
}

LLVM IR (-O2):
define i32* @string2() {
%1 = tail call i64 @malloc(i32 400)
%2 = inttoptr i64 %1 to i32*
%3 = inttoptr i64 %1 to <4 x i32>*
store <4 x i32> <i32 5, i32 6, i32 7, i32 8>, <4 x i32>* %3
%4 = getelementptr inbounds i32, i32* %2, i64 4
%5 = bitcast i32* %4 to <4 x i32>*
store <4 x i32> <i32 9, i32 10, i32 11, i32 12>, <4 x i32>* %5
%6 = getelementptr inbounds i32, i32* %2, i64 8
%7 = bitcast i32* %6 to <4 x i32>*
store <4 x i32> <i32 13, i32 14, i32 15, i32 16>, <4 x i32>* %7
%8 = getelementptr inbounds i32, i32* %2, i64 12
%9 = bitcast i32* %8 to <4 x i32>*
store <4 x i32> <i32 17, i32 18, i32 19, i32 20>, <4 x i32>* %9
%10 = getelementptr inbounds i32, i32* %2, i64 16
%11 = bitcast i32* %10 to <4 x i32>*
store <4 x i32> <i32 21, i32 22, i32 23, i32 24>, <4 x i32>* %11
%12 = getelementptr inbounds i32, i32* %2, i64 20
%13 = bitcast i32* %12 to <4 x i32>*
store <4 x i32> <i32 25, i32 26, i32 27, i32 28>, <4 x i32>* %13
%14 = getelementptr inbounds i32, i32* %2, i64 24
%15 = bitcast i32* %14 to <4 x i32>*
store <4 x i32> <i32 29, i32 30, i32 31, i32 32>, <4 x i32>* %15
%16 = getelementptr inbounds i32, i32* %2, i64 28
%17 = bitcast i32* %16 to <4 x i32>*
store <4 x i32> <i32 33, i32 34, i32 35, i32 36>, <4 x i32>* %17
%18 = getelementptr inbounds i32, i32* %2, i64 32
%19 = bitcast i32* %18 to <4 x i32>*
store <4 x i32> <i32 37, i32 38, i32 39, i32 40>, <4 x i32>* %19
%20 = getelementptr inbounds i32, i32* %2, i64 36
%21 = bitcast i32* %20 to <4 x i32>*
store <4 x i32> <i32 41, i32 42, i32 43, i32 44>, <4 x i32>* %21
%22 = getelementptr inbounds i32, i32* %2, i64 40
%23 = bitcast i32* %22 to <4 x i32>*
store <4 x i32> <i32 45, i32 46, i32 47, i32 48>, <4 x i32>* %23
%24 = getelementptr inbounds i32, i32* %2, i64 44
%25 = bitcast i32* %24 to <4 x i32>*
store <4 x i32> <i32 49, i32 50, i32 51, i32 52>, <4 x i32>* %25
%26 = getelementptr inbounds i32, i32* %2, i64 48
%27 = bitcast i32* %26 to <4 x i32>*
store <4 x i32> <i32 53, i32 54, i32 55, i32 56>, <4 x i32>* %27
%28 = getelementptr inbounds i32, i32* %2, i64 52
%29 = bitcast i32* %28 to <4 x i32>*
store <4 x i32> <i32 57, i32 58, i32 59, i32 60>, <4 x i32>* %29
%30 = getelementptr inbounds i32, i32* %2, i64 56
%31 = bitcast i32* %30 to <4 x i32>*
store <4 x i32> <i32 61, i32 62, i32 63, i32 64>, <4 x i32>* %31
%32 = getelementptr inbounds i32, i32* %2, i64 60
%33 = bitcast i32* %32 to <4 x i32>*
store <4 x i32> <i32 65, i32 66, i32 67, i32 68>, <4 x i32>* %33
%34 = getelementptr inbounds i32, i32* %2, i64 64
%35 = bitcast i32* %34 to <4 x i32>*
store <4 x i32> <i32 69, i32 70, i32 71, i32 72>, <4 x i32>* %35
%36 = getelementptr inbounds i32, i32* %2, i64 68
%37 = bitcast i32* %36 to <4 x i32>*
store <4 x i32> <i32 73, i32 74, i32 75, i32 76>, <4 x i32>* %37
%38 = getelementptr inbounds i32, i32* %2, i64 72
%39 = bitcast i32* %38 to <4 x i32>*
store <4 x i32> <i32 77, i32 78, i32 79, i32 80>, <4 x i32>* %39
%40 = getelementptr inbounds i32, i32* %2, i64 76
%41 = bitcast i32* %40 to <4 x i32>*
store <4 x i32> <i32 81, i32 82, i32 83, i32 84>, <4 x i32>* %41
%42 = getelementptr inbounds i32, i32* %2, i64 80
%43 = bitcast i32* %42 to <4 x i32>*
store <4 x i32> <i32 85, i32 86, i32 87, i32 88>, <4 x i32>* %43
%44 = getelementptr inbounds i32, i32* %2, i64 84
%45 = bitcast i32* %44 to <4 x i32>*
store <4 x i32> <i32 89, i32 90, i32 91, i32 92>, <4 x i32>* %45
%46 = getelementptr inbounds i32, i32* %2, i64 88
%47 = bitcast i32* %46 to <4 x i32>*
store <4 x i32> <i32 93, i32 94, i32 95, i32 96>, <4 x i32>* %47
%48 = getelementptr inbounds i32, i32* %2, i64 92
%49 = bitcast i32* %48 to <4 x i32>*
store <4 x i32> <i32 97, i32 98, i32 99, i32 100>, <4 x i32>* %49
%50 = getelementptr inbounds i32, i32* %2, i64 96
store i32 101, i32* %50
%51 = getelementptr inbounds i32, i32* %2, i64 97
store i32 102, i32* %51
%52 = getelementptr inbounds i32, i32* %2, i64 98
store i32 103, i32* %52
%53 = getelementptr inbounds i32, i32* %2, i64 99
store i32 0, i32* %53
ret i32* %2
}