#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*/ lob_bnd_fst(double *, double const *, double const *,
                               double const *, double const *, unsigned int,
                               unsigned int, double const *);
void lob_bnd_lin_1(double *restrict b, const double *restrict lob_bnd_data,
                   unsigned n, unsigned m, const double *restrict u,
                   unsigned int un) {
  const double *z = lob_bnd_data, *Q = z + n, *h = Q + 2 * n, *lb = h + m;
  for (; un; --un, u += n, b += 2 * m)
    lob_bnd_fst(b, z, Q, h, lb, n, m, u);
}


x86 assembly (clang, -O0):
<lob_bnd_lin_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x14(%rbp),%ecx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
mov    %ecx,%ecx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    -0x18(%rbp),%ecx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     11e2 <lob_bnd_lin_1+0xd2>
mov    -0x8(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    -0x14(%rbp),%r9d
mov    -0x18(%rbp),%r10d
mov    -0x20(%rbp),%rax
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <lob_bnd_fst@plt>
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,%ecx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%ecx
shl    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,%ecx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    1171 <lob_bnd_lin_1+0x61>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lob_bnd_lin_1>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rcx,0x10(%rsp)
mov    %rdx,0x8(%rsp)
mov    %rsi,(%rsp)
test   %r9d,%r9d
je     11b3 <lob_bnd_lin_1+0xa3>
mov    %r9d,%r13d
mov    %r8,%rbx
mov    %rdi,%rbp
mov    0x8(%rsp),%rax
mov    %eax,%r14d
mov    (%rsp),%rcx
lea    (%rcx,%r14,8),%rcx
add    %eax,%eax
mov    %rcx,0x20(%rsp)
lea    (%rcx,%rax,8),%rdx
mov    0x10(%rsp),%rcx
mov    %ecx,%eax
mov    %rdx,0x18(%rsp)
lea    (%rdx,%rax,8),%r15
lea    (%rcx,%rcx,1),%r12d
shl    $0x3,%r12
shl    $0x3,%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbp,%rdi
mov    (%rsp),%rsi
mov    0x20(%rsp),%rdx
mov    0x18(%rsp),%rcx
mov    %r15,%r8
mov    0x8(%rsp),%r9
push   %rbx
push   0x18(%rsp)
call   1030 <lob_bnd_fst@plt>
add    $0x10,%rsp
add    %r12,%rbp
add    %r14,%rbx
add    $0xffffffff,%r13d
jne    1180 <lob_bnd_lin_1+0x70>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @lob_bnd_lin_1(double* noalias %0, double* noalias %1, i32 %2, i32 %3, double* noalias %4, i32 %5) {
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32
%11 = alloca double*
%12 = alloca i32
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
store double* %0, double** %7
store double* %1, double** %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store double* %4, double** %11
store i32 %5, i32* %12
%17 = load double*, double** %8
store double* %17, double** %13
%18 = load double*, double** %13
%19 = load i32, i32* %9
%20 = zext i32 %19 to i64
%21 = getelementptr inbounds double, double* %18, i64 %20
store double* %21, double** %14
%22 = load double*, double** %14
%23 = load i32, i32* %9
%24 = mul i32 2, %23
%25 = zext i32 %24 to i64
%26 = getelementptr inbounds double, double* %22, i64 %25
store double* %26, double** %15
%27 = load double*, double** %15
%28 = load i32, i32* %10
%29 = zext i32 %28 to i64
%30 = getelementptr inbounds double, double* %27, i64 %29
store double* %30, double** %16
br label %31
31: ; preds = %44, %6
%32 = load i32, i32* %12
%33 = icmp ne i32 %32, 0
br i1 %33, label %34, label %56
34: ; preds = %31
%35 = load double*, double** %7
%36 = load double*, double** %13
%37 = load double*, double** %14
%38 = load double*, double** %15
%39 = load double*, double** %16
%40 = load i32, i32* %9
%41 = load i32, i32* %10
%42 = load double*, double** %11
%43 = call i32 @lob_bnd_fst(double* %35, double* %36, double* %37, double* %38, double* %39, i32 %40, i32 %41, double* %42)
br label %44
44: ; preds = %34
%45 = load i32, i32* %12
%46 = add i32 %45, -1
store i32 %46, i32* %12
%47 = load i32, i32* %9
%48 = load double*, double** %11
%49 = zext i32 %47 to i64
%50 = getelementptr inbounds double, double* %48, i64 %49
store double* %50, double** %11
%51 = load i32, i32* %10
%52 = mul i32 2, %51
%53 = load double*, double** %7
%54 = zext i32 %52 to i64
%55 = getelementptr inbounds double, double* %53, i64 %54
store double* %55, double** %7
br label %31
56: ; preds = %31
ret void
}

LLVM IR (-O2):
define void @lob_bnd_lin_1(double* noalias %0, double* noalias %1, i32 %2, i32 %3, double* noalias %4, i32 %5) {
%7 = zext i32 %2 to i64
%8 = getelementptr inbounds double, double* %1, i64 %7
%9 = shl i32 %2, 1
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds double, double* %8, i64 %10
%12 = zext i32 %3 to i64
%13 = getelementptr inbounds double, double* %11, i64 %12
%14 = icmp eq i32 %5, 0
br i1 %14, label %27, label %15
15: ; preds = %6
%16 = shl i32 %3, 1
%17 = zext i32 %16 to i64
br label %18
18: ; preds = %15, %18
%19 = phi double* [ %0, %15 ], [ %25, %18 ]
%20 = phi double* [ %4, %15 ], [ %24, %18 ]
%21 = phi i32 [ %5, %15 ], [ %23, %18 ]
%22 = tail call i32 @lob_bnd_fst(double* %19, double* %1, double* %8, double* %11, double* %13, i32 %2, i32 %3, double* %20)
%23 = add i32 %21, -1
%24 = getelementptr inbounds double, double* %20, i64 %7
%25 = getelementptr inbounds double, double* %19, i64 %17
%26 = icmp eq i32 %23, 0
br i1 %26, label %27, label %18
27: ; preds = %18, %6
ret void
}