#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 */
typedef int uint32_t;
typedef int const int32_t;

/* Variables and functions */
int /*<<< orphan*/ __CRAB_assert(int);
int /*<<< orphan*/ __CRAB_assume(int);
int nd();
int32_t compute2(const uint32_t t[6][2]) {
  int i2 = nd();
  __CRAB_assume(i2 >= 0 && i2 < 6);
  __CRAB_assert(t[i2][1] <= 100);
  return t[0][1] + t[1][1] + t[5][1];
}


x86 assembly (clang, -O0):
<compute2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <nd@plt>
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0xd(%rbp)
jl     115f <compute2+0x2f>
cmpl   $0x6,-0xc(%rbp)
setl   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <__CRAB_assume@plt>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpl   $0x64,0x4(%rax,%rcx,8)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__CRAB_assert@plt>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    -0x8(%rbp),%rcx
add    0xc(%rcx),%eax
mov    -0x8(%rbp),%rcx
add    0x2c(%rcx),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute2>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <nd@plt>
mov    %eax,%ebp
xor    %edi,%edi
cmp    $0x6,%eax
setb   %dil
call   1050 <__CRAB_assume@plt>
movslq %ebp,%rax
xor    %edi,%edi
cmpl   $0x65,0x4(%rbx,%rax,8)
setl   %dil
call   1040 <__CRAB_assert@plt>
mov    0xc(%rbx),%eax
add    0x4(%rbx),%eax
add    0x2c(%rbx),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @compute2([2 x i32]* %0) {
%2 = alloca [2 x i32]*
%3 = alloca i32
store [2 x i32]* %0, [2 x i32]** %2
%4 = call i32 (...) @nd()
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 6
br label %10
10: ; preds = %7, %1
%11 = phi i1 [ false, %1 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @__CRAB_assume(i32 %12)
%14 = load [2 x i32]*, [2 x i32]** %2
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [2 x i32], [2 x i32]* %14, i64 %16
%18 = getelementptr inbounds [2 x i32], [2 x i32]* %17, i64 0, i64 1
%19 = load i32, i32* %18
%20 = icmp sle i32 %19, 100
%21 = zext i1 %20 to i32
%22 = call i32 @__CRAB_assert(i32 %21)
%23 = load [2 x i32]*, [2 x i32]** %2
%24 = getelementptr inbounds [2 x i32], [2 x i32]* %23, i64 0
%25 = getelementptr inbounds [2 x i32], [2 x i32]* %24, i64 0, i64 1
%26 = load i32, i32* %25
%27 = load [2 x i32]*, [2 x i32]** %2
%28 = getelementptr inbounds [2 x i32], [2 x i32]* %27, i64 1
%29 = getelementptr inbounds [2 x i32], [2 x i32]* %28, i64 0, i64 1
%30 = load i32, i32* %29
%31 = add nsw i32 %26, %30
%32 = load [2 x i32]*, [2 x i32]** %2
%33 = getelementptr inbounds [2 x i32], [2 x i32]* %32, i64 5
%34 = getelementptr inbounds [2 x i32], [2 x i32]* %33, i64 0, i64 1
%35 = load i32, i32* %34
%36 = add nsw i32 %31, %35
ret i32 %36
}

LLVM IR (-O2):
define i32 @compute2([2 x i32]* nocapture %0) {
%2 = tail call i32 (...) @nd()
%3 = icmp ult i32 %2, 6
%4 = zext i1 %3 to i32
%5 = tail call i32 @__CRAB_assume(i32 %4)
%6 = sext i32 %2 to i64
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %0, i64 %6, i64 1
%8 = load i32, i32* %7
%9 = icmp slt i32 %8, 101
%10 = zext i1 %9 to i32
%11 = tail call i32 @__CRAB_assert(i32 %10)
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %0, i64 0, i64 1
%13 = load i32, i32* %12
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %0, i64 1, i64 1
%15 = load i32, i32* %14
%16 = add nsw i32 %15, %13
%17 = getelementptr inbounds [2 x i32], [2 x i32]* %0, i64 5, i64 1
%18 = load i32, i32* %17
%19 = add nsw i32 %16, %18
ret i32 %19
}