#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 /*<<< orphan*/ display_status(int *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  int primes[6] = {2, 3, 5, 7, 11, 13};
  printf("Initial: ");
  display_status(primes);
  boil(primes);
  printf("After boil(): ");
  display_status(primes);
  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)
mov    0xeb3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeb0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xead(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
lea    -0x30(%rbp),%rdi
call   1030 <display_status@plt>
lea    -0x30(%rbp),%rdi
call   1050 <boil@plt>
lea    0xe96(%rip),%rdi
call   1040 <printf@plt>
lea    -0x30(%rbp),%rdi
call   1030 <display_status@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    0xed4(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xeb8(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <display_status@plt>
mov    %rbx,%rdi
call   1050 <boil@plt>
lea    0xeb0(%rip),%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <display_status@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.primes = [6 x i32] [i32 2, i32 3, i32 5, i32 7, i32 11, i32 13]
@.str = [10 x i8] c"Initial: \00"
@.str.1 = [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 [6 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [6 x i32]* %6 to i8*
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%9 = getelementptr inbounds [6 x i32], [6 x i32]* %6, i64 0, i64 0
%10 = call i32 @display_status(i32* %9)
%11 = getelementptr inbounds [6 x i32], [6 x i32]* %6, i64 0, i64 0
%12 = call i32 @boil(i32* %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%14 = getelementptr inbounds [6 x i32], [6 x i32]* %6, i64 0, i64 0
%15 = call i32 @display_status(i32* %14)
ret i32 0
}

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