#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 *, ...);
void main() {
  float score[][4] = {{60, 70, 80, 90}, {89, 56, 67, 88}, {34, 78, 90, 66}};
  float *search(float(*pointer)[4]);
  float *p;
  int i, j;
  for (i = 0; i < 3; i++) {
    p = search(score + i);
    if (p == *(score + i)) {
      printf("No.%d scores: ", i);
      for (j = 0; j < 4; j++) {
        printf("%5.2f ", *(p + j));
      }
      printf("\n");
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x30(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x30,%edx
call   1050 <memcpy@plt>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x3,-0x3c(%rbp)
jge    1202 <main+0xd2>
lea    -0x30(%rbp),%rdi
movslq -0x3c(%rbp),%rax
shl    $0x4,%rax
add    %rax,%rdi
call   1040 <search@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
lea    -0x30(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
shl    $0x4,%rdx
add    %rdx,%rcx
cmp    %rcx,%rax
jne    11ef <main+0xbf>
mov    -0x3c(%rbp),%esi
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x40(%rbp)
cmpl   $0x4,-0x40(%rbp)
jge    11e1 <main+0xb1>
mov    -0x38(%rbp),%rax
movslq -0x40(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe73(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    11aa <main+0x7a>
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f4 <main+0xc4>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1154 <main+0x24>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x38,%rsp
movaps 0xee2(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec6(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeaa(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%r14
mov    %r14,%rdi
call   1050 <search@plt>
cmp    %r14,%rax
jne    11d9 <main+0xa9>
mov    %rax,%rbx
lea    0xebc(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movss  (%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb3(%rip),%r14
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x4(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x8(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0xc(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x10(%rsp),%r14
mov    %r14,%rdi
call   1050 <search@plt>
cmp    %r14,%rax
jne    125d <main+0x12d>
mov    %rax,%rbx
lea    0xe3b(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movss  (%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe2f(%rip),%r14
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x4(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x8(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0xc(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x20(%rsp),%r14
mov    %r14,%rdi
call   1050 <search@plt>
cmp    %r14,%rax
jne    12e1 <main+0x1b1>
mov    %rax,%rbx
lea    0xdb7(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movss  (%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdab(%rip),%r14
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x4(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x8(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0xc(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.score = [3 x [4 x float]] [[4 x float] [float 6.000000e+01, float 7.000000e+01, float 8.000000e+01, float 9.000000e+01], [4 x float] [float 8.900000e+01, float 5.600000e+01, float 6.700000e+01, float 8.800000e+01], [4 x float] [float 3.400000e+01, float 7.800000e+01, float 9.000000e+01, float 6.600000e+01]]
@.str = [15 x i8] c"No.%d scores: \00"
@.str.1 = [7 x i8] c"%5.2f \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @main() {
%1 = alloca [3 x [4 x float]]
%2 = alloca float*
%3 = alloca i32
%4 = alloca i32
%5 = bitcast [3 x [4 x float]]* %1 to i8*
store i32 0, i32* %3
br label %6
6: ; preds = %42, %0
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 3
br i1 %8, label %9, label %45
9: ; preds = %6
%10 = getelementptr inbounds [3 x [4 x float]], [3 x [4 x float]]* %1, i64 0, i64 0
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [4 x float], [4 x float]* %10, i64 %12
%14 = call float* @search([4 x float]* %13)
store float* %14, float** %2
%15 = load float*, float** %2
%16 = getelementptr inbounds [3 x [4 x float]], [3 x [4 x float]]* %1, i64 0, i64 0
%17 = load i32, i32* %3
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [4 x float], [4 x float]* %16, i64 %18
%20 = getelementptr inbounds [4 x float], [4 x float]* %19, i64 0, i64 0
%21 = icmp eq float* %15, %20
br i1 %21, label %22, label %41
22: ; preds = %9
%23 = load i32, i32* %3
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %23)
store i32 0, i32* %4
br label %25
25: ; preds = %36, %22
%26 = load i32, i32* %4
%27 = icmp slt i32 %26, 4
br i1 %27, label %28, label %39
28: ; preds = %25
%29 = load float*, float** %2
%30 = load i32, i32* %4
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds float, float* %29, i64 %31
%33 = load float, float* %32
%34 = fpext float %33 to double
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %34)
br label %36
36: ; preds = %28
%37 = load i32, i32* %4
%38 = add nsw i32 %37, 1
store i32 %38, i32* %4
br label %25
39: ; preds = %25
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %41
41: ; preds = %39, %9
br label %42
42: ; preds = %41
%43 = load i32, i32* %3
%44 = add nsw i32 %43, 1
store i32 %44, i32* %3
br label %6
45: ; preds = %6
ret void
}

LLVM IR (-O2):
@__const.main.score = [3 x [4 x float]] [[4 x float] [float 6.000000e+01, float 7.000000e+01, float 8.000000e+01, float 9.000000e+01], [4 x float] [float 8.900000e+01, float 5.600000e+01, float 6.700000e+01, float 8.800000e+01], [4 x float] [float 3.400000e+01, float 7.800000e+01, float 9.000000e+01, float 6.600000e+01]]
@.str = [15 x i8] c"No.%d scores: \00"
@.str.1 = [7 x i8] c"%5.2f \00"
define void @main() {
%1 = alloca [3 x [4 x float]]
%2 = bitcast [3 x [4 x float]]* %1 to i8*
%3 = getelementptr inbounds [3 x [4 x float]], [3 x [4 x float]]* %1, i64 0, i64 0
%4 = call float* @search([4 x float]* %3)
%5 = getelementptr inbounds [3 x [4 x float]], [3 x [4 x float]]* %1, i64 0, i64 0, i64 0
%6 = icmp eq float* %4, %5
br i1 %6, label %7, label %25
7: ; preds = %0
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 0)
%9 = load float, float* %4
%10 = fpext float %9 to double
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %10)
%12 = getelementptr inbounds float, float* %4, i64 1
%13 = load float, float* %12
%14 = fpext float %13 to double
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %14)
%16 = getelementptr inbounds float, float* %4, i64 2
%17 = load float, float* %16
%18 = fpext float %17 to double
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %18)
%20 = getelementptr inbounds float, float* %4, i64 3
%21 = load float, float* %20
%22 = fpext float %21 to double
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %22)
%24 = call i32 @putchar(i32 10)
br label %25
25: ; preds = %0, %7
%26 = getelementptr inbounds [3 x [4 x float]], [3 x [4 x float]]* %1, i64 0, i64 1
%27 = call float* @search([4 x float]* %26)
%28 = getelementptr inbounds [4 x float], [4 x float]* %26, i64 0, i64 0
%29 = icmp eq float* %27, %28
br i1 %29, label %30, label %48
30: ; preds = %25
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 1)
%32 = load float, float* %27
%33 = fpext float %32 to double
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %33)
%35 = getelementptr inbounds float, float* %27, i64 1
%36 = load float, float* %35
%37 = fpext float %36 to double
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %37)
%39 = getelementptr inbounds float, float* %27, i64 2
%40 = load float, float* %39
%41 = fpext float %40 to double
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %41)
%43 = getelementptr inbounds float, float* %27, i64 3
%44 = load float, float* %43
%45 = fpext float %44 to double
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %45)
%47 = call i32 @putchar(i32 10)
br label %48
48: ; preds = %30, %25
%49 = getelementptr inbounds [3 x [4 x float]], [3 x [4 x float]]* %1, i64 0, i64 2
%50 = call float* @search([4 x float]* %49)
%51 = getelementptr inbounds [4 x float], [4 x float]* %49, i64 0, i64 0
%52 = icmp eq float* %50, %51
br i1 %52, label %53, label %71
53: ; preds = %48
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 2)
%55 = load float, float* %50
%56 = fpext float %55 to double
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %56)
%58 = getelementptr inbounds float, float* %50, i64 1
%59 = load float, float* %58
%60 = fpext float %59 to double
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %60)
%62 = getelementptr inbounds float, float* %50, i64 2
%63 = load float, float* %62
%64 = fpext float %63 to double
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %64)
%66 = getelementptr inbounds float, float* %50, i64 3
%67 = load float, float* %66
%68 = fpext float %67 to double
%69 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %68)
%70 = call i32 @putchar(i32 10)
br label %71
71: ; preds = %53, %48
ret void
}