#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*/ abort();
void **bar(void **, int *);
int main(void) {
  void **u = bar((void **)0, (int *)0);
  void *t[] = {u[2], u[4]};
  int s[] = {7, 8, 9, 10, 11, 12};
  if (bar(t, &s[1]) != (void **)0 || s[0] != 4 || s[1] != 3 || s[2] != 2 ||
      s[3] != 1 || s[4] != 11 || s[5] != 12)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%esi
mov    %rsi,%rdi
call   1040 <bar@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    0xea2(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xe9f(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xe9c(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x40(%rbp),%rsi
add    $0x4,%rsi
call   1040 <bar@plt>
cmp    $0x0,%rax
jne    11cf <main+0xaf>
cmpl   $0x4,-0x40(%rbp)
jne    11cf <main+0xaf>
cmpl   $0x3,-0x3c(%rbp)
jne    11cf <main+0xaf>
cmpl   $0x2,-0x38(%rbp)
jne    11cf <main+0xaf>
cmpl   $0x1,-0x34(%rbp)
jne    11cf <main+0xaf>
cmpl   $0xb,-0x30(%rbp)
jne    11cf <main+0xaf>
cmpl   $0xc,-0x2c(%rbp)
je     11d6 <main+0xb6>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
xor    %edi,%edi
xor    %esi,%esi
call   1040 <bar@plt>
mov    0x10(%rax),%rcx
mov    %rcx,0x20(%rsp)
mov    0x20(%rax),%rax
mov    %rax,0x28(%rsp)
mov    0xeca(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xeae(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x4(%rsp),%rsi
lea    0x20(%rsp),%rdi
call   1040 <bar@plt>
test   %rax,%rax
jne    119a <main+0x7a>
cmpl   $0x4,(%rsp)
jne    119a <main+0x7a>
cmpl   $0x3,0x4(%rsp)
jne    119a <main+0x7a>
cmpl   $0x2,0x8(%rsp)
jne    119a <main+0x7a>
cmpl   $0x1,0xc(%rsp)
jne    119a <main+0x7a>
cmpl   $0xb,0x10(%rsp)
jne    119a <main+0x7a>
cmpl   $0xc,0x14(%rsp)
jne    119a <main+0x7a>
xor    %eax,%eax
add    $0x38,%rsp
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@__const.main.s = [6 x i32] [i32 7, i32 8, i32 9, i32 10, i32 11, i32 12]
define i32 @main() {
%1 = alloca i32
%2 = alloca i8**
%3 = alloca [2 x i8*]
%4 = alloca [6 x i32]
store i32 0, i32* %1
%5 = call i8** @bar(i8** null, i32* null)
store i8** %5, i8*** %2
%6 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 0
%7 = load i8**, i8*** %2
%8 = getelementptr inbounds i8*, i8** %7, i64 2
%9 = load i8*, i8** %8
store i8* %9, i8** %6
%10 = getelementptr inbounds i8*, i8** %6, i64 1
%11 = load i8**, i8*** %2
%12 = getelementptr inbounds i8*, i8** %11, i64 4
%13 = load i8*, i8** %12
store i8* %13, i8** %10
%14 = bitcast [6 x i32]* %4 to i8*
%15 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 0
%16 = getelementptr inbounds [6 x i32], [6 x i32]* %4, i64 0, i64 1
%17 = call i8** @bar(i8** %15, i32* %16)
%18 = icmp ne i8** %17, null
br i1 %18, label %43, label %19
19: ; preds = %0
%20 = getelementptr inbounds [6 x i32], [6 x i32]* %4, i64 0, i64 0
%21 = load i32, i32* %20
%22 = icmp ne i32 %21, 4
br i1 %22, label %43, label %23
23: ; preds = %19
%24 = getelementptr inbounds [6 x i32], [6 x i32]* %4, i64 0, i64 1
%25 = load i32, i32* %24
%26 = icmp ne i32 %25, 3
br i1 %26, label %43, label %27
27: ; preds = %23
%28 = getelementptr inbounds [6 x i32], [6 x i32]* %4, i64 0, i64 2
%29 = load i32, i32* %28
%30 = icmp ne i32 %29, 2
br i1 %30, label %43, label %31
31: ; preds = %27
%32 = getelementptr inbounds [6 x i32], [6 x i32]* %4, i64 0, i64 3
%33 = load i32, i32* %32
%34 = icmp ne i32 %33, 1
br i1 %34, label %43, label %35
35: ; preds = %31
%36 = getelementptr inbounds [6 x i32], [6 x i32]* %4, i64 0, i64 4
%37 = load i32, i32* %36
%38 = icmp ne i32 %37, 11
br i1 %38, label %43, label %39
39: ; preds = %35
%40 = getelementptr inbounds [6 x i32], [6 x i32]* %4, i64 0, i64 5
%41 = load i32, i32* %40
%42 = icmp ne i32 %41, 12
br i1 %42, label %43, label %45
43: ; preds = %39, %35, %31, %27, %23, %19, %0
%44 = call i32 (...) @abort()
unreachable
45: ; preds = %39
ret i32 0
}

LLVM IR (-O2):
@__const.main.s = [6 x i32] [i32 7, i32 8, i32 9, i32 10, i32 11, i32 12]
define i32 @main() {
%1 = alloca [2 x i8*]
%2 = alloca [6 x i32]
%3 = tail call i8** @bar(i8** null, i32* null)
%4 = bitcast [2 x i8*]* %1 to i8*
%5 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
%6 = getelementptr inbounds i8*, i8** %3, i64 2
%7 = load i8*, i8** %6
store i8* %7, i8** %5
%8 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 1
%9 = getelementptr inbounds i8*, i8** %3, i64 4
%10 = load i8*, i8** %9
store i8* %10, i8** %8
%11 = bitcast [6 x i32]* %2 to i8*
%12 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 1
%13 = call i8** @bar(i8** %5, i32* %12)
%14 = icmp ne i8** %13, null
%15 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%16 = load i32, i32* %15
%17 = icmp ne i32 %16, 4
%18 = select i1 %14, i1 true, i1 %17
%19 = load i32, i32* %12
%20 = icmp ne i32 %19, 3
%21 = select i1 %18, i1 true, i1 %20
%22 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 2
%23 = load i32, i32* %22
%24 = icmp ne i32 %23, 2
%25 = select i1 %21, i1 true, i1 %24
%26 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 3
%27 = load i32, i32* %26
%28 = icmp ne i32 %27, 1
%29 = select i1 %25, i1 true, i1 %28
%30 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 4
%31 = load i32, i32* %30
%32 = icmp ne i32 %31, 11
%33 = select i1 %29, i1 true, i1 %32
%34 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 5
%35 = load i32, i32* %34
%36 = icmp ne i32 %35, 12
%37 = select i1 %33, i1 true, i1 %36
br i1 %37, label %38, label %40
38: ; preds = %0
%39 = call i32 (...) @abort()
unreachable
40: ; preds = %0
ret i32 0
}