#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*/ mulmp(float *, float const *, float const *);
void transform(float *dest, const float *src, int num, const float *from) {
  int i;
  for (i = num; i > 0; i--) {
    mulmp(dest, from, src);
    src += 3;
    dest += 3;
  }
}


x86 assembly (clang, -O0):
<transform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jle    116e <transform+0x5e>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <mulmp@plt>
mov    -0x10(%rbp),%rax
add    $0xc,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0xc,%rax
mov    %rax,-0x8(%rbp)
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    112d <transform+0x1d>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<transform>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %edx,%edx
jle    1150 <transform+0x40>
mov    %rcx,%r14
mov    %edx,%r15d
mov    %rsi,%rbx
mov    %rdi,%rbp
add    $0x1,%r15d
nopl   0x0(%rax,%rax,1)
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <mulmp@plt>
add    $0xc,%rbx
add    $0xc,%rbp
add    $0xffffffff,%r15d
cmp    $0x1,%r15d
ja     1130 <transform+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @transform(float* %0, float* %1, i32 %2, float* %3) {
%5 = alloca float*
%6 = alloca float*
%7 = alloca i32
%8 = alloca float*
%9 = alloca i32
store float* %0, float** %5
store float* %1, float** %6
store i32 %2, i32* %7
store float* %3, float** %8
%10 = load i32, i32* %7
store i32 %10, i32* %9
br label %11
11: ; preds = %23, %4
%12 = load i32, i32* %9
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %26
14: ; preds = %11
%15 = load float*, float** %5
%16 = load float*, float** %8
%17 = load float*, float** %6
%18 = call i32 @mulmp(float* %15, float* %16, float* %17)
%19 = load float*, float** %6
%20 = getelementptr inbounds float, float* %19, i64 3
store float* %20, float** %6
%21 = load float*, float** %5
%22 = getelementptr inbounds float, float* %21, i64 3
store float* %22, float** %5
br label %23
23: ; preds = %14
%24 = load i32, i32* %9
%25 = add nsw i32 %24, -1
store i32 %25, i32* %9
br label %11
26: ; preds = %11
ret void
}

LLVM IR (-O2):
define void @transform(float* %0, float* %1, i32 %2, float* %3) {
%5 = icmp sgt i32 %2, 0
br i1 %5, label %6, label %15
6: ; preds = %4, %6
%7 = phi i32 [ %13, %6 ], [ %2, %4 ]
%8 = phi float* [ %12, %6 ], [ %0, %4 ]
%9 = phi float* [ %11, %6 ], [ %1, %4 ]
%10 = tail call i32 @mulmp(float* %8, float* %3, float* %9)
%11 = getelementptr inbounds float, float* %9, i64 3
%12 = getelementptr inbounds float, float* %8, i64 3
%13 = add nsw i32 %7, -1
%14 = icmp ugt i32 %7, 1
br i1 %14, label %6, label %15
15: ; preds = %6, %4
ret void
}