#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*/ printf(char *, int);
void main() {
  static int a[5] = {1, 3, 5, 7, 9};
  int *num[5] = {&a[0], &a[1], &a[2], &a[3], &a[4]};
  int **p, i;
  p = num;
  for (i = 0; i < 5; i++) {
    printf("%d    ", **p);
    p++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
lea    0x2f01(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0x2ef6(%rip),%rax
add    $0x4,%rax
mov    %rax,-0x28(%rbp)
lea    0x2ee7(%rip),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
lea    0x2ed8(%rip),%rax
add    $0xc,%rax
mov    %rax,-0x18(%rbp)
lea    0x2ec9(%rip),%rax
add    $0x10,%rax
mov    %rax,-0x10(%rbp)
lea    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0x5,-0x3c(%rbp)
jge    11c7 <main+0xa7>
mov    -0x38(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%esi
lea    0xe58(%rip),%rdi
call   1030 <printf@plt>
mov    -0x38(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x38(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    118e <main+0x6e>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@main.a = internal global [5 x i32] [i32 1, i32 3, i32 5, i32 7, i32 9]
@.str = [7 x i8] c"%d \00"
define void @main() {
%1 = alloca [5 x i32*]
%2 = alloca i32**
%3 = alloca i32
%4 = bitcast [5 x i32*]* %1 to i8*
%5 = bitcast i8* %4 to [5 x i32*]*
%6 = getelementptr inbounds [5 x i32*], [5 x i32*]* %5, i32 0, i32 0
store i32* getelementptr inbounds ([5 x i32], [5 x i32]* @main.a, i32 0, i32 0), i32** %6
%7 = getelementptr inbounds [5 x i32*], [5 x i32*]* %5, i32 0, i32 1
store i32* bitcast (i8* getelementptr (i8, i8* bitcast ([5 x i32]* @main.a to i8*), i64 4) to i32*), i32** %7
%8 = getelementptr inbounds [5 x i32*], [5 x i32*]* %5, i32 0, i32 2
store i32* bitcast (i8* getelementptr (i8, i8* bitcast ([5 x i32]* @main.a to i8*), i64 8) to i32*), i32** %8
%9 = getelementptr inbounds [5 x i32*], [5 x i32*]* %5, i32 0, i32 3
store i32* bitcast (i8* getelementptr (i8, i8* bitcast ([5 x i32]* @main.a to i8*), i64 12) to i32*), i32** %9
%10 = getelementptr inbounds [5 x i32*], [5 x i32*]* %5, i32 0, i32 4
store i32* bitcast (i8* getelementptr (i8, i8* bitcast ([5 x i32]* @main.a to i8*), i64 16) to i32*), i32** %10
%11 = getelementptr inbounds [5 x i32*], [5 x i32*]* %1, i64 0, i64 0
store i32** %11, i32*** %2
store i32 0, i32* %3
br label %12
12: ; preds = %22, %0
%13 = load i32, i32* %3
%14 = icmp slt i32 %13, 5
br i1 %14, label %15, label %25
15: ; preds = %12
%16 = load i32**, i32*** %2
%17 = load i32*, i32** %16
%18 = load i32, i32* %17
%19 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = load i32**, i32*** %2
%21 = getelementptr inbounds i32*, i32** %20, i32 1
store i32** %21, i32*** %2
br label %22
22: ; preds = %15
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
br label %12
25: ; preds = %12
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d \00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 3)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 5)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 7)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 9)
ret void
}