#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 good(float *pscore, int *pnum, float *paver, char (*pcourse)[10]) {
  int i, j, k, n;
  printf("      =======Student whose score is good======  \n");
  printf("NO.");
  for (i = 0; i < 5; i++)
    printf("%11s", *(pcourse + i));
  printf("   average\n");
  for (i = 0; i < 4; i++) {
    n = 0;
    for (j = 0; j < 5; j++)
      if (*(pscore + 5 * i + j) > 85.0)
        n++;
    if ((n == 5) || (*(paver + i) > 90.0)) {
      printf("%d", *(pnum + i));
      for (k = 0; k < 5; k++)
        printf("%11.2f", *(pscore + 5 * i + k));
      printf("%11.2f\n", *(paver + i));
    }
  }
}


x86 assembly (clang, -O0):
<good>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf05(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x5,-0x24(%rbp)
jge    1180 <good+0x70>
mov    -0x20(%rbp),%rsi
movslq -0x24(%rbp),%rax
imul   $0xa,%rax,%rax
add    %rax,%rsi
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    114b <good+0x3b>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x4,-0x24(%rbp)
jge    12c8 <good+0x1b8>
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x28(%rbp)
cmpl   $0x5,-0x28(%rbp)
jge    1204 <good+0xf4>
mov    -0x8(%rbp),%rax
imul   $0x5,-0x24(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x28(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe2a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11f1 <good+0xe1>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11f6 <good+0xe6>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11ad <good+0x9d>
cmpl   $0x5,-0x30(%rbp)
je     1231 <good+0x121>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdd9(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12b5 <good+0x1a5>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe14(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x2c(%rbp)
cmpl   $0x5,-0x2c(%rbp)
jge    1296 <good+0x186>
mov    -0x8(%rbp),%rax
imul   $0x5,-0x24(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdd9(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1251 <good+0x141>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdb3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    12ba <good+0x1aa>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1195 <good+0x85>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<good>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rcx,%rbp
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xef5(%rip),%rdi
call   1030 <puts@plt>
lea    0xece(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec4(%rip),%r12
mov    %r12,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xa(%rbp),%rsi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x14(%rbp),%rsi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1e(%rbp),%rsi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x28,%rbp
mov    %r12,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rbx
lea    0xe6d(%rip),%r13
lea    0xe6d(%rip),%rbp
xor    %r12d,%r12d
jmp    1262 <good+0x142>
cs nopw 0x0(%rax,%rax,1)
mov    (%r14,%r12,4),%esi
lea    0xe46(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movss  -0x10(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0xc(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x8(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x4(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  (%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  (%r15,%r12,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x1,%r12
add    $0x14,%rbx
cmp    $0x4,%r12
je     12c7 <good+0x1a7>
movups -0x10(%rbx),%xmm0
movaps 0xd93(%rip),%xmm1
cmpltps %xmm0,%xmm1
movss  (%rbx),%xmm0
xor    %eax,%eax
ucomiss 0xd92(%rip),%xmm0
seta   %al
movmskps %xmm1,%ecx
mov    %ecx,%edx
shr    %dl
and    $0x5,%dl
sub    %dl,%cl
mov    %ecx,%edx
and    $0x33,%dl
shr    $0x2,%cl
and    $0x33,%cl
add    %dl,%cl
mov    %ecx,%edx
shr    $0x4,%dl
add    %cl,%dl
and    $0xf,%dl
movzbl %dl,%ecx
add    %eax,%ecx
cmp    $0x5,%ecx
je     11d0 <good+0xb0>
movss  (%r15,%r12,4),%xmm0
ucomiss 0xd55(%rip),%xmm0
ja     11d0 <good+0xb0>
jmp    1254 <good+0x134>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [50 x i8] c" =======Student whose score is good====== \0A\00"
@.str.1 = [4 x i8] c"NO.\00"
@.str.2 = [5 x i8] c"%11s\00"
@.str.3 = [12 x i8] c" average\0A\00"
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [7 x i8] c"%11.2f\00"
@.str.6 = [8 x i8] c"%11.2f\0A\00"
define void @good(float* %0, i32* %1, float* %2, [10 x i8]* %3) {
%5 = alloca float*
%6 = alloca i32*
%7 = alloca float*
%8 = alloca [10 x i8]*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store float* %0, float** %5
store i32* %1, i32** %6
store float* %2, float** %7
store [10 x i8]* %3, [10 x i8]** %8
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %9
br label %15
15: ; preds = %25, %4
%16 = load i32, i32* %9
%17 = icmp slt i32 %16, 5
br i1 %17, label %18, label %28
18: ; preds = %15
%19 = load [10 x i8]*, [10 x i8]** %8
%20 = load i32, i32* %9
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [10 x i8], [10 x i8]* %19, i64 %21
%23 = getelementptr inbounds [10 x i8], [10 x i8]* %22, i64 0, i64 0
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %23)
br label %25
25: ; preds = %18
%26 = load i32, i32* %9
%27 = add nsw i32 %26, 1
store i32 %27, i32* %9
br label %15
28: ; preds = %15
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %9
br label %30
30: ; preds = %101, %28
%31 = load i32, i32* %9
%32 = icmp slt i32 %31, 4
br i1 %32, label %33, label %104
33: ; preds = %30
store i32 0, i32* %12
store i32 0, i32* %10
br label %34
34: ; preds = %53, %33
%35 = load i32, i32* %10
%36 = icmp slt i32 %35, 5
br i1 %36, label %37, label %56
37: ; preds = %34
%38 = load float*, float** %5
%39 = load i32, i32* %9
%40 = mul nsw i32 5, %39
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds float, float* %38, i64 %41
%43 = load i32, i32* %10
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds float, float* %42, i64 %44
%46 = load float, float* %45
%47 = fpext float %46 to double
%48 = fcmp ogt double %47, 8.500000e+01
br i1 %48, label %49, label %52
49: ; preds = %37
%50 = load i32, i32* %12
%51 = add nsw i32 %50, 1
store i32 %51, i32* %12
br label %52
52: ; preds = %49, %37
br label %53
53: ; preds = %52
%54 = load i32, i32* %10
%55 = add nsw i32 %54, 1
store i32 %55, i32* %10
br label %34
56: ; preds = %34
%57 = load i32, i32* %12
%58 = icmp eq i32 %57, 5
br i1 %58, label %67, label %59
59: ; preds = %56
%60 = load float*, float** %7
%61 = load i32, i32* %9
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds float, float* %60, i64 %62
%64 = load float, float* %63
%65 = fpext float %64 to double
%66 = fcmp ogt double %65, 9.000000e+01
br i1 %66, label %67, label %100
67: ; preds = %59, %56
%68 = load i32*, i32** %6
%69 = load i32, i32* %9
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds i32, i32* %68, i64 %70
%72 = load i32, i32* %71
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %72)
store i32 0, i32* %11
br label %74
74: ; preds = %89, %67
%75 = load i32, i32* %11
%76 = icmp slt i32 %75, 5
br i1 %76, label %77, label %92
77: ; preds = %74
%78 = load float*, float** %5
%79 = load i32, i32* %9
%80 = mul nsw i32 5, %79
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds float, float* %78, i64 %81
%83 = load i32, i32* %11
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds float, float* %82, i64 %84
%86 = load float, float* %85
%87 = fpext float %86 to double
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %87)
br label %89
89: ; preds = %77
%90 = load i32, i32* %11
%91 = add nsw i32 %90, 1
store i32 %91, i32* %11
br label %74
92: ; preds = %74
%93 = load float*, float** %7
%94 = load i32, i32* %9
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds float, float* %93, i64 %95
%97 = load float, float* %96
%98 = fpext float %97 to double
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), double %98)
br label %100
100: ; preds = %92, %59
br label %101
101: ; preds = %100
%102 = load i32, i32* %9
%103 = add nsw i32 %102, 1
store i32 %103, i32* %9
br label %30
104: ; preds = %30
ret void
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"NO.\00"
@.str.2 = [5 x i8] c"%11s\00"
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [7 x i8] c"%11.2f\00"
@.str.6 = [8 x i8] c"%11.2f\0A\00"
@str = [49 x i8] c" =======Student whose score is good====== \00"
@str.7 = [11 x i8] c" average\00"
define void @good(float* nocapture %0, i32* nocapture %1, float* nocapture %2, [10 x i8]* %3) {
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %7)
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 1, i64 0
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %9)
%11 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 2, i64 0
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %11)
%13 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 3, i64 0
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %13)
%15 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 4, i64 0
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %15)
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.7, i64 0, i64 0))
br label %18
18: ; preds = %4, %64
%19 = phi i64 [ 0, %4 ], [ %65, %64 ]
%20 = mul nuw nsw i64 %19, 5
%21 = getelementptr inbounds float, float* %0, i64 %20
%22 = getelementptr inbounds float, float* %21, i64 1
%23 = getelementptr inbounds float, float* %21, i64 2
%24 = getelementptr inbounds float, float* %21, i64 3
%25 = bitcast float* %21 to <4 x float>*
%26 = load <4 x float>, <4 x float>* %25
%27 = fcmp ogt <4 x float> %26, <float 8.500000e+01, float 8.500000e+01, float 8.500000e+01, float 8.500000e+01>
%28 = getelementptr inbounds float, float* %21, i64 4
%29 = load float, float* %28
%30 = fcmp ogt float %29, 8.500000e+01
%31 = zext i1 %30 to i32
%32 = bitcast <4 x i1> %27 to i4
%33 = call i4 @llvm.ctpop.i4(i4 %32)
%34 = zext i4 %33 to i32
%35 = add nuw nsw i32 %34, %31
%36 = icmp eq i32 %35, 5
br i1 %36, label %41, label %37
37: ; preds = %18
%38 = getelementptr inbounds float, float* %2, i64 %19
%39 = load float, float* %38
%40 = fcmp ogt float %39, 9.000000e+01
br i1 %40, label %41, label %64
41: ; preds = %37, %18
%42 = getelementptr inbounds i32, i32* %1, i64 %19
%43 = load i32, i32* %42
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %43)
%45 = load float, float* %21
%46 = fpext float %45 to double
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %46)
%48 = load float, float* %22
%49 = fpext float %48 to double
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %49)
%51 = load float, float* %23
%52 = fpext float %51 to double
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %52)
%54 = load float, float* %24
%55 = fpext float %54 to double
%56 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %55)
%57 = load float, float* %28
%58 = fpext float %57 to double
%59 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %58)
%60 = getelementptr inbounds float, float* %2, i64 %19
%61 = load float, float* %60
%62 = fpext float %61 to double
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), double %62)
br label %64
64: ; preds = %37, %41
%65 = add nuw nsw i64 %19, 1
%66 = icmp eq i64 %65, 4
br i1 %66, label %67, label %18
67: ; preds = %64
ret void
}