#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 increment(int);
int negate(int);
int /*<<< orphan*/ printf(char *, int, int, int);
int /*<<< orphan*/ system(char *);
int main() {
  printf("Use increment process \"10\" : %d \"0\": %d \"-10\": %d\n\n",
         increment(10), increment(0), increment(-10));
  printf("Use negate    process \"10\" : %d \"0\": %d \"-10\": %d ", negate(10),
         negate(0), negate(-10));
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%edi
call   1030 <increment@plt>
mov    %eax,-0x14(%rbp)
xor    %edi,%edi
call   1030 <increment@plt>
mov    %eax,-0x10(%rbp)
mov    $0xfffffff6,%edi
call   1030 <increment@plt>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    %eax,%ecx
lea    0xe81(%rip),%rdi
call   1050 <printf@plt>
mov    $0xa,%edi
call   1060 <negate@plt>
mov    %eax,-0xc(%rbp)
xor    %edi,%edi
call   1060 <negate@plt>
mov    %eax,-0x8(%rbp)
mov    $0xfffffff6,%edi
call   1060 <negate@plt>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    %eax,%ecx
lea    0xe80(%rip),%rdi
call   1050 <printf@plt>
lea    0xea7(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0xa,%edi
call   1030 <increment@plt>
mov    %eax,%ebx
xor    %edi,%edi
call   1030 <increment@plt>
mov    %eax,%ebp
mov    $0xfffffff6,%edi
call   1030 <increment@plt>
lea    0xe97(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %eax,%ecx
call   1050 <printf@plt>
mov    $0xa,%edi
call   1060 <negate@plt>
mov    %eax,%ebx
xor    %edi,%edi
call   1060 <negate@plt>
mov    %eax,%ebp
mov    $0xfffffff6,%edi
call   1060 <negate@plt>
lea    0xe9a(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %eax,%ecx
call   1050 <printf@plt>
lea    0xebb(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [52 x i8] c"Use increment process \2210\22 : %d \220\22: %d \22-10\22: %d\0A\0A\00"
@.str.1 = [51 x i8] c"Use negate process \2210\22 : %d \220\22: %d \22-10\22: %d \00"
@.str.2 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @increment(i32 10)
%3 = call i32 @increment(i32 0)
%4 = call i32 @increment(i32 -10)
%5 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3, i32 %4)
%6 = call i32 @negate(i32 10)
%7 = call i32 @negate(i32 0)
%8 = call i32 @negate(i32 -10)
%9 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %7, i32 %8)
%10 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [52 x i8] c"Use increment process \2210\22 : %d \220\22: %d \22-10\22: %d\0A\0A\00"
@.str.1 = [51 x i8] c"Use negate process \2210\22 : %d \220\22: %d \22-10\22: %d \00"
@.str.2 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = tail call i32 @increment(i32 10)
%2 = tail call i32 @increment(i32 0)
%3 = tail call i32 @increment(i32 -10)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2, i32 %3)
%5 = tail call i32 @negate(i32 10)
%6 = tail call i32 @negate(i32 0)
%7 = tail call i32 @negate(i32 -10)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %6, i32 %7)
%9 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}