#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 get_x(unsigned long volatile);
unsigned int get_int_vect() {
  unsigned int ret = -1;
  if ((*((volatile unsigned long *)((0xF2000000) + 0x00)))) {
    ret = get_x((*((volatile unsigned long *)((0xF2000000) + 0x00))));
  } else if ((*((volatile unsigned long *)((0xF2100000) + 0x00)))) {
    ret = get_x((*((volatile unsigned long *)((0xF2100000) + 0x00)))) + 32;
  } else if ((*((volatile unsigned long *)((0xF2100000) + 0x00)))) {
    ret = get_x((*((volatile unsigned long *)((0xF2200000) + 0x00)))) + 64;
  } else if ((*((volatile unsigned long *)((0xF2100000) + 0x00)))) {
    ret = get_x((*((volatile unsigned long *)((0xF2300000) + 0x00)))) + 96;
  }
  return ret;
}


x86 assembly (clang, -O0):
<get_int_vect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffffff,-0x4(%rbp)
mov    $0xf2000000,%eax
mov    (%rax),%rax
cmp    $0x0,%rax
je     1146 <get_int_vect+0x36>
mov    $0xf2000000,%eax
mov    (%rax),%rdi
call   1030 <get_x@plt>
mov    %eax,-0x4(%rbp)
jmp    11ce <get_int_vect+0xbe>
mov    $0xf2100000,%eax
mov    (%rax),%rax
cmp    $0x0,%rax
je     1170 <get_int_vect+0x60>
mov    $0xf2100000,%eax
mov    (%rax),%rdi
call   1030 <get_x@plt>
add    $0x20,%eax
mov    %eax,-0x4(%rbp)
jmp    11c9 <get_int_vect+0xb9>
mov    $0xf2100000,%eax
mov    (%rax),%rax
cmp    $0x0,%rax
je     119a <get_int_vect+0x8a>
mov    $0xf2200000,%eax
mov    (%rax),%rdi
call   1030 <get_x@plt>
add    $0x40,%eax
mov    %eax,-0x4(%rbp)
jmp    11c4 <get_int_vect+0xb4>
mov    $0xf2100000,%eax
mov    (%rax),%rax
cmp    $0x0,%rax
je     11bf <get_int_vect+0xaf>
mov    $0xf2300000,%eax
mov    (%rax),%rdi
call   1030 <get_x@plt>
add    $0x60,%eax
mov    %eax,-0x4(%rbp)
jmp    11c4 <get_int_vect+0xb4>
jmp    11c9 <get_int_vect+0xb9>
jmp    11ce <get_int_vect+0xbe>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_int_vect>:
push   %rax
mov    $0xf2100000,%eax
cmpq   $0x0,-0x100000(%rax)
je     112d <get_int_vect+0x1d>
mov    -0x100000(%rax),%rdi
pop    %rax
jmp    1030 <get_x@plt>
cmpq   $0x0,(%rax)
mov    (%rax),%rdi
je     1140 <get_int_vect+0x30>
call   1030 <get_x@plt>
add    $0x20,%eax
pop    %rcx
ret
test   %rdi,%rdi
je     1156 <get_int_vect+0x46>
mov    0x100000(%rax),%rdi
call   1030 <get_x@plt>
add    $0x40,%eax
pop    %rcx
ret
cmpq   $0x0,(%rax)
je     116d <get_int_vect+0x5d>
mov    0x200000(%rax),%rdi
call   1030 <get_x@plt>
add    $0x60,%eax
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @get_int_vect() {
%1 = alloca i32
store i32 -1, i32* %1
%2 = load volatile i64, i64* inttoptr (i64 4060086272 to i64*)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = load volatile i64, i64* inttoptr (i64 4060086272 to i64*)
%6 = call i32 @get_x(i64 %5)
store i32 %6, i32* %1
br label %31
7: ; preds = %0
%8 = load volatile i64, i64* inttoptr (i64 4061134848 to i64*)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load volatile i64, i64* inttoptr (i64 4061134848 to i64*)
%12 = call i32 @get_x(i64 %11)
%13 = add nsw i32 %12, 32
store i32 %13, i32* %1
br label %30
14: ; preds = %7
%15 = load volatile i64, i64* inttoptr (i64 4061134848 to i64*)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %21
17: ; preds = %14
%18 = load volatile i64, i64* inttoptr (i64 4062183424 to i64*)
%19 = call i32 @get_x(i64 %18)
%20 = add nsw i32 %19, 64
store i32 %20, i32* %1
br label %29
21: ; preds = %14
%22 = load volatile i64, i64* inttoptr (i64 4061134848 to i64*)
%23 = icmp ne i64 %22, 0
br i1 %23, label %24, label %28
24: ; preds = %21
%25 = load volatile i64, i64* inttoptr (i64 4063232000 to i64*)
%26 = call i32 @get_x(i64 %25)
%27 = add nsw i32 %26, 96
store i32 %27, i32* %1
br label %28
28: ; preds = %24, %21
br label %29
29: ; preds = %28, %17
br label %30
30: ; preds = %29, %10
br label %31
31: ; preds = %30, %4
%32 = load i32, i32* %1
ret i32 %32
}

LLVM IR (-O2):
define i32 @get_int_vect() {
%1 = load volatile i64, i64* inttoptr (i64 4060086272 to i64*)
%2 = icmp eq i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = load volatile i64, i64* inttoptr (i64 4060086272 to i64*)
%5 = tail call i32 @get_x(i64 %4)
br label %26
6: ; preds = %0
%7 = load volatile i64, i64* inttoptr (i64 4061134848 to i64*)
%8 = icmp eq i64 %7, 0
%9 = load volatile i64, i64* inttoptr (i64 4061134848 to i64*)
br i1 %8, label %13, label %10
10: ; preds = %6
%11 = tail call i32 @get_x(i64 %9)
%12 = add nsw i32 %11, 32
br label %26
13: ; preds = %6
%14 = icmp eq i64 %9, 0
br i1 %14, label %19, label %15
15: ; preds = %13
%16 = load volatile i64, i64* inttoptr (i64 4062183424 to i64*)
%17 = tail call i32 @get_x(i64 %16)
%18 = add nsw i32 %17, 64
br label %26
19: ; preds = %13
%20 = load volatile i64, i64* inttoptr (i64 4061134848 to i64*)
%21 = icmp eq i64 %20, 0
br i1 %21, label %26, label %22
22: ; preds = %19
%23 = load volatile i64, i64* inttoptr (i64 4063232000 to i64*)
%24 = tail call i32 @get_x(i64 %23)
%25 = add nsw i32 %24, 96
br label %26
26: ; preds = %10, %19, %22, %15, %3
%27 = phi i32 [ %5, %3 ], [ %12, %10 ], [ %18, %15 ], [ %25, %22 ], [ -1, %19 ]
ret i32 %27
}