#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 /*<<< orphan*/ rootbeer;

/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
int main() {
  float rootbeer;
  float *pr;
  pr = &rootbeer;
  printf("The adress of the float variable 'rootbeer' is %p", pr);
  printf("\nThe next float in memory will be at ??? %c", 25);
  puts("\n\n\n\n");
  printf("\t\t\t\t\t\t%p", pr + 1);
  printf("\t\t\t\t\t\t\t\t\t********");
  printf("\n\n*Tip: according to the sizeof operator, rootbeer is %d bytes.",
         sizeof(rootbeer));
  printf("\n*The point to remember is that pointer math isnt incremental, "
         "like regular math \;     rather, the pointer is manipulated in "
         "chunks. The size of the chunks    are equal to the variable size.");
  getchar();
  return 768;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xed2(%rip),%rdi
mov    $0x19,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeeb(%rip),%rdi
call   1030 <puts@plt>
mov    -0x10(%rbp),%rsi
add    $0x4,%rsi
lea    0xedc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xedb(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf08(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    $0x300,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee7(%rip),%rdi
mov    $0x19,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf00(%rip),%rdi
call   1030 <puts@plt>
lea    0x8(%rsp),%rsi
lea    0xef4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeef(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef3(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf20(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    $0x300,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"The adress of the float variable 'rootbeer' is %p\00"
@.str.1 = [44 x i8] c"\0AThe next float in memory will be at ??? %c\00"
@.str.2 = [5 x i8] c"\0A\0A\0A\0A\00"
@.str.3 = [9 x i8] c"\09\09\09\09\09\09%p\00"
@.str.4 = [18 x i8] c"\09\09\09\09\09\09\09\09\09********\00"
@.str.5 = [64 x i8] c"\0A\0A*Tip: according to the sizeof operator, rootbeer is %d bytes.\00"
@.str.6 = [193 x i8] c"\0A*The point to remember is that pointer math isn\C2\92t incremental, like regular math ; rather, the pointer is manipulated in chunks. The size of the chunks are equal to the variable size.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float*
store i32 0, i32* %1
store float* %2, float** %3
%4 = load float*, float** %3
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), float* %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), i32 25)
%7 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%8 = load float*, float** %3
%9 = getelementptr inbounds float, float* %8, i64 1
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), float* %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.5, i64 0, i64 0), i64 4)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([193 x i8], [193 x i8]* @.str.6, i64 0, i64 0))
%14 = call i32 (...) @getchar()
ret i32 768
}

LLVM IR (-O2):
@.str = [50 x i8] c"The adress of the float variable 'rootbeer' is %p\00"
@.str.1 = [44 x i8] c"\0AThe next float in memory will be at ??? %c\00"
@.str.2 = [5 x i8] c"\0A\0A\0A\0A\00"
@.str.3 = [9 x i8] c"\09\09\09\09\09\09%p\00"
@.str.4 = [18 x i8] c"\09\09\09\09\09\09\09\09\09********\00"
@.str.5 = [64 x i8] c"\0A\0A*Tip: according to the sizeof operator, rootbeer is %d bytes.\00"
@.str.6 = [193 x i8] c"\0A*The point to remember is that pointer math isn\C2\92t incremental, like regular math ; rather, the pointer is manipulated in chunks. The size of the chunks are equal to the variable size.\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), i32 25)
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%6 = getelementptr inbounds float, float* %1, i64 1
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), float* %6)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.5, i64 0, i64 0), i64 4)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([193 x i8], [193 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 (...) @getchar()
ret i32 768
}