#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 *, float);
float *search(float (*pointer)[4]) {
  int i;
  float *pt;
  pt = *(pointer + 1);
  printf("%f\n", *pt);
  for (i = 0; i < 4; i++) {
    if (*(*pointer + i) < 60)
      pt = *pointer;
  }
  return pt;
}


x86 assembly (clang, -O0):
<search>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    1182 <search+0x72>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movss  0xea3(%rip),%xmm0
ucomiss (%rax,%rcx,4),%xmm0
jbe    116f <search+0x5f>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1174 <search+0x64>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1143 <search+0x33>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<search>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0x10(%rdi),%r14
movss  0x10(%rdi),%xmm0
lea    0xee9(%rip),%rdi
call   1030 <printf@plt>
movups (%rbx),%xmm0
cmpltps 0xec9(%rip),%xmm0
01
movmskps %xmm0,%eax
test   %eax,%eax
cmovne %rbx,%r14
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
define float* @search([4 x float]* %0) {
%2 = alloca [4 x float]*
%3 = alloca i32
%4 = alloca float*
store [4 x float]* %0, [4 x float]** %2
%5 = load [4 x float]*, [4 x float]** %2
%6 = getelementptr inbounds [4 x float], [4 x float]* %5, i64 1
%7 = getelementptr inbounds [4 x float], [4 x float]* %6, i64 0, i64 0
store float* %7, float** %4
%8 = load float*, float** %4
%9 = load float, float* %8
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %9)
store i32 0, i32* %3
br label %11
11: ; preds = %26, %1
%12 = load i32, i32* %3
%13 = icmp slt i32 %12, 4
br i1 %13, label %14, label %29
14: ; preds = %11
%15 = load [4 x float]*, [4 x float]** %2
%16 = getelementptr inbounds [4 x float], [4 x float]* %15, i64 0, i64 0
%17 = load i32, i32* %3
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds float, float* %16, i64 %18
%20 = load float, float* %19
%21 = fcmp olt float %20, 6.000000e+01
br i1 %21, label %22, label %25
22: ; preds = %14
%23 = load [4 x float]*, [4 x float]** %2
%24 = getelementptr inbounds [4 x float], [4 x float]* %23, i64 0, i64 0
store float* %24, float** %4
br label %25
25: ; preds = %22, %14
br label %26
26: ; preds = %25
%27 = load i32, i32* %3
%28 = add nsw i32 %27, 1
store i32 %28, i32* %3
br label %11
29: ; preds = %11
%30 = load float*, float** %4
ret float* %30
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define float* @search([4 x float]* %0) {
%2 = getelementptr inbounds [4 x float], [4 x float]* %0, i64 1, i64 0
%3 = load float, float* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %3)
%5 = getelementptr inbounds [4 x float], [4 x float]* %0, i64 0, i64 0
%6 = bitcast [4 x float]* %0 to <4 x float>*
%7 = load <4 x float>, <4 x float>* %6
%8 = freeze <4 x float> %7
%9 = fcmp olt <4 x float> %8, <float 6.000000e+01, float 6.000000e+01, float 6.000000e+01, float 6.000000e+01>
%10 = bitcast <4 x i1> %9 to i4
%11 = icmp eq i4 %10, 0
%12 = select i1 %11, float* %2, float* %5
ret float* %12
}