#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 main(void) {
  printf("the orinal number is: %d %d %d\n", 10, 0, -10);
  printf("increment: %d %d %d\n", increment(10), increment(0), increment(-10));
  printf("negate: %d %d %d\n", negate(10), negate(0), negate(-10));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0xa,%esi
xor    %edx,%edx
mov    $0xfffffff6,%ecx
call   1040 <printf@plt>
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    0xe99(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1050 <negate@plt>
mov    %eax,-0xc(%rbp)
xor    %edi,%edi
call   1050 <negate@plt>
mov    %eax,-0x8(%rbp)
mov    $0xfffffff6,%edi
call   1050 <negate@plt>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    %eax,%ecx
lea    0xe79(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xec6(%rip),%rdi
mov    $0xa,%esi
xor    %edx,%edx
mov    $0xfffffff6,%ecx
call   1040 <printf@plt>
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    0xeaf(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %eax,%ecx
call   1040 <printf@plt>
mov    $0xa,%edi
call   1050 <negate@plt>
mov    %eax,%ebx
xor    %edi,%edi
call   1050 <negate@plt>
mov    %eax,%ebp
mov    $0xfffffff6,%edi
call   1050 <negate@plt>
lea    0xe93(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %eax,%ecx
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [32 x i8] c"the orinal number is: %d %d %d\0A\00"
@.str.1 = [21 x i8] c"increment: %d %d %d\0A\00"
@.str.2 = [18 x i8] c"negate: %d %d %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 10, i32 0, i32 -10)
%3 = call i32 @increment(i32 10)
%4 = call i32 @increment(i32 0)
%5 = call i32 @increment(i32 -10)
%6 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %3, i32 %4, i32 %5)
%7 = call i32 @negate(i32 10)
%8 = call i32 @negate(i32 0)
%9 = call i32 @negate(i32 -10)
%10 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"the orinal number is: %d %d %d\0A\00"
@.str.1 = [21 x i8] c"increment: %d %d %d\0A\00"
@.str.2 = [18 x i8] c"negate: %d %d %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 10, i32 0, i32 -10)
%2 = tail call i32 @increment(i32 10)
%3 = tail call i32 @increment(i32 0)
%4 = tail call i32 @increment(i32 -10)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %2, i32 %3, i32 %4)
%6 = tail call i32 @negate(i32 10)
%7 = tail call i32 @negate(i32 0)
%8 = tail call i32 @negate(i32 -10)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %6, i32 %7, i32 %8)
ret i32 0
}