LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_geometry.c
// Function: glutSolidSierpinskiSponge
void FGAPIENTRY glutSolidSierpinskiSponge ( int num_levels, GLdouble offset[3], GLdouble scale )
{
  int i, j ;

  FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSolidSierpinskiSponge" );

  if ( num_levels == 0 )
  {
    glBegin ( GL_TRIANGLES ) ;

    for ( i = 0 ; i < NUM_TETR_FACES ; i++ )
    {
      glNormal3d ( -tet_r[i][0], -tet_r[i][1], -tet_r[i][2] ) ;
      for ( j = 0; j < 3; j++ )
      {
        double x = offset[0] + scale * tet_r[tet_i[i][j]][0] ;
        double y = offset[1] + scale * tet_r[tet_i[i][j]][1] ;
        double z = offset[2] + scale * tet_r[tet_i[i][j]][2] ;
        glVertex3d ( x, y, z ) ;
      }
    }

    glEnd () ;
  }
  else if ( num_levels > 0 )
  {
    GLdouble local_offset[3] ;  /* Use a local variable to avoid buildup of roundoff errors */
    num_levels -- ;
    scale /= 2.0 ;
    for ( i = 0 ; i < NUM_TETR_FACES ; i++ )
    {
      local_offset[0] = offset[0] + scale * tet_r[i][0] ;
      local_offset[1] = offset[1] + scale * tet_r[i][1] ;
      local_offset[2] = offset[2] + scale * tet_r[i][2] ;
      glutSolidSierpinskiSponge ( num_levels, local_offset, scale ) ;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x68f22(%rip), %rax     # 0x1441c0
cmpb $0x0, 0x1c(%rax)
movapd %xmm0, (%rsp)
jne 0xdb2c3
leaq 0x102b6(%rip), %rdi     # 0xeb566
leaq 0x21ef6(%rip), %rsi     # 0xfd1ad
xorl %eax, %eax
callq 0xd1cf7
movapd (%rsp), %xmm0
testl %ebp, %ebp
je 0xdb354
jle 0xdb345
decl %ebp
mulsd 0xd49(%rip), %xmm0      # 0xdc020
movapd %xmm0, %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movapd %xmm1, 0x10(%rsp)
movl $0x10, %r15d
leaq 0x68fee(%rip), %r12     # 0x1442e0
leaq 0x20(%rsp), %r14
movapd %xmm0, (%rsp)
movupd (%rbx), %xmm2
movupd -0x10(%r15,%r12), %xmm1
mulpd 0x10(%rsp), %xmm1
addpd %xmm2, %xmm1
movapd %xmm1, 0x20(%rsp)
movsd (%r15,%r12), %xmm1
mulsd %xmm0, %xmm1
addsd 0x10(%rbx), %xmm1
movsd %xmm1, 0x30(%rsp)
movl %ebp, %edi
movq %r14, %rsi
callq 0xdb284
movapd (%rsp), %xmm0
addq $0x18, %r15
cmpq $0x70, %r15
jne 0xdb2fc
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x4, %edi
callq 0x21190
leaq 0x2218b(%rip), %r14     # 0xfd4f0
xorl %r15d, %r15d
leaq 0x68f71(%rip), %r12     # 0x1442e0
leaq (%r15,%r15,2), %rax
movsd (%r12,%rax,8), %xmm0
movsd 0x8(%r12,%rax,8), %xmm1
movsd 0x10(%r12,%rax,8), %xmm2
movaps 0x11a2(%rip), %xmm3     # 0xdc530
xorps %xmm3, %xmm0
xorps %xmm3, %xmm1
xorps %xmm3, %xmm2
callq 0x21310
xorl %r13d, %r13d
movslq (%r14,%r13,4), %rax
leaq (%rax,%rax,2), %rax
movsd (%r12,%rax,8), %xmm0
movapd (%rsp), %xmm3
mulsd %xmm3, %xmm0
addsd (%rbx), %xmm0
movsd 0x8(%r12,%rax,8), %xmm1
mulsd %xmm3, %xmm1
addsd 0x8(%rbx), %xmm1
movsd 0x10(%r12,%rax,8), %xmm2
mulsd %xmm3, %xmm2
addsd 0x10(%rbx), %xmm2
callq 0x21e70
incq %r13
cmpq $0x3, %r13
jne 0xdb39f
incq %r15
addq $0xc, %r14
cmpq $0x4, %r15
jne 0xdb36f
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21c60
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_misc.c
// Function: glutExtensionSupported
int FGAPIENTRY glutExtensionSupported( const char* extension )
{
  const char *extensions, *start;
  const size_t len = strlen( extension );

  /* Make sure there is a current window, and thus a current context available */
  FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutExtensionSupported" );
  freeglut_return_val_if_fail( fgStructure.CurrentWindow != NULL, 0 );

  if (strchr(extension, ' '))
    return 0;
  start = extensions = (const char *) glGetString(GL_EXTENSIONS);

  /* XXX consider printing a warning to stderr that there's no current
   * rendering context.
   */
  freeglut_return_val_if_fail( extensions != NULL, 0 );

  while (1) {
     const char *p = strstr(extensions, extension);
     if (!p)
        return 0;  /* not found */
     /* check that the match isn't a super string */
     if ((p == start || p[-1] == ' ') && (p[len] == ' ' || p[len] == 0))
        return 1;
     /* skip the false match and continue */
     extensions = p + len;
  }

  return 0 ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x21380
movq %rax, %r14
leaq 0x68d9a(%rip), %rax     # 0x1441c0
cmpb $0x0, 0x1c(%rax)
jne 0xdb441
leaq 0x10133(%rip), %rdi     # 0xeb566
leaq 0x21ae5(%rip), %rsi     # 0xfcf1f
xorl %eax, %eax
callq 0xd1cf7
leaq 0x6d428(%rip), %rax     # 0x148870
xorl %ebp, %ebp
cmpq $0x0, 0x30(%rax)
je 0xdb4b8
movq %rbx, %rdi
movl $0x20, %esi
callq 0x21330
testq %rax, %rax
jne 0xdb4b8
movl $0x1f03, %edi           # imm = 0x1F03
callq 0x21570
testq %rax, %rax
je 0xdb4b8
movq %rax, %r15
movq %rax, %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x21180
testq %rax, %rax
je 0xdb4a6
cmpq %r15, %rax
je 0xdb493
cmpb $0x20, -0x1(%rax)
jne 0xdb4ac
movzbl (%rax,%r14), %ecx
testb $-0x21, %cl
jne 0xdb4ac
movl $0x1, %ebp
xorl %ecx, %ecx
jmp 0xdb4b4
xorl %ecx, %ecx
xorl %ebp, %ebp
jmp 0xdb4b4
addq %r14, %rax
movb $0x1, %cl
movq %rax, %r12
testb %cl, %cl
jne 0xdb478
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_misc.c
// Function: glutReportErrors
void FGAPIENTRY glutReportErrors( void )
{
    GLenum error;
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutReportErrors" );
    while( ( error = glGetError() ) != GL_NO_ERROR )
        fgWarning( "GL error: %s", fghErrorString( error ) );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x68ceb(%rip), %rax     # 0x1441c0
cmpb $0x0, 0x1c(%rax)
jne 0xdb4f0
leaq 0x10084(%rip), %rdi     # 0xeb566
leaq 0x21bdf(%rip), %rsi     # 0xfd0c8
xorl %eax, %eax
callq 0xd1cf7
leaq 0x22074(%rip), %r14     # 0xfd56b
leaq 0x22022(%rip), %r15     # 0xfd520
leaq 0x22105(%rip), %r12     # 0xfd60a
leaq 0x22030(%rip), %rbx     # 0xfd53c
leaq 0x220b7(%rip), %r13     # 0xfd5ca
leaq 0x220de(%rip), %rbp     # 0xfd5f8
callq 0x21440
cmpl $0x8030, %eax           # imm = 0x8030
jg 0xdb546
leal -0x500(%rax), %ecx
cmpl $0x6, %ecx
ja 0xdb58b
movslq (%r15,%rcx,4), %rax
addq %r15, %rax
movq %r14, %rsi
jmpq *%rax
leaq 0x22039(%rip), %rsi     # 0xfd57d
jmp 0xdb592
cmpl $0x8031, %eax           # imm = 0x8031
je 0xdb574
cmpl $0x8065, %eax           # imm = 0x8065
jne 0xdb58f
movq %rbp, %rsi
jmp 0xdb592
leaq 0x2204c(%rip), %rsi     # 0xfd5ac
jmp 0xdb592
leaq 0x22022(%rip), %rsi     # 0xfd58b
jmp 0xdb592
leaq 0x2202b(%rip), %rsi     # 0xfd59d
jmp 0xdb592
movq %r13, %rsi
jmp 0xdb592
leaq 0x2203c(%rip), %rsi     # 0xfd5bc
jmp 0xdb592
leaq 0x22051(%rip), %rsi     # 0xfd5da
jmp 0xdb592
testl %eax, %eax
je 0xdb5a1
movq %r12, %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22aab
jmp 0xdb51a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_misc.c
// Function: glutSetKeyRepeat
void FGAPIENTRY glutSetKeyRepeat( int repeatMode )
{
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSetKeyRepeat" );

    switch( repeatMode )
    {
    case GLUT_KEY_REPEAT_OFF:
    case GLUT_KEY_REPEAT_ON:
     fgState.KeyRepeat = repeatMode;
     break;

    case GLUT_KEY_REPEAT_DEFAULT:
     fgState.KeyRepeat = GLUT_KEY_REPEAT_ON;
     break;

    default:
        fgError ("Invalid glutSetKeyRepeat mode: %d", repeatMode);
        break;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0x68ba6(%rip), %r14     # 0x1441c0
cmpb $0x0, 0x1c(%r14)
jne 0xdb636
leaq 0xff3e(%rip), %rdi      # 0xeb566
leaq 0x21abe(%rip), %rsi     # 0xfd0ed
xorl %eax, %eax
callq 0xd1cf7
cmpl $0x2, %ebx
jae 0xdb641
movl %ebx, 0x28(%r14)
jmp 0xdb64b
jne 0xdb653
movl $0x1, 0x28(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x21eef(%rip), %rdi     # 0xfd549
movl %ebx, %esi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xd1cf7
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_misc.c
// Function: glutForceJoystickFunc
void FGAPIENTRY glutForceJoystickFunc( void )
{
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutForceJoystickFunc" );
#if !defined(_WIN32_WCE)
    freeglut_return_if_fail( fgStructure.CurrentWindow != NULL );
    freeglut_return_if_fail( FETCH_WCB( *( fgStructure.CurrentWindow ), Joystick ) );
    fgJoystickPollWindow( fgStructure.CurrentWindow );
#endif /* !defined(_WIN32_WCE) */
}

// Assembly:
pushq %rax
leaq 0x68b4e(%rip), %rax     # 0x1441c0
cmpb $0x0, 0x1c(%rax)
jne 0xdb68d
leaq 0xfee7(%rip), %rdi      # 0xeb566
leaq 0x21a78(%rip), %rsi     # 0xfd0fe
xorl %eax, %eax
callq 0xd1cf7
leaq 0x6d1dc(%rip), %rax     # 0x148870
movq 0x30(%rax), %rdi
testq %rdi, %rdi
je 0xdb6ad
cmpq $0x0, 0xd8(%rdi)
je 0xdb6ad
popq %rax
jmp 0xd13f5
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/fglut/freeglut_cursor.c
// Function: glutWarpPointer
void FGAPIENTRY glutWarpPointer( int x, int y )
{
    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutWarpPointer" );
    FREEGLUT_EXIT_IF_NO_WINDOW ( "glutWarpPointer" );

#if TARGET_HOST_POSIX_X11

    XWarpPointer(
        fgDisplay.Display,
        None,
        fgStructure.CurrentWindow->Window.Handle,
        0, 0, 0, 0,
        x, y
    );
    /* Make the warp visible immediately. */
    XFlush( fgDisplay.Display );

#elif TARGET_HOST_MS_WINDOWS

    {
        POINT coords;
        coords.x = x;
        coords.y = y;

        /* ClientToScreen() translates {coords} for us. */
        ClientToScreen( fgStructure.CurrentWindow->Window.Handle, &coords );
        SetCursorPos( coords.x, coords.y );
    }

#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movl %edi, %ebx
leaq 0x68477(%rip), %rax     # 0x1441c0
cmpb $0x0, 0x1c(%rax)
jne 0xdbd64
leaq 0xf810(%rip), %rdi      # 0xeb566
leaq 0x210fb(%rip), %rsi     # 0xfce58
xorl %eax, %eax
callq 0xd1cf7
leaq 0x6cb05(%rip), %r15     # 0x148870
cmpq $0x0, 0x30(%r15)
jne 0xdbd87
leaq 0xfb45(%rip), %rdi      # 0xeb8be
leaq 0x210d8(%rip), %rsi     # 0xfce58
xorl %eax, %eax
callq 0xd1cf7
leaq 0x6ca42(%rip), %r12     # 0x1487d0
movq (%r12), %rdi
movq 0x30(%r15), %rax
movq 0x18(%rax), %rdx
subq $0x8, %rsp
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r14
pushq %rbx
pushq $0x0
callq 0x21e60
addq $0x20, %rsp
movq (%r12), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x21eb0
// File: /workspace/github_cpp_makefile_star2_O1/AbraaoHonorio[P]Page-Replacement-Algorithms/PageReplacement.cpp
// Function: findIndex(std::vector<int, std::allocator<int>>, std::vector<int, std::allocator<int>>, int)
int findIndex(std::vector<int> myQueue, std::vector<int> myPages, int nPages)
{
	int index = 0;


	// erase the first nPages elements
	myPages.erase(myPages.begin(), myPages.begin() + nPages);

	// initialize an vector Priority with 1000
	std::vector<int> arrayPriority(myQueue.size(),1000);

	if (!myPages.empty())
	{
		for (unsigned int i = 0; i < myQueue.size(); i++)
		{
			for (unsigned int j = 0; j < myPages.size(); j++)
			{
				if (myQueue[i] == myPages[j])
				{
					arrayPriority[i] = j;
					break;
				}

			}
		}
		/*					DEBUG                             */
		/*std::cout << "\n ***  arrayPriority *** " << std::endl; //DEBUG
		for each (int element in arrayPriority)
		{
		std::cout << index << " *** " << element << " " << std::endl; //DEBUG
		}*/


		/* return o index with highest priority*/
		int winner = arrayPriority[0];
		for (unsigned int i = 0; i < arrayPriority.size(); i++)
		{
			if (winner < arrayPriority[i])
			{
				winner = arrayPriority[i];
				index = i;
			}
		}
	}


	return (index);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
testl %edx, %edx
je 0x161e
movq (%rbx), %r15
movslq %edx, %rax
leaq (%r15,%rax,4), %r12
movq 0x8(%rbx), %rdx
subq %r12, %rdx
je 0x1608
movq %r15, %rdi
movq %r12, %rsi
callq 0x1150
movq 0x8(%rbx), %rax
movq %rax, %rcx
subq %r12, %rcx
addq %rcx, %r15
cmpq %r15, %rax
je 0x161e
movq %r15, 0x8(%rbx)
movq 0x8(%r14), %rsi
subq (%r14), %rsi
sarq $0x2, %rsi
leaq 0xc(%rsp), %rdx
movl $0x3e8, (%rdx)          # imm = 0x3E8
leaq 0x10(%rsp), %rdi
leaq 0xb(%rsp), %rcx
callq 0x1ca6
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
xorl %ebx, %ebx
cmpq %rcx, %rax
je 0x16cc
movq (%r14), %rdx
movq 0x8(%r14), %rsi
subq %rdx, %rsi
je 0x169e
sarq $0x2, %rsi
movq %rcx, %rdi
subq %rax, %rdi
sarq $0x2, %rdi
movq 0x10(%rsp), %r8
xorl %r9d, %r9d
cmpq %rax, %rcx
je 0x1693
movl (%rdx,%r9,4), %r11d
xorl %r10d, %r10d
cmpl (%rax,%r10,4), %r11d
je 0x168f
incl %r10d
cmpq %r10, %rdi
ja 0x167f
jmp 0x1693
movl %r10d, (%r8,%r9,4)
incq %r9
movl %r9d, %r10d
cmpq %r10, %rsi
ja 0x1673
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
je 0x16cc
sarq $0x2, %rcx
movl (%rax), %edx
xorl %esi, %esi
xorl %ebx, %ebx
movl (%rax,%rsi,4), %edi
cmpl %edi, %edx
cmovll %esi, %ebx
cmovlel %edi, %edx
incq %rsi
movl %esi, %edi
cmpq %rdi, %rcx
ja 0x16b7
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x16db
callq 0x10f0
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/AbraaoHonorio[P]Page-Replacement-Algorithms/PageReplacement.cpp
// Function: PageReplacement::readFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void PageReplacement::readFile(std::string filename)
{

	std::ifstream myfile(filename);
	int element = 0;


	if (myfile.is_open())
	{
		myfile >> element; // get first value
		sizeRam_m = element;

		while (myfile >> element) // read the referenced strings
		{
			myPages.push_back(element);
		}
	}
	else
	{
		std::cout << "Unable to open file" << std::endl;
	}

	myfile.close();


}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
movl $0x8, %edx
callq 0x1140
movl $0x0, 0xc(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x1050
testb %al, %al
je 0x1c26
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x1090
leaq 0xc(%rsp), %r14
movl (%r14), %eax
movl %eax, 0xc(%rbx)
leaq 0x28(%rbx), %r15
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x1090
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1c6c
movq 0x30(%rbx), %rsi
cmpq 0x38(%rbx), %rsi
je 0x1c19
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x30(%rbx)
jmp 0x1be6
movq %r15, %rdi
movq %r14, %rdx
callq 0x1fae
jmp 0x1be6
movq 0x33ab(%rip), %rbx      # 0x4fd8
leaq 0x144d(%rip), %rsi      # 0x3081
movl $0x13, %edx
movq %rbx, %rdi
callq 0x1120
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x1100
movsbl %al, %esi
movq 0x3379(%rip), %rdi      # 0x4fd8
callq 0x1030
movq %rax, %rdi
callq 0x10a0
leaq 0x10(%rsp), %rdi
callq 0x1040
leaq 0x10(%rsp), %rdi
callq 0x1060
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x1c91
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1060
movq %rbx, %rdi
callq 0x1170
// File: /workspace/github_cpp_makefile_star2_O1/AbraaoHonorio[P]Page-Replacement-Algorithms/main.cpp
// Function: main
int main(void)
{
	PageReplacement *pageReplacement = new PageReplacement();

	pageReplacement->readFile("input/input.txt"); 
	pageReplacement->fifo();
	pageReplacement->otm();
	pageReplacement->lru();


	std::cout<<std::endl;
	delete pageReplacement;


	return 0;

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl $0x40, %edi
callq 0x1110
movq %rax, %rbx
movq %rax, %rdi
callq 0x12ec
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xfe0(%rip), %rsi       # 0x30f2
leaq 0xfe8(%rip), %rdx       # 0x3101
movq %rsp, %r14
movq %r14, %rdi
callq 0x21ba
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1b8a
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x213d
callq 0x10f0
movq %rbx, %rdi
callq 0x1366
movq %rbx, %rdi
callq 0x16ea
movq %rbx, %rdi
callq 0x1942
movq 0x2e7c(%rip), %r14      # 0x4fd8
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x1100
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10a0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
jne 0x21ac
jmp 0x21b1
movq %rax, %r14
movq %rbx, %rdi
callq 0x10f0
movq %r14, %rdi
callq 0x1170
nop
// File: /workspace/github_cpp_makefile_star2_O1/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::write_times(MyFILE*, long, long)
void LMF_IO::write_times(MyFILE * out_file,time_t _Starttime,time_t _Stoptime) {
	unsigned __int32 dummy;
	if (CTime_version_output > 2003) {
		dummy = INT_MIN_+10; *out_file << dummy;
		dummy = (unsigned __int32)_Starttime; *out_file << dummy;
		dummy =0;			*out_file << dummy;
		dummy =INT_MIN_+10;	*out_file << dummy;
		dummy = (unsigned __int32)_Stoptime;	*out_file << dummy;
		dummy = 0;			*out_file << dummy;
	} else {
		dummy = (unsigned __int32)_Starttime;	*out_file << dummy;
		dummy = (unsigned __int32)_Stoptime;	*out_file << dummy;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rbx
cmpl $0x7d4, 0x278(%rdi)     # imm = 0x7D4
jl 0x23d4
movq %rbx, %rdi
movl $0x8000000a, %esi       # imm = 0x8000000A
callq 0x13968
movq %rbx, %rdi
movl %r15d, %esi
callq 0x13968
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x13968
movq %rbx, %rdi
movl $0x8000000a, %esi       # imm = 0x8000000A
callq 0x13968
movq %rbx, %rdi
movl %r14d, %esi
callq 0x13968
jmp 0x23e2
movq %rbx, %rdi
movl %r15d, %esi
callq 0x13968
movl %r14d, %ebp
movq %rbx, %rdi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x13968
// File: /workspace/github_cpp_makefile_star2_O1/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: ReadCStringLength(MyFILE&)
unsigned __int32 ReadCStringLength(MyFILE &in_file)
{
	unsigned __int64 qwLength;
	unsigned __int32 dwLength;
	unsigned __int16 wLength;
	unsigned __int8  bLength;

//	__int32 nCharSize = sizeof(__int8);

	// First, try to read a one-byte length
	in_file >> bLength;

	if (bLength < 0xff) 
		return bLength;

	// Try a two-byte length
	in_file >> wLength;
	if (wLength == 0xfffe)
	{
//		// Unicode string.  Start over at 1-byte length
//		nCharSize = sizeof(wchar_t);

		in_file >> bLength;
		if (bLength < 0xff)
			return bLength;

		// Two-byte length
		in_file >> wLength;
		// Fall through to continue on same branch as ANSI string
	}
	if (wLength < 0xffff)
		return wLength;

	// 4-byte length
	in_file >> dwLength;
	if (dwLength < 0xffffffff)
		return dwLength;

	// 8-byte length
	in_file >> qwLength;

	return (unsigned __int32)qwLength;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x9(%rsp), %r14
movq %r14, %rsi
movl $0x1, %edx
callq 0x139ac
movzbl (%r14), %eax
cmpl $0xff, %eax
jne 0x24b0
leaq 0xa(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl $0x2, %edx
callq 0x139ac
cmpw $-0x2, (%r14)
jne 0x246f
leaq 0x9(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x139ac
movzbl (%r14), %eax
cmpl $0xff, %eax
jne 0x24b0
leaq 0xa(%rsp), %rsi
movq %rbx, %rdi
movl $0x2, %edx
callq 0x139ac
movzwl 0xa(%rsp), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x24b0
leaq 0xc(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl $0x4, %edx
callq 0x139ac
movl (%r14), %eax
cmpl $-0x1, %eax
jne 0x24b0
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x139ac
movl (%r14), %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: Read_CString_as_StdString(MyFILE&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void Read_CString_as_StdString(MyFILE &in_file,std::string &stdstring)
{
	__int32 length = ReadCStringLength(in_file);
	__int8 * temp_string = new __int8[length+1];
	in_file.read(temp_string,length);
	temp_string[length] = 0;
	stdstring = temp_string;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x23f6
movl %eax, %r15d
leal 0x1(%r15), %eax
movslq %eax, %rdi
callq 0x2030
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
movl %r15d, %edx
callq 0x139ac
movslq %r15d, %rax
movb $0x0, (%r12,%rax)
movq 0x8(%rbx), %r14
movq %r12, %rdi
callq 0x2090
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %r12, %rcx
movq %rax, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x21f0
// File: /workspace/github_cpp_makefile_star2_O1/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: WriteCStringLength(MyFILE&, unsigned int)
void WriteCStringLength(MyFILE &out_file, unsigned __int32 nLength)
{
	unsigned __int8 dummy_uint8;
	unsigned __int16 dummy_uint16;
	unsigned __int32 dummy_uint32;
	unsigned __int64 dummy_uint64;

	if (nLength < 255)
	{
		dummy_uint8 = nLength; out_file << dummy_uint8;
	}
	else if (nLength < 0xfffe)
	{
		dummy_uint8 = 0xff; out_file << dummy_uint8;
		dummy_uint16 = nLength; out_file << dummy_uint16;
	}
	else if (nLength < 0xffffffff)
	{
		dummy_uint8 = 0xff; out_file << dummy_uint8;
		dummy_uint16 = 0xffff; out_file << dummy_uint16;
		dummy_uint32 = nLength; out_file << dummy_uint32;
	}
	else
	{
		dummy_uint8 = 0xff; out_file << dummy_uint8;
		dummy_uint16 = 0xffff; out_file << dummy_uint16;
		dummy_uint32 = 0xffffffff; out_file << dummy_uint32;
		dummy_uint64 = nLength; out_file << dummy_uint64;
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
cmpl $0xfe, %esi
ja 0x2558
movq (%rbx), %rsi
movsbl %bpl, %edi
callq 0x2190
movq 0x10(%rbx), %rcx
movq 0x20(%rbx), %rax
incq %rax
movq %rax, 0x20(%rbx)
cmpq %rax, %rcx
jae 0x2551
movq %rax, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
cmpl $0xfffd, %ebp           # imm = 0xFFFD
ja 0x2596
movq (%rbx), %rsi
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2190
movq 0x10(%rbx), %rcx
movq 0x20(%rbx), %rax
incq %rax
movq %rax, 0x20(%rbx)
cmpq %rax, %rcx
jae 0x2585
movq %rax, 0x10(%rbx)
movzwl %bp, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x139f4
movq (%rbx), %rsi
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2190
movq 0x10(%rbx), %rcx
movq 0x20(%rbx), %rax
incq %rax
movq %rax, 0x20(%rbx)
cmpl $-0x1, %ebp
je 0x25dd
cmpq %rax, %rcx
jae 0x25c0
movq %rax, 0x10(%rbx)
movq %rbx, %rdi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x139f4
movq %rbx, %rdi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x13968
cmpq %rax, %rcx
jae 0x25e6
movq %rax, 0x10(%rbx)
movq %rbx, %rdi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x139f4
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x13968
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x13a38
// File: /workspace/github_cpp_makefile_star2_O1/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::OpenNonCoboldFile()
bool LMF_IO::OpenNonCoboldFile(void)
/////////////////////////////////////////////////////////////////
{
	input_lmf->seek(0);

	if (skip_header) {
		DAQ_ID = DAQ_ID_RAW32BIT;
		data_format_in_userheader = 10;
		return true;
	}

	if (DAQ_ID == DAQ_ID_RAW32BIT) return true;

	DAQ_ID = DAQ_ID_SIMPLE;

	*input_lmf >> SIMPLE_DAQ_ID_Orignial;
	unsigned tempi;
	*input_lmf >> tempi; uint64_Numberofevents = tempi;
	*input_lmf >> data_format_in_userheader;

	User_header_size = 3*sizeof(__int32);
	Headersize = 0;

	return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2b18(%rdi), %r14
movq (%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x20c0
testl %eax, %eax
je 0x3886
movl $0x1, 0x8(%r14)
jmp 0x388e
movq $0x0, 0x20(%r14)
cmpb $0x1, 0x12e4(%rbx)
jne 0x38ad
movl $0x64, 0x288(%rbx)
movl $0xa, 0x290(%rbx)
jmp 0x3924
cmpl $0x64, 0x288(%rbx)
je 0x3924
movl $0x65, 0x288(%rbx)
movq 0x2b18(%rbx), %rdi
leaq 0x27c(%rbx), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
leaq 0x4(%rsp), %r14
movq %r14, %rsi
movl $0x4, %edx
callq 0x139ac
movl (%r14), %eax
movq %rax, 0x268(%rbx)
movq 0x2b18(%rbx), %rdi
leaq 0x290(%rbx), %rsi
movl $0x4, %edx
callq 0x139ac
movabsq $0xc00000000, %rax      # imm = 0xC00000000
movq %rax, 0x298(%rbx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::ReadTCPIPHeader()
__int32	LMF_IO::ReadTCPIPHeader()
/////////////////////////////////////////////////////////////////
{
	__int32	byte_counter = 0;
 

	*input_lmf >> frequency;	byte_counter += sizeof(double);		// frequency is always 4th value
	*input_lmf >> IOaddress;	byte_counter += sizeof(__int32);		// IO address (parameter 1) always 5th value
	*input_lmf >> timestamp_format;	byte_counter += sizeof(__int32);	// TimeInfo (parameter 2) always 6th value  (0,1,2)*32Bit

	*input_lmf >> DAQ_info_Length;	byte_counter += sizeof(__int32);		// Length of DAQInfo always 7th value
	__int8 * __int8_temp = new __int8[DAQ_info_Length+1];
	input_lmf->read(__int8_temp,DAQ_info_Length);	// DAQInfo always 8th value
	__int8_temp[DAQ_info_Length] = 0;
	DAQ_info = __int8_temp;
	delete[] __int8_temp; __int8_temp = 0;
	byte_counter += DAQ_info_Length;
	*input_lmf >> LMF_Version; byte_counter += sizeof(__int32);
	*input_lmf >> time_reference; byte_counter += sizeof(__int32);

	*input_lmf >> data_format_in_userheader;	byte_counter   += sizeof(__int32);
	*input_lmf >> number_of_channels;			byte_counter   += sizeof(__int32);
	*input_lmf >> max_number_of_hits;			byte_counter   += sizeof(__int32);

	if (int(number_of_channels) > num_channels)	{errorflag = 19;	return -100000;}
	if (int(max_number_of_hits) > num_ions)		{errorflag = 20;	return -100000;}

	tdcresolution = 1.;

	return byte_counter;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x2b18(%rdi), %rdi
leaq 0x12c8(%rbx), %rsi
movl $0x8, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
leaq 0x2a4(%rbx), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
leaq 0x2a8(%rbx), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
leaq 0x129c(%rbx), %rsi
movl $0x4, %edx
callq 0x139ac
movslq 0x129c(%rbx), %r14
movq %r14, %rdi
incq %rdi
callq 0x2030
movq %rax, %r15
movq 0x2b18(%rbx), %rdi
movq %rax, %rsi
movl %r14d, %edx
callq 0x139ac
movslq 0x129c(%rbx), %rax
movb $0x0, (%r15,%rax)
leaq 0xa0(%rbx), %r14
movq 0xa8(%rbx), %r12
movq %r15, %rdi
callq 0x2090
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x21f0
movq %r15, %rdi
callq 0x21a0
movl 0x129c(%rbx), %ebp
movq 0x2b18(%rbx), %rdi
leaq 0x12a4(%rbx), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
leaq 0x240(%rbx), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
leaq 0x290(%rbx), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
leaq 0x2b4(%rbx), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
leaq 0x2bc(%rbx), %rsi
movl $0x4, %edx
callq 0x139ac
movl 0x2b4(%rbx), %eax
cmpl 0x2b70(%rbx), %eax
jle 0x6f97
movl $0x13, 0x12e0(%rbx)
jmp 0x6faf
movl 0x2bc(%rbx), %eax
cmpl 0x2b74(%rbx), %eax
jle 0x6fb6
movl $0x14, 0x12e0(%rbx)
movl $0xfffe7960, %ebp       # imm = 0xFFFE7960
jmp 0x6fca
addl $0x28, %ebp
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x12b8(%rbx)
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::ReadfADC8Header()
__int32	LMF_IO::ReadfADC8Header()
/////////////////////////////////////////////////////////////////
{
	__int32	byte_counter = 0;

	*input_lmf >> frequency;	byte_counter += sizeof(double);			// frequency is always 4th value
	*input_lmf >> IOaddress;	byte_counter += sizeof(__int32);		// IO address (parameter 1) always 5th value
	*input_lmf >> timestamp_format;	byte_counter += sizeof(__int32);	// TimeInfo (parameter 2) always 6th value  (0,1,2)*32Bit

	*input_lmf >> DAQ_info_Length;	byte_counter += sizeof(__int32);	// Length of DAQInfo always 7th value
	__int8 * __int8_temp = new __int8[DAQ_info_Length+1];
	input_lmf->read(__int8_temp,DAQ_info_Length);	byte_counter += DAQ_info_Length;  // DAQInfo always 8th value
	__int8_temp[DAQ_info_Length] = 0;
	DAQ_info = __int8_temp;
	delete[] __int8_temp; __int8_temp = 0;

	*input_lmf >> LMF_Version; byte_counter += sizeof(__int32);
	
	if (LMF_Version == 10) byte_counter += ReadfADC8_header_LMFversion10();
	if (LMF_Version == 9)  byte_counter += ReadfADC8_header_LMFversion9();

	return byte_counter;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2b18(%rdi), %rdi
leaq 0x12c8(%rbx), %rsi
movl $0x8, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
leaq 0x2a4(%rbx), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
leaq 0x2a8(%rbx), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%rbx), %rdi
leaq 0x129c(%rbx), %rsi
movl $0x4, %edx
callq 0x139ac
movslq 0x129c(%rbx), %r14
movq %r14, %rdi
incq %rdi
callq 0x2030
movq %rax, %r15
movq 0x2b18(%rbx), %rdi
movq %rax, %rsi
movl %r14d, %edx
callq 0x139ac
movslq 0x129c(%rbx), %r13
movb $0x0, (%r15,%r13)
leaq 0xa0(%rbx), %r14
movq 0xa8(%rbx), %r12
movq %r15, %rdi
callq 0x2090
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x21f0
movq %r15, %rdi
callq 0x21a0
movq 0x2b18(%rbx), %rdi
leaq 0x12a4(%rbx), %r14
movq %r14, %rsi
movl $0x4, %edx
callq 0x139ac
leal 0x18(%r13), %ebp
cmpl $0xa, 0x12a4(%rbx)
jne 0x70da
movq %rbx, %rdi
callq 0x91a2
addl %eax, %ebp
cmpl $0x9, (%r14)
jne 0x70ea
movq %rbx, %rdi
callq 0x8b2c
addl %eax, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::WriteNextfADC8Signal(fADC8_signal_info_struct*, unsigned int*)
bool LMF_IO::WriteNextfADC8Signal(fADC8_signal_info_struct* signal_info, unsigned __int32 * ui32buffer)
/////////////////////////////////////////////////////////////////
{
	if (!output_lmf || !OutputFileIsOpen) {
		errorflag = 10;
		return false;
	}
	if (fADC8.at_least_1_signal_was_written) *output_lmf << __int32(0);

	output_lmf->write((char*)(signal_info),sizeof(fADC8_signal_info_struct));

	if (signal_info->signal_type != 8) {
		output_lmf->write((char*)ui32buffer, signal_info->signallength_including_header_in_32bit_words*4);
	}

	fADC8.at_least_1_signal_was_written = true;
	
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2b20(%rdi), %rdi
testq %rdi, %rdi
je 0x8a76
cmpb $0x0, 0x2b29(%rbx)
je 0x8a76
movq %rdx, %r14
movq %rsi, %r15
cmpb $0x1, 0x1a78(%rbx)
jne 0x8a14
xorl %esi, %esi
callq 0x13c82
movq 0x2b20(%rbx), %r12
movq (%r12), %rcx
movl $0x1, %esi
movl $0x38, %edx
movq %r15, %rdi
callq 0x2240
movq 0x10(%r12), %rcx
movq 0x20(%r12), %rax
addq $0x38, %rax
movq %rax, 0x20(%r12)
cmpq %rax, %rcx
jae 0x8a4e
movq %rax, 0x10(%r12)
cmpb $0x8, 0x18(%r15)
je 0x8a6b
movq 0x2b20(%rbx), %rdi
movl 0x28(%r15), %edx
shll $0x2, %edx
movq %r14, %rsi
callq 0x13a7c
movb $0x1, 0x1a78(%rbx)
movb $0x1, %al
jmp 0x8a82
movl $0xa, 0x12e0(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::WritefADC8EndGroupMarker()
bool LMF_IO::WritefADC8EndGroupMarker()
/////////////////////////////////////////////////////////////////
{
	if (fADC8.at_least_1_signal_was_written) *output_lmf << __int32(12345678);

	if (fADC8.bReadCustomData) {
		*output_lmf << number_of_bytes_in_PostEventData;
		for (__int32 i=0;i<number_of_bytes_in_PostEventData;i++) {
			*output_lmf << ui8_PostEventData[i];
		}
	}

	fADC8.at_least_1_signal_was_written = false;
	++uint64_number_of_written_events;

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpb $0x1, 0x1a78(%rdi)
jne 0x8ab0
movq 0x2b20(%rbx), %rdi
movl $0xbc614e, %esi         # imm = 0xBC614E
callq 0x13c82
cmpb $0x1, 0x1854(%rbx)
jne 0x8b16
movq 0x2b20(%rbx), %rdi
movl 0x1280(%rbx), %esi
callq 0x13c82
cmpl $0x0, 0x1280(%rbx)
jle 0x8b16
xorl %r14d, %r14d
movq 0x2b20(%rbx), %r15
movsbl 0x2e0(%rbx,%r14), %edi
movq (%r15), %rsi
callq 0x2190
movq 0x10(%r15), %rcx
movq 0x20(%r15), %rax
incq %rax
movq %rax, 0x20(%r15)
cmpq %rax, %rcx
jae 0x8b07
movq %rax, 0x10(%r15)
incq %r14
movslq 0x1280(%rbx), %rax
cmpq %rax, %r14
jl 0x8ad7
movb $0x0, 0x1a78(%rbx)
incq 0x2b10(%rbx)
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::WriteTCPIPHeader()
__int32 LMF_IO::WriteTCPIPHeader()
/////////////////////////////////////////////////////////////////
{
	unsigned __int32 byte_counter;
	byte_counter = 0;

	*output_lmf << frequency;	byte_counter += sizeof(double);		// frequency is always 4th value
	*output_lmf << IOaddress;	byte_counter += sizeof(__int32);		// IO address (parameter 1) always 5th value
	*output_lmf << timestamp_format_output;	byte_counter += sizeof(__int32);		// TimeInfo (parameter 2) always 6th value  (0,1,2)*32Bit

	unsigned __int32 dummy = (unsigned __int32)(DAQ_info.length());
	*output_lmf << dummy;
	byte_counter += sizeof(__int32);		// Length of DAQInfo always 7th value

	output_lmf->write(DAQ_info.c_str(), __int32(DAQ_info.length()));	// DAQInfo always 8th value
	byte_counter += (unsigned __int32)(DAQ_info.length());

	*output_lmf << LMF_Version_output; byte_counter += sizeof(__int32);
	*output_lmf << time_reference; byte_counter += sizeof(__int32);


	*output_lmf << data_format_in_userheader_output;					byte_counter   += sizeof(__int32);
	*output_lmf << number_of_channels_output;			byte_counter   += sizeof(__int32);
	*output_lmf << max_number_of_hits_output;			byte_counter   += sizeof(__int32);

	return byte_counter;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2b20(%rdi), %rdi
movsd 0x12c8(%rbx), %xmm0
callq 0x13c3c
movq 0x2b20(%rbx), %rdi
movl 0x2a4(%rbx), %esi
callq 0x13c82
movq 0x2b20(%rbx), %rdi
movl 0x2ac(%rbx), %esi
callq 0x13968
movl 0xa8(%rbx), %esi
movq 0x2b20(%rbx), %rdi
callq 0x13968
movq 0x2b20(%rbx), %rdi
movq 0xa0(%rbx), %rsi
movl 0xa8(%rbx), %edx
callq 0x13a7c
movl 0xa8(%rbx), %ebp
movq 0x2b20(%rbx), %rdi
movl 0x12a8(%rbx), %esi
callq 0x13c82
movq 0x2b20(%rbx), %rdi
movl 0x240(%rbx), %esi
callq 0x13c82
movq 0x2b20(%rbx), %rdi
movl 0x294(%rbx), %esi
callq 0x13c82
movq 0x2b20(%rbx), %rdi
movl 0x2c4(%rbx), %esi
callq 0x13c82
movq 0x2b20(%rbx), %rdi
movl 0x2cc(%rbx), %esi
callq 0x13c82
addl $0x28, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::WriteCAMACHeader()
__int32	LMF_IO::WriteCAMACHeader()
/////////////////////////////////////////////////////////////////
{
	unsigned __int32 byte_counter;
	byte_counter = 0;

	*output_lmf << frequency;	byte_counter += sizeof(double);		// frequency is always 4th value
	*output_lmf << IOaddress;	byte_counter += sizeof(__int32);		// IO address (parameter 1) always 5th value
	*output_lmf << timestamp_format_output;	byte_counter += sizeof(__int32);		// TimeInfo (parameter 2) always 6th value  (0,1,2)*32Bit

	unsigned __int32 dummy = __int32(DAQ_info.length());
	*output_lmf << dummy;
	byte_counter += sizeof(__int32);		// Length of DAQInfo always 7th value
	output_lmf->write(DAQ_info.c_str(), __int32(DAQ_info.length()));	// DAQInfo always 8th value
	byte_counter += __int32(DAQ_info.length());

	dummy = __int32(Camac_CIF.length());
	*output_lmf << dummy;
	byte_counter += sizeof(__int32);
	output_lmf->write(Camac_CIF.c_str(), __int32(Camac_CIF.length()));
	byte_counter += __int32(Camac_CIF.length());

	*output_lmf << system_timeout_output; byte_counter += sizeof(__int32);		// system time-out
	*output_lmf << time_reference_output; byte_counter += sizeof(__int32);
	*output_lmf << data_format_in_userheader_output;	byte_counter += sizeof(__int32);		// data format (2=short integer)

	return byte_counter;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x2b20(%rdi), %rdi
movsd 0x12c8(%rbx), %xmm0
callq 0x13c3c
movq 0x2b20(%rbx), %rdi
movl 0x2a4(%rbx), %esi
callq 0x13c82
movq 0x2b20(%rbx), %rdi
movl 0x2ac(%rbx), %esi
callq 0x13968
movl 0xa8(%rbx), %esi
movq 0x2b20(%rbx), %rdi
callq 0x13968
movq 0x2b20(%rbx), %rdi
movq 0xa0(%rbx), %rsi
movl 0xa8(%rbx), %edx
callq 0x13a7c
movl 0xa8(%rbx), %r14d
movl 0xc8(%rbx), %esi
movq 0x2b20(%rbx), %rdi
callq 0x13968
movq 0x2b20(%rbx), %rdi
movq 0xc0(%rbx), %rsi
movl 0xc8(%rbx), %edx
callq 0x13a7c
movl 0xc8(%rbx), %r15d
movq 0x2b20(%rbx), %rdi
movl 0x1290(%rbx), %esi
callq 0x13c82
movq 0x2b20(%rbx), %rdi
movl 0x244(%rbx), %esi
callq 0x13c82
movq 0x2b20(%rbx), %rdi
movl 0x294(%rbx), %esi
callq 0x13c82
leal (%r14,%r15), %eax
addl $0x24, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::WriteEventHeader(unsigned long long, unsigned int*)
void LMF_IO::WriteEventHeader(unsigned __int64 timestamp, unsigned __int32 cnt[])
/////////////////////////////////////////////////////////////////
{
	unsigned __int64 HeaderLength = 0;
	// EventLength information in 64Bit
	if (DAQVersion_output >= 20080000 || data_format_in_userheader_output == LM_USERDEF) {
		HeaderLength = timestamp_format_output + 1 + number_of_channels_output;	// +1 for HeaderLength itself

		HeaderLength = timestamp_format_output*sizeof(__int32) + 2*sizeof(__int64);	// +2 for HeaderLength itself, +2 for EventCounter (size in __int32)
		for(__int32 iCount=0;iCount<number_of_channels_output;++iCount) HeaderLength += cnt[iCount]*sizeof(__int32);
		HeaderLength += number_of_channels_output*sizeof(__int16);
#ifdef __linux__
		HeaderLength = (HeaderLength & 0x00ffffffffffffffLL) | 0xff00000000000000LL;	// set 0xff in bits 63..56 as EventMarker
#else
		HeaderLength = (HeaderLength & 0x00ffffffffffffff) | 0xff00000000000000;	// set 0xff in bits 63..56 as EventMarker
#endif
		*output_lmf << HeaderLength;
		*output_lmf << uint64_number_of_written_events; 
	}

	myLARGE_INTEGER LARGE_Timestamp;
	LARGE_Timestamp.QuadPart = timestamp;

	if (timestamp_format_output > 0) {
		*output_lmf << LARGE_Timestamp.LowPart;
		if (timestamp_format_output == 2) *output_lmf << LARGE_Timestamp.HighPart;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x132657f, 0x284(%rdi) # imm = 0x132657F
ja 0xe4a0
cmpl $-0x1, 0x294(%r14)
jne 0xe4fc
movl 0x2ac(%r14), %eax
leaq 0x10(,%rax,4), %rax
movslq 0x2c4(%r14), %rcx
testq %rcx, %rcx
jle 0xe4cc
xorl %esi, %esi
movl (%rdx,%rsi,4), %edi
leaq (%rax,%rdi,4), %rax
incq %rsi
cmpq %rsi, %rcx
jne 0xe4bd
leaq (%rax,%rcx,2), %rax
movabsq $-0x100000000000000, %rsi # imm = 0xFF00000000000000
orq %rax, %rsi
movq 0x2b20(%r14), %rdi
callq 0x13a38
movq 0x2b10(%r14), %rsi
movq 0x2b20(%r14), %rdi
callq 0x13a38
cmpl $0x0, 0x2ac(%r14)
je 0xe537
movq 0x2b20(%r14), %rdi
movl %ebx, %esi
callq 0x13968
cmpl $0x2, 0x2ac(%r14)
jne 0xe537
shrq $0x20, %rbx
movq 0x2b20(%r14), %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x13c82
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::WriteTDCData(double, unsigned int*, int*)
void LMF_IO::WriteTDCData(double timestamp, unsigned __int32 cnt[], __int32 *i32TDC)
/////////////////////////////////////////////////////////////////
{
	if (!output_lmf|| !OutputFileIsOpen) {
		errorflag = 10;
		return;
	}

	unsigned __int64 new_timestamp = (unsigned __int64)(timestamp * frequency + 0.001);

	WriteTDCData(new_timestamp, cnt, i32TDC);

	return;
}

// Assembly:
cmpq $0x0, 0x2b20(%rdi)
je 0xed65
cmpb $0x0, 0x2b29(%rdi)
je 0xed65
movq %rdx, %rcx
movq %rsi, %rdx
mulsd 0x12c8(%rdi), %xmm0
addsd 0x632f(%rip), %xmm0     # 0x15070
cvttsd2si %xmm0, %rax
movq %rax, %r8
sarq $0x3f, %r8
subsd 0x6323(%rip), %xmm0     # 0x15078
cvttsd2si %xmm0, %rsi
andq %r8, %rsi
orq %rax, %rsi
jmp 0xe540
movl $0xa, 0x12e0(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::WriteTDCData(double, unsigned int*, double*)
void LMF_IO::WriteTDCData(double timestamp, unsigned __int32 cnt[], double *dtdc)
/////////////////////////////////////////////////////////////////
{
	if (!output_lmf || !OutputFileIsOpen) {
		errorflag = 10;
		return;
	}
	unsigned __int64 new_timestamp = (unsigned __int64)(timestamp * frequency + 0.001);

	WriteTDCData(new_timestamp, cnt, dtdc);

	return;
}

// Assembly:
cmpq $0x0, 0x2b20(%rdi)
je 0xf609
cmpb $0x0, 0x2b29(%rdi)
je 0xf609
movq %rdx, %rcx
movq %rsi, %rdx
mulsd 0x12c8(%rdi), %xmm0
addsd 0x5a8b(%rip), %xmm0     # 0x15070
cvttsd2si %xmm0, %rax
movq %rax, %r8
sarq $0x3f, %r8
subsd 0x5a7f(%rip), %xmm0     # 0x15078
cvttsd2si %xmm0, %rsi
andq %r8, %rsi
orq %rax, %rsi
jmp 0xed70
movl $0xa, 0x12e0(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::WriteTDCData(double, unsigned int*, unsigned short*)
void LMF_IO::WriteTDCData(double timestamp, unsigned __int32 cnt[], unsigned __int16 * us16TDC)
/////////////////////////////////////////////////////////////////
{
	if (!output_lmf || !OutputFileIsOpen) {
		errorflag = 10;
		return;
	}
	unsigned __int64 new_timestamp = (unsigned __int64)(timestamp * frequency);

	WriteTDCData(new_timestamp, cnt, us16TDC);

	return;
}

// Assembly:
cmpq $0x0, 0x2b20(%rdi)
je 0xfdd9
cmpb $0x0, 0x2b29(%rdi)
je 0xfdd9
movq %rdx, %rcx
movq %rsi, %rdx
mulsd 0x12c8(%rdi), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %r8
sarq $0x3f, %r8
subsd 0x52af(%rip), %xmm0     # 0x15078
cvttsd2si %xmm0, %rsi
andq %r8, %rsi
orq %rax, %rsi
jmp 0xf614
movl $0xa, 0x12e0(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::SeekToEventNumber(unsigned long long)
bool LMF_IO::SeekToEventNumber(unsigned __int64 target_number)
/////////////////////////////////////////////////////////////////
{
	if (DAQ_ID == DAQ_ID_SIMPLE) return false;

	if (target_number == 0) {
		input_lmf->seek((unsigned __int64)(Headersize + User_header_size));
		must_read_first = true;
		errorflag = 0;
		input_lmf->error = 0;
		return true;
	}

	if (data_format_in_userheader == LM_USERDEF) {errorflag = 16; return false;}

	if (!input_lmf) {
		errorflag = 9;
		return false;
	}


/*	unsigned __int64 filesize;
	unsigned __int64 pos = input_lmf->tell();
	input_lmf->seek_to_end();
	filesize = input_lmf->tell();
	input_lmf->seek(pos);
*/

	

	if (target_number < 0) return false;
	if (target_number > uint64_Numberofevents) return false;
	__int32 eventsize = 0;
	if (data_format_in_userheader == 2 ) eventsize = 2 * Numberofcoordinates;
	if (data_format_in_userheader == 5 ) eventsize = 8 * Numberofcoordinates;
	if (data_format_in_userheader == 10) eventsize = 4 * Numberofcoordinates;

	if (DAQ_ID == DAQ_ID_RAW32BIT) eventsize = 4 * number_of_channels * (max_number_of_hits+1);

	if (input_lmf->filesize < (unsigned __int64)(eventsize)*target_number + (unsigned  __int64)(Headersize + User_header_size)) return false;

	unsigned __int64 new_position = (unsigned __int64)(eventsize)*target_number + (unsigned __int64)(Headersize + User_header_size);

	input_lmf->seek(new_position);



	uint64_number_of_read_events = target_number;
	must_read_first = true;
	errorflag = 0;
	input_lmf->error = 0;
	return true;
}

// Assembly:
movl 0x288(%rdi), %ecx
cmpl $0x65, %ecx
jne 0xfdfa
xorl %eax, %eax
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0xfebe
movl 0x290(%rbx), %edx
cmpl $-0x1, %edx
je 0xfeee
movq 0x2b18(%rbx), %r12
testq %r12, %r12
je 0xfefa
xorl %eax, %eax
cmpq %r14, 0x268(%rbx)
jb 0xff35
movl 0x270(%rbx), %esi
leal (%rsi,%rsi), %edi
cmpl $0x2, %edx
cmovel %edi, %eax
leal (,%rsi,8), %edi
cmpl $0x5, %edx
cmovnel %eax, %edi
shll $0x2, %esi
cmpl $0xa, %edx
cmovnel %edi, %esi
cmpl $0x64, %ecx
jne 0xfe7b
movl 0x2bc(%rbx), %esi
incl %esi
imull 0x2b4(%rbx), %esi
shll $0x2, %esi
movslq %esi, %rax
imulq %r14, %rax
movl 0x29c(%rbx), %r15d
addl 0x298(%rbx), %r15d
addq %rax, %r15
cmpq %r15, 0x10(%r12)
setae %al
jb 0xff35
movq (%r12), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x20c0
testl %eax, %eax
je 0xff0e
movl $0x1, 0x8(%r12)
jmp 0xff13
movq 0x2b18(%rbx), %r15
movl 0x29c(%rbx), %r14d
addl 0x298(%rbx), %r14d
movq (%r15), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x20c0
testl %eax, %eax
je 0xff08
movl $0x1, 0x8(%r15)
jmp 0xff1a
movl $0x10, 0x12e0(%rbx)
jmp 0xff04
movl $0x9, 0x12e0(%rbx)
xorl %eax, %eax
jmp 0xff35
movq %r14, 0x20(%r15)
jmp 0xff1a
movq %r15, 0x20(%r12)
movq %r14, 0x260(%rbx)
movb $0x1, 0x2b4c(%rbx)
xorl %eax, %eax
movl %eax, 0x12e0(%rbx)
movq 0x2b18(%rbx), %rcx
movl %eax, 0x8(%rcx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::Read_TDC8HP_raw_format(unsigned long long&)
bool LMF_IO::Read_TDC8HP_raw_format(unsigned __int64 &ui64TDC8HP_AbsoluteTimeStamp_)
/////////////////////////////////////////////////////////////////
{
	__int32 count;
	*input_lmf >> count;
	if (input_lmf->error) return false;
	if (!count) return false;
	if (ui32buffer_size < count) {
		if (ui32buffer) {delete[] ui32buffer; ui32buffer = 0;}
		ui32buffer_size = count + 5000;
		ui32buffer = new unsigned __int32[ui32buffer_size];
	}
	input_lmf->read(this->ui32buffer,count*sizeof(__int32));
	if (input_lmf->error) return false;
	if (!PCIGetTDC_TDC8HP_25psGroupMode(ui64TDC8HP_AbsoluteTimeStamp_, count, this->ui32buffer)) return false;
	return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x2b18(%rdi), %rdi
leaq 0x4(%rsp), %rsi
movl $0x4, %edx
callq 0x139ac
movq 0x2b18(%r14), %rax
cmpl $0x0, 0x8(%rax)
je 0x101f3
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl 0x4(%rsp), %eax
testl %eax, %eax
je 0x101e9
cmpl %eax, 0x2b38(%r14)
jge 0x10258
movq 0x2b30(%r14), %rdi
testq %rdi, %rdi
je 0x10220
callq 0x21a0
movq $0x0, 0x2b30(%r14)
movslq 0x4(%rsp), %rax
leaq 0x1388(%rax), %rcx
cmpq $-0x1388, %rax          # imm = 0xEC78
movl %ecx, 0x2b38(%r14)
leaq 0x4e20(,%rax,4), %rax
movq $-0x1, %rdi
cmovgeq %rax, %rdi
callq 0x2030
movq %rax, 0x2b30(%r14)
movq 0x2b18(%r14), %rdi
movq 0x2b30(%r14), %rsi
movl 0x4(%rsp), %edx
shll $0x2, %edx
callq 0x13d0a
movq 0x2b18(%r14), %rax
cmpl $0x0, 0x8(%rax)
jne 0x101e9
movl 0x4(%rsp), %edx
movq 0x2b30(%r14), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xff42
jmp 0x101eb
// File: /workspace/github_cpp_makefile_star2_O1/NichtJens[P]lmf2txt/LMF_IO.cpp
// Function: LMF_IO::GetNumberOfHitsArray(unsigned int*)
void LMF_IO::GetNumberOfHitsArray(unsigned __int32 cnt[]) {
/////////////////////////////////////////////////////////////////
	__int32 i;

	if (must_read_first) {
		if (!ReadNextEvent()) return;
	}

	for (i=0;i<num_channels;++i) cnt[i] = (number_of_hits[i] < (unsigned __int32)(num_ions)) ? number_of_hits[i] : num_ions;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x1, 0x2b4c(%rdi)
jne 0x12063
movq %r14, %rdi
callq 0x1029e
testb %al, %al
je 0x12097
cmpl $0x0, 0x2b70(%r14)
jle 0x12097
movq 0x2b50(%r14), %rax
xorl %ecx, %ecx
movl (%rax,%rcx,4), %edx
movl 0x2b74(%r14), %esi
cmpl %esi, %edx
cmovbl %edx, %esi
movl %esi, (%rbx,%rcx,4)
incq %rcx
movslq 0x2b70(%r14), %rdx
cmpq %rdx, %rcx
jl 0x12076
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop