#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*/ dgetf2_3l(int, int, double *, int, int *, int *);
int /*<<< orphan*/ dgetrs_3l(int, int, double *, int, int *, double *, int);
void dgesv_3l(int n, int nrhs, double *A, int lda, int *ipiv, double *B,
              int ldb, int *info) {
  dgetf2_3l(n, n, A, lda, ipiv, info);
  if (*info == 0) {
    dgetrs_3l(n, nrhs, A, lda, ipiv, B, ldb);
  }
  return;
}


x86 assembly (clang, -O0):
<dgesv_3l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    0x18(%rbp),%r9
call   1040 <dgetf2_3l@plt>
mov    0x18(%rbp),%rax
cmpl   $0x0,(%rax)
jne    118b <dgesv_3l+0x6b>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <dgetrs_3l@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dgesv_3l>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,(%rsp)
mov    %r8,%r15
mov    %ecx,%r13d
mov    %rdx,%rbx
mov    %esi,%r12d
mov    %edi,%ebp
mov    0x48(%rsp),%r14
mov    %edi,%esi
mov    %r14,%r9
call   1040 <dgetf2_3l@plt>
cmpl   $0x0,(%r14)
je     1161 <dgesv_3l+0x41>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %ebp,%edi
mov    %r12d,%esi
mov    %rbx,%rdx
mov    %r13d,%ecx
mov    %r15,%r8
mov    (%rsp),%r9
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <dgetrs_3l@plt>

LLVM IR (-O0):
define void @dgesv_3l(i32 %0, i32 %1, double* %2, i32 %3, i32* %4, double* %5, i32 %6, i32* %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca double*
%12 = alloca i32
%13 = alloca i32*
%14 = alloca double*
%15 = alloca i32
%16 = alloca i32*
store i32 %0, i32* %9
store i32 %1, i32* %10
store double* %2, double** %11
store i32 %3, i32* %12
store i32* %4, i32** %13
store double* %5, double** %14
store i32 %6, i32* %15
store i32* %7, i32** %16
%17 = load i32, i32* %9
%18 = load i32, i32* %9
%19 = load double*, double** %11
%20 = load i32, i32* %12
%21 = load i32*, i32** %13
%22 = load i32*, i32** %16
%23 = call i32 @dgetf2_3l(i32 %17, i32 %18, double* %19, i32 %20, i32* %21, i32* %22)
%24 = load i32*, i32** %16
%25 = load i32, i32* %24
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %36
27: ; preds = %8
%28 = load i32, i32* %9
%29 = load i32, i32* %10
%30 = load double*, double** %11
%31 = load i32, i32* %12
%32 = load i32*, i32** %13
%33 = load double*, double** %14
%34 = load i32, i32* %15
%35 = call i32 @dgetrs_3l(i32 %28, i32 %29, double* %30, i32 %31, i32* %32, double* %33, i32 %34)
br label %36
36: ; preds = %27, %8
ret void
}

LLVM IR (-O2):
define void @dgesv_3l(i32 %0, i32 %1, double* %2, i32 %3, i32* %4, double* %5, i32 %6, i32* %7) {
%9 = tail call i32 @dgetf2_3l(i32 %0, i32 %0, double* %2, i32 %3, i32* %4, i32* %7)
%10 = load i32, i32* %7
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = tail call i32 @dgetrs_3l(i32 %0, i32 %1, double* %2, i32 %3, i32* %4, double* %5, i32 %6)
br label %14
14: ; preds = %12, %8
ret void
}