#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);
int main(int argc, char **argv) {
  int number = 50;
  int prefix_num = 0;
  int postfix_num = 0;
  printf("The number value: %d\n", number);
  postfix_num = number++;
  printf("Value after the postfix operation: %d\n", postfix_num);
  printf("Value of number: %d\n", number);
  prefix_num = ++number;
  printf("Value after the prefix operation: %d\n", prefix_num);
  printf("Value of number: %d\n", number);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x32,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x14(%rbp),%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rdi
mov    $0x32,%esi
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
mov    $0x32,%esi
call   1030 <printf@plt>
lea    0xf03(%rip),%rbx
mov    %rbx,%rdi
mov    $0x33,%esi
call   1030 <printf@plt>
lea    0xf04(%rip),%rdi
mov    $0x34,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x34,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"The number value: %d\0A\00"
@.str.1 = [39 x i8] c"Value after the postfix operation: %d\0A\00"
@.str.2 = [21 x i8] c"Value of number: %d\0A\00"
@.str.3 = [38 x i8] c"Value after the prefix operation: %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 50, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
%9 = load i32, i32* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %6
%12 = add nsw i32 %11, 1
store i32 %12, i32* %6
store i32 %11, i32* %8
%13 = load i32, i32* %8
%14 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %6
%16 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %6
%18 = add nsw i32 %17, 1
store i32 %18, i32* %6
store i32 %18, i32* %7
%19 = load i32, i32* %7
%20 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i32 %19)
%21 = load i32, i32* %6
%22 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %21)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"The number value: %d\0A\00"
@.str.1 = [39 x i8] c"Value after the postfix operation: %d\0A\00"
@.str.2 = [21 x i8] c"Value of number: %d\0A\00"
@.str.3 = [38 x i8] c"Value after the prefix operation: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 50)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i32 50)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 51)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i32 52)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 52)
ret i32 0
}