#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 */
typedef int /*<<< orphan*/ adet;

/* Variables and functions */
scalar_t__ pow(int, scalar_t__);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  float musluk, total, size;
  int i, adet[30];
  printf("Kac tane musluk olacak: ");
  scanf("%f", &size);
  for (i = 0; i < size; i++) {
    printf("%d. musluk kac saatte doldurur: ", i + 1);
    scanf("%d", &adet[i]);
  }
  printf("%lu", sizeof(adet));
  musluk = 0;
  for (i = 0; i < size; i++) {
    musluk += pow(adet[i], 0 - 1);
  }
  total = 1 / musluk;
  printf("\n%d musluk %.3f saatte doldurur\n", i, total);
  float dk = 60 * total;
  printf("%.3f saat = %.3f dakika\n", total, dk);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0x14(%rbp)
cvtsi2ssl -0x14(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    11be <main+0x8e>
mov    -0x14(%rbp),%esi
add    $0x1,%esi
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x14(%rbp),%rax
lea    -0x90(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1169 <main+0x39>
lea    0xe83(%rip),%rdi
mov    $0x78,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
cvtsi2ssl -0x14(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1227 <main+0xf7>
movslq -0x14(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%edi
mov    $0xffffffffffffffff,%rsi
call   1050 <pow@plt>
cvtsi2ss %rax,%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11e0 <main+0xb0>
movss  0xdd5(%rip),%xmm0
divss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x14(%rbp),%esi
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe00(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0xda5(%rip),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x94(%rbp)
ff
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x94(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
lea    0xde9(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xa0,%rsp
lea    0xec2(%rip),%rdi
xor    %r14d,%r14d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    11c2 <main+0x92>
lea    0x20(%rsp),%rbx
mov    $0x1,%ebp
lea    0xea2(%rip),%r15
lea    0xebc(%rip),%r12
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %ebp,%xmm0
movss  0xc(%rsp),%xmm1
add    $0x4,%rbx
add    $0x1,%ebp
ucomiss %xmm0,%xmm1
ja     1190 <main+0x60>
lea    0xe7f(%rip),%rdi
mov    $0x78,%esi
xor    %eax,%eax
call   1030 <printf@plt>
movss  0xc(%rsp),%xmm0
xorps  %xmm2,%xmm2
ucomiss %xmm2,%xmm0
jbe    1230 <main+0x100>
xorps  %xmm2,%xmm2
xor    %r14d,%r14d
nopl   0x0(%rax)
movss  %xmm2,0x10(%rsp)
mov    0x20(%rsp,%r14,4),%edi
mov    $0xffffffffffffffff,%rsi
call   1050 <pow@plt>
movss  0x10(%rsp),%xmm2
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
add    $0x1,%r14
xorps  %xmm1,%xmm1
cvtsi2ss %r14d,%xmm1
addss  %xmm0,%xmm2
movss  0xc(%rsp),%xmm0
ucomiss %xmm1,%xmm0
ja     11f0 <main+0xc0>
movss  0xdc8(%rip),%xmm0
divss  %xmm2,%xmm0
movss  %xmm0,0x1c(%rsp)
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
lea    0xdf9(%rip),%rdi
mov    %r14d,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x1c(%rsp),%xmm0
mulss  0xd99(%rip),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
lea    0xdf4(%rip),%rdi
movsd  0x10(%rsp),%xmm0
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Kac tane musluk olacak: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [33 x i8] c"%d. musluk kac saatte doldurur: \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [4 x i8] c"%lu\00"
@.str.5 = [33 x i8] c"\0A%d musluk %.3f saatte doldurur\0A\00"
@.str.6 = [25 x i8] c"%.3f saat = %.3f dakika\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca i32
%6 = alloca [30 x i32]
%7 = alloca float
store i32 0, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
store i32 0, i32* %5
br label %10
10: ; preds = %23, %0
%11 = load i32, i32* %5
%12 = sitofp i32 %11 to float
%13 = load float, float* %4
%14 = fcmp olt float %12, %13
br i1 %14, label %15, label %26
15: ; preds = %10
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [30 x i32], [30 x i32]* %6, i64 0, i64 %20
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %21)
br label %23
23: ; preds = %15
%24 = load i32, i32* %5
%25 = add nsw i32 %24, 1
store i32 %25, i32* %5
br label %10
26: ; preds = %10
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i64 120)
store float 0.000000e+00, float* %2
store i32 0, i32* %5
br label %28
28: ; preds = %42, %26
%29 = load i32, i32* %5
%30 = sitofp i32 %29 to float
%31 = load float, float* %4
%32 = fcmp olt float %30, %31
br i1 %32, label %33, label %45
33: ; preds = %28
%34 = load i32, i32* %5
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [30 x i32], [30 x i32]* %6, i64 0, i64 %35
%37 = load i32, i32* %36
%38 = call i64 @pow(i32 %37, i64 -1)
%39 = sitofp i64 %38 to float
%40 = load float, float* %2
%41 = fadd float %40, %39
store float %41, float* %2
br label %42
42: ; preds = %33
%43 = load i32, i32* %5
%44 = add nsw i32 %43, 1
store i32 %44, i32* %5
br label %28
45: ; preds = %28
%46 = load float, float* %2
%47 = fdiv float 1.000000e+00, %46
store float %47, float* %3
%48 = load i32, i32* %5
%49 = load float, float* %3
%50 = fpext float %49 to double
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i32 %48, double %50)
%52 = load float, float* %3
%53 = fmul float 6.000000e+01, %52
store float %53, float* %7
%54 = load float, float* %3
%55 = fpext float %54 to double
%56 = load float, float* %7
%57 = fpext float %56 to double
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), double %55, double %57)
%59 = load i32, i32* %1
ret i32 %59
}

LLVM IR (-O2):
@.str = [25 x i8] c"Kac tane musluk olacak: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [33 x i8] c"%d. musluk kac saatte doldurur: \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [4 x i8] c"%lu\00"
@.str.5 = [33 x i8] c"\0A%d musluk %.3f saatte doldurur\0A\00"
@.str.6 = [25 x i8] c"%.3f saat = %.3f dakika\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca [30 x i32]
%3 = bitcast float* %1 to i8*
%4 = bitcast [30 x i32]* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%7 = load float, float* %1
%8 = fcmp ogt float %7, 0.000000e+00
br i1 %8, label %9, label %19
9: ; preds = %0, %9
%10 = phi i64 [ %11, %9 ], [ 0, %0 ]
%11 = add nuw i64 %10, 1
%12 = trunc i64 %11 to i32
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %12)
%14 = getelementptr inbounds [30 x i32], [30 x i32]* %2, i64 0, i64 %10
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %14)
%16 = sitofp i32 %12 to float
%17 = load float, float* %1
%18 = fcmp ogt float %17, %16
br i1 %18, label %9, label %19
19: ; preds = %9, %0
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i64 120)
%21 = load float, float* %1
%22 = fcmp ogt float %21, 0.000000e+00
br i1 %22, label %23, label %38
23: ; preds = %19, %23
%24 = phi i64 [ %31, %23 ], [ 0, %19 ]
%25 = phi float [ %30, %23 ], [ 0.000000e+00, %19 ]
%26 = getelementptr inbounds [30 x i32], [30 x i32]* %2, i64 0, i64 %24
%27 = load i32, i32* %26
%28 = call i64 @pow(i32 %27, i64 -1)
%29 = sitofp i64 %28 to float
%30 = fadd float %25, %29
%31 = add nuw i64 %24, 1
%32 = trunc i64 %31 to i32
%33 = sitofp i32 %32 to float
%34 = load float, float* %1
%35 = fcmp ogt float %34, %33
br i1 %35, label %23, label %36
36: ; preds = %23
%37 = trunc i64 %31 to i32
br label %38
38: ; preds = %36, %19
%39 = phi i32 [ 0, %19 ], [ %37, %36 ]
%40 = phi float [ 0.000000e+00, %19 ], [ %30, %36 ]
%41 = fdiv float 1.000000e+00, %40
%42 = fpext float %41 to double
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i32 %39, double %42)
%44 = fmul float %41, 6.000000e+01
%45 = fpext float %44 to double
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), double %42, double %45)
ret i32 0
}