LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: sthapliyal37[P]Microprocessor_8085_Updated/Validation.cpp
// Function: memoryValidation(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool memoryValidation(string start)
{
			int num=0;
			int n=start.length();
			for(int i=0;i<n;i++)
			{	
					int a=stoi(start[i]);
					num=(num*10) + a; 
			}
			if(num>=2000 && num<=8000)
							return 1;
			return 0;				
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x28(%rbp)
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
callq 0x33b0
movl %eax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x3ecb
movq -0x28(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x34a0
movsbl (%rax), %edi
callq 0x3950
movl %eax, -0x20(%rbp)
imull $0xa, -0x14(%rbp), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3e96
cmpl $0x7d0, -0x14(%rbp)     # imm = 0x7D0
jl 0x3ee3
cmpl $0x1f40, -0x14(%rbp)    # imm = 0x1F40
jg 0x3ee3
movb $0x1, -0x1(%rbp)
jmp 0x3ee7
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sthapliyal37[P]Microprocessor_8085_Updated/Memory_Allocation.cpp
// Function: sumBase14(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
char *sumBase14(string num1, string num2) 
{ 
	int l1 = num1.length(); 
	int l2 = num2.length(); 
	char *res; 
	int i; 
	int nml1, nml2, res_nml; 
	bool carry = 0; 
		
	if(l1 != l2) 
	{ 
		cout << "Function doesn't support numbers of different"
				" lengths. If you want to add such numbers then"
				" prefix smaller number with required no. of zeroes"; 
		assert(0); 
	} 
	res = new char[(sizeof(char)*(l1 + 1))]; 
			
	for(i = l1-1; i >= 0; i--) 
	{ 
		nml1 = getNumeralValue(num1[i]); 
		nml2 = getNumeralValue(num2[i]); 
		
		res_nml = carry + nml1 + nml2; 
		
		if(res_nml >= 14) 
		{ 
			carry = 1; 
			res_nml -= 14; 
		} 
		else
		{ 
			carry = 0; 
		} 
		res[i+1] = getNumeral(res_nml); 
	} 
	if(carry == 0) 
		return (res + 1); 
	
	res[0] = '1'; 
	return res; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x50(%rbp)
movq %rsi, -0x48(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
callq 0x33b0
movq -0x48(%rbp), %rdi
movl %eax, -0x1c(%rbp)
callq 0x33b0
movl %eax, -0x20(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
je 0x548d
movq 0x15b6e(%rip), %rdi     # 0x1afd0
leaq 0xfc41(%rip), %rsi      # 0x150aa
callq 0x3270
leaq 0xfd76(%rip), %rdi      # 0x151eb
leaq 0xfcbc(%rip), %rsi      # 0x15138
movl $0x1a, %edx
leaq 0xfcc6(%rip), %rcx      # 0x1514e
callq 0x31b0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
shlq $0x0, %rdi
callq 0x3030
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jl 0x5539
movq -0x50(%rbp), %rdi
movslq -0x2c(%rbp), %rsi
callq 0x34a0
movsbl (%rax), %edi
callq 0x5570
movq -0x48(%rbp), %rdi
movl %eax, -0x30(%rbp)
movslq -0x2c(%rbp), %rsi
callq 0x34a0
movsbl (%rax), %edi
callq 0x5570
movl %eax, -0x34(%rbp)
movl -0x3c(%rbp), %eax
addl -0x30(%rbp), %eax
addl -0x34(%rbp), %eax
movl %eax, -0x38(%rbp)
cmpl $0xe, -0x38(%rbp)
jl 0x550a
movl $0x1, -0x3c(%rbp)
movl -0x38(%rbp), %eax
subl $0xe, %eax
movl %eax, -0x38(%rbp)
jmp 0x5511
movl $0x0, -0x3c(%rbp)
movl -0x38(%rbp), %edi
callq 0x55f0
movb %al, %dl
movq -0x28(%rbp), %rax
movl -0x2c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x54ac
cmpl $0x0, -0x3c(%rbp)
jne 0x554d
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x555c
movq -0x28(%rbp), %rax
movb $0x31, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sthapliyal37[P]Microprocessor_8085_Updated/Memory_Allocation.cpp
// Function: getNumeralValue(char)
int getNumeralValue(char num) 
{ 
	if( num >= '0' && num <= '9') 
		return (num - '0'); 
	if( num >= 'A' && num <= 'D') 
		return (num - 'A' + 10); 
			
	assert(0); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x5(%rbp)
movsbl -0x5(%rbp), %eax
cmpl $0x30, %eax
jl 0x559c
movsbl -0x5(%rbp), %eax
cmpl $0x39, %eax
jg 0x559c
movsbl -0x5(%rbp), %eax
subl $0x30, %eax
movl %eax, -0x4(%rbp)
jmp 0x55dc
movsbl -0x5(%rbp), %eax
cmpl $0x41, %eax
jl 0x55bd
movsbl -0x5(%rbp), %eax
cmpl $0x44, %eax
jg 0x55bd
movsbl -0x5(%rbp), %eax
subl $0x41, %eax
addl $0xa, %eax
movl %eax, -0x4(%rbp)
jmp 0x55dc
leaq 0xfc27(%rip), %rdi      # 0x151eb
leaq 0xfb6d(%rip), %rsi      # 0x15138
movl $0x3e, %edx
leaq 0xfb97(%rip), %rcx      # 0x1516e
callq 0x31b0
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sthapliyal37[P]Microprocessor_8085_Updated/Memory_Allocation.cpp
// Function: getNumeral(int)
char getNumeral(int val) 
{ 
	if( val >= 0 && val <= 9) 
		return (val + '0'); 
	if( val >= 10 && val <= 14) 
		return (val + 'A' - 10); 
	assert(0); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jl 0x5612
cmpl $0x9, -0x8(%rbp)
jg 0x5612
movl -0x8(%rbp), %eax
addl $0x30, %eax
movb %al, -0x1(%rbp)
jmp 0x564b
cmpl $0xa, -0x8(%rbp)
jl 0x562c
cmpl $0xe, -0x8(%rbp)
jg 0x562c
movl -0x8(%rbp), %eax
addl $0x41, %eax
subl $0xa, %eax
movb %al, -0x1(%rbp)
jmp 0x564b
leaq 0xfbb8(%rip), %rdi      # 0x151eb
leaq 0xfafe(%rip), %rsi      # 0x15138
movl $0x46, %edx
leaq 0xfb42(%rip), %rcx      # 0x15188
callq 0x31b0
movb -0x1(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sthapliyal37[P]Microprocessor_8085_Updated/Memory_Allocation.cpp
// Function: hexadecimalToDecimal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int hexadecimalToDecimal(string hexVal) 
{    
    int len = hexVal.length(); 
      
    int base = 1; 
      
    int dec_val = 0; 
      
    for (int i=len-1; i>=0; i--) 
    {    
        if (hexVal[i]>='0' && hexVal[i]<='9') 
        { 
            dec_val += (hexVal[i] - 48)*base; 
                  
            base = base * 16; 
        } 
          else if (hexVal[i]>='a' && hexVal[i]<='f') 
        { 
            dec_val += (hexVal[i] - 55)*base; 
          
            base = base*16; 
        } 
    } 
      
    return dec_val; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x20(%rbp)
movq %rdi, -0x8(%rbp)
callq 0x33b0
movl %eax, -0xc(%rbp)
movl $0x1, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0xc(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jl 0x574d
movq -0x20(%rbp), %rdi
movslq -0x18(%rbp), %rsi
callq 0x34a0
movsbl (%rax), %eax
cmpl $0x30, %eax
jl 0x56eb
movq -0x20(%rbp), %rdi
movslq -0x18(%rbp), %rsi
callq 0x34a0
movsbl (%rax), %eax
cmpl $0x39, %eax
jg 0x56eb
movq -0x20(%rbp), %rdi
movslq -0x18(%rbp), %rsi
callq 0x34a0
movsbl (%rax), %eax
subl $0x30, %eax
imull -0x10(%rbp), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
shll $0x4, %eax
movl %eax, -0x10(%rbp)
jmp 0x573d
movq -0x20(%rbp), %rdi
movslq -0x18(%rbp), %rsi
callq 0x34a0
movsbl (%rax), %eax
cmpl $0x61, %eax
jl 0x573b
movq -0x20(%rbp), %rdi
movslq -0x18(%rbp), %rsi
callq 0x34a0
movsbl (%rax), %eax
cmpl $0x66, %eax
jg 0x573b
movq -0x20(%rbp), %rdi
movslq -0x18(%rbp), %rsi
callq 0x34a0
movsbl (%rax), %eax
subl $0x37, %eax
imull -0x10(%rbp), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
shll $0x4, %eax
movl %eax, -0x10(%rbp)
jmp 0x573d
jmp 0x573f
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x568f
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sthapliyal37[P]Microprocessor_8085_Updated/Essential.cpp
// Function: decimalToHex[abi:cxx11](int*)
string decimalToHex(int* deciml)
{
	string hex="";
	int size=sizeof(deciml)/sizeof(deciml[0]);
	for(int i=0;i<size;i++)
	{
		if(deciml[i]>=0 && deciml[i]<=9)
			hex = hex + char('0' + deciml[i]);
		else if(deciml[i]>=10 && deciml[i]<=15)
			hex+=(char)('A'+(deciml[i]-10));
	}
	return hex;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x60(%rbp)
movq %rdi, %rax
movq %rax, -0x68(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
leaq -0x12(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x3440
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rdx
leaq 0xe077(%rip), %rsi      # 0x15202
callq 0x50d0
jmp 0x7192
leaq -0x12(%rbp), %rdi
callq 0x32f0
movl $0x2, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x28(%rbp), %eax
jge 0x7286
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jl 0x723a
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
cmpl $0x9, (%rax,%rcx,4)
jg 0x723a
movq -0x60(%rbp), %rsi
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
addl $0x30, %eax
movsbl %al, %edx
leaq -0x50(%rbp), %rdi
callq 0x8270
jmp 0x71f1
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x3330
leaq -0x50(%rbp), %rdi
callq 0x3190
jmp 0x7276
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x12(%rbp), %rdi
callq 0x32f0
jmp 0x72a3
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x3190
jmp 0x72a3
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
cmpl $0xa, (%rax,%rcx,4)
jl 0x7274
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
cmpl $0xf, (%rax,%rcx,4)
jg 0x7274
movq -0x60(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
addl $0x37, %eax
movsbl %al, %esi
callq 0x31a0
jmp 0x7272
jmp 0x7274
jmp 0x7276
jmp 0x7278
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x71a9
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x7299
movq -0x60(%rbp), %rdi
callq 0x3190
movq -0x68(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x3430
nopl (%rax)
// File: sthapliyal37[P]Microprocessor_8085_Updated/Essential.cpp
// Function: hexToDecimal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int*)
void hexToDecimal(string pc,int arr[]){
 
	int l = pc.length();
	int p = 0;
	for(int i =0 ;i<l;i++){
	
		if(pc[i]>='0' && pc[i]<='9')
			arr[i] = pc[i] - '0';
		else 
			arr[i] = 10 + (pc[i] - 'A'); 
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x28(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x33b0
movl %eax, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x7afa
movq -0x28(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x34a0
movsbl (%rax), %eax
cmpl $0x30, %eax
jl 0x7acc
movq -0x28(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x34a0
movsbl (%rax), %eax
cmpl $0x39, %eax
jg 0x7acc
movq -0x28(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x34a0
movsbl (%rax), %edx
subl $0x30, %edx
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x7aed
movq -0x28(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x34a0
movsbl (%rax), %edx
subl $0x41, %edx
addl $0xa, %edx
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x7aef
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x7a7a
addq $0x30, %rsp
popq %rbp
retq
// File: sthapliyal37[P]Microprocessor_8085_Updated/arithmetic.cpp
// Function: ADI(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*)
void ADI(string instruction,string* registers,bool* flag)
{
		int length = instruction.length();
	if(length == 2){
	
		if(validityData(instruction)){
			registers[0] = hexAdd(instruction,registers[0],flag,true);
		}
		}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0xb8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
callq 0x33b0
movl %eax, -0x1c(%rbp)
cmpl $0x2, -0x1c(%rbp)
jne 0xbd38
movq -0xb8(%rbp), %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x3110
movq -0xc8(%rbp), %rdi
callq 0x3cc0
movb %al, -0xb9(%rbp)
jmp 0xbc5b
leaq -0x40(%rbp), %rdi
callq 0x3190
movb -0xb9(%rbp), %al
testb $0x1, %al
jne 0xbc73
jmp 0xbd36
movq -0xb8(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x3110
movq -0x10(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
callq 0x3110
jmp 0xbc98
movq -0x18(%rbp), %rcx
leaq -0x70(%rbp), %rdi
leaq -0x90(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
movl $0x1, %r8d
callq 0x76b0
jmp 0xbcbb
movq -0x10(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x3330
leaq -0x70(%rbp), %rdi
callq 0x3190
leaq -0xb0(%rbp), %rdi
callq 0x3190
leaq -0x90(%rbp), %rdi
callq 0x3190
jmp 0xbd36
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x3190
jmp 0xbd41
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xbd28
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x3190
leaq -0x90(%rbp), %rdi
callq 0x3190
jmp 0xbd41
jmp 0xbd38
addq $0xd0, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x3430
nopw (%rax,%rax)
// File: sthapliyal37[P]Microprocessor_8085_Updated/arithmetic.cpp
// Function: SUI(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*)
void SUI(string instruction,string* registers,bool* flag)
{
	int length = instruction.length();
	if(length == 2){
	
		if(validityData(instruction)){		
				registers[0] = hexSub(instruction,registers[0],flag,true);
		}
		else{
			
			cout<<"Error: \n";
			exit(0);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0xb8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
callq 0x33b0
movl %eax, -0x1c(%rbp)
cmpl $0x2, -0x1c(%rbp)
jne 0xe612
movq -0xb8(%rbp), %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x3110
movq -0xc8(%rbp), %rdi
callq 0x3cc0
movb %al, -0xb9(%rbp)
jmp 0xe51b
leaq -0x40(%rbp), %rdi
callq 0x3190
movb -0xb9(%rbp), %al
testb $0x1, %al
jne 0xe533
jmp 0xe5f6
movq -0xb8(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x3110
movq -0x10(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
callq 0x3110
jmp 0xe558
movq -0x18(%rbp), %rcx
leaq -0x70(%rbp), %rdi
leaq -0x90(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
movl $0x1, %r8d
callq 0x7f00
jmp 0xe57b
movq -0x10(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x3330
leaq -0x70(%rbp), %rdi
callq 0x3190
leaq -0xb0(%rbp), %rdi
callq 0x3190
leaq -0x90(%rbp), %rdi
callq 0x3190
jmp 0xe610
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x3190
jmp 0xe61b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xe5e8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x3190
leaq -0x90(%rbp), %rdi
callq 0x3190
jmp 0xe61b
movq 0xc9d3(%rip), %rdi      # 0x1afd0
leaq 0x6bf6(%rip), %rsi      # 0x151fa
callq 0x3270
xorl %edi, %edi
callq 0x3320
jmp 0xe612
addq $0xd0, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x3430
nopw %cs:(%rax,%rax)
nop
// File: sthapliyal37[P]Microprocessor_8085_Updated/Logical.cpp
// Function: CMA(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*)
void CMA(string instruction,string registers[],bool flags[])
{
string complment = complement(registers[0]);
	registers[0] = complment;
		
	if(registers[0]=="00")
    {
        flags[6] = true;
        flags[2] = true;
    }
    else
    {
        string temp = registers[0];
		int array[2];
		hexToDecimal(temp,array);
		int value=array[1]*16+array[0];
		bitset<8> dataInBinary(value);
		int parity = dataInBinary.count();
		if(parity%2 == 0 && parity!=0)
			flags[2] = true;
		else
			flags[2] = false;
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x58(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x3110
movq -0xd0(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x6ef0
jmp 0xff1d
leaq -0x58(%rbp), %rdi
callq 0x3190
movq -0x10(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3050
jmp 0xff35
movq -0x10(%rbp), %rdi
leaq 0x52aa(%rip), %rsi      # 0x151ea
callq 0x50a0
movb %al, -0xd1(%rbp)
jmp 0xff4d
movb -0xd1(%rbp), %al
testb $0x1, %al
jne 0xff59
jmp 0xff99
movq -0x18(%rbp), %rax
movb $0x1, 0x6(%rax)
movq -0x18(%rbp), %rax
movb $0x1, 0x2(%rax)
jmp 0x1008d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x3190
jmp 0x100a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x1009f
movq -0x10(%rbp), %rsi
leaq -0x88(%rbp), %rdi
callq 0x3110
jmp 0xffab
leaq -0xb0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x3110
jmp 0xffc0
leaq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x7a50
jmp 0xffd5
leaq -0xb0(%rbp), %rdi
callq 0x3190
movl -0x8c(%rbp), %eax
shll $0x4, %eax
addl -0x90(%rbp), %eax
movl %eax, -0xb4(%rbp)
movslq -0xb4(%rbp), %rsi
leaq -0xc0(%rbp), %rdi
callq 0x83f0
leaq -0xc0(%rbp), %rdi
callq 0x8440
movl %eax, -0xc4(%rbp)
movl -0xc4(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x10069
cmpl $0x0, -0xc4(%rbp)
je 0x10069
movq -0x18(%rbp), %rax
movb $0x1, 0x2(%rax)
jmp 0x10071
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x1007f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x3190
jmp 0x1007f
movq -0x18(%rbp), %rax
movb $0x0, 0x2(%rax)
leaq -0x88(%rbp), %rdi
callq 0x3190
jmp 0x1008d
leaq -0x88(%rbp), %rdi
callq 0x3190
jmp 0x1009f
leaq -0x38(%rbp), %rdi
callq 0x3190
addq $0xe0, %rsp
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x3190
movq -0x60(%rbp), %rdi
callq 0x3430
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: sthapliyal37[P]Microprocessor_8085_Updated/DataTransfer.cpp
// Function: LDA(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)
void LDA(string instruction,string* registers,bool* flag,map<string,string>&memory){
		int length=instruction.length();
	if(length==4)
		if(validityAddress(instruction))
			registers[0] = memory[instruction];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
callq 0x33b0
movl %eax, -0x24(%rbp)
cmpl $0x4, -0x24(%rbp)
jne 0x11f3f
movq -0x60(%rbp), %rsi
leaq -0x48(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x3110
movq -0x70(%rbp), %rdi
callq 0x3db0
movb %al, -0x61(%rbp)
jmp 0x11ef9
leaq -0x48(%rbp), %rdi
callq 0x3190
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0x11f0b
jmp 0x11f3d
movq -0x60(%rbp), %rsi
movq -0x20(%rbp), %rdi
callq 0xe790
movq %rax, %rsi
movq -0x10(%rbp), %rdi
callq 0x3050
jmp 0x11f3d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x3190
jmp 0x11f45
jmp 0x11f3f
addq $0x70, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x3430
nop
// File: sthapliyal37[P]Microprocessor_8085_Updated/DataTransfer.cpp
// Function: XCHG(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*)
void XCHG(string* registers,bool* flag){
string temp=registers[3];
	registers[3]=registers[5];
	registers[5]=temp;
	temp=registers[4];
	registers[4]=registers[6];
	registers[6]=temp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
addq $0x60, %rsi
leaq -0x30(%rbp), %rdi
callq 0x3110
movq -0x8(%rbp), %rdi
movq %rdi, %rsi
addq $0xa0, %rsi
addq $0x60, %rdi
callq 0x3050
jmp 0x1248a
movq -0x8(%rbp), %rdi
addq $0xa0, %rdi
leaq -0x30(%rbp), %rsi
callq 0x3050
jmp 0x124a0
movq -0x8(%rbp), %rsi
subq $-0x80, %rsi
leaq -0x30(%rbp), %rdi
callq 0x3050
jmp 0x124b3
movq -0x8(%rbp), %rdi
movq %rdi, %rsi
addq $0xc0, %rsi
subq $-0x80, %rdi
callq 0x3050
jmp 0x124cc
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
leaq -0x30(%rbp), %rsi
callq 0x3050
jmp 0x124e2
leaq -0x30(%rbp), %rdi
callq 0x3190
addq $0x40, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3190
movq -0x38(%rbp), %rdi
callq 0x3430
nop
// File: sthapliyal37[P]Microprocessor_8085_Updated/DataTransfer.cpp
// Function: STA(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)
void STA(string instruction,string* registers,bool* flag,map<string,string> &memory){

int length=instruction.length();
	//cout<<length<<endl;
	if(length==4)
	{
		if(validityAddress(instruction))
		{	memory[instruction]=registers[0];
			//cout<<memory[instruction]<<endl;
		}	
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
callq 0x33b0
movl %eax, -0x24(%rbp)
cmpl $0x4, -0x24(%rbp)
jne 0x125aa
movq -0x60(%rbp), %rsi
leaq -0x48(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x3110
movq -0x70(%rbp), %rdi
callq 0x3db0
movb %al, -0x61(%rbp)
jmp 0x1255c
leaq -0x48(%rbp), %rdi
callq 0x3190
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0x1256e
jmp 0x125a8
movq -0x60(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x20(%rbp), %rdi
callq 0xe790
movq -0x78(%rbp), %rsi
movq %rax, %rdi
callq 0x3050
jmp 0x125a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x3190
jmp 0x125b3
jmp 0x125aa
addq $0x80, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x3430
nopl (%rax)
// File: sthapliyal37[P]Microprocessor_8085_Updated/DataTransfer.cpp
// Function: SET(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)
void SET(string instruction,string instruction2,map<string,string>& memory){
int length1=instruction.length();
	int length2=instruction2.length();
	if(length1==4&&length2==2)
		if(validityAddress(instruction)&&validityData(instruction2))
			memory[instruction]=instruction2;		
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x88(%rbp)
movq %rsi, -0x80(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
callq 0x33b0
movq -0x80(%rbp), %rdi
movl %eax, -0x1c(%rbp)
callq 0x33b0
movl %eax, -0x20(%rbp)
cmpl $0x4, -0x1c(%rbp)
jne 0x1298a
cmpl $0x2, -0x20(%rbp)
jne 0x1298a
movq -0x88(%rbp), %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x3110
movq -0x98(%rbp), %rdi
movb $0x0, -0x71(%rbp)
callq 0x3db0
movb %al, -0x89(%rbp)
jmp 0x128b9
movb -0x89(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x99(%rbp)
jne 0x128ce
jmp 0x12900
movq -0x80(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x3110
jmp 0x128dd
movb $0x1, -0x71(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x3cc0
movb %al, -0x9a(%rbp)
jmp 0x128f2
movb -0x9a(%rbp), %al
movb %al, -0x99(%rbp)
jmp 0x12900
movb -0x99(%rbp), %al
movb %al, -0x9b(%rbp)
testb $0x1, -0x71(%rbp)
jne 0x12914
jmp 0x1291d
leaq -0x70(%rbp), %rdi
callq 0x3190
leaq -0x40(%rbp), %rdi
callq 0x3190
movb -0x9b(%rbp), %al
testb $0x1, %al
jne 0x12932
jmp 0x12988
movq -0x88(%rbp), %rsi
movq -0x18(%rbp), %rdi
callq 0xe790
movq -0x80(%rbp), %rsi
movq %rax, %rdi
callq 0x3050
jmp 0x12988
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x1297d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
testb $0x1, -0x71(%rbp)
jne 0x12972
jmp 0x1297b
leaq -0x70(%rbp), %rdi
callq 0x3190
jmp 0x1297d
leaq -0x40(%rbp), %rdi
callq 0x3190
jmp 0x12993
jmp 0x1298a
addq $0xa0, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x3430
nopl (%rax)
// File: lvandeve[P]lodepng/pngdetail.cpp
// Function: colorTypeString[abi:cxx11](LodePNGColorType)
std::string colorTypeString(LodePNGColorType type) {
  std::string name;
  switch(type) {
    case LCT_GREY: name = "grey"; break;
    case LCT_RGB: name = "RGB"; break;
    case LCT_PALETTE: name = "palette"; break;
    case LCT_GREY_ALPHA: name = "grey+alpha"; break;
    case LCT_RGBA: name = "RGBA"; break;
    default: name = "invalid"; break;
  }
  std::stringstream ss;
  ss << type << " (" << name << ")";
  return ss.str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x200, %rsp            # imm = 0x200
movq %rdi, -0x1e0(%rbp)
movq %rdi, %rax
movq %rax, -0x1d8(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x2370
movl -0xc(%rbp), %eax
movq %rax, -0x1d0(%rbp)
subq $0x6, %rax
ja 0x27cfc
movq -0x1d0(%rbp), %rax
leaq 0x120b2(%rip), %rcx     # 0x39d30
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x12771(%rip), %rsi     # 0x3a3ff
leaq -0x30(%rbp), %rdi
callq 0x2350
jmp 0x27c99
jmp 0x27d10
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x27dd8
leaq 0x108e0(%rip), %rsi     # 0x38593
leaq -0x30(%rbp), %rdi
callq 0x2350
jmp 0x27cbe
jmp 0x27d10
leaq 0x11aab(%rip), %rsi     # 0x39772
leaq -0x30(%rbp), %rdi
callq 0x2350
jmp 0x27cd2
jmp 0x27d10
leaq 0x12729(%rip), %rsi     # 0x3a404
leaq -0x30(%rbp), %rdi
callq 0x2350
jmp 0x27ce6
jmp 0x27d10
leaq 0x12720(%rip), %rsi     # 0x3a40f
leaq -0x30(%rbp), %rdi
callq 0x2350
jmp 0x27cfa
jmp 0x27d10
leaq 0x1175f(%rip), %rsi     # 0x39462
leaq -0x30(%rbp), %rdi
callq 0x2350
jmp 0x27d0e
jmp 0x27d10
leaq -0x1c8(%rbp), %rdi
callq 0x21b0
jmp 0x27d1e
leaq -0x1b8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x2420
movq %rax, -0x1e8(%rbp)
jmp 0x27d36
movq -0x1e8(%rbp), %rdi
leaq 0x1304a(%rip), %rsi     # 0x3ad8e
callq 0x2250
movq %rax, -0x1f0(%rbp)
jmp 0x27d52
movq -0x1f0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2210
movq %rax, -0x1f8(%rbp)
jmp 0x27d6b
movq -0x1f8(%rbp), %rdi
leaq 0x11db7(%rip), %rsi     # 0x39b30
callq 0x2250
jmp 0x27d80
movq -0x1e0(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x2240
jmp 0x27d95
leaq -0x1c8(%rbp), %rdi
callq 0x21d0
jmp 0x27dbd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x21d0
jmp 0x27dd6
leaq -0x30(%rbp), %rdi
callq 0x2170
movq -0x1d8(%rbp), %rax
addq $0x200, %rsp            # imm = 0x200
popq %rbp
retq
jmp 0x27dd8
leaq -0x30(%rbp), %rdi
callq 0x2170
jmp 0x27de3
jmp 0x27de5
movq -0x38(%rbp), %rdi
callq 0x2430
movq %rax, %rdi
callq 0x19400
nopw %cs:(%rax,%rax)
// File: lvandeve[P]lodepng/pngdetail.cpp
// Function: RGBtoHCT(unsigned char, unsigned char, unsigned char, unsigned char*, unsigned char*, unsigned char*)
void RGBtoHCT(unsigned char r, unsigned char g, unsigned char b, unsigned char* h, unsigned char* c, unsigned char* t) {
  int cmax = std::max<int>(r, std::max<int>(g, b));
  int cmin = std::min<int>(r, std::min<int>(g, b));
  RGBtoHSL(r, g, b, h, c, t);
  *c = cmax - cmin;
  *t = *c == 255 ? 0 : 255 * cmin / (255 + cmin - cmax);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %dl, %al
movb %sil, %dl
movb %dil, %sil
movb %sil, -0x1(%rbp)
movb %dl, -0x2(%rbp)
movb %al, -0x3(%rbp)
movq %rcx, -0x10(%rbp)
movq %r8, -0x18(%rbp)
movq %r9, -0x20(%rbp)
movzbl -0x1(%rbp), %eax
movl %eax, -0x28(%rbp)
movzbl -0x2(%rbp), %eax
movl %eax, -0x2c(%rbp)
movzbl -0x3(%rbp), %eax
movl %eax, -0x30(%rbp)
leaq -0x2c(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x32090
movq %rax, %rsi
leaq -0x28(%rbp), %rdi
callq 0x32090
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movzbl -0x1(%rbp), %eax
movl %eax, -0x38(%rbp)
movzbl -0x2(%rbp), %eax
movl %eax, -0x3c(%rbp)
movzbl -0x3(%rbp), %eax
movl %eax, -0x40(%rbp)
leaq -0x3c(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x320d0
movq %rax, %rsi
leaq -0x38(%rbp), %rdi
callq 0x320d0
movl (%rax), %eax
movl %eax, -0x34(%rbp)
movb -0x1(%rbp), %sil
movb -0x2(%rbp), %dl
movb -0x3(%rbp), %al
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %r8
movq -0x20(%rbp), %r9
movzbl %sil, %edi
movzbl %dl, %esi
movzbl %al, %edx
callq 0x28760
movl -0x24(%rbp), %eax
subl -0x34(%rbp), %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xff, %eax
jne 0x289d4
xorl %eax, %eax
movl %eax, -0x44(%rbp)
jmp 0x289ed
imull $0xff, -0x34(%rbp), %eax
movl -0x34(%rbp), %ecx
addl $0xff, %ecx
subl -0x24(%rbp), %ecx
cltd
idivl %ecx
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
addq $0x50, %rsp
popq %rbp
retq
nop
// File: lvandeve[P]lodepng/pngdetail.cpp
// Function: HueToLetter(int)
char HueToLetter(int h) {
  char hl = 'R';
  // 12 unique hue letters for 30 degree increment hues.
  if(h < 11 || h >= 244) hl = 'R';  // red
  else if(h >= 11 && h < 32) hl = 'O';  // orange
  else if(h >= 32 && h < 53) hl = 'Y';  // yellow
  else if(h >= 53 && h < 74) hl = 'L';  // lime (officialy "chartreuse" but c is for cyan)
  else if(h >= 74 && h < 96) hl = 'G';  // green
  else if(h >= 96 && h < 117) hl = 'T';  // turquoise (officially "spring green" but that name overlaps green)
  else if(h >= 117 && h < 138) hl = 'C';  // cyan
  else if(h >= 138 && h < 159) hl = 'A';  // azure
  else if(h >= 159 && h < 181) hl = 'B';  // blue
  else if(h >= 181 && h < 202) hl = 'V';  // violet
  else if(h >= 202 && h < 223) hl = 'M';  // magenta
  else if(h >= 223 && h < 244) hl = 'F';  // fuchsia (officially "rose" but r is for red)
  return hl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movb $0x52, -0x5(%rbp)
cmpl $0xb, -0x4(%rbp)
jl 0x28a1a
cmpl $0xf4, -0x4(%rbp)
jl 0x28a23
movb $0x52, -0x5(%rbp)
jmp 0x28b30
cmpl $0xb, -0x4(%rbp)
jl 0x28a38
cmpl $0x20, -0x4(%rbp)
jge 0x28a38
movb $0x4f, -0x5(%rbp)
jmp 0x28b2e
cmpl $0x20, -0x4(%rbp)
jl 0x28a4d
cmpl $0x35, -0x4(%rbp)
jge 0x28a4d
movb $0x59, -0x5(%rbp)
jmp 0x28b2c
cmpl $0x35, -0x4(%rbp)
jl 0x28a62
cmpl $0x4a, -0x4(%rbp)
jge 0x28a62
movb $0x4c, -0x5(%rbp)
jmp 0x28b2a
cmpl $0x4a, -0x4(%rbp)
jl 0x28a77
cmpl $0x60, -0x4(%rbp)
jge 0x28a77
movb $0x47, -0x5(%rbp)
jmp 0x28b28
cmpl $0x60, -0x4(%rbp)
jl 0x28a8c
cmpl $0x75, -0x4(%rbp)
jge 0x28a8c
movb $0x54, -0x5(%rbp)
jmp 0x28b26
cmpl $0x75, -0x4(%rbp)
jl 0x28aa4
cmpl $0x8a, -0x4(%rbp)
jge 0x28aa4
movb $0x43, -0x5(%rbp)
jmp 0x28b24
cmpl $0x8a, -0x4(%rbp)
jl 0x28abc
cmpl $0x9f, -0x4(%rbp)
jge 0x28abc
movb $0x41, -0x5(%rbp)
jmp 0x28b22
cmpl $0x9f, -0x4(%rbp)
jl 0x28ad4
cmpl $0xb5, -0x4(%rbp)
jge 0x28ad4
movb $0x42, -0x5(%rbp)
jmp 0x28b20
cmpl $0xb5, -0x4(%rbp)
jl 0x28aec
cmpl $0xca, -0x4(%rbp)
jge 0x28aec
movb $0x56, -0x5(%rbp)
jmp 0x28b1e
cmpl $0xca, -0x4(%rbp)
jl 0x28b04
cmpl $0xdf, -0x4(%rbp)
jge 0x28b04
movb $0x4d, -0x5(%rbp)
jmp 0x28b1c
cmpl $0xdf, -0x4(%rbp)
jl 0x28b1a
cmpl $0xf4, -0x4(%rbp)
jge 0x28b1a
movb $0x46, -0x5(%rbp)
jmp 0x28b1c
jmp 0x28b1e
jmp 0x28b20
jmp 0x28b22
jmp 0x28b24
jmp 0x28b26
jmp 0x28b28
jmp 0x28b2a
jmp 0x28b2c
jmp 0x28b2e
jmp 0x28b30
movb -0x5(%rbp), %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lvandeve[P]lodepng/pngdetail.cpp
// Function: lightnessToLetter(int)
char lightnessToLetter(int l) {
  int c = ' ';
  if(l < 16) c = ' ';
  else if(l < 48) c = '.';
  else if(l < 80) c = ':';
  else if(l < 112) c = '-';
  else if(l < 144) c = '!';
  else if(l < 176) c = '*';
  else if(l < 208) c = '+'; // The + looks denser than the * in a terminal...
  else if(l < 240) c = '=';
  else c = '#';
  return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl $0x20, -0x8(%rbp)
cmpl $0x10, -0x4(%rbp)
jge 0x28b60
movl $0x20, -0x8(%rbp)
jmp 0x28bea
cmpl $0x30, -0x4(%rbp)
jge 0x28b6f
movl $0x2e, -0x8(%rbp)
jmp 0x28be8
cmpl $0x50, -0x4(%rbp)
jge 0x28b7e
movl $0x3a, -0x8(%rbp)
jmp 0x28be6
cmpl $0x70, -0x4(%rbp)
jge 0x28b8d
movl $0x2d, -0x8(%rbp)
jmp 0x28be4
cmpl $0x90, -0x4(%rbp)
jge 0x28b9f
movl $0x21, -0x8(%rbp)
jmp 0x28be2
cmpl $0xb0, -0x4(%rbp)
jge 0x28bb1
movl $0x2a, -0x8(%rbp)
jmp 0x28be0
cmpl $0xd0, -0x4(%rbp)
jge 0x28bc3
movl $0x2b, -0x8(%rbp)
jmp 0x28bde
cmpl $0xf0, -0x4(%rbp)
jge 0x28bd5
movl $0x3d, -0x8(%rbp)
jmp 0x28bdc
movl $0x23, -0x8(%rbp)
jmp 0x28bde
jmp 0x28be0
jmp 0x28be2
jmp 0x28be4
jmp 0x28be6
jmp 0x28be8
jmp 0x28bea
movl -0x8(%rbp), %eax
popq %rbp
retq
nop
// File: lvandeve[P]lodepng/pngdetail.cpp
// Function: applyDither(int, int, int, int, bool)
static inline int applyDither(int v, int range, int x, int y, bool wrap) {
  // ordered dithering pattern; ranges from 0-15, so multiply with 17 to have 0-255
  static const int pattern[16] = {0,8,2,10,
                                  12,4,14,6,
                                  3,11,1,9,
                                  15,7,13,5};
  int d = pattern[(x & 3) + 4 * (y & 3)] * 17 - 128; // range: -128 to 127
  if(wrap) return (v + d * range / 256) & 255;
  else return std::max(0, std::min(255, v + d * range / 256));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %r8b, %al
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
andb $0x1, %al
movb %al, -0x15(%rbp)
movl -0x10(%rbp), %eax
andl $0x3, %eax
movl -0x14(%rbp), %ecx
andl $0x3, %ecx
shll $0x2, %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x10ea9(%rip), %rax     # 0x39d50
imull $0x11, (%rax,%rcx,4), %eax
subl $0x80, %eax
movl %eax, -0x1c(%rbp)
testb $0x1, -0x15(%rbp)
je 0x28edf
movl -0x8(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x1c(%rbp), %eax
imull -0xc(%rbp), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movl %eax, %ecx
movl -0x2c(%rbp), %eax
addl %ecx, %eax
andl $0xff, %eax
movl %eax, -0x4(%rbp)
jmp 0x28f2a
movl $0x0, -0x20(%rbp)
movl $0xff, -0x24(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x1c(%rbp), %eax
imull -0xc(%rbp), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movl %eax, %ecx
movl -0x30(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x28(%rbp)
leaq -0x24(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x320d0
movq %rax, %rsi
leaq -0x20(%rbp), %rdi
callq 0x32090
movl (%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lvandeve[P]lodepng/pngdetail.cpp
// Function: showError(Data&, Options const&)
void showError(Data& data, const Options& options) {
  std::cout << (options.use_hex ? std::hex: std::dec);
  std::string prefix = (options.use_hex ? "0x": "");
  if(!data.error) {
    std::cout << "No error" << std::endl;
  }
  std::cout << "Decoding error " << prefix << data.error << ": " << lodepng_error_text(data.error) << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
testb $0x1, 0x24(%rax)
je 0x2bb4a
leaq 0x610c(%rip), %rax      # 0x31c50
movq %rax, -0x50(%rbp)
jmp 0x2bb57
leaq 0x612f(%rip), %rax      # 0x31c80
movq %rax, -0x50(%rbp)
jmp 0x2bb57
movq -0x50(%rbp), %rsi
movq 0x1b46e(%rip), %rdi     # 0x46fd0
callq 0x20b0
movq -0x10(%rbp), %rax
movb 0x24(%rax), %dl
leaq 0xeb6f(%rip), %rcx      # 0x3a6e4
leaq 0xf345(%rip), %rax      # 0x3aec1
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, -0x60(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x2440
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
leaq -0x30(%rbp), %rdi
callq 0x2360
jmp 0x2bba7
leaq -0x31(%rbp), %rdi
callq 0x22b0
movq -0x8(%rbp), %rax
cmpl $0x0, 0x2d8(%rax)
jne 0x2bc1e
movq 0x1b40c(%rip), %rdi     # 0x46fd0
leaq 0xeb1c(%rip), %rsi      # 0x3a6e7
callq 0x2250
movq %rax, -0x68(%rbp)
jmp 0x2bbd6
movq -0x68(%rbp), %rdi
movq 0x1b3df(%rip), %rsi     # 0x46fc0
callq 0x22a0
jmp 0x2bbe8
jmp 0x2bc1e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x31(%rbp), %rdi
callq 0x22b0
jmp 0x2bcd9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x2170
jmp 0x2bcd7
movq 0x1b3ab(%rip), %rdi     # 0x46fd0
leaq 0xeac4(%rip), %rsi      # 0x3a6f0
callq 0x2250
movq %rax, -0x70(%rbp)
jmp 0x2bc37
movq -0x70(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2210
movq %rax, -0x78(%rbp)
jmp 0x2bc4a
movq -0x78(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x2d8(%rax), %esi
callq 0x2340
movq %rax, -0x80(%rbp)
jmp 0x2bc63
movq -0x80(%rbp), %rdi
leaq 0xf38b(%rip), %rsi      # 0x3aff9
callq 0x2250
movq %rax, -0x88(%rbp)
jmp 0x2bc7c
movq -0x8(%rbp), %rax
movl 0x2d8(%rax), %edi
callq 0xfe20
movq %rax, -0x90(%rbp)
jmp 0x2bc94
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdi
callq 0x2250
movq %rax, -0x98(%rbp)
jmp 0x2bcb0
movq -0x98(%rbp), %rdi
movq 0x1b302(%rip), %rsi     # 0x46fc0
callq 0x22a0
jmp 0x2bcc5
leaq -0x30(%rbp), %rdi
callq 0x2170
addq $0xa0, %rsp
popq %rbp
retq
jmp 0x2bcd9
movq -0x40(%rbp), %rdi
callq 0x2430
movq %rax, %rdi
callq 0x19400
nopw (%rax,%rax)
// File: lvandeve[P]lodepng/pngdetail.cpp
// Function: printableICCWord[abi:cxx11](unsigned char const*, unsigned long, unsigned long)
static std::string printableICCWord(const unsigned char* icc, size_t size, size_t pos) {
  if (pos + 4 > size) {
    return "out of range";
  }
  std::string result;
  for (int i = 0; i < 4; i++) {
    char c = icc[pos + i];
    result += ((c >= 32 && c < 127) ? c : '?');
  }
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x50(%rbp)
movq %rdi, %rax
movq %rax, -0x48(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x4, %rax
cmpq -0x18(%rbp), %rax
jbe 0x2db2c
leaq -0x21(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x2440
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rdx
leaq 0xd5e1(%rip), %rsi      # 0x3b0de
callq 0x2360
jmp 0x2db04
leaq -0x21(%rbp), %rdi
callq 0x22b0
jmp 0x2dbc8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x21(%rbp), %rdi
callq 0x22b0
jmp 0x2dbd2
movq -0x50(%rbp), %rdi
movb $0x0, -0x35(%rbp)
callq 0x2370
movl $0x0, -0x3c(%rbp)
cmpl $0x4, -0x3c(%rbp)
jge 0x2dbb1
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0x3c(%rbp), %rdx
addq %rdx, %rcx
movb (%rax,%rcx), %al
movb %al, -0x3d(%rbp)
movsbl -0x3d(%rbp), %eax
cmpl $0x20, %eax
jl 0x2db75
movsbl -0x3d(%rbp), %eax
cmpl $0x7f, %eax
jge 0x2db75
movb -0x3d(%rbp), %al
movb %al, -0x59(%rbp)
jmp 0x2db7c
movb $0x3f, %al
movb %al, -0x59(%rbp)
jmp 0x2db7c
movq -0x50(%rbp), %rdi
movb -0x59(%rbp), %al
movsbl %al, %esi
callq 0x2180
jmp 0x2db8d
jmp 0x2db8f
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x2db40
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x2170
jmp 0x2dbc6
movb $0x1, -0x35(%rbp)
testb $0x1, -0x35(%rbp)
jne 0x2dbc4
movq -0x50(%rbp), %rdi
callq 0x2170
jmp 0x2dbc8
jmp 0x2dbd2
movq -0x48(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x2430
movq %rax, %rdi
callq 0x19400
nopw %cs:(%rax,%rax)
// File: lvandeve[P]lodepng/pngdetail.cpp
// Function: showHex(unsigned char const*, unsigned long, Options const&)
void showHex(const unsigned char* data, size_t size, const Options& options) {
  for(size_t i = 0; i < size; i++) {
    unsigned char c = data[i];
    if(options.hexformat == HF_BIN) {
      printf("%c", c);
    } else {
      if(c > 32 && c < 127 && options.hexformat == HF_MIX) printf(" %c ", c);
      else printf("%02x ", c);
      if(i % 32 == 31 && i + 1 != size) std::cout << std::endl;
    }
  }
  if(options.hexformat != HF_BIN) std::cout << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x2de2c
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x21(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x2, 0x10(%rax)
jne 0x2dda6
movzbl -0x21(%rbp), %esi
leaq 0xcdb6(%rip), %rdi      # 0x3ab53
movb $0x0, %al
callq 0x2060
jmp 0x2de19
movzbl -0x21(%rbp), %eax
cmpl $0x20, %eax
jle 0x2ddd6
movzbl -0x21(%rbp), %eax
cmpl $0x7f, %eax
jge 0x2ddd6
movq -0x18(%rbp), %rax
cmpl $0x1, 0x10(%rax)
jne 0x2ddd6
movzbl -0x21(%rbp), %esi
leaq 0xcd89(%rip), %rdi      # 0x3ab56
movb $0x0, %al
callq 0x2060
jmp 0x2dde8
movzbl -0x21(%rbp), %esi
leaq 0xcd7a(%rip), %rdi      # 0x3ab5b
movb $0x0, %al
callq 0x2060
movq -0x20(%rbp), %rax
andq $0x1f, %rax
cmpq $0x1f, %rax
jne 0x2de17
movq -0x20(%rbp), %rax
addq $0x1, %rax
cmpq -0x10(%rbp), %rax
je 0x2de17
movq 0x191c5(%rip), %rdi     # 0x46fd0
movq 0x191ae(%rip), %rsi     # 0x46fc0
callq 0x22a0
jmp 0x2de19
jmp 0x2de1b
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x2dd6c
movq -0x18(%rbp), %rax
cmpl $0x2, 0x10(%rax)
je 0x2de49
movq 0x19193(%rip), %rdi     # 0x46fd0
movq 0x1917c(%rip), %rsi     # 0x46fc0
callq 0x22a0
addq $0x30, %rsp
popq %rbp
retq
nop
// File: lvandeve[P]lodepng/pngdetail.cpp
// Function: shortenText(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, Options const&)
std::string shortenText(const std::string& text, const Options& options) {
  if(options.expand_long_texts) return text;
  size_t maxlen = 512;
  size_t maxnl = options.verbose ? 5 : 1;
  size_t numnl = 0; // amount of newlines
  for(size_t i = 0; i < text.size(); i++) {
    if(text[i] == 10) numnl++;
    if(numnl >= maxnl) {
      maxlen = i;
      break;
    }
  }

  if(text.size() < maxlen) return text;

  return text.substr(0, maxlen) + (numnl > 1 ? "\n" : "") + "... [TEXT SNIPPED! use -t to expand long text]";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x98(%rbp)
movq %rdi, %rax
movq %rax, -0x90(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
testb $0x1, 0x1(%rax)
je 0x2ebe7
movq -0x98(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2100
jmp 0x2ed58
movq $0x200, -0x20(%rbp)     # imm = 0x200
movq -0x18(%rbp), %rax
movb (%rax), %dl
movl $0x1, %eax
movl $0x5, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
cltq
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x21a0
movq %rax, %rcx
movq -0xa0(%rbp), %rax
cmpq %rcx, %rax
jae 0x2ec83
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x22c0
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0x2ec5f
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x2ec73
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x2ec83
jmp 0x2ec75
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x2ec1b
movq -0x10(%rbp), %rdi
callq 0x21a0
cmpq -0x20(%rbp), %rax
jae 0x2eca7
movq -0x98(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2100
jmp 0x2ed58
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x78(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x2280
movq -0xa8(%rbp), %rsi
movq -0x30(%rbp), %rax
subq $0x2, %rax
leaq 0xc1e7(%rip), %rax      # 0x3aec0
leaq 0xc1e1(%rip), %rdx      # 0x3aec1
cmovaeq %rax, %rdx
leaq -0x58(%rbp), %rdi
callq 0x327c0
jmp 0x2ecef
movq -0x98(%rbp), %rdi
leaq 0xc133(%rip), %rdx      # 0x3ae30
leaq -0x58(%rbp), %rsi
callq 0x327c0
jmp 0x2ed08
leaq -0x58(%rbp), %rdi
callq 0x2170
jmp 0x2ed13
leaq -0x78(%rbp), %rdi
callq 0x2170
jmp 0x2ed58
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x2ed4b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x2170
jmp 0x2ed49
jmp 0x2ed4b
leaq -0x78(%rbp), %rdi
callq 0x2170
jmp 0x2ed56
jmp 0x2ed68
movq -0x90(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
movq -0x80(%rbp), %rdi
callq 0x2430
movq %rax, %rdi
callq 0x19400
nopl (%rax)
// File: lvandeve[P]lodepng/pngdetail.cpp
// Function: readExifUint32(unsigned char const*, unsigned long, unsigned long, bool)
uint32_t readExifUint32(const unsigned char* exif, size_t size, size_t pos, bool big_endian) {
  if(pos + 4 > size) return 0;
  if(big_endian) {
    return ((uint32_t)exif[pos + 0] << 24u) | ((uint32_t)exif[pos + 1] << 16u) | ((uint32_t)exif[pos + 2] << 8u) | (uint32_t)exif[pos + 3];
  } else {
    return ((uint32_t)exif[pos + 3] << 24u) | ((uint32_t)exif[pos + 2] << 16u) | ((uint32_t)exif[pos + 1] << 8u) | (uint32_t)exif[pos + 0];
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x20(%rbp), %rax
addq $0x4, %rax
cmpq -0x18(%rbp), %rax
jbe 0x2fa31
movl $0x0, -0x4(%rbp)
jmp 0x2fac3
testb $0x1, -0x21(%rbp)
je 0x2fa7e
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rdx
movzbl 0x1(%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rdx
movzbl 0x2(%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rdx
movzbl 0x3(%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x2fac3
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movzbl 0x3(%rax,%rcx), %eax
shll $0x18, %eax
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rdx
movzbl 0x2(%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rdx
movzbl 0x1(%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: lvandeve[P]lodepng/pngdetail.cpp
// Function: readExifUint16(unsigned char const*, unsigned long, unsigned long, bool)
uint32_t readExifUint16(const unsigned char* exif, size_t size, size_t pos, bool big_endian) {
  if(pos + 2 > size) return 0;
  if(big_endian) {
    return ((uint32_t)exif[pos + 0] << 8u) | (uint32_t)exif[pos + 1];
  } else {
    return ((uint32_t)exif[pos + 1] << 8u) | (uint32_t)exif[pos + 0];
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x18(%rbp), %rax
jbe 0x2fafe
movl $0x0, -0x4(%rbp)
jmp 0x2fb48
testb $0x1, -0x21(%rbp)
je 0x2fb27
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rdx
movzbl 0x1(%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x2fb48
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rax,%rcx), %eax
shll $0x8, %eax
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)