#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);
int main() {
  int ints[] = {0, 1, 2, 3};
  int *i1 = ints + 1;
  int *i2 = ints + 2;
  int a = ++*i1 + *i2++;
  int b = *++i1 + *i2--;
  printf("%d#%d\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x28(%rbp)
lea    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rcx
mov    (%rcx),%eax
add    $0x1,%eax
mov    %eax,(%rcx)
mov    -0x30(%rbp),%rcx
mov    %rcx,%rdx
add    $0x4,%rdx
mov    %rdx,-0x30(%rbp)
add    (%rcx),%eax
mov    %eax,-0x34(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x28(%rbp)
mov    0x4(%rax),%eax
mov    -0x30(%rbp),%rcx
mov    %rcx,%rdx
add    $0xfffffffffffffffc,%rdx
mov    %rdx,-0x30(%rbp)
add    (%rcx),%eax
mov    %eax,-0x38(%rbp)
mov    -0x34(%rbp),%esi
mov    -0x38(%rbp),%edx
lea    0xe71(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x4,%esi
mov    $0x5,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d#%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 4, i32 5)
ret i32 0
}