#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stdout;
void psycho_3_dump(int *tonelabel, float *Xtm, int *noiselabel, float *Xnm) {
  int i;
  fprintf(stdout, "3 Ton:");
  for (i = 1; i < 512; i++) {
    if (tonelabel[i] == 20)
      fprintf(stdout, "[%i] %3.0f ", i, Xtm[i]);
  }
  fprintf(stdout, "\n");
  fprintf(stdout, "3 Nos:");
  for (i = 1; i < 512; i++) {
    if (noiselabel[i] == 10)
      fprintf(stdout, "[%i] %3.0f ", i, Xnm[i]);
  }
  fprintf(stdout, "\n");
}


x86 assembly (clang, -O0):
<psycho_3_dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
lea    0xec8(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x1,-0x24(%rbp)
cmpl   $0x200,-0x24(%rbp)
jge    11a3 <psycho_3_dump+0x93>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
cmpl   $0x14,(%rax,%rcx,4)
jne    1190 <psycho_3_dump+0x80>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
mov    -0x24(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe7e(%rip),%rsi
mov    $0x1,%al
call   1030 <fprintf@plt>
jmp    1195 <psycho_3_dump+0x85>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1146 <psycho_3_dump+0x36>
mov    0x2e36(%rip),%rax
mov    (%rax),%edi
lea    0xe60(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e1f(%rip),%rax
mov    (%rax),%edi
lea    0xe4b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x1,-0x24(%rbp)
cmpl   $0x200,-0x24(%rbp)
jge    1235 <psycho_3_dump+0x125>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
cmpl   $0xa,(%rax,%rcx,4)
jne    1222 <psycho_3_dump+0x112>
mov    0x2de2(%rip),%rax
mov    (%rax),%edi
mov    -0x24(%rbp),%edx
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdec(%rip),%rsi
mov    $0x1,%al
call   1030 <fprintf@plt>
jmp    1227 <psycho_3_dump+0x117>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11d8 <psycho_3_dump+0xc8>
mov    0x2da4(%rip),%rax
mov    (%rax),%edi
lea    0xdce(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psycho_3_dump>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rcx,(%rsp)
mov    %rdx,%r12
mov    %rsi,%r15
mov    %rdi,%r13
mov    0x2eb1(%rip),%r14
mov    (%r14),%edi
lea    0xec7(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%ebx
lea    0xebb(%rip),%rbp
jmp    115d <psycho_3_dump+0x4d>
xchg   %ax,%ax
add    $0x1,%rbx
cmp    $0x200,%rbx
je     1180 <psycho_3_dump+0x70>
cmpl   $0x14,0x0(%r13,%rbx,4)
jne    1150 <psycho_3_dump+0x40>
mov    (%r14),%edi
movss  (%r15,%rbx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rsi
mov    %ebx,%edx
mov    $0x1,%al
call   1030 <fprintf@plt>
jmp    1150 <psycho_3_dump+0x40>
mov    (%r14),%edi
lea    0xe89(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xe7a(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%ebx
lea    0xe59(%rip),%r15
mov    (%rsp),%rbp
jmp    11cd <psycho_3_dump+0xbd>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%rbx
cmp    $0x200,%rbx
je     11ef <psycho_3_dump+0xdf>
cmpl   $0xa,(%r12,%rbx,4)
jne    11c0 <psycho_3_dump+0xb0>
mov    (%r14),%edi
movss  0x0(%rbp,%rbx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r15,%rsi
mov    %ebx,%edx
mov    $0x1,%al
call   1030 <fprintf@plt>
jmp    11c0 <psycho_3_dump+0xb0>
mov    (%r14),%edi
lea    0xe1a(%rip),%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [7 x i8] c"3 Ton:\00"
@.str.1 = [12 x i8] c"[%i] %3.0f \00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [7 x i8] c"3 Nos:\00"
define void @psycho_3_dump(i32* %0, float* %1, i32* %2, float* %3) {
%5 = alloca i32*
%6 = alloca float*
%7 = alloca i32*
%8 = alloca float*
%9 = alloca i32
store i32* %0, i32** %5
store float* %1, float** %6
store i32* %2, i32** %7
store float* %3, float** %8
%10 = load i32, i32* @stdout
%11 = call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %9
br label %12
12: ; preds = %33, %4
%13 = load i32, i32* %9
%14 = icmp slt i32 %13, 512
br i1 %14, label %15, label %36
15: ; preds = %12
%16 = load i32*, i32** %5
%17 = load i32, i32* %9
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %16, i64 %18
%20 = load i32, i32* %19
%21 = icmp eq i32 %20, 20
br i1 %21, label %22, label %32
22: ; preds = %15
%23 = load i32, i32* @stdout
%24 = load i32, i32* %9
%25 = load float*, float** %6
%26 = load i32, i32* %9
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds float, float* %25, i64 %27
%29 = load float, float* %28
%30 = fpext float %29 to double
%31 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %24, double %30)
br label %32
32: ; preds = %22, %15
br label %33
33: ; preds = %32
%34 = load i32, i32* %9
%35 = add nsw i32 %34, 1
store i32 %35, i32* %9
br label %12
36: ; preds = %12
%37 = load i32, i32* @stdout
%38 = call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%39 = load i32, i32* @stdout
%40 = call i32 (i32, i8*, ...) @fprintf(i32 %39, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %9
br label %41
41: ; preds = %62, %36
%42 = load i32, i32* %9
%43 = icmp slt i32 %42, 512
br i1 %43, label %44, label %65
44: ; preds = %41
%45 = load i32*, i32** %7
%46 = load i32, i32* %9
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds i32, i32* %45, i64 %47
%49 = load i32, i32* %48
%50 = icmp eq i32 %49, 10
br i1 %50, label %51, label %61
51: ; preds = %44
%52 = load i32, i32* @stdout
%53 = load i32, i32* %9
%54 = load float*, float** %8
%55 = load i32, i32* %9
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds float, float* %54, i64 %56
%58 = load float, float* %57
%59 = fpext float %58 to double
%60 = call i32 (i32, i8*, ...) @fprintf(i32 %52, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %53, double %59)
br label %61
61: ; preds = %51, %44
br label %62
62: ; preds = %61
%63 = load i32, i32* %9
%64 = add nsw i32 %63, 1
store i32 %64, i32* %9
br label %41
65: ; preds = %41
%66 = load i32, i32* @stdout
%67 = call i32 (i32, i8*, ...) @fprintf(i32 %66, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [7 x i8] c"3 Ton:\00"
@.str.1 = [12 x i8] c"[%i] %3.0f \00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [7 x i8] c"3 Nos:\00"
define void @psycho_3_dump(i32* nocapture %0, float* nocapture %1, i32* nocapture %2, float* nocapture %3) {
%5 = load i32, i32* @stdout
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %4, %19
%8 = phi i64 [ 1, %4 ], [ %20, %19 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, 20
br i1 %11, label %12, label %19
12: ; preds = %7
%13 = load i32, i32* @stdout
%14 = getelementptr inbounds float, float* %1, i64 %8
%15 = load float, float* %14
%16 = fpext float %15 to double
%17 = trunc i64 %8 to i32
%18 = tail call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %17, double %16)
br label %19
19: ; preds = %7, %12
%20 = add nuw nsw i64 %8, 1
%21 = icmp eq i64 %20, 512
br i1 %21, label %22, label %7
22: ; preds = %19
%23 = load i32, i32* @stdout
%24 = tail call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%25 = load i32, i32* @stdout
%26 = tail call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %27
27: ; preds = %22, %39
%28 = phi i64 [ 1, %22 ], [ %40, %39 ]
%29 = getelementptr inbounds i32, i32* %2, i64 %28
%30 = load i32, i32* %29
%31 = icmp eq i32 %30, 10
br i1 %31, label %32, label %39
32: ; preds = %27
%33 = load i32, i32* @stdout
%34 = getelementptr inbounds float, float* %3, i64 %28
%35 = load float, float* %34
%36 = fpext float %35 to double
%37 = trunc i64 %28 to i32
%38 = tail call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %37, double %36)
br label %39
39: ; preds = %27, %32
%40 = add nuw nsw i64 %28, 1
%41 = icmp eq i64 %40, 512
br i1 %41, label %42, label %27
42: ; preds = %39
%43 = load i32, i32* @stdout
%44 = tail call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}