#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*/ abort();
int /*<<< orphan*/ free(int *);
int *malloc(int);
int /*<<< orphan*/ modify_array_new_syntax(int *);
int /*<<< orphan*/ modify_calculated_address_new_syntax(int *);
int /*<<< orphan*/ modify_char_refs_new_syntax(char *, char *);
int /*<<< orphan*/ modify_char_refs_old_syntax(char *, char *);
int /*<<< orphan*/ modify_int_refs_new_syntax(int *, int *);
int /*<<< orphan*/ modify_int_refs_old_syntax(int *, int *);
int /*<<< orphan*/ modify_uint_refs_new_syntax(unsigned int *, unsigned int *);
int /*<<< orphan*/ modify_uint_refs_old_syntax(unsigned int *, unsigned int *);
int main() {
  int i = -10;
  int j = 10;
  unsigned int k = 10;
  unsigned int l = 20;
  char m = 'a';
  char n = 'z';
  int *int_pointer;
  modify_int_refs_old_syntax(&i, &j);
  modify_int_refs_new_syntax(&i, &j);
  modify_uint_refs_old_syntax(&k, &l);
  modify_uint_refs_new_syntax(&k, &l);
  modify_char_refs_old_syntax(&m, &n);
  modify_char_refs_new_syntax(&m, &n);
  int_pointer = malloc(5 * sizeof(int));
  if (int_pointer == 0)
    abort();
  *(int_pointer + 1) = 5;
  *(int_pointer + 2) = 5;
  modify_calculated_address_new_syntax(int_pointer);
  modify_array_new_syntax(int_pointer);
  free(int_pointer);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xfffffff6,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
movl   $0xa,-0x10(%rbp)
movl   $0x14,-0x14(%rbp)
movb   $0x61,-0x15(%rbp)
movb   $0x7a,-0x16(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   10c0 <modify_int_refs_old_syntax@plt>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1070 <modify_int_refs_new_syntax@plt>
lea    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   10b0 <modify_uint_refs_old_syntax@plt>
lea    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   10a0 <modify_uint_refs_new_syntax@plt>
lea    -0x15(%rbp),%rdi
lea    -0x16(%rbp),%rsi
call   10d0 <modify_char_refs_old_syntax@plt>
lea    -0x15(%rbp),%rdi
lea    -0x16(%rbp),%rsi
call   1080 <modify_char_refs_new_syntax@plt>
mov    $0x14,%edi
call   1090 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1251 <main+0xa1>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x20(%rbp),%rax
movl   $0x5,0x4(%rax)
mov    -0x20(%rbp),%rax
movl   $0x5,0x8(%rax)
mov    -0x20(%rbp),%rdi
call   1050 <modify_calculated_address_new_syntax@plt>
mov    -0x20(%rbp),%rdi
call   1060 <modify_array_new_syntax@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movl   $0xfffffff6,0x14(%rsp)
ff
movl   $0xa,0x10(%rsp)
movl   $0xa,0xc(%rsp)
movl   $0x14,0x8(%rsp)
movb   $0x61,0x7(%rsp)
movb   $0x7a,0x6(%rsp)
lea    0x14(%rsp),%rbx
lea    0x10(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   10c0 <modify_int_refs_old_syntax@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1070 <modify_int_refs_new_syntax@plt>
lea    0xc(%rsp),%rbx
lea    0x8(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   10b0 <modify_uint_refs_old_syntax@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   10a0 <modify_uint_refs_new_syntax@plt>
lea    0x7(%rsp),%rbx
lea    0x6(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   10d0 <modify_char_refs_old_syntax@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1080 <modify_char_refs_new_syntax@plt>
mov    $0x14,%edi
call   1090 <malloc@plt>
test   %rax,%rax
je     1283 <main+0xd3>
mov    %rax,%rbx
movabs $0x500000005,%rax
mov    %rax,0x4(%rbx)
mov    %rbx,%rdi
call   1050 <modify_calculated_address_new_syntax@plt>
mov    %rbx,%rdi
call   1060 <modify_array_new_syntax@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8
%7 = alloca i8
%8 = alloca i32*
store i32 0, i32* %1
store i32 -10, i32* %2
store i32 10, i32* %3
store i32 10, i32* %4
store i32 20, i32* %5
store i8 97, i8* %6
store i8 122, i8* %7
%9 = call i32 @modify_int_refs_old_syntax(i32* %2, i32* %3)
%10 = call i32 @modify_int_refs_new_syntax(i32* %2, i32* %3)
%11 = call i32 @modify_uint_refs_old_syntax(i32* %4, i32* %5)
%12 = call i32 @modify_uint_refs_new_syntax(i32* %4, i32* %5)
%13 = call i32 @modify_char_refs_old_syntax(i8* %6, i8* %7)
%14 = call i32 @modify_char_refs_new_syntax(i8* %6, i8* %7)
%15 = call i32* @malloc(i32 20)
store i32* %15, i32** %8
%16 = load i32*, i32** %8
%17 = icmp eq i32* %16, null
br i1 %17, label %18, label %20
18: ; preds = %0
%19 = call i32 (...) @abort()
unreachable
20: ; preds = %0
%21 = load i32*, i32** %8
%22 = getelementptr inbounds i32, i32* %21, i64 1
store i32 5, i32* %22
%23 = load i32*, i32** %8
%24 = getelementptr inbounds i32, i32* %23, i64 2
store i32 5, i32* %24
%25 = load i32*, i32** %8
%26 = call i32 @modify_calculated_address_new_syntax(i32* %25)
%27 = load i32*, i32** %8
%28 = call i32 @modify_array_new_syntax(i32* %27)
%29 = load i32*, i32** %8
%30 = call i32 @free(i32* %29)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
%6 = alloca i8
%7 = bitcast i32* %1 to i8*
store i32 -10, i32* %1
%8 = bitcast i32* %2 to i8*
store i32 10, i32* %2
%9 = bitcast i32* %3 to i8*
store i32 10, i32* %3
%10 = bitcast i32* %4 to i8*
store i32 20, i32* %4
store i8 97, i8* %5
store i8 122, i8* %6
%11 = call i32 @modify_int_refs_old_syntax(i32* %1, i32* %2)
%12 = call i32 @modify_int_refs_new_syntax(i32* %1, i32* %2)
%13 = call i32 @modify_uint_refs_old_syntax(i32* %3, i32* %4)
%14 = call i32 @modify_uint_refs_new_syntax(i32* %3, i32* %4)
%15 = call i32 @modify_char_refs_old_syntax(i8* %5, i8* %6)
%16 = call i32 @modify_char_refs_new_syntax(i8* %5, i8* %6)
%17 = call i32* @malloc(i32 20)
%18 = icmp eq i32* %17, null
br i1 %18, label %19, label %21
19: ; preds = %0
%20 = call i32 (...) @abort()
unreachable
21: ; preds = %0
%22 = getelementptr inbounds i32, i32* %17, i64 1
store i32 5, i32* %22
%23 = getelementptr inbounds i32, i32* %17, i64 2
store i32 5, i32* %23
%24 = call i32 @modify_calculated_address_new_syntax(i32* %17)
%25 = call i32 @modify_array_new_syntax(i32* %17)
%26 = call i32 @free(i32* %17)
ret i32 0
}