#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 EXIT_SUCCESS;
int /*<<< orphan*/ constant_pointers_to_constants();
int /*<<< orphan*/ constant_pointers_to_variables();
int /*<<< orphan*/ pointers_to_constants();
int /*<<< orphan*/ pointers_to_variables();
int /*<<< orphan*/ printf(char *);
int main(int argc, char const *argv[]) {
  printf("================================\n");
  printf("POINTERS #1\n");
  printf("================================\n");
  pointers_to_variables();
  pointers_to_constants();
  constant_pointers_to_variables();
  constant_pointers_to_constants();
  printf("\n");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe93(%rip),%rdi
call   1040 <printf@plt>
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
lea    0xe7b(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <pointers_to_variables@plt>
mov    $0x0,%al
call   1030 <pointers_to_constants@plt>
mov    $0x0,%al
call   1050 <constant_pointers_to_variables@plt>
mov    $0x0,%al
call   1070 <constant_pointers_to_constants@plt>
lea    0xe80(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e27(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xea4(%rip),%rbx
mov    %rbx,%rdi
call   1050 <puts@plt>
lea    0xe89(%rip),%rdi
call   1050 <puts@plt>
mov    %rbx,%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1070 <pointers_to_variables@plt>
xor    %eax,%eax
call   1040 <pointers_to_constants@plt>
xor    %eax,%eax
call   1060 <constant_pointers_to_variables@plt>
xor    %eax,%eax
call   1080 <constant_pointers_to_constants@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2e2f(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"================================\0A\00"
@.str.1 = [13 x i8] c"POINTERS\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (...) @pointers_to_variables()
%10 = call i32 (...) @pointers_to_constants()
%11 = call i32 (...) @constant_pointers_to_variables()
%12 = call i32 (...) @constant_pointers_to_constants()
%13 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%14 = load i32, i32* @EXIT_SUCCESS
ret i32 %14
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str.3 = [12 x i8] c"POINTERS\00"
@str.4 = [33 x i8] c"================================\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.3, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.4, i64 0, i64 0))
%6 = tail call i32 (...) @pointers_to_variables()
%7 = tail call i32 (...) @pointers_to_constants()
%8 = tail call i32 (...) @constant_pointers_to_variables()
%9 = tail call i32 (...) @constant_pointers_to_constants()
%10 = tail call i32 @putchar(i32 10)
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}