#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 /*<<< orphan*/ scanf(char *, ...);
int main() {
  int i, j, studenti;
  double postotak, tablica[20][4] = {{0}}, prolaznost[4] = {}, pomocna[4] = {};
  for (i = 0; i < 20; i++) {
    scanf("%d", &studenti);
    if (studenti < 2 || studenti > 10) {
      printf("Pogresan unos broja. Unesite ponovno broj studenata:\n");
      continue;
    } else {
      break;
    }
  }
  for (i = 0; i < studenti; i++) {
    for (j = 0; j < 4; j++) {
      scanf("%lf", &postotak);
      tablica[i][j] = postotak;
    }
  }
  for (i = 0; i < studenti; i++) {
    for (j = 0; j < 4; j++) {
      if (tablica[i][j] >= 50 && tablica[i][j] <= 100) {
        prolaznost[j]++;
      }
    }
  }
  for (i = 0; i < 4; i++) {
    pomocna[i] = (100.00 / studenti) * prolaznost[i];
  }
  printf("Prolaznost:\n");
  for (i = 0; i < studenti; i++) {
    for (j = 0; j < 4; j++) {
      if (j <= 2) {
        printf("%.0lf\t", tablica[i][j]);
      } else {
        printf("%.0lf", tablica[i][j]);
      }
    }
    printf("\n");
  }
  for (i = 0; i < 4; i++) {
    if (i <= 2) {
      printf("%.0lf\t", pomocna[i]);
    } else {
      printf("%.0lf", pomocna[i]);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2e0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x2a0(%rbp),%rdi
xor    %esi,%esi
mov    $0x280,%edx
call   1040 <memset@plt>
lea    -0x2c0(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    -0x2e0(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jge    11d8 <main+0xa8>
lea    0xe85(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
cmpl   $0x2,-0x10(%rbp)
jl     11b2 <main+0x82>
cmpl   $0xa,-0x10(%rbp)
jle    11c5 <main+0x95>
lea    0xe62(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11ca <main+0x9a>
jmp    11d8 <main+0xa8>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1182 <main+0x52>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    124f <main+0x11f>
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    123c <main+0x10c>
lea    0xe4e(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movsd  -0x18(%rbp),%xmm0
movslq -0x8(%rbp),%rcx
lea    -0x2a0(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11f2 <main+0xc2>
jmp    1241 <main+0x111>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11df <main+0xaf>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    130d <main+0x1dd>
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    12fa <main+0x1ca>
movslq -0x8(%rbp),%rcx
lea    -0x2a0(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xd72(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     12e7 <main+0x1b7>
movslq -0x8(%rbp),%rcx
lea    -0x2a0(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
movsd  0xd42(%rip),%xmm0
ucomisd (%rax,%rcx,8),%xmm0
jb     12e7 <main+0x1b7>
movslq -0xc(%rbp),%rax
movsd  0xd3b(%rip),%xmm0
addsd  -0x2c0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x2c0(%rbp,%rax,8)
ff ff
jmp    12ec <main+0x1bc>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1269 <main+0x139>
jmp    12ff <main+0x1cf>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1256 <main+0x126>
movl   $0x0,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jge    1357 <main+0x227>
cvtsi2sdl -0x10(%rbp),%xmm1
movsd  0xcd5(%rip),%xmm0
divsd  %xmm1,%xmm0
movslq -0x8(%rbp),%rax
mulsd  -0x2c0(%rbp,%rax,8),%xmm0
ff ff
movslq -0x8(%rbp),%rax
movsd  %xmm0,-0x2e0(%rbp,%rax,8)
ff ff
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1314 <main+0x1e4>
lea    0xcf7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1419 <main+0x2e9>
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    13fd <main+0x2cd>
cmpl   $0x2,-0xc(%rbp)
jg     13c1 <main+0x291>
movslq -0x8(%rbp),%rcx
lea    -0x2a0(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xcad(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    13ea <main+0x2ba>
movslq -0x8(%rbp),%rcx
lea    -0x2a0(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xc86(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    13ef <main+0x2bf>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    137f <main+0x24f>
lea    0xc4b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    136c <main+0x23c>
movl   $0x0,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jge    1482 <main+0x352>
cmpl   $0x2,-0x8(%rbp)
jg     1454 <main+0x324>
movslq -0x8(%rbp),%rax
movsd  -0x2e0(%rbp,%rax,8),%xmm0
ff ff
lea    0xc1a(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    146f <main+0x33f>
movslq -0x8(%rbp),%rax
movsd  -0x2e0(%rbp,%rax,8),%xmm0
ff ff
lea    0xc01(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1474 <main+0x344>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1420 <main+0x2f0>
xor    %eax,%eax
add    $0x2e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x2e0,%rsp
lea    0x60(%rsp),%rdi
mov    $0x280,%edx
xor    %esi,%esi
call   1060 <memset@plt>
mov    $0x14,%ebp
lea    0xe9c(%rip),%r14
lea    0x4(%rsp),%rbx
lea    0xeb0(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    0x4(%rsp),%eax
add    $0xfffffff5,%eax
cmp    $0xfffffff6,%eax
ja     11c2 <main+0x72>
mov    %r15,%rdi
call   1040 <puts@plt>
add    $0xffffffff,%ebp
jne    1190 <main+0x40>
mov    0x4(%rsp),%eax
test   %eax,%eax
jle    13c4 <main+0x274>
lea    0x78(%rsp),%rbx
lea    0xe4d(%rip),%r14
lea    0x8(%rsp),%r15
xor    %r12d,%r12d
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,-0x18(%rbx)
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,-0x10(%rbx)
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,-0x8(%rbx)
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rbx)
add    $0x1,%r12
movslq 0x4(%rsp),%rax
add    $0x20,%rbx
cmp    %rax,%r12
jl     11e0 <main+0x90>
test   %eax,%eax
jle    13c4 <main+0x274>
mov    %eax,%ecx
shl    $0x5,%rcx
xorpd  %xmm7,%xmm7
xor    %edx,%edx
movsd  0xd92(%rip),%xmm8
movsd  0xd91(%rip),%xmm9
movsd  0xd90(%rip),%xmm10
xorpd  %xmm11,%xmm11
xorpd  %xmm2,%xmm2
xorpd  %xmm1,%xmm1
nopl   (%rax)
movsd  0x60(%rsp,%rdx,1),%xmm3
movapd %xmm10,%xmm4
cmpnlesd %xmm3,%xmm4
cmpnlesd %xmm9,%xmm3
movapd %xmm3,%xmm5
andpd  %xmm7,%xmm3
movapd %xmm4,%xmm6
andpd  %xmm7,%xmm4
addsd  %xmm8,%xmm7
movsd  0x68(%rsp,%rdx,1),%xmm0
andnpd %xmm7,%xmm5
orpd   %xmm5,%xmm3
andnpd %xmm3,%xmm6
orpd   %xmm6,%xmm4
movapd %xmm4,%xmm7
movapd %xmm10,%xmm3
cmpnlesd %xmm0,%xmm3
cmpnlesd %xmm9,%xmm0
movapd %xmm0,%xmm4
andpd  %xmm11,%xmm0
movapd %xmm3,%xmm5
andpd  %xmm11,%xmm3
movapd %xmm11,%xmm6
addsd  %xmm8,%xmm6
andnpd %xmm6,%xmm4
orpd   %xmm4,%xmm0
andnpd %xmm0,%xmm5
orpd   %xmm5,%xmm3
movapd %xmm3,%xmm11
movsd  0x70(%rsp,%rdx,1),%xmm0
movapd %xmm10,%xmm3
cmpnlesd %xmm0,%xmm3
cmpnlesd %xmm9,%xmm0
movapd %xmm0,%xmm4
andpd  %xmm2,%xmm0
movapd %xmm3,%xmm5
andpd  %xmm2,%xmm3
movapd %xmm2,%xmm6
addsd  %xmm8,%xmm6
andnpd %xmm6,%xmm4
orpd   %xmm4,%xmm0
andnpd %xmm0,%xmm5
orpd   %xmm5,%xmm3
movapd %xmm3,%xmm2
movsd  0x78(%rsp,%rdx,1),%xmm0
movapd %xmm10,%xmm3
cmpnlesd %xmm0,%xmm3
cmpnlesd %xmm9,%xmm0
movapd %xmm0,%xmm4
andpd  %xmm1,%xmm0
movapd %xmm3,%xmm5
andpd  %xmm1,%xmm3
movapd %xmm1,%xmm6
addsd  %xmm8,%xmm6
andnpd %xmm6,%xmm4
orpd   %xmm4,%xmm0
andnpd %xmm0,%xmm5
orpd   %xmm5,%xmm3
movapd %xmm3,%xmm1
add    $0x20,%rdx
cmp    %rdx,%rcx
jne    1290 <main+0x140>
movapd %xmm11,0x10(%rsp)
movapd %xmm2,0x20(%rsp)
movapd %xmm1,0x30(%rsp)
movapd %xmm7,0x40(%rsp)
jmp    13ec <main+0x29c>
xorpd  %xmm0,%xmm0
movapd %xmm0,0x40(%rsp)
xorpd  %xmm0,%xmm0
movapd %xmm0,0x10(%rsp)
xorpd  %xmm0,%xmm0
movapd %xmm0,0x20(%rsp)
xorpd  %xmm0,%xmm0
movapd %xmm0,0x30(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0xc0d(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x58(%rsp)
lea    0xc20(%rip),%rdi
call   1040 <puts@plt>
cmpl   $0x0,0x4(%rsp)
jle    1487 <main+0x337>
lea    0x78(%rsp),%rbx
xor    %r12d,%r12d
lea    0xbf8(%rip),%r15
lea    0xbf8(%rip),%r14
xchg   %ax,%ax
movsd  -0x18(%rbx),%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  -0x10(%rbx),%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  -0x8(%rbx),%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  (%rbx),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r12
movslq 0x4(%rsp),%rax
add    $0x20,%rbx
cmp    %rax,%r12
jl     1430 <main+0x2e0>
movsd  0x58(%rsp),%xmm1
movapd 0x30(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movapd %xmm0,0x30(%rsp)
movapd 0x20(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movapd %xmm0,0x20(%rsp)
movapd 0x10(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movapd %xmm0,0x10(%rsp)
movapd 0x40(%rsp),%xmm0
mulsd  %xmm1,%xmm0
lea    0xb51(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    %rbx,%rdi
movaps 0x10(%rsp),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
mov    %rbx,%rdi
movaps 0x20(%rsp),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xb29(%rip),%rdi
movaps 0x30(%rsp),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x2e0,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [54 x i8] c"Pogresan unos broja. Unesite ponovno broj studenata:\0A\00"
@.str.2 = [4 x i8] c"%lf\00"
@.str.3 = [13 x i8] c"Prolaznost:\0A\00"
@.str.4 = [7 x i8] c"%.0lf\09\00"
@.str.5 = [6 x i8] c"%.0lf\00"
@.str.6 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
%6 = alloca [20 x [4 x double]]
%7 = alloca [4 x double]
%8 = alloca [4 x double]
store i32 0, i32* %1
%9 = bitcast [20 x [4 x double]]* %6 to i8*
%10 = bitcast [4 x double]* %7 to i8*
%11 = bitcast [4 x double]* %8 to i8*
store i32 0, i32* %2
br label %12
12: ; preds = %25, %0
%13 = load i32, i32* %2
%14 = icmp slt i32 %13, 20
br i1 %14, label %15, label %28
15: ; preds = %12
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%17 = load i32, i32* %4
%18 = icmp slt i32 %17, 2
br i1 %18, label %22, label %19
19: ; preds = %15
%20 = load i32, i32* %4
%21 = icmp sgt i32 %20, 10
br i1 %21, label %22, label %24
22: ; preds = %19, %15
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0))
br label %25
24: ; preds = %19
br label %28
25: ; preds = %22
%26 = load i32, i32* %2
%27 = add nsw i32 %26, 1
store i32 %27, i32* %2
br label %12
28: ; preds = %24, %12
store i32 0, i32* %2
br label %29
29: ; preds = %50, %28
%30 = load i32, i32* %2
%31 = load i32, i32* %4
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %53
33: ; preds = %29
store i32 0, i32* %3
br label %34
34: ; preds = %46, %33
%35 = load i32, i32* %3
%36 = icmp slt i32 %35, 4
br i1 %36, label %37, label %49
37: ; preds = %34
%38 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %5)
%39 = load double, double* %5
%40 = load i32, i32* %2
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [20 x [4 x double]], [20 x [4 x double]]* %6, i64 0, i64 %41
%43 = load i32, i32* %3
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [4 x double], [4 x double]* %42, i64 0, i64 %44
store double %39, double* %45
br label %46
46: ; preds = %37
%47 = load i32, i32* %3
%48 = add nsw i32 %47, 1
store i32 %48, i32* %3
br label %34
49: ; preds = %34
br label %50
50: ; preds = %49
%51 = load i32, i32* %2
%52 = add nsw i32 %51, 1
store i32 %52, i32* %2
br label %29
53: ; preds = %29
store i32 0, i32* %2
br label %54
54: ; preds = %91, %53
%55 = load i32, i32* %2
%56 = load i32, i32* %4
%57 = icmp slt i32 %55, %56
br i1 %57, label %58, label %94
58: ; preds = %54
store i32 0, i32* %3
br label %59
59: ; preds = %87, %58
%60 = load i32, i32* %3
%61 = icmp slt i32 %60, 4
br i1 %61, label %62, label %90
62: ; preds = %59
%63 = load i32, i32* %2
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [20 x [4 x double]], [20 x [4 x double]]* %6, i64 0, i64 %64
%66 = load i32, i32* %3
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [4 x double], [4 x double]* %65, i64 0, i64 %67
%69 = load double, double* %68
%70 = fcmp oge double %69, 5.000000e+01
br i1 %70, label %71, label %86
71: ; preds = %62
%72 = load i32, i32* %2
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [20 x [4 x double]], [20 x [4 x double]]* %6, i64 0, i64 %73
%75 = load i32, i32* %3
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [4 x double], [4 x double]* %74, i64 0, i64 %76
%78 = load double, double* %77
%79 = fcmp ole double %78, 1.000000e+02
br i1 %79, label %80, label %86
80: ; preds = %71
%81 = load i32, i32* %3
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 %82
%84 = load double, double* %83
%85 = fadd double %84, 1.000000e+00
store double %85, double* %83
br label %86
86: ; preds = %80, %71, %62
br label %87
87: ; preds = %86
%88 = load i32, i32* %3
%89 = add nsw i32 %88, 1
store i32 %89, i32* %3
br label %59
90: ; preds = %59
br label %91
91: ; preds = %90
%92 = load i32, i32* %2
%93 = add nsw i32 %92, 1
store i32 %93, i32* %2
br label %54
94: ; preds = %54
store i32 0, i32* %2
br label %95
95: ; preds = %110, %94
%96 = load i32, i32* %2
%97 = icmp slt i32 %96, 4
br i1 %97, label %98, label %113
98: ; preds = %95
%99 = load i32, i32* %4
%100 = sitofp i32 %99 to double
%101 = fdiv double 1.000000e+02, %100
%102 = load i32, i32* %2
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 %103
%105 = load double, double* %104
%106 = fmul double %101, %105
%107 = load i32, i32* %2
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 %108
store double %106, double* %109
br label %110
110: ; preds = %98
%111 = load i32, i32* %2
%112 = add nsw i32 %111, 1
store i32 %112, i32* %2
br label %95
113: ; preds = %95
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %2
br label %115
115: ; preds = %150, %113
%116 = load i32, i32* %2
%117 = load i32, i32* %4
%118 = icmp slt i32 %116, %117
br i1 %118, label %119, label %153
119: ; preds = %115
store i32 0, i32* %3
br label %120
120: ; preds = %145, %119
%121 = load i32, i32* %3
%122 = icmp slt i32 %121, 4
br i1 %122, label %123, label %148
123: ; preds = %120
%124 = load i32, i32* %3
%125 = icmp sle i32 %124, 2
br i1 %125, label %126, label %135
126: ; preds = %123
%127 = load i32, i32* %2
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds [20 x [4 x double]], [20 x [4 x double]]* %6, i64 0, i64 %128
%130 = load i32, i32* %3
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds [4 x double], [4 x double]* %129, i64 0, i64 %131
%133 = load double, double* %132
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), double %133)
br label %144
135: ; preds = %123
%136 = load i32, i32* %2
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds [20 x [4 x double]], [20 x [4 x double]]* %6, i64 0, i64 %137
%139 = load i32, i32* %3
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds [4 x double], [4 x double]* %138, i64 0, i64 %140
%142 = load double, double* %141
%143 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), double %142)
br label %144
144: ; preds = %135, %126
br label %145
145: ; preds = %144
%146 = load i32, i32* %3
%147 = add nsw i32 %146, 1
store i32 %147, i32* %3
br label %120
148: ; preds = %120
%149 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %150
150: ; preds = %148
%151 = load i32, i32* %2
%152 = add nsw i32 %151, 1
store i32 %152, i32* %2
br label %115
153: ; preds = %115
store i32 0, i32* %2
br label %154
154: ; preds = %173, %153
%155 = load i32, i32* %2
%156 = icmp slt i32 %155, 4
br i1 %156, label %157, label %176
157: ; preds = %154
%158 = load i32, i32* %2
%159 = icmp sle i32 %158, 2
br i1 %159, label %160, label %166
160: ; preds = %157
%161 = load i32, i32* %2
%162 = sext i32 %161 to i64
%163 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 %162
%164 = load double, double* %163
%165 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), double %164)
br label %172
166: ; preds = %157
%167 = load i32, i32* %2
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 %168
%170 = load double, double* %169
%171 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), double %170)
br label %172
172: ; preds = %166, %160
br label %173
173: ; preds = %172
%174 = load i32, i32* %2
%175 = add nsw i32 %174, 1
store i32 %175, i32* %2
br label %154
176: ; preds = %154
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%lf\00"
@.str.4 = [7 x i8] c"%.0lf\09\00"
@.str.5 = [6 x i8] c"%.0lf\00"
@str = [12 x i8] c"Prolaznost:\00"
@str.7 = [53 x i8] c"Pogresan unos broja. Unesite ponovno broj studenata:\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca [20 x [4 x double]]
%4 = bitcast i32* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast [20 x [4 x double]]* %3 to i8*
br label %7
7: ; preds = %0, %13
%8 = phi i32 [ 0, %0 ], [ %15, %13 ]
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%10 = load i32, i32* %1
%11 = add i32 %10, -11
%12 = icmp ult i32 %11, -9
br i1 %12, label %13, label %20
13: ; preds = %7
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.7, i64 0, i64 0))
%15 = add nuw nsw i32 %8, 1
%16 = icmp eq i32 %15, 20
br i1 %16, label %17, label %7
17: ; preds = %13
%18 = load i32, i32* %1
%19 = icmp sgt i32 %18, 0
br i1 %19, label %20, label %79
20: ; preds = %7, %17
br label %21
21: ; preds = %20, %21
%22 = phi i64 [ %35, %21 ], [ 0, %20 ]
%23 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %2)
%24 = load double, double* %2
%25 = getelementptr inbounds [20 x [4 x double]], [20 x [4 x double]]* %3, i64 0, i64 %22, i64 0
store double %24, double* %25
%26 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %2)
%27 = load double, double* %2
%28 = getelementptr inbounds [20 x [4 x double]], [20 x [4 x double]]* %3, i64 0, i64 %22, i64 1
store double %27, double* %28
%29 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %2)
%30 = load double, double* %2
%31 = getelementptr inbounds [20 x [4 x double]], [20 x [4 x double]]* %3, i64 0, i64 %22, i64 2
store double %30, double* %31
%32 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %2)
%33 = load double, double* %2
%34 = getelementptr inbounds [20 x [4 x double]], [20 x [4 x double]]* %3, i64 0, i64 %22, i64 3
store double %33, double* %34
%35 = add nuw nsw i64 %22, 1
%36 = load i32, i32* %1
%37 = sext i32 %36 to i64
%38 = icmp slt i64 %35, %37
br i1 %38, label %21, label %39
39: ; preds = %21
%40 = icmp sgt i32 %36, 0
br i1 %40, label %41, label %79
41: ; preds = %39
%42 = zext i32 %36 to i64
br label %43
43: ; preds = %41, %43
%44 = phi double [ 0.000000e+00, %41 ], [ %55, %43 ]
%45 = phi double [ 0.000000e+00, %41 ], [ %62, %43 ]
%46 = phi double [ 0.000000e+00, %41 ], [ %69, %43 ]
%47 = phi double [ 0.000000e+00, %41 ], [ %76, %43 ]
%48 = phi i64 [ 0, %41 ], [ %77, %43 ]
%49 = getelementptr inbounds [20 x [4 x double]], [20 x [4 x double]]* %3, i64 0, i64 %48, i64 0
%50 = load double, double* %49
%51 = fcmp ult double %50, 5.000000e+01
%52 = fcmp ugt double %50, 1.000000e+02
%53 = or i1 %51, %52
%54 = fadd double %44, 1.000000e+00
%55 = select i1 %53, double %44, double %54
%56 = getelementptr inbounds [20 x [4 x double]], [20 x [4 x double]]* %3, i64 0, i64 %48, i64 1
%57 = load double, double* %56
%58 = fcmp ult double %57, 5.000000e+01
%59 = fcmp ugt double %57, 1.000000e+02
%60 = or i1 %58, %59
%61 = fadd double %45, 1.000000e+00
%62 = select i1 %60, double %45, double %61
%63 = getelementptr inbounds [20 x [4 x double]], [20 x [4 x double]]* %3, i64 0, i64 %48, i64 2
%64 = load double, double* %63
%65 = fcmp ult double %64, 5.000000e+01
%66 = fcmp ugt double %64, 1.000000e+02
%67 = or i1 %65, %66
%68 = fadd double %46, 1.000000e+00
%69 = select i1 %67, double %46, double %68
%70 = getelementptr inbounds [20 x [4 x double]], [20 x [4 x double]]* %3, i64 0, i64 %48, i64 3
%71 = load double, double* %70
%72 = fcmp ult double %71, 5.000000e+01
%73 = fcmp ugt double %71, 1.000000e+02
%74 = or i1 %72, %73
%75 = fadd double %47, 1.000000e+00
%76 = select i1 %74, double %47, double %75
%77 = add nuw nsw i64 %48, 1
%78 = icmp eq i64 %77, %42
br i1 %78, label %79, label %43
79: ; preds = %43, %17, %39
%80 = phi i32 [ %36, %39 ], [ %18, %17 ], [ %36, %43 ]
%81 = phi double [ 0.000000e+00, %39 ], [ 0.000000e+00, %17 ], [ %55, %43 ]
%82 = phi double [ 0.000000e+00, %39 ], [ 0.000000e+00, %17 ], [ %62, %43 ]
%83 = phi double [ 0.000000e+00, %39 ], [ 0.000000e+00, %17 ], [ %69, %43 ]
%84 = phi double [ 0.000000e+00, %39 ], [ 0.000000e+00, %17 ], [ %76, %43 ]
%85 = sitofp i32 %80 to double
%86 = fdiv double 1.000000e+02, %85
%87 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%88 = load i32, i32* %1
%89 = icmp sgt i32 %88, 0
br i1 %89, label %90, label %109
90: ; preds = %79, %90
%91 = phi i64 [ %105, %90 ], [ 0, %79 ]
%92 = getelementptr inbounds [20 x [4 x double]], [20 x [4 x double]]* %3, i64 0, i64 %91, i64 3
%93 = getelementptr inbounds [20 x [4 x double]], [20 x [4 x double]]* %3, i64 0, i64 %91, i64 0
%94 = load double, double* %93
%95 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), double %94)
%96 = getelementptr inbounds [20 x [4 x double]], [20 x [4 x double]]* %3, i64 0, i64 %91, i64 1
%97 = load double, double* %96
%98 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), double %97)
%99 = getelementptr inbounds [20 x [4 x double]], [20 x [4 x double]]* %3, i64 0, i64 %91, i64 2
%100 = load double, double* %99
%101 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), double %100)
%102 = load double, double* %92
%103 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), double %102)
%104 = call i32 @putchar(i32 10)
%105 = add nuw nsw i64 %91, 1
%106 = load i32, i32* %1
%107 = sext i32 %106 to i64
%108 = icmp slt i64 %105, %107
br i1 %108, label %90, label %109
109: ; preds = %90, %79
%110 = fmul double %86, %84
%111 = fmul double %86, %83
%112 = fmul double %86, %82
%113 = fmul double %86, %81
%114 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), double %113)
%115 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), double %112)
%116 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), double %111)
%117 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), double %110)
ret i32 0
}