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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x30,%edx
call   1050 <memcpy@plt>
movl   $0x0,-0x4c(%rbp)
cmpl   $0x3,-0x4c(%rbp)
jge    1209 <main+0xd9>
lea    -0x40(%rbp),%rdi
movslq -0x4c(%rbp),%rax
shl    $0x4,%rax
add    %rax,%rdi
call   1040 <search@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
lea    -0x40(%rbp),%rcx
movslq -0x4c(%rbp),%rdx
shl    $0x4,%rdx
add    %rdx,%rcx
cmp    %rcx,%rax
jne    11ed <main+0xbd>
mov    -0x4c(%rbp),%esi
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x50(%rbp)
cmpl   $0x4,-0x50(%rbp)
jge    11e8 <main+0xb8>
mov    -0x48(%rbp),%rax
movslq -0x50(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe6b(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    11b1 <main+0x81>
jmp    11ed <main+0xbd>
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    115b <main+0x2b>
mov    -0x4(%rbp),%eax
add    $0x50,%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    11cf <main+0x9f>
mov    %rax,%rbx
lea    0xebc(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movss  (%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb2(%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    1253 <main+0x123>
mov    %rax,%rbx
lea    0xe3b(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movss  (%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe2e(%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    12d7 <main+0x1a7>
mov    %rax,%rbx
lea    0xdb7(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movss  (%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdaa(%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>
xor    %eax,%eax
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 5.600000e+01, float 8.900000e+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 = [14 x i8] c"No.%d score:\09\00"
@.str.1 = [7 x i8] c"%5.2f\09\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x [4 x float]]
%3 = alloca float*
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = bitcast [3 x [4 x float]]* %2 to i8*
store i32 0, i32* %4
br label %7
7: ; preds = %43, %0
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 3
br i1 %9, label %10, label %46
10: ; preds = %7
%11 = getelementptr inbounds [3 x [4 x float]], [3 x [4 x float]]* %2, i64 0, i64 0
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [4 x float], [4 x float]* %11, i64 %13
%15 = call float* @search([4 x float]* %14)
store float* %15, float** %3
%16 = load float*, float** %3
%17 = getelementptr inbounds [3 x [4 x float]], [3 x [4 x float]]* %2, i64 0, i64 0
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [4 x float], [4 x float]* %17, i64 %19
%21 = getelementptr inbounds [4 x float], [4 x float]* %20, i64 0, i64 0
%22 = icmp eq float* %16, %21
br i1 %22, label %23, label %41
23: ; preds = %10
%24 = load i32, i32* %4
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %24)
store i32 0, i32* %5
br label %26
26: ; preds = %37, %23
%27 = load i32, i32* %5
%28 = icmp slt i32 %27, 4
br i1 %28, label %29, label %40
29: ; preds = %26
%30 = load float*, float** %3
%31 = load i32, i32* %5
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds float, float* %30, i64 %32
%34 = load float, float* %33
%35 = fpext float %34 to double
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %35)
br label %37
37: ; preds = %29
%38 = load i32, i32* %5
%39 = add nsw i32 %38, 1
store i32 %39, i32* %5
br label %26
40: ; preds = %26
br label %41
41: ; preds = %40, %10
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %43
43: ; preds = %41
%44 = load i32, i32* %4
%45 = add nsw i32 %44, 1
store i32 %45, i32* %4
br label %7
46: ; preds = %7
%47 = load i32, i32* %1
ret i32 %47
}

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 5.600000e+01, float 8.900000e+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 = [14 x i8] c"No.%d score:\09\00"
@.str.1 = [7 x i8] c"%5.2f\09\00"
define i32 @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 %24
7: ; preds = %0
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 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)
br label %24
24: ; preds = %7, %0
%25 = call i32 @putchar(i32 10)
%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 %47
30: ; preds = %24
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 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)
br label %47
47: ; preds = %30, %24
%48 = call i32 @putchar(i32 10)
%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 %70
53: ; preds = %47
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 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)
br label %70
70: ; preds = %53, %47
%71 = call i32 @putchar(i32 10)
ret i32 0
}