#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);
void *fun1(void *argv[]) {
  *((int *)argv[0]) = *((int *)argv[0]) + 1;
  *((int *)argv[1]) = *((int *)argv[1]) + 1;
  *((int *)argv[2]) = *((int *)argv[2]) + 1;
  printf("in the fun 1 a = %d\n", *((int *)argv[0]));
  printf("in the fun 1 b = %d\n", *((int *)argv[1]));
  printf("in the fun 1 c = %d\n", *((int *)argv[2]));
  return NULL;
}


x86 assembly (clang, -O0):
<fun1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%esi
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%esi
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rax
mov    (%rax),%esi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun1>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rax
addl   $0x1,(%rax)
mov    0x8(%rdi),%rcx
addl   $0x1,(%rcx)
mov    0x10(%rdi),%rcx
addl   $0x1,(%rcx)
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
mov    0x8(%rbx),%rax
mov    (%rax),%esi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
mov    0x10(%rbx),%rax
mov    (%rax),%esi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"in the fun 1 a = %d\0A\00"
@.str.1 = [21 x i8] c"in the fun 1 b = %d\0A\00"
@.str.2 = [21 x i8] c"in the fun 1 c = %d\0A\00"
define i8* @fun1(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 0
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = add nsw i32 %7, 1
%9 = load i8**, i8*** %2
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = bitcast i8* %11 to i32*
store i32 %8, i32* %12
%13 = load i8**, i8*** %2
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = bitcast i8* %15 to i32*
%17 = load i32, i32* %16
%18 = add nsw i32 %17, 1
%19 = load i8**, i8*** %2
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = load i8*, i8** %20
%22 = bitcast i8* %21 to i32*
store i32 %18, i32* %22
%23 = load i8**, i8*** %2
%24 = getelementptr inbounds i8*, i8** %23, i64 2
%25 = load i8*, i8** %24
%26 = bitcast i8* %25 to i32*
%27 = load i32, i32* %26
%28 = add nsw i32 %27, 1
%29 = load i8**, i8*** %2
%30 = getelementptr inbounds i8*, i8** %29, i64 2
%31 = load i8*, i8** %30
%32 = bitcast i8* %31 to i32*
store i32 %28, i32* %32
%33 = load i8**, i8*** %2
%34 = getelementptr inbounds i8*, i8** %33, i64 0
%35 = load i8*, i8** %34
%36 = bitcast i8* %35 to i32*
%37 = load i32, i32* %36
%38 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %37)
%39 = load i8**, i8*** %2
%40 = getelementptr inbounds i8*, i8** %39, i64 1
%41 = load i8*, i8** %40
%42 = bitcast i8* %41 to i32*
%43 = load i32, i32* %42
%44 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %43)
%45 = load i8**, i8*** %2
%46 = getelementptr inbounds i8*, i8** %45, i64 2
%47 = load i8*, i8** %46
%48 = bitcast i8* %47 to i32*
%49 = load i32, i32* %48
%50 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %49)
ret i8* null
}

LLVM IR (-O2):
@.str = [21 x i8] c"in the fun 1 a = %d\0A\00"
@.str.1 = [21 x i8] c"in the fun 1 b = %d\0A\00"
@.str.2 = [21 x i8] c"in the fun 1 c = %d\0A\00"
define noalias i8* @fun1(i8** nocapture %0) {
%2 = bitcast i8** %0 to i32**
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = add nsw i32 %4, 1
store i32 %5, i32* %3
%6 = getelementptr inbounds i8*, i8** %0, i64 1
%7 = bitcast i8** %6 to i32**
%8 = load i32*, i32** %7
%9 = load i32, i32* %8
%10 = add nsw i32 %9, 1
store i32 %10, i32* %8
%11 = getelementptr inbounds i8*, i8** %0, i64 2
%12 = bitcast i8** %11 to i32**
%13 = load i32*, i32** %12
%14 = load i32, i32* %13
%15 = add nsw i32 %14, 1
store i32 %15, i32* %13
%16 = load i32, i32* %3
%17 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %16)
%18 = load i32*, i32** %7
%19 = load i32, i32* %18
%20 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %19)
%21 = load i32*, i32** %12
%22 = load i32, i32* %21
%23 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %22)
ret i8* null
}