#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 printingFile(int *idr, char *typer, double *arear, double *pricer,
                  char **adresr, int counter) {
  int i = 0;
  for (i; i < counter; i++) {
    printf("%d. ", idr[i]);
    double price = arear[i] * pricer[i];
    printf("%lf ", price);
    printf("%s. ", adresr[i]);
  }
}


x86 assembly (clang, -O0):
<printingFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    11b6 <printingFile+0xa6>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
lea    0xe7e(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1137 <printingFile+0x27>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printingFile>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %r9d,%r9d
jle    1187 <printingFile+0x77>
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rdi,%rbx
mov    %r9d,%ebp
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%rbx,%r13,4),%esi
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movsd  (%r12,%r13,8),%xmm0
mulsd  (%r15,%r13,8),%xmm0
lea    0xea0(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    (%r14,%r13,8),%rsi
lea    0xe93(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%r13
cmp    %r13,%rbp
jne    1140 <printingFile+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d. \00"
@.str.1 = [5 x i8] c"%lf \00"
@.str.2 = [5 x i8] c"%s. \00"
define void @printingFile(i32* %0, i8* %1, double* %2, double* %3, i8** %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca double*
%10 = alloca double*
%11 = alloca i8**
%12 = alloca i32
%13 = alloca i32
%14 = alloca double
store i32* %0, i32** %7
store i8* %1, i8** %8
store double* %2, double** %9
store double* %3, double** %10
store i8** %4, i8*** %11
store i32 %5, i32* %12
store i32 0, i32* %13
%15 = load i32, i32* %13
br label %16
16: ; preds = %46, %6
%17 = load i32, i32* %13
%18 = load i32, i32* %12
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %49
20: ; preds = %16
%21 = load i32*, i32** %7
%22 = load i32, i32* %13
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i32, i32* %21, i64 %23
%25 = load i32, i32* %24
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %25)
%27 = load double*, double** %9
%28 = load i32, i32* %13
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds double, double* %27, i64 %29
%31 = load double, double* %30
%32 = load double*, double** %10
%33 = load i32, i32* %13
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds double, double* %32, i64 %34
%36 = load double, double* %35
%37 = fmul double %31, %36
store double %37, double* %14
%38 = load double, double* %14
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %38)
%40 = load i8**, i8*** %11
%41 = load i32, i32* %13
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds i8*, i8** %40, i64 %42
%44 = load i8*, i8** %43
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %44)
br label %46
46: ; preds = %20
%47 = load i32, i32* %13
%48 = add nsw i32 %47, 1
store i32 %48, i32* %13
br label %16
49: ; preds = %16
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d. \00"
@.str.1 = [5 x i8] c"%lf \00"
@.str.2 = [5 x i8] c"%s. \00"
define void @printingFile(i32* nocapture %0, i8* nocapture readnone %1, double* nocapture %2, double* nocapture %3, i8** nocapture %4, i32 %5) {
%7 = icmp sgt i32 %5, 0
br i1 %7, label %8, label %26
8: ; preds = %6
%9 = zext i32 %5 to i64
br label %10
10: ; preds = %8, %10
%11 = phi i64 [ 0, %8 ], [ %24, %10 ]
%12 = getelementptr inbounds i32, i32* %0, i64 %11
%13 = load i32, i32* %12
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = getelementptr inbounds double, double* %2, i64 %11
%16 = load double, double* %15
%17 = getelementptr inbounds double, double* %3, i64 %11
%18 = load double, double* %17
%19 = fmul double %16, %18
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %19)
%21 = getelementptr inbounds i8*, i8** %4, i64 %11
%22 = load i8*, i8** %21
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %22)
%24 = add nuw nsw i64 %11, 1
%25 = icmp eq i64 %24, %9
br i1 %25, label %26, label %10
26: ; preds = %10, %6
ret void
}