#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, int, ...);
main() {
  int b[4] = {12, 13, 14, 15};
  int u = 20, v = 30, *x = &u, *y, *z;
  y = &u;
  z = &b[2];
  printf("x is %d, y is %d, z is %d\n", *x, *y, *z);
  printf("u is %d, v is %d\n", u, v);
  printf("b[0] is %d, b[1] is %d, b[2] is %d, b[3] is %d\n", b[0], b[1], b[2],
         b[3]);
  ++*x;
  y = &v;
  --z;
  z[1] = 20;
  printf("x is %d, y is %d, z is %d\n", *x, *y, *z);
  printf("u is %d, v is %d\n", u, v);
  printf("b[0] is %d, b[1] is %d, b[2] is %d, b[3] is %d\n", b[0], b[1], b[2],
         b[3]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x14,-0x14(%rbp)
movl   $0x1e,-0x18(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%esi
mov    -0x28(%rbp),%rax
mov    (%rax),%edx
mov    -0x30(%rbp),%rax
mov    (%rax),%ecx
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%r8d
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
lea    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x30(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movl   $0x14,0x4(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%esi
mov    -0x28(%rbp),%rax
mov    (%rax),%edx
mov    -0x30(%rbp),%rax
mov    (%rax),%ecx
lea    0xe26(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xe2d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%r8d
lea    0xe24(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xee4(%rip),%r14
mov    %r14,%rdi
mov    $0x14,%esi
mov    $0x14,%edx
mov    $0xe,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedf(%rip),%r15
mov    %r15,%rdi
mov    $0x14,%esi
mov    $0x1e,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed6(%rip),%rbx
mov    %rbx,%rdi
mov    $0xc,%esi
mov    $0xd,%edx
mov    $0xe,%ecx
mov    $0xf,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x15,%esi
mov    $0x1e,%edx
mov    $0xd,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r15,%rdi
mov    $0x15,%esi
mov    $0x1e,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xc,%esi
mov    $0xd,%edx
mov    $0x14,%ecx
mov    $0xf,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.b = [4 x i32] [i32 12, i32 13, i32 14, i32 15]
@.str = [27 x i8] c"x is %d, y is %d, z is %d\0A\00"
@.str.1 = [18 x i8] c"u is %d, v is %d\0A\00"
@.str.2 = [48 x i8] c"b[0] is %d, b[1] is %d, b[2] is %d, b[3] is %d\0A\00"
define i32 @main() {
%1 = alloca [4 x i32]
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
%7 = bitcast [4 x i32]* %1 to i8*
store i32 20, i32* %2
store i32 30, i32* %3
store i32* %2, i32** %4
store i32* %2, i32** %5
%8 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 2
store i32* %8, i32** %6
%9 = load i32*, i32** %4
%10 = load i32, i32* %9
%11 = load i32*, i32** %5
%12 = load i32, i32* %11
%13 = load i32*, i32** %6
%14 = load i32, i32* %13
%15 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %12, i32 %14)
%16 = load i32, i32* %2
%17 = load i32, i32* %3
%18 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %16, i32 %17)
%19 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%20 = load i32, i32* %19
%21 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 1
%22 = load i32, i32* %21
%23 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 2
%24 = load i32, i32* %23
%25 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 3
%26 = load i32, i32* %25
%27 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0), i32 %20, i32 %22, i32 %24, i32 %26)
%28 = load i32*, i32** %4
%29 = load i32, i32* %28
%30 = add nsw i32 %29, 1
store i32 %30, i32* %28
store i32* %3, i32** %5
%31 = load i32*, i32** %6
%32 = getelementptr inbounds i32, i32* %31, i32 -1
store i32* %32, i32** %6
%33 = load i32*, i32** %6
%34 = getelementptr inbounds i32, i32* %33, i64 1
store i32 20, i32* %34
%35 = load i32*, i32** %4
%36 = load i32, i32* %35
%37 = load i32*, i32** %5
%38 = load i32, i32* %37
%39 = load i32*, i32** %6
%40 = load i32, i32* %39
%41 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %36, i32 %38, i32 %40)
%42 = load i32, i32* %2
%43 = load i32, i32* %3
%44 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %42, i32 %43)
%45 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%46 = load i32, i32* %45
%47 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 1
%48 = load i32, i32* %47
%49 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 2
%50 = load i32, i32* %49
%51 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 3
%52 = load i32, i32* %51
%53 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0), i32 %46, i32 %48, i32 %50, i32 %52)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"x is %d, y is %d, z is %d\0A\00"
@.str.1 = [18 x i8] c"u is %d, v is %d\0A\00"
@.str.2 = [48 x i8] c"b[0] is %d, b[1] is %d, b[2] is %d, b[3] is %d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 20, i32 20, i32 14)
%2 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 20, i32 30)
%3 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0), i32 12, i32 13, i32 14, i32 15)
%4 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 21, i32 30, i32 13)
%5 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 21, i32 30)
%6 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0), i32 12, i32 13, i32 20, i32 15)
ret i32 0
}