#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*/ __mf_set_options(char *);
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int main() {
  volatile int *p;
  __mf_set_options("-wipe-stack -no-check-initialization");
  {
    volatile int array[10];
    p = &array[0];
    array[0] = 2;
    array[9] = 5;
  }
  __mf_set_options("-no-wipe-stack");
  {
    volatile int array2[10];
    if (p != &array2[0])
      exit(0);
    array2[5] = 6;
    if (p[0] == 2 || p[9] == 5 || p[5] != 6)
      abort();
  }
  {
    volatile int array3[10];
    if (p != &array3[0])
      exit(0);
    array3[1] = 2;
    if (p[5] != 6 || p[1] != 2)
      abort();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
call   1050 <__mf_set_options@plt>
lea    -0x40(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x2,-0x40(%rbp)
movl   $0x5,-0x1c(%rbp)
lea    0xeba(%rip),%rdi
call   1050 <__mf_set_options@plt>
mov    -0x10(%rbp),%rax
lea    -0x70(%rbp),%rcx
cmp    %rcx,%rax
je     1188 <main+0x58>
xor    %edi,%edi
call   1040 <exit@plt>
movl   $0x6,-0x5c(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
cmp    $0x2,%eax
je     11be <main+0x8e>
mov    -0x10(%rbp),%rax
mov    0x24(%rax),%eax
cmp    $0x5,%eax
je     11be <main+0x8e>
mov    -0x10(%rbp),%rax
mov    0x14(%rax),%eax
cmp    $0x6,%eax
je     11c5 <main+0x95>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
lea    -0xa0(%rbp),%rcx
cmp    %rcx,%rax
je     11e0 <main+0xb0>
xor    %edi,%edi
call   1040 <exit@plt>
movl   $0x2,-0x9c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x14(%rax),%eax
cmp    $0x6,%eax
jne    120a <main+0xda>
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
cmp    $0x2,%eax
je     1211 <main+0xe1>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <__mf_set_options@plt>
movl   $0x2,(%rsp)
movl   $0x5,0x4(%rsp)
lea    0xee2(%rip),%rdi
call   1040 <__mf_set_options@plt>
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"-wipe-stack -no-check-initialization\00"
@.str.1 = [15 x i8] c"-no-wipe-stack\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca [10 x i32]
%4 = alloca [10 x i32]
%5 = alloca [10 x i32]
store i32 0, i32* %1
%6 = call i32 @__mf_set_options(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
store i32* %7, i32** %2
%8 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
store volatile i32 2, i32* %8
%9 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 9
store volatile i32 5, i32* %9
%10 = call i32 @__mf_set_options(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%11 = load i32*, i32** %2
%12 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 0
%13 = icmp ne i32* %11, %12
br i1 %13, label %14, label %16
14: ; preds = %0
%15 = call i32 @exit(i32 0)
unreachable
16: ; preds = %0
%17 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 5
store volatile i32 6, i32* %17
%18 = load i32*, i32** %2
%19 = getelementptr inbounds i32, i32* %18, i64 0
%20 = load volatile i32, i32* %19
%21 = icmp eq i32 %20, 2
br i1 %21, label %32, label %22
22: ; preds = %16
%23 = load i32*, i32** %2
%24 = getelementptr inbounds i32, i32* %23, i64 9
%25 = load volatile i32, i32* %24
%26 = icmp eq i32 %25, 5
br i1 %26, label %32, label %27
27: ; preds = %22
%28 = load i32*, i32** %2
%29 = getelementptr inbounds i32, i32* %28, i64 5
%30 = load volatile i32, i32* %29
%31 = icmp ne i32 %30, 6
br i1 %31, label %32, label %34
32: ; preds = %27, %22, %16
%33 = call i32 (...) @abort()
unreachable
34: ; preds = %27
%35 = load i32*, i32** %2
%36 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 0
%37 = icmp ne i32* %35, %36
br i1 %37, label %38, label %40
38: ; preds = %34
%39 = call i32 @exit(i32 0)
unreachable
40: ; preds = %34
%41 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 1
store volatile i32 2, i32* %41
%42 = load i32*, i32** %2
%43 = getelementptr inbounds i32, i32* %42, i64 5
%44 = load volatile i32, i32* %43
%45 = icmp ne i32 %44, 6
br i1 %45, label %51, label %46
46: ; preds = %40
%47 = load i32*, i32** %2
%48 = getelementptr inbounds i32, i32* %47, i64 1
%49 = load volatile i32, i32* %48
%50 = icmp ne i32 %49, 2
br i1 %50, label %51, label %53
51: ; preds = %46, %40
%52 = call i32 (...) @abort()
unreachable
53: ; preds = %46
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"-wipe-stack -no-check-initialization\00"
@.str.1 = [15 x i8] c"-no-wipe-stack\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = tail call i32 @__mf_set_options(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
store volatile i32 2, i32* %1
store volatile i32 5, i32* %2
%6 = tail call i32 @__mf_set_options(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @exit(i32 0)
unreachable
}