#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*/ free(int *);
int *malloc(int);
int dhsein(char *SIDE, char *EIGSRC, char *INITV, int *SELECT, int N, double *H,
           int LDH, double *WR, double *WI, double *VL, int LDVL, double *VR,
           int LDVR, int MM, double *WORK, int *IFFAILL, int *IFFAILR) {
  extern void dhsein_(char *SIDE, char *EIGSRC, char *INITV, int *SELECT,
                      int *Np, double *H, int *LDHp, double *WR, double *WI,
                      double *VL, int *LDVLp, double *VR, int *LDVRp, int *MMp,
                      int *Mp, double *WORK, int *IFFAILL, int *IFFAILR,
                      int *INFO);
  int INFO;
  int *M;
  M = malloc(sizeof(int));
  dhsein_(SIDE, EIGSRC, INITV, SELECT, &N, H, &LDH, WR, WI, VL, &LDVL, VR,
          &LDVR, &MM, M, WORK, IFFAILL, IFFAILR, &INFO);
  free(M);
  return INFO;
}


x86 assembly (clang, -O0):
<dhsein>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
mov    0x60(%rbp),%rax
mov    0x58(%rbp),%rax
mov    0x50(%rbp),%rax
mov    0x48(%rbp),%eax
mov    0x40(%rbp),%eax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %rdi,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x48(%rbp)
mov    %r8d,-0x4c(%rbp)
mov    %r9,-0x58(%rbp)
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,-0x68(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%rcx
mov    -0x58(%rbp),%r9
mov    0x18(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    0x20(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    0x28(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    0x38(%rbp),%r13
mov    -0x68(%rbp),%r14
mov    0x50(%rbp),%rbx
mov    0x58(%rbp),%r11
mov    0x60(%rbp),%r10
lea    -0x4c(%rbp),%r8
lea    0x10(%rbp),%rax
mov    %rax,-0x98(%rbp)
lea    0x30(%rbp),%rax
mov    %rax,-0x78(%rbp)
lea    0x40(%rbp),%r12
lea    0x48(%rbp),%r15
lea    -0x5c(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x98(%rbp),%rax
mov    %rax,(%rsp)
mov    -0x90(%rbp),%rax
mov    %rax,0x8(%rsp)
mov    -0x88(%rbp),%rax
mov    %rax,0x10(%rsp)
mov    -0x80(%rbp),%rax
mov    %rax,0x18(%rsp)
mov    -0x78(%rbp),%rax
mov    %rax,0x20(%rsp)
mov    -0x70(%rbp),%rax
mov    %r13,0x28(%rsp)
mov    %r12,0x30(%rsp)
mov    %r15,0x38(%rsp)
mov    %r14,0x40(%rsp)
mov    %rbx,0x48(%rsp)
mov    %r11,0x50(%rsp)
mov    %r10,0x58(%rsp)
mov    %rax,0x60(%rsp)
call   1040 <dhsein_@plt>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
mov    -0x5c(%rbp),%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<dhsein>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %r9,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%r13
mov    %rdi,%rbx
mov    %r8d,0x74(%rsp)
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,%rbp
lea    0x70(%rsp),%rax
mov    %rax,0x60(%rsp)
mov    0x100(%rsp),%rax
mov    %rax,0x58(%rsp)
movaps 0xf0(%rsp),%xmm0
movups %xmm0,0x48(%rsp)
mov    %rbp,0x40(%rsp)
lea    0xe8(%rsp),%rax
mov    %rax,0x38(%rsp)
lea    0xe0(%rsp),%rax
mov    %rax,0x30(%rsp)
mov    0xd8(%rsp),%rax
mov    %rax,0x28(%rsp)
lea    0xd0(%rsp),%rax
mov    %rax,0x20(%rsp)
mov    0xc8(%rsp),%rax
mov    %rax,0x18(%rsp)
movups 0xb8(%rsp),%xmm0
movups %xmm0,0x8(%rsp)
lea    0xb0(%rsp),%rax
mov    %rax,(%rsp)
lea    0x74(%rsp),%r8
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
mov    %r14,%r9
call   1040 <dhsein_@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    0x70(%rsp),%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @dhsein(i8* %0, i8* %1, i8* %2, i32* %3, i32 %4, double* %5, i32 %6, double* %7, double* %8, double* %9, i32 %10, double* %11, i32 %12, i32 %13, double* %14, i32* %15, i32* %16) {
%18 = alloca i8*
%19 = alloca i8*
%20 = alloca i8*
%21 = alloca i32*
%22 = alloca i32
%23 = alloca double*
%24 = alloca i32
%25 = alloca double*
%26 = alloca double*
%27 = alloca double*
%28 = alloca i32
%29 = alloca double*
%30 = alloca i32
%31 = alloca i32
%32 = alloca double*
%33 = alloca i32*
%34 = alloca i32*
%35 = alloca i32
%36 = alloca i32*
store i8* %0, i8** %18
store i8* %1, i8** %19
store i8* %2, i8** %20
store i32* %3, i32** %21
store i32 %4, i32* %22
store double* %5, double** %23
store i32 %6, i32* %24
store double* %7, double** %25
store double* %8, double** %26
store double* %9, double** %27
store i32 %10, i32* %28
store double* %11, double** %29
store i32 %12, i32* %30
store i32 %13, i32* %31
store double* %14, double** %32
store i32* %15, i32** %33
store i32* %16, i32** %34
%37 = call i32* @malloc(i32 4)
store i32* %37, i32** %36
%38 = load i8*, i8** %18
%39 = load i8*, i8** %19
%40 = load i8*, i8** %20
%41 = load i32*, i32** %21
%42 = load double*, double** %23
%43 = load double*, double** %25
%44 = load double*, double** %26
%45 = load double*, double** %27
%46 = load double*, double** %29
%47 = load i32*, i32** %36
%48 = load double*, double** %32
%49 = load i32*, i32** %33
%50 = load i32*, i32** %34
%51 = load i32*, i32** %36
%52 = call i32 @free(i32* %51)
%53 = load i32, i32* %35
ret i32 %53
}

LLVM IR (-O2):
define i32 @dhsein(i8* %0, i8* %1, i8* %2, i32* %3, i32 %4, double* %5, i32 %6, double* %7, double* %8, double* %9, i32 %10, double* %11, i32 %12, i32 %13, double* %14, i32* %15, i32* %16) {
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
store i32 %4, i32* %18
store i32 %6, i32* %19
store i32 %10, i32* %20
store i32 %12, i32* %21
store i32 %13, i32* %22
%24 = bitcast i32* %23 to i8*
%25 = tail call i32* @malloc(i32 4)
%26 = call i32 @free(i32* %25)
%27 = load i32, i32* %23
ret i32 %27
}