#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*/ printf(char *, ...);
void ppMem1(unsigned int *m, int len) {
  int i;
  printf("MEM:\n");
  for (i = 0; i < len; i = i + 4) {
    printf("0x%x, 0x%x, 0x%x, 0x%x\n", m[i], m[i + 1], m[i + 2], m[i + 3]);
  }
  m[0] = 0x121f1e1f;
  m[1] = 0;
  m[2] = 3;
  m[3] = -1;
  m[4] = 0x232f2e2f;
  m[5] = 0x242c2b2b;
  m[6] = 0x252a2e2b;
  m[7] = 0x262d2d2a;
  m[8] = 0x3f343f3e;
  m[9] = 0x3e353d3c;
  m[10] = 0x363a3c3b;
  m[11] = 0x3b373b3a;
  m[12] = 0x454f4e45;
  m[13] = 0x4e464d46;
  m[14] = 0x474d474c;
  m[15] = 0x4a484a4c;
}


x86 assembly (clang, -O0):
<ppMem1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1198 <ppMem1+0x88>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%ecx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%edi
add    $0x3,%edi
movslq %edi,%rdi
mov    (%rax,%rdi,4),%r8d
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <ppMem1+0x24>
mov    -0x8(%rbp),%rax
movl   $0x121f1e1f,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x3,0x8(%rax)
mov    -0x8(%rbp),%rax
movl   $0xffffffff,0xc(%rax)
mov    -0x8(%rbp),%rax
movl   $0x232f2e2f,0x10(%rax)
mov    -0x8(%rbp),%rax
movl   $0x242c2b2b,0x14(%rax)
mov    -0x8(%rbp),%rax
movl   $0x252a2e2b,0x18(%rax)
mov    -0x8(%rbp),%rax
movl   $0x262d2d2a,0x1c(%rax)
mov    -0x8(%rbp),%rax
movl   $0x3f343f3e,0x20(%rax)
mov    -0x8(%rbp),%rax
movl   $0x3e353d3c,0x24(%rax)
mov    -0x8(%rbp),%rax
movl   $0x363a3c3b,0x28(%rax)
mov    -0x8(%rbp),%rax
movl   $0x3b373b3a,0x2c(%rax)
mov    -0x8(%rbp),%rax
movl   $0x454f4e45,0x30(%rax)
mov    -0x8(%rbp),%rax
movl   $0x4e464d46,0x34(%rax)
mov    -0x8(%rbp),%rax
movl   $0x474d474c,0x38(%rax)
mov    -0x8(%rbp),%rax
movl   $0x4a484a4c,0x3c(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ppMem1>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r15d
mov    %rdi,%rbx
lea    0xf24(%rip),%rdi
call   1030 <puts@plt>
test   %r15d,%r15d
jle    1173 <ppMem1+0x53>
lea    0xefb(%rip),%r14
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    (%rbx,%rbp,4),%esi
mov    0x4(%rbx,%rbp,4),%edx
mov    0x8(%rbx,%rbp,4),%ecx
mov    0xc(%rbx,%rbp,4),%r8d
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x4,%rbp
cmp    %r15d,%ebp
jl     1150 <ppMem1+0x30>
movaps 0xe86(%rip),%xmm0
movups %xmm0,(%rbx)
movaps 0xe8c(%rip),%xmm0
movups %xmm0,0x10(%rbx)
movaps 0xe91(%rip),%xmm0
movups %xmm0,0x20(%rbx)
movaps 0xe96(%rip),%xmm0
movups %xmm0,0x30(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"MEM:\0A\00"
@.str.1 = [24 x i8] c"0x%x, 0x%x, 0x%x, 0x%x\0A\00"
define void @ppMem1(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %5
br label %7
7: ; preds = %36, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %39
11: ; preds = %7
%12 = load i32*, i32** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
%17 = load i32*, i32** %3
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %17, i64 %20
%22 = load i32, i32* %21
%23 = load i32*, i32** %3
%24 = load i32, i32* %5
%25 = add nsw i32 %24, 2
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i32, i32* %23, i64 %26
%28 = load i32, i32* %27
%29 = load i32*, i32** %3
%30 = load i32, i32* %5
%31 = add nsw i32 %30, 3
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i32, i32* %29, i64 %32
%34 = load i32, i32* %33
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %16, i32 %22, i32 %28, i32 %34)
br label %36
36: ; preds = %11
%37 = load i32, i32* %5
%38 = add nsw i32 %37, 4
store i32 %38, i32* %5
br label %7
39: ; preds = %7
%40 = load i32*, i32** %3
%41 = getelementptr inbounds i32, i32* %40, i64 0
store i32 304029215, i32* %41
%42 = load i32*, i32** %3
%43 = getelementptr inbounds i32, i32* %42, i64 1
store i32 0, i32* %43
%44 = load i32*, i32** %3
%45 = getelementptr inbounds i32, i32* %44, i64 2
store i32 3, i32* %45
%46 = load i32*, i32** %3
%47 = getelementptr inbounds i32, i32* %46, i64 3
store i32 -1, i32* %47
%48 = load i32*, i32** %3
%49 = getelementptr inbounds i32, i32* %48, i64 4
store i32 590294575, i32* %49
%50 = load i32*, i32** %3
%51 = getelementptr inbounds i32, i32* %50, i64 5
store i32 606874411, i32* %51
%52 = load i32*, i32** %3
%53 = getelementptr inbounds i32, i32* %52, i64 6
store i32 623521323, i32* %53
%54 = load i32*, i32** %3
%55 = getelementptr inbounds i32, i32* %54, i64 7
store i32 640494890, i32* %55
%56 = load i32*, i32** %3
%57 = getelementptr inbounds i32, i32* %56, i64 8
store i32 1060388670, i32* %57
%58 = load i32*, i32** %3
%59 = getelementptr inbounds i32, i32* %58, i64 9
store i32 1043676476, i32* %59
%60 = load i32*, i32** %3
%61 = getelementptr inbounds i32, i32* %60, i64 10
store i32 909786171, i32* %61
%62 = load i32*, i32** %3
%63 = getelementptr inbounds i32, i32* %62, i64 11
store i32 993475386, i32* %63
%64 = load i32*, i32** %3
%65 = getelementptr inbounds i32, i32* %64, i64 12
store i32 1162825285, i32* %65
%66 = load i32*, i32** %3
%67 = getelementptr inbounds i32, i32* %66, i64 13
store i32 1313230150, i32* %67
%68 = load i32*, i32** %3
%69 = getelementptr inbounds i32, i32* %68, i64 14
store i32 1196246860, i32* %69
%70 = load i32*, i32** %3
%71 = getelementptr inbounds i32, i32* %70, i64 15
store i32 1246251596, i32* %71
ret void
}

LLVM IR (-O2):
@.str.1 = [24 x i8] c"0x%x, 0x%x, 0x%x, 0x%x\0A\00"
@str = [5 x i8] c"MEM:\00"
define void @ppMem1(i32* nocapture %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %22
5: ; preds = %2, %5
%6 = phi i64 [ %19, %5 ], [ 0, %2 ]
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = or i64 %6, 1
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = or i64 %6, 2
%13 = getelementptr inbounds i32, i32* %0, i64 %12
%14 = load i32, i32* %13
%15 = or i64 %6, 3
%16 = getelementptr inbounds i32, i32* %0, i64 %15
%17 = load i32, i32* %16
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %11, i32 %14, i32 %17)
%19 = add nuw i64 %6, 4
%20 = trunc i64 %19 to i32
%21 = icmp slt i32 %20, %1
br i1 %21, label %5, label %22
22: ; preds = %5, %2
%23 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> <i32 304029215, i32 0, i32 3, i32 -1>, <4 x i32>* %23
%24 = getelementptr inbounds i32, i32* %0, i64 4
%25 = bitcast i32* %24 to <4 x i32>*
store <4 x i32> <i32 590294575, i32 606874411, i32 623521323, i32 640494890>, <4 x i32>* %25
%26 = getelementptr inbounds i32, i32* %0, i64 8
%27 = bitcast i32* %26 to <4 x i32>*
store <4 x i32> <i32 1060388670, i32 1043676476, i32 909786171, i32 993475386>, <4 x i32>* %27
%28 = getelementptr inbounds i32, i32* %0, i64 12
%29 = bitcast i32* %28 to <4 x i32>*
store <4 x i32> <i32 1162825285, i32 1313230150, i32 1196246860, i32 1246251596>, <4 x i32>* %29
ret void
}