#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 q1m() {
  int a[] = {11, 22, 33};
  int *p = a;
  int *q = a + 1;
  int *r = a + 2;
  *p++ = *r--;
  *++q = *r--;
  --*p;
  ++*q;
  --*r;
  printf("\n%s\n", "q1m ------");
  printf("%d %d %d\n", a[0], a[1], a[2]);
  return 1;
}


x86 assembly (clang, -O0):
<q1m>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    0xedf(%rip),%eax
mov    %eax,-0x4(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0xc(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x20(%rbp)
lea    -0xc(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x28(%rbp)
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x18(%rbp)
mov    %ecx,(%rax)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x28(%rbp)
mov    (%rax),%ecx
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x20(%rbp)
mov    %ecx,0x4(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0xffffffff,%ecx
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
add    $0xffffffff,%ecx
mov    %ecx,(%rax)
lea    0xe53(%rip),%rdi
lea    0xe51(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%ecx
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<q1m>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xee6(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
mov    $0x20,%esi
mov    $0x15,%edx
mov    $0x17,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"\0A%s\0A\00"
@.str.1 = [11 x i8] c"q1m ------\00"
@.str.2 = [10 x i8] c"%d %d %d\0A\00"
define i32 @q1m() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 32, i32 21, i32 23)
ret i32 1
}