#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 main() {
  int i, *j, k;
  char string[10];
  char l1, *l2, ol1, ol2;
  j = &i;
  j -= 1;
  l2 = &l1;
  for (k = 0; k < 10; k--) {
    j--;
    printf("j(%p)\n", j);
  }
  printf("%p\n", j);
  printf("String: ");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x10(%rbp)
lea    -0x1f(%rbp),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    1178 <main+0x68>
mov    -0x10(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1142 <main+0x32>
mov    -0x10(%rbp),%rsi
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    -0x4(%rsp),%rbx
lea    0xee0(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0xfffffffffffffffc,%rbx
jmp    1120 <main+0x10>

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

LLVM IR (-O2):
@.str = [7 x i8] c"j(%p)\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = getelementptr inbounds i32, i32* %1, i64 -1
br label %4
4: ; preds = %0, %4
%5 = phi i32* [ %3, %0 ], [ %6, %4 ]
%6 = getelementptr inbounds i32, i32* %5, i64 -1
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %6)
br label %4
}