// File: /workspace/github_c_makefile_star2_O3/mikecat[P]x86_interpreter/pe_libs.c
// Function: pe_lib_exec
uint32_t pe_lib_exec(uint32_t regs[], const char* lib_name, const char* func_name, uint16_t func_ord) {
	if (func_name == NULL) {
		fprintf(stderr, "function #%"PRIu16" in library %s called. (ord value unsupported)\n",
			func_ord, lib_name);
		return PE_LIB_EXEC_FAILED;
	}
	if (strcmp_ncs(lib_name, "msvcrt.dll") == 0) {
		return exec_msvcrt(regs, func_name);
	} else if (strcmp_ncs(lib_name, "kernel32.dll") == 0) {
		return exec_kernel32(regs, func_name);
	} else if (strcmp_ncs(lib_name, "libintl3.dll") == 0) {
		return exec_libintl3(regs, func_name);
	} else {
		fprintf(stderr, "function %s() in unknown library %s called.\n", func_name, lib_name);
		return PE_LIB_EXEC_FAILED;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
testq %rdx, %rdx
je 0xbd04
movq %rdx, %r15
movq %rdi, %r14
leaq 0x2e6a(%rip), %rsi      # 0xe4eb
movq %rbx, %rdi
callq 0xb572
testl %eax, %eax
je 0xb72c
leaq 0x2ebb(%rip), %rsi      # 0xe553
movq %rbx, %rdi
callq 0xb572
testl %eax, %eax
je 0xbb12
leaq 0x2eb1(%rip), %rsi      # 0xe560
movq %rbx, %rdi
callq 0xb572
testl %eax, %eax
jne 0xbd45
leaq 0x361a(%rip), %rsi      # 0xece0
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbc65
leaq 0x361a(%rip), %rsi      # 0xecf7
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbc65
leaq 0x3616(%rip), %rsi      # 0xed0a
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
jne 0xbd9f
movl 0x10(%r14), %edi
xorl %ebx, %ebx
leaq 0x8(%rsp), %rdx
movl $0x1, %esi
xorl %eax, %eax
callq 0x7157
testl %eax, %eax
je 0xbd6e
movl 0x8(%rsp), %eax
jmp 0xbd6e
leaq 0x2e67(%rip), %rsi      # 0xe59a
movq %r15, %rdi
callq 0x10c0
xorl %ebx, %ebx
testl %eax, %eax
je 0xbdbf
leaq 0x2e5d(%rip), %rsi      # 0xe5a9
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbc84
leaq 0x2e54(%rip), %rsi      # 0xe5b7
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbd27
leaq 0x2e48(%rip), %rsi      # 0xe5c2
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbd3c
leaq 0x2e38(%rip), %rsi      # 0xe5c9
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbd65
leaq 0x2ea8(%rip), %rsi      # 0xe650
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbd73
leaq 0x2e42(%rip), %rsi      # 0xe601
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbdbf
leaq 0x2e32(%rip), %rsi      # 0xe608
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbd96
leaq 0x2e22(%rip), %rsi      # 0xe60f
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbd96
leaq 0x2e15(%rip), %rsi      # 0xe619
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbedb
leaq 0x2de8(%rip), %rsi      # 0xe603
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbd32
leaq 0x2e1d(%rip), %rsi      # 0xe64f
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbef9
leaq 0x2e38(%rip), %rsi      # 0xe681
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbf17
leaq 0x2e55(%rip), %rsi      # 0xe6b5
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbf35
leaq 0x2e74(%rip), %rsi      # 0xe6eb
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbf53
leaq 0x2eee(%rip), %rsi      # 0xe77c
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbf87
leaq 0x2ed6(%rip), %rsi      # 0xe77b
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbfa5
leaq 0x2ebe(%rip), %rsi      # 0xe77a
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbfc3
leaq 0x2edf(%rip), %rsi      # 0xe7b2
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbfe1
leaq 0x2ecf(%rip), %rsi      # 0xe7b9
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbfef
leaq 0x2eec(%rip), %rsi      # 0xe7ed
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xc00d
leaq 0x2348(%rip), %rsi      # 0xdc60
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xc02b
leaq 0x2f1f(%rip), %rsi      # 0xe84e
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbd96
leaq 0x2f10(%rip), %rsi      # 0xe856
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xc049
leaq 0x2f02(%rip), %rsi      # 0xe85f
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xc055
leaq 0x2f1f(%rip), %rsi      # 0xe893
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xc073
leaq 0x2f3c(%rip), %rsi      # 0xe8c7
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xc091
leaq 0x2f55(%rip), %rsi      # 0xe8f7
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xc0af
leaq 0x2f74(%rip), %rsi      # 0xe92d
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xc0cd
leaq 0x260a(%rip), %rsi      # 0xdfda
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xc0eb
leaq 0x2fa8(%rip), %rsi      # 0xe98f
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xc109
leaq 0x2fc7(%rip), %rsi      # 0xe9c5
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xc127
leaq 0x2fe2(%rip), %rsi      # 0xe9f7
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xc145
leaq 0x2fff(%rip), %rsi      # 0xea2b
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xc163
leaq 0x301a(%rip), %rsi      # 0xea5d
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xc181
leaq 0x3037(%rip), %rsi      # 0xea91
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xc049
leaq 0x302f(%rip), %rsi      # 0xeaa0
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xc19f
leaq 0x304e(%rip), %rsi      # 0xead6
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xc1bd
leaq 0x3069(%rip), %rsi      # 0xeb08
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xc1db
leaq 0x308c(%rip), %rsi      # 0xeb42
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbdbf
leaq 0x307c(%rip), %rsi      # 0xeb49
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xc1f9
leaq 0x2183(%rip), %rsi      # 0xdc67
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
jne 0xc217
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x8a2b
testl %eax, %eax
jne 0xbdbf
callq 0x1b8e
jmp 0xbdba
leaq 0x30c8(%rip), %rsi      # 0xebe1
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbc73
leaq 0x30cd(%rip), %rsi      # 0xebfd
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbc65
leaq 0x30c7(%rip), %rsi      # 0xec0e
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbd32
leaq 0x30bc(%rip), %rsi      # 0xec1a
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbc73
leaq 0x30b2(%rip), %rsi      # 0xec27
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbd8a
leaq 0x30ae(%rip), %rsi      # 0xec3a
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbc65
leaq 0x30a4(%rip), %rsi      # 0xec47
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbdd8
leaq 0x30a5(%rip), %rsi      # 0xec5f
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbdcc
leaq 0x30a2(%rip), %rsi      # 0xec73
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbdcc
leaq 0x309e(%rip), %rsi      # 0xec86
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
je 0xbc65
leaq 0x3098(%rip), %rsi      # 0xec93
movq %r15, %rdi
callq 0x10c0
testl %eax, %eax
jne 0xbf71
movl 0x10(%r14), %edi
xorl %ebx, %ebx
leaq 0x8(%rsp), %rdx
movl $0x1, %esi
xorl %eax, %eax
callq 0x7157
testl %eax, %eax
je 0xbc60
movl 0x8(%rsp), %edi
movl $0x8, %esi
callq 0x6ec9
testl %eax, %eax
je 0xbc60
movl 0x8(%rsp), %edi
xorl %esi, %esi
movl $0x4, %edx
callq 0x6f54
movl 0x8(%rsp), %edi
addl $0x4, %edi
xorl %esi, %esi
movl $0x4, %edx
callq 0x6f54
movl $0x1, %ebx
movl %ebx, (%r14)
jmp 0xbc7a
movl $0x0, (%r14)
xorl %ebx, %ebx
jmp 0xbdbf
movl $0x0, (%r14)
movl $0x4, %ebx
jmp 0xbdbf
movl 0x10(%r14), %edi
xorl %ebx, %ebx
leaq 0x8(%rsp), %rdx
leaq 0x4(%rsp), %rcx
leaq 0x14(%rsp), %r8
movl $0x3, %esi
xorl %eax, %eax
callq 0x7157
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0xbcfc
movl 0x8(%rsp), %edi
movl 0x12108(%rip), %esi     # 0x1ddc0
movl $0x4, %edx
callq 0x6f54
testl %eax, %eax
je 0xbcfc
movl 0x4(%rsp), %edi
movl 0x120f4(%rip), %esi     # 0x1ddc4
movl $0x4, %edx
callq 0x6f54
testl %eax, %eax
je 0xbcfc
movl 0x14(%rsp), %edi
movl 0x120d4(%rip), %esi     # 0x1ddbc
addl $0x8, %esi
movl $0x4, %edx
callq 0x6f54
xorl %ebp, %ebp
cmpl $0x1, %eax
sbbl %ebp, %ebp
movl %ebp, (%r14)
jmp 0xbdbf
movq 0x72ed(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
movzwl %cx, %edx
leaq 0x27ff(%rip), %rsi      # 0xe517
movq %rbx, %rcx
xorl %eax, %eax
callq 0x10d0
jmp 0xbdba
movl 0x1208f(%rip), %eax     # 0x1ddbc
addl $0x10, %eax
jmp 0xbd6e
movl $0xfffffffe, %ebx       # imm = 0xFFFFFFFE
jmp 0xbdbf
movl $0x1, (%r14)
jmp 0xbdbf
movq 0x72ac(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x2817(%rip), %rsi      # 0xe56d
movq %r15, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x10d0
jmp 0xbdba
movl 0x12051(%rip), %eax     # 0x1ddbc
addl $0x8, %eax
movl %eax, (%r14)
jmp 0xbdbf
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x8431
testl %eax, %eax
jne 0xbdbf
callq 0x1e82
jmp 0xbdba
movl $0xffffffff, (%r14)     # imm = 0xFFFFFFFF
jmp 0xbc7a
movl $0x0, (%r14)
jmp 0xbdbf
movq 0x7252(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x2f6a(%rip), %rsi      # 0xed1a
movq %r15, %rdx
xorl %eax, %eax
callq 0x10d0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, (%r14)
jmp 0xbc6c
movl 0x10(%r14), %edi
leaq 0x4(%rsp), %rdx
movl $0x1, %esi
xorl %eax, %eax
callq 0x7157
testl %eax, %eax
je 0xbc7a
movl 0x4(%rsp), %edi
movl $0x8, %esi
callq 0x6ec9
testl %eax, %eax
je 0xbc7a
xorl %edi, %edi
callq 0x10f0
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
callq 0x1170
movl 0x14(%rax), %ecx
leal 0x76b(%rcx), %esi
leal 0x76e(%rcx), %edx
testl %esi, %esi
cmovnsl %esi, %edx
sarl $0x2, %edx
movslq %esi, %rsi
imulq $-0x51eb851f, %rsi, %rdi # imm = 0xAE147AE1
movq %rdi, %r8
shrq $0x3f, %r8
shrq $0x20, %rdi
sarl $0x5, %edi
addl %r8d, %edi
imulq $0x51eb851f, %rsi, %rsi # imm = 0x51EB851F
movq %rsi, %r8
shrq $0x3f, %r8
shrq $0x20, %rsi
sarl $0x7, %esi
addl %r8d, %esi
imull $0x16d, %ecx, %ecx      # imm = 0x16D
addl %edx, %ecx
addl %edi, %ecx
addl %esi, %ecx
addl $0x1a8cb, %ecx          # imm = 0x1A8CB
movslq %ecx, %rcx
movslq 0x1c(%rax), %rdx
addq %rcx, %rdx
imulq $0x15180, %rdx, %rcx    # imm = 0x15180
movslq 0x8(%rax), %rdx
imulq $0x3c, %rdx, %rdx
movslq 0x4(%rax), %rsi
addq %rdx, %rsi
imulq $0x3c, %rsi, %rdx
movslq (%rax), %rax
addq %rdx, %rax
addq %rcx, %rax
imulq $0x989680, %rax, %rbx   # imm = 0x989680
movl 0x4(%rsp), %edi
movl %ebx, %esi
movl $0x4, %edx
callq 0x6f54
movl 0x4(%rsp), %edi
addl $0x4, %edi
shrq $0x20, %rbx
movl %ebx, %esi
movl $0x4, %edx
callq 0x6f54
jmp 0xbc7a
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x8746
testl %eax, %eax
jne 0xbdbf
callq 0x1e66
jmp 0xbdba
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x8371
testl %eax, %eax
jne 0xbdbf
callq 0x1e4a
jmp 0xbdba
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x9246
testl %eax, %eax
jne 0xbdbf
callq 0x1e2e
jmp 0xbdba
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x916b
testl %eax, %eax
jne 0xbdbf
callq 0x1e12
jmp 0xbdba
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x934b
testl %eax, %eax
jne 0xbdbf
callq 0x1df6
jmp 0xbdba
movq 0x7080(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x2d29(%rip), %rsi      # 0xecab
jmp 0xbdb0
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x8157
testl %eax, %eax
jne 0xbdbf
callq 0x1dda
jmp 0xbdba
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x76d3
testl %eax, %eax
jne 0xbdbf
callq 0x1dbe
jmp 0xbdba
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x829a
testl %eax, %eax
jne 0xbdbf
callq 0x1da2
jmp 0xbdba
movl 0x11dd5(%rip), %eax     # 0x1ddbc
addl $0x14, %eax
jmp 0xbd6e
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x73d8
testl %eax, %eax
jne 0xbdbf
callq 0x1d86
jmp 0xbdba
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x9097
testl %eax, %eax
jne 0xbdbf
callq 0x1d6a
jmp 0xbdba
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x8c87
testl %eax, %eax
jne 0xbdbf
callq 0x1d4e
jmp 0xbdba
movl $0xffffffff, (%r14)     # imm = 0xFFFFFFFF
jmp 0xbdbf
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x8f24
testl %eax, %eax
jne 0xbdbf
callq 0x1d32
jmp 0xbdba
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x8e7e
testl %eax, %eax
jne 0xbdbf
callq 0x1d16
jmp 0xbdba
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x8bdf
testl %eax, %eax
jne 0xbdbf
callq 0x1cfa
jmp 0xbdba
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x8faa
testl %eax, %eax
jne 0xbdbf
callq 0x1cde
jmp 0xbdba
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x92b7
testl %eax, %eax
jne 0xbdbf
callq 0x1cc2
jmp 0xbdba
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x8cbf
testl %eax, %eax
jne 0xbdbf
callq 0x1ca6
jmp 0xbdba
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x8201
testl %eax, %eax
jne 0xbdbf
callq 0x1c8a
jmp 0xbdba
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x84c9
testl %eax, %eax
jne 0xbdbf
callq 0x1c6e
jmp 0xbdba
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x72ed
testl %eax, %eax
jne 0xbdbf
callq 0x1c52
jmp 0xbdba
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x747f
testl %eax, %eax
jne 0xbdbf
callq 0x1c36
jmp 0xbdba
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x8632
testl %eax, %eax
jne 0xbdbf
callq 0x1c1a
jmp 0xbdba
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x87fa
testl %eax, %eax
jne 0xbdbf
callq 0x1bfe
jmp 0xbdba
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x88a1
testl %eax, %eax
jne 0xbdbf
callq 0x1be2
jmp 0xbdba
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x940a
testl %eax, %eax
jne 0xbdbf
callq 0x1bc6
jmp 0xbdba
movl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x9715
testl %eax, %eax
jne 0xbdbf
callq 0x1baa
jmp 0xbdba
movq 0x6dda(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x2986(%rip), %rsi      # 0xebae
jmp 0xbdb0