#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*/ boil(int **, int *);
int /*<<< orphan*/ display_status(int *);
int /*<<< orphan*/ fry(int *, int *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  int m = 5;
  int n = -8293;
  int *p;
  int *x;
  p = &m;
  x = &n;
  printf("Initial: ");
  display_status(x);
  fry(x, p);
  printf("After fry(): ");
  display_status(x);
  boil(&x, p);
  printf("After boil(): ");
  display_status(x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x5,-0x14(%rbp)
movl   $0xffffdf9b,-0x18(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    0xe85(%rip),%rdi
call   1040 <printf@plt>
mov    -0x28(%rbp),%rdi
call   1030 <display_status@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1060 <fry@plt>
lea    0xe6d(%rip),%rdi
call   1040 <printf@plt>
mov    -0x28(%rbp),%rdi
call   1030 <display_status@plt>
mov    -0x20(%rbp),%rsi
lea    -0x28(%rbp),%rdi
call   1050 <boil@plt>
lea    0xe59(%rip),%rdi
call   1040 <printf@plt>
mov    -0x28(%rbp),%rdi
call   1030 <display_status@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movl   $0x5,0xc(%rsp)
movl   $0xffffdf9b,0x8(%rsp)
ff
lea    0x8(%rsp),%rbx
mov    %rbx,0x10(%rsp)
lea    0xe98(%rip),%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <display_status@plt>
lea    0xc(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <fry@plt>
lea    0xe7e(%rip),%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <display_status@plt>
lea    0x10(%rsp),%rdi
mov    %r14,%rsi
call   1050 <boil@plt>
lea    0xe6b(%rip),%rdi
call   1040 <printf@plt>
mov    0x10(%rsp),%rdi
call   1030 <display_status@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Initial: \00"
@.str.1 = [14 x i8] c"After fry(): \00"
@.str.2 = [15 x i8] c"After boil(): \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*
%9 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 5, i32* %6
store i32 -8293, i32* %7
store i32* %6, i32** %8
store i32* %7, i32** %9
%10 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%11 = load i32*, i32** %9
%12 = call i32 @display_status(i32* %11)
%13 = load i32*, i32** %9
%14 = load i32*, i32** %8
%15 = call i32 @fry(i32* %13, i32* %14)
%16 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%17 = load i32*, i32** %9
%18 = call i32 @display_status(i32* %17)
%19 = load i32*, i32** %8
%20 = call i32 @boil(i32** %9, i32* %19)
%21 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%22 = load i32*, i32** %9
%23 = call i32 @display_status(i32* %22)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"Initial: \00"
@.str.1 = [14 x i8] c"After fry(): \00"
@.str.2 = [15 x i8] c"After boil(): \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
%6 = bitcast i32* %3 to i8*
store i32 5, i32* %3
%7 = bitcast i32* %4 to i8*
store i32 -8293, i32* %4
%8 = bitcast i32** %5 to i8*
store i32* %4, i32** %5
%9 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @display_status(i32* %4)
%11 = call i32 @fry(i32* %4, i32* %3)
%12 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 @display_status(i32* %4)
%14 = call i32 @boil(i32** %5, i32* %3)
%15 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%16 = load i32*, i32** %5
%17 = call i32 @display_status(i32* %16)
ret i32 0
}