#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*/ Print_x(char *, float *, int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdout;
void Snapshot(char *title, int num_vals, float x[], int i, int j, int k,
              float temp) {
  printf("*********************\n");
  printf("%s\n", title);
  printf("num_vals = %d, i = %d, temp = %f\n", num_vals, i, temp);
  printf("j = %d, k = %d\n", j, k);
  Print_x("x = ", x, i);
  printf("*********************\n\n");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<Snapshot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
movss  %xmm0,-0x28(%rbp)
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
mov    -0x1c(%rbp),%edx
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe92(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
lea    0xe9b(%rip),%rdi
call   1040 <Print_x@plt>
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e14(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Snapshot>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
movss  %xmm0,0x4(%rsp)
mov    %r9d,%r15d
mov    %r8d,%r12d
mov    %ecx,%r13d
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe79(%rip),%rdi
mov    %ebp,%esi
mov    %r13d,%edx
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe88(%rip),%rdi
mov    %r12d,%esi
mov    %r15d,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe84(%rip),%rdi
mov    %r14,%rsi
mov    %r13d,%edx
call   1050 <Print_x@plt>
lea    0xe8d(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e14(%rip),%rax
mov    (%rax),%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <fflush@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"*********************\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [34 x i8] c"num_vals = %d, i = %d, temp = %f\0A\00"
@.str.3 = [16 x i8] c"j = %d, k = %d\0A\00"
@.str.4 = [5 x i8] c"x = \00"
@.str.5 = [24 x i8] c"*********************\0A\0A\00"
@stdout = global i32 0
define void @Snapshot(i8* %0, i32 %1, float* %2, i32 %3, i32 %4, i32 %5, float %6) {
%8 = alloca i8*
%9 = alloca i32
%10 = alloca float*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca float
store i8* %0, i8** %8
store i32 %1, i32* %9
store float* %2, float** %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store float %6, float* %14
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%16 = load i8*, i8** %8
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %16)
%18 = load i32, i32* %9
%19 = load i32, i32* %11
%20 = load float, float* %14
%21 = fpext float %20 to double
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %18, i32 %19, double %21)
%23 = load i32, i32* %12
%24 = load i32, i32* %13
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %23, i32 %24)
%26 = load float*, float** %10
%27 = load i32, i32* %11
%28 = call i32 @Print_x(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), float* %26, i32 %27)
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%30 = load i32, i32* @stdout
%31 = call i32 @fflush(i32 %30)
ret void
}

LLVM IR (-O2):
@.str.2 = [34 x i8] c"num_vals = %d, i = %d, temp = %f\0A\00"
@.str.3 = [16 x i8] c"j = %d, k = %d\0A\00"
@.str.4 = [5 x i8] c"x = \00"
@stdout = global i32 0
@str = [22 x i8] c"*********************\00"
@str.6 = [23 x i8] c"*********************\0A\00"
define void @Snapshot(i8* nocapture %0, i32 %1, float* %2, i32 %3, i32 %4, i32 %5, float %6) {
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) %0)
%10 = fpext float %6 to double
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %1, i32 %3, double %10)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %4, i32 %5)
%13 = tail call i32 @Print_x(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), float* %2, i32 %3)
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.6, i64 0, i64 0))
%15 = load i32, i32* @stdout
%16 = tail call i32 @fflush(i32 %15)
ret void
}