#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*/ expression_2(double *, double *);
void wrap_expression_2(int start, int end, double *arg0_0, double *arg1_0,
                       int layers) {
  for (int n = start; n < end; n++) {
    int i = n;
    expression_2(arg0_0 + i * 1, arg1_0 + i * 1);
  }
}


x86 assembly (clang, -O0):
<wrap_expression_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    117b <wrap_expression_2+0x6b>
mov    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x24(%rbp),%eax
shl    $0x0,%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rsi
mov    -0x24(%rbp),%eax
shl    $0x0,%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
call   1030 <expression_2@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1130 <wrap_expression_2+0x20>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrap_expression_2>:
push   %rbp
push   %r14
push   %rbx
cmp    %esi,%edi
jge    1149 <wrap_expression_2+0x39>
mov    %esi,%r14d
movslq %edi,%rax
lea    (%rdx,%rax,8),%rbx
lea    (%rcx,%rax,8),%rbp
sub    %edi,%r14d
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1030 <expression_2@plt>
add    $0x8,%rbx
add    $0x8,%rbp
add    $0xffffffff,%r14d
jne    1130 <wrap_expression_2+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @wrap_expression_2(i32 %0, i32 %1, double* %2, double* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca double*
%9 = alloca double*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store double* %2, double** %8
store double* %3, double** %9
store i32 %4, i32* %10
%13 = load i32, i32* %6
store i32 %13, i32* %11
br label %14
14: ; preds = %31, %5
%15 = load i32, i32* %11
%16 = load i32, i32* %7
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %34
18: ; preds = %14
%19 = load i32, i32* %11
store i32 %19, i32* %12
%20 = load double*, double** %8
%21 = load i32, i32* %12
%22 = mul nsw i32 %21, 1
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds double, double* %20, i64 %23
%25 = load double*, double** %9
%26 = load i32, i32* %12
%27 = mul nsw i32 %26, 1
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds double, double* %25, i64 %28
%30 = call i32 @expression_2(double* %24, double* %29)
br label %31
31: ; preds = %18
%32 = load i32, i32* %11
%33 = add nsw i32 %32, 1
store i32 %33, i32* %11
br label %14
34: ; preds = %14
ret void
}

LLVM IR (-O2):
define void @wrap_expression_2(i32 %0, i32 %1, double* %2, double* %3, i32 %4) {
%6 = icmp slt i32 %0, %1
br i1 %6, label %7, label %9
7: ; preds = %5
%8 = sext i32 %0 to i64
br label %10
9: ; preds = %10, %5
ret void
10: ; preds = %7, %10
%11 = phi i64 [ %8, %7 ], [ %15, %10 ]
%12 = getelementptr inbounds double, double* %2, i64 %11
%13 = getelementptr inbounds double, double* %3, i64 %11
%14 = tail call i32 @expression_2(double* %12, double* %13)
%15 = add nsw i64 %11, 1
%16 = trunc i64 %15 to i32
%17 = icmp eq i32 %16, %1
br i1 %17, label %9, label %10
}