#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*/ test(char *, char *);
void TEST_inc_and_dec(void) {
  test("12", "main(){int i=1; printf(\"%d\", i++);printf(\"%d\", i);}");
  test("22", "main(){int i=1; printf(\"%d\", ++i);printf(\"%d\", i);}");
  test("54", "main(){int i=5; printf(\"%d\", i--);printf(\"%d\", i);}");
  test("44", "main(){int i=5; printf(\"%d\", --i);printf(\"%d\", i);}");
  test("3 5", "main(){int a[2]; a[0]=3; a[1]=5; int *p=a; *p++; printf(\"%d "
              "%d\", a[0], *p);}");
}


x86 assembly (clang, -O0):
<TEST_inc_and_dec>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee1(%rip),%rsi
call   1030 <test@plt>
lea    0xf09(%rip),%rdi
lea    0xf05(%rip),%rsi
call   1030 <test@plt>
lea    0xf2d(%rip),%rdi
lea    0xf29(%rip),%rsi
call   1030 <test@plt>
lea    0xf51(%rip),%rdi
lea    0xf4d(%rip),%rsi
call   1030 <test@plt>
lea    0xf75(%rip),%rdi
lea    0xf72(%rip),%rsi
call   1030 <test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TEST_inc_and_dec>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xee4(%rip),%rsi
call   1030 <test@plt>
lea    0xf0c(%rip),%rdi
lea    0xf08(%rip),%rsi
call   1030 <test@plt>
lea    0xf30(%rip),%rdi
lea    0xf2c(%rip),%rsi
call   1030 <test@plt>
lea    0xf54(%rip),%rdi
lea    0xf50(%rip),%rsi
call   1030 <test@plt>
lea    0xf78(%rip),%rdi
lea    0xf75(%rip),%rsi
pop    %rax
jmp    1030 <test@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"12\00"
@.str.1 = [52 x i8] c"main(){int i=1; printf(\22%d\22, i++);printf(\22%d\22, i);}\00"
@.str.2 = [3 x i8] c"22\00"
@.str.3 = [52 x i8] c"main(){int i=1; printf(\22%d\22, ++i);printf(\22%d\22, i);}\00"
@.str.4 = [3 x i8] c"54\00"
@.str.5 = [52 x i8] c"main(){int i=5; printf(\22%d\22, i--);printf(\22%d\22, i);}\00"
@.str.6 = [3 x i8] c"44\00"
@.str.7 = [52 x i8] c"main(){int i=5; printf(\22%d\22, --i);printf(\22%d\22, i);}\00"
@.str.8 = [4 x i8] c"3 5\00"
@.str.9 = [77 x i8] c"main(){int a[2]; a[0]=3; a[1]=5; int *p=a; *p++; printf(\22%d %d\22, a[0], *p);}\00"
define void @TEST_inc_and_dec() {
%1 = call i32 @test(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0))
%3 = call i32 @test(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.5, i64 0, i64 0))
%4 = call i32 @test(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.7, i64 0, i64 0))
%5 = call i32 @test(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.9, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"12\00"
@.str.1 = [52 x i8] c"main(){int i=1; printf(\22%d\22, i++);printf(\22%d\22, i);}\00"
@.str.2 = [3 x i8] c"22\00"
@.str.3 = [52 x i8] c"main(){int i=1; printf(\22%d\22, ++i);printf(\22%d\22, i);}\00"
@.str.4 = [3 x i8] c"54\00"
@.str.5 = [52 x i8] c"main(){int i=5; printf(\22%d\22, i--);printf(\22%d\22, i);}\00"
@.str.6 = [3 x i8] c"44\00"
@.str.7 = [52 x i8] c"main(){int i=5; printf(\22%d\22, --i);printf(\22%d\22, i);}\00"
@.str.8 = [4 x i8] c"3 5\00"
@.str.9 = [77 x i8] c"main(){int a[2]; a[0]=3; a[1]=5; int *p=a; *p++; printf(\22%d %d\22, a[0], *p);}\00"
define void @TEST_inc_and_dec() {
%1 = tail call i32 @test(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 @test(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.5, i64 0, i64 0))
%4 = tail call i32 @test(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.7, i64 0, i64 0))
%5 = tail call i32 @test(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.9, i64 0, i64 0))
ret void
}