#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*/ pointer(int *);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  int i = 4, j = i / 2, d = 19;
  int *pm = &d;
  i--, j--;
  printf("%d %d", i, j);
  i++;
  j++;
  printf("\n%d %d", i, j);
  printf("\n");
  printf("pm=%d\n", *pm);
  pointer(pm);
  printf("pm=%d ", *pm);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
movl   $0x13,-0x1c(%rbp)
lea    -0x1c(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%esi
lea    0xe4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rdi
call   1040 <pointer@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%esi
lea    0xe37(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x13,0x4(%rsp)
lea    0xec1(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea8(%rip),%rdi
mov    $0x4,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe8d(%rip),%rdi
mov    $0x13,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x4(%rsp),%rdi
call   1050 <pointer@plt>
mov    0x4(%rsp),%esi
lea    0xe73(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [7 x i8] c"\0A%d %d\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [7 x i8] c"pm=%d\0A\00"
@.str.4 = [7 x i8] c"pm=%d \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i32 4, i32* %5
%9 = load i32, i32* %5
%10 = sdiv i32 %9, 2
store i32 %10, i32* %6
store i32 19, i32* %7
store i32* %7, i32** %8
%11 = load i32, i32* %5
%12 = add nsw i32 %11, -1
store i32 %12, i32* %5
%13 = load i32, i32* %6
%14 = add nsw i32 %13, -1
store i32 %14, i32* %6
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %16)
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %6
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %22, i32 %23)
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%26 = load i32*, i32** %8
%27 = load i32, i32* %26
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %27)
%29 = load i32*, i32** %8
%30 = call i32 @pointer(i32* %29)
%31 = load i32*, i32** %8
%32 = load i32, i32* %31
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %32)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [7 x i8] c"\0A%d %d\00"
@.str.3 = [7 x i8] c"pm=%d\0A\00"
@.str.4 = [7 x i8] c"pm=%d \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 19, i32* %3
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 3, i32 1)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 4, i32 2)
%7 = tail call i32 @putchar(i32 10)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 19)
%9 = call i32 @pointer(i32* %3)
%10 = load i32, i32* %3
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %10)
ret i32 0
}