// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/main.cpp
// Function: main
int main(int argc, char *argv[])
{
	int i, ret;
	yak_reset_realtime();
    init_opt(&asm_opt);
    if (!CommandLine_process(argc, argv, &asm_opt)) return 0;
	
	// bit_extz_t exz, exz64; init_bit_extz_t(&exz, 2); init_bit_extz_t(&exz64, 2);
	
	// char *pstr = "GACCCAG", *tsrt = "GTTGTTAATTCCAT"; int32_t thre = 14; clear_align(exz); clear_align(exz64);
	// ed_band_cal_extension_64_0_w_trace((char*)pstr, strlen(pstr), (char*)tsrt, strlen(tsrt), thre, &exz);
	// // // ed_band_cal_semi_64_w_absent_diag((char*)pstr, strlen(pstr), (char*)tsrt, strlen(tsrt), thre, 0, &exz);
	// fprintf(stderr, "\n[M::%s::] exz.err::%d, exz.ps::%d, exz.pe::%d, exz.ts::%d, exz.te::%d\n", __func__, 
    //         exz.err, exz.ps, exz.pe, exz.ts, exz.te);
	// cigar_check((char*)pstr, (char*)tsrt, &(exz));
	// ed_band_cal_extension_64_0_w((char*)pstr, strlen(pstr), (char*)tsrt, strlen(tsrt), thre, &exz);
	// fprintf(stderr, "\n[M::%s::] exz.err::%d, exz.ps::%d, exz.pe::%d, exz.ts::%d, exz.te::%d\n", __func__, 
    //         exz.err, exz.ps, exz.pe, exz.ts, exz.te);
	// ed_band_cal_semi_infi_w((char*)pstr, strlen(pstr), (char*)tsrt, strlen(tsrt), thre, NULL, &exz);
	// ed_band_cal_semi_64_w((char*)pstr, strlen(pstr), (char*)tsrt, strlen(tsrt), thre, &exz64);
	// fprintf(stderr, "\n[M::%s::] exz.err::%d, exz64.err::%d, exz.ps::%d, exz64.ps::%d, exz.pe::%d, exz64.pe::%d, exz.ts::%d, exz64.ts::%d, exz.te::%d, exz64.te::%d\n", __func__, 
    //         exz.err, exz64.err, exz.ps, exz64.ps, exz.pe, exz64.pe, exz.ts, exz64.ts, exz.te, exz64.te);
	// ed_band_cal_semi_64_w_trace((char*)pstr, strlen(pstr), (char*)tsrt, strlen(tsrt), thre, &exz64);
	// cigar_check((char*)pstr, (char*)tsrt, &(exz64));
	
	
	// char *pstr = "TGT", *tsrt = "CTGT"; int32_t thre = 1;
	// ed_band_cal_global_infi_w((char*)pstr, strlen(pstr), (char*)tsrt, strlen(tsrt), thre, NULL, &exz);
	// ed_band_cal_global_64_w((char*)pstr, strlen(pstr), (char*)tsrt, strlen(tsrt), thre, &exz64);
	// ed_band_cal_global_64_w_trace((char*)pstr, strlen(pstr), (char*)tsrt, strlen(tsrt), thre, &exz64);
	// fprintf(stderr, "\n[M::%s::] exz.err::%d, exz64.err::%d, exz.ps::%d, exz64.ps::%d, exz.pe::%d, exz64.pe::%d, exz.ts::%d, exz64.ts::%d, exz.te::%d, exz64.te::%d\n", __func__, 
    //         exz.err, exz64.err, exz.ps, exz64.ps, exz.pe, exz64.pe, exz.ts, exz64.ts, exz.te, exz64.te);
	// cigar_check((char*)pstr, (char*)tsrt, &(exz64));
	
	// ed_band_cal_extension_infi0_w((char *)"AAT", 3, (char *)"ACTTTTTT", 8, 2, NULL, &exz);
    // ed_band_cal_extension_64_w((char *)"AAT", 3, (char *)"ACTTTTTT", 8, 2, &exz64);
	// fprintf(stderr, "\n[M::%s::] exz.err::%d, exz64.err::%d, exz.ps::%d, exz64.ps::%d, exz.pe::%d, exz64.pe::%d, exz.ts::%d, exz64.ts::%d, exz.te::%d, exz64.te::%d\n", __func__, 
    //         exz.err, exz64.err, exz.ps, exz64.ps, exz.pe, exz64.pe, exz.ts, exz64.ts, exz.te, exz64.te);

	//bit_extz_t exz; ///ed_band_cal_global_128bit(t_string+r_ts, t_end+1-r_ts, q_string, ql, thres, &exz);
	// ed_band_cal_extension_128bit((char *)"AAGTTTA", 7, (char *)"CCTTTTTT", 8, 4, &exz);
	// ed_band_cal_extension_128bit((char *)"AA", 2, (char *)"ACTTTTTT", 8, 1, &exz);
	// fprintf(stderr, "ed_extension::%d, pe::%d, te::%d\n", exz.err, exz.pe, exz.te);
	// exit(1);
	
	

	// fprintf(stderr, "[M::%s::] ed_global::%d, ed_global_128bit::%d\n", __func__, 
	// ed_band_cal_global((char *)"ACT", 3, (char *)"AAT", 3, 1), 
	// ed_band_cal_global_128bit((char *)"ACT", 3, (char *)"AAT", 3, 1));

	// fprintf(stderr, "[M::%s::] ed_global::%d, ed_global_128bit::%d\n", __func__, 
	// ed_band_cal_global((char*)"ACTTTTTT", 8, (char*)"AATTTT", 6, 3),
	// ed_band_cal_global_128bit((char*)"ACTTTTTT", 8, (char*)"AATTTT", 6, 3));
	// exit(1);
	if(asm_opt.sec_in) ret = ha_assemble_pair();
	else if(asm_opt.dbg_ovec_cal) ret = ha_ec_dbg();
	else ret = ha_assemble();
	
    destory_opt(&asm_opt);
	fprintf(stderr, "[M::%s] Version: %s\n", __func__, HA_VERSION);
	fprintf(stderr, "[M::%s] CMD:", __func__);
	for (i = 0; i < argc; ++i)
		fprintf(stderr, " %s", argv[i]);
	fprintf(stderr, "\n[M::%s] Real time: %.3f sec; CPU: %.3f sec; Peak RSS: %.3f GB\n", __func__, yak_realtime(), yak_cputime(), yak_peakrss_in_gb());
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movl %edi, %r14d
callq 0xefe63
leaq 0x74428(%rip), %r15     # 0x253758
movq %r15, %rdi
callq 0x3074
movl %r14d, %edi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x4487
xorl %ebp, %ebp
testl %eax, %eax
jne 0x1df35d
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, 0x70(%r15)
jne 0x1df375
cmpb $0x0, 0x25c(%r15)
jne 0x1df37c
callq 0xffb6
jmp 0x1df381
callq 0x1037d
jmp 0x1df381
callq 0xd96c
movl %eax, %ebp
leaq 0x743ce(%rip), %rdi     # 0x253758
callq 0x33d0
movq 0x73c4a(%rip), %r13     # 0x252fe0
movq (%r13), %rdi
leaq 0x1d4c5(%rip), %rsi     # 0x1fc866
leaq 0x1d4d3(%rip), %r15     # 0x1fc87b
leaq 0x2efe(%rip), %rcx      # 0x1e22ad
xorl %r12d, %r12d
movq %r15, %rdx
xorl %eax, %eax
callq 0x22b0
movq (%r13), %rdi
leaq 0x1d4b9(%rip), %rsi     # 0x1fc880
movq %r15, %rdx
xorl %eax, %eax
callq 0x22b0
testl %r14d, %r14d
cmovlel %r12d, %r14d
leaq 0x1d4ae(%rip), %r12     # 0x1fc88d
xorl %r13d, %r13d
movq 0x73bf7(%rip), %rax     # 0x252fe0
movq (%rax), %r15
cmpq %r13, %r14
je 0x1df407
movq (%rbx,%r13,8), %rdx
movq %r15, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x22b0
incq %r13
jmp 0x1df3e2
callq 0xefea7
movsd %xmm0, 0x10(%rsp)
callq 0xefe20
movsd %xmm0, 0x8(%rsp)
callq 0xefedf
movaps %xmm0, %xmm2
leaq 0x1d465(%rip), %rsi     # 0x1fc891
leaq 0x1d448(%rip), %rdx     # 0x1fc87b
movq %r15, %rdi
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movb $0x3, %al
callq 0x22b0
jmp 0x1df34c