#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 */
struct SLL {
  int dummy;
};

/* Variables and functions */
struct SLL *SLL_create(int, int **);
int /*<<< orphan*/ SLL_destroy(struct SLL *);
int main() {
  int A0[] = {1, 2, 3};
  int A1[] = {4, 5};
  int A2[] = {6, 7, 8};
  int *A[3] = {A0, A1, A2};
  struct SLL *sll = SLL_create(3, A);
  SLL_destroy(sll);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x24(%rbp)
mov    0xeb5(%rip),%eax
mov    %eax,-0x1c(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
lea    -0x18(%rbp),%rax
mov    %rax,-0x38(%rbp)
lea    -0x24(%rbp),%rax
mov    %rax,-0x30(%rbp)
lea    -0x40(%rbp),%rsi
mov    $0x3,%edi
call   1040 <SLL_create@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rdi
call   1030 <SLL_destroy@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
mov    0xede(%rip),%eax
mov    %eax,0x28(%rsp)
mov    0xecb(%rip),%rax
mov    %rax,0x20(%rsp)
movabs $0x500000004,%rax
mov    %rax,0x18(%rsp)
mov    0xec5(%rip),%eax
mov    %eax,0x10(%rsp)
mov    0xeb2(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0x20(%rsp),%rax
mov    %rax,0x30(%rsp)
lea    0x18(%rsp),%rax
mov    %rax,0x38(%rsp)
lea    0x8(%rsp),%rax
mov    %rax,0x40(%rsp)
lea    0x30(%rsp),%rsi
mov    $0x3,%edi
call   1040 <SLL_create@plt>
mov    %rax,%rdi
call   1030 <SLL_destroy@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
%struct.SLL = type { i32 }
@__const.main.A0 = [3 x i32] [i32 1, i32 2, i32 3]
@__const.main.A1 = [2 x i32] [i32 4, i32 5]
@__const.main.A2 = [3 x i32] [i32 6, i32 7, i32 8]
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
%3 = alloca [2 x i32]
%4 = alloca [3 x i32]
%5 = alloca [3 x i32*]
%6 = alloca %struct.SLL*
store i32 0, i32* %1
%7 = bitcast [3 x i32]* %2 to i8*
%8 = bitcast [2 x i32]* %3 to i8*
%9 = bitcast [3 x i32]* %4 to i8*
%10 = getelementptr inbounds [3 x i32*], [3 x i32*]* %5, i64 0, i64 0
%11 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
store i32* %11, i32** %10
%12 = getelementptr inbounds i32*, i32** %10, i64 1
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
store i32* %13, i32** %12
%14 = getelementptr inbounds i32*, i32** %12, i64 1
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 0
store i32* %15, i32** %14
%16 = getelementptr inbounds [3 x i32*], [3 x i32*]* %5, i64 0, i64 0
%17 = call %struct.SLL* @SLL_create(i32 3, i32** %16)
store %struct.SLL* %17, %struct.SLL** %6
%18 = load %struct.SLL*, %struct.SLL** %6
%19 = call i32 @SLL_destroy(%struct.SLL* %18)
ret i32 0
}

LLVM IR (-O2):
%struct.SLL = type { i32 }
@__const.main.A0 = [3 x i32] [i32 1, i32 2, i32 3]
@__const.main.A2 = [3 x i32] [i32 6, i32 7, i32 8]
define i32 @main() {
%1 = alloca [3 x i32]
%2 = alloca i64
%3 = alloca [3 x i32]
%4 = alloca [3 x i32*]
%5 = bitcast [3 x i32]* %1 to i8*
%6 = bitcast i64* %2 to i8*
store i64 21474836484, i64* %2
%7 = bitcast [3 x i32]* %3 to i8*
%8 = bitcast [3 x i32*]* %4 to i8*
%9 = getelementptr inbounds [3 x i32*], [3 x i32*]* %4, i64 0, i64 0
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
store i32* %10, i32** %9
%11 = getelementptr inbounds [3 x i32*], [3 x i32*]* %4, i64 0, i64 1
%12 = bitcast i32** %11 to i64**
store i64* %2, i64** %12
%13 = getelementptr inbounds [3 x i32*], [3 x i32*]* %4, i64 0, i64 2
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32* %14, i32** %13
%15 = call %struct.SLL* @SLL_create(i32 3, i32** %9)
%16 = call i32 @SLL_destroy(%struct.SLL* %15)
ret i32 0
}