// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi2/mag.c
// Function: main_simplify
int main_simplify(int argc, char *argv[])
{
	mag_t *g;
	int c;
	char *s;
	magopt_t *opt;
	opt = mag_init_opt();
	while ((c = getopt(argc, argv, "ON:d:CFAl:e:i:o:R:w:r:Sm:T:D:")) >= 0) {
		switch (c) {
		case 'F': opt->flag |= MAG_F_NO_AMEND | MAG_F_READ_ORI; break;
		case 'C': opt->flag |= MAG_F_CLEAN; break;
		case 'A': opt->flag |= MAG_F_AGGRESSIVE; break;
		case 'O': opt->flag |= MAG_F_READ_ORI; break;
		case 'S': opt->flag |= MAG_F_NO_SIMPL; break;
		case 'd': opt->min_dratio0 = atof(optarg); break;
		case 'N': opt->max_arc  = atoi(optarg); break;
		case 'l': opt->min_elen = atoi(optarg); break;
		case 'e': opt->min_ensr = atoi(optarg); break;
		case 'i': opt->min_insr = atoi(optarg); break;
		case 'o': opt->min_ovlp = atoi(optarg); break;
		case 'R': opt->min_dratio1 = atof(optarg); break;
		case 'w': opt->max_bcov = atof(optarg); break;
		case 'r': opt->max_bfrac= atof(optarg); break;
		case 'm': opt->min_merge_len = atoi(optarg); break;
		case 'T':
			opt->trim_len = strtol(optarg, &s, 10);
			if (*s == ',' || *s == ':' || *s == ';')
				opt->trim_depth = strtol(s + 1, &s, 10);
			break;
		}
	}
	if (argc == optind) {
		fprintf(stderr, "\n");
		fprintf(stderr, "Usage:   fermi2 simplify [options] <in.mag>\n\n");
		fprintf(stderr, "Options: -N INT         read maximum INT neighbors per node [%d]\n", opt->max_arc);
		fprintf(stderr, "         -O             read the graph without modifications\n");
		fprintf(stderr, "         -F             don't attempt to fix erroneous edges (force -O)\n");
		fprintf(stderr, "         -m INT         minimum overlap to merge [%d]\n", opt->min_merge_len);
		fprintf(stderr, "         -d FLOAT       drop a neighbor if relative overlap ratio below FLOAT [%.2f]\n\n", opt->min_dratio0); 
		fprintf(stderr, "         -C             clean the graph\n");
		fprintf(stderr, "         -l INT         minimum tip length [%d]\n", opt->min_elen);
		fprintf(stderr, "         -e INT         minimum tip read count [%d]\n", opt->min_ensr);
		fprintf(stderr, "         -i INT         minimum internal unitig read count [%d]\n", opt->min_insr);
		fprintf(stderr, "         -o INT         minimum overlap [%d]\n", opt->min_ovlp);
		fprintf(stderr, "         -R FLOAT       minimum relative overlap ratio [%.2f]\n", opt->min_dratio1);
		fprintf(stderr, "         -A             aggressive bubble popping\n");
		fprintf(stderr, "         -S             skip bubble simplification\n");
		fprintf(stderr, "         -w FLOAT       minimum coverage to keep a bubble [%.2f]\n", opt->max_bcov);
		fprintf(stderr, "         -r FLOAT       minimum fraction to keep a bubble [%.2f]\n\n", opt->max_bfrac);
		fprintf(stderr, "         -T INT1[,INT2] trim INT1-bp from an open end if DP below INT2 [%d,%d]\n", opt->trim_len, opt->trim_depth);
		fprintf(stderr, "\n");
		return 1;
	}
	g = mag_g_read(argv[optind], opt);
	mag_g_clean(g, opt);
	mag_g_trim_open(g, opt);
	mag_g_print(g);
	mag_g_destroy(g);
	free(opt);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x1f570
movq %rax, -0x30(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0xd7ce(%rip), %rdx      # 0x2d424
callq 0x2300
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
jl 0x1fe7d
movl -0x1c(%rbp), %eax
addl $-0x41, %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x36, %eax
ja 0x1fe78
movq -0x38(%rbp), %rax
leaq 0xd299(%rip), %rcx      # 0x2cf20
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x30(%rbp), %rax
movl (%rax), %ecx
orl $0x41, %ecx
movl %ecx, (%rax)
jmp 0x1fe78
movq -0x30(%rbp), %rax
movl (%rax), %ecx
orl $0x10, %ecx
movl %ecx, (%rax)
jmp 0x1fe78
movq -0x30(%rbp), %rax
movl (%rax), %ecx
orl $0x20, %ecx
movl %ecx, (%rax)
jmp 0x1fe78
movq -0x30(%rbp), %rax
movl (%rax), %ecx
orl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x1fe78
movq -0x30(%rbp), %rax
movl (%rax), %ecx
orl $0x80, %ecx
movl %ecx, (%rax)
jmp 0x1fe78
movq 0x132ee(%rip), %rax     # 0x32fd8
movq (%rax), %rdi
callq 0x20c0
cvtsd2ss %xmm0, %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x2c(%rax)
jmp 0x1fe78
movq 0x132cd(%rip), %rax     # 0x32fd8
movq (%rax), %rdi
callq 0x2310
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x4(%rax)
jmp 0x1fe78
movq 0x132b0(%rip), %rax     # 0x32fd8
movq (%rax), %rdi
callq 0x2310
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0xc(%rax)
jmp 0x1fe78
movq 0x13293(%rip), %rax     # 0x32fd8
movq (%rax), %rdi
callq 0x2310
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x1fe78
movq 0x13276(%rip), %rax     # 0x32fd8
movq (%rax), %rdi
callq 0x2310
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x14(%rax)
jmp 0x1fe78
movq 0x13259(%rip), %rax     # 0x32fd8
movq (%rax), %rdi
callq 0x2310
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x1fe78
movq 0x1323c(%rip), %rax     # 0x32fd8
movq (%rax), %rdi
callq 0x20c0
cvtsd2ss %xmm0, %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x30(%rax)
jmp 0x1fe78
movq 0x1321b(%rip), %rax     # 0x32fd8
movq (%rax), %rdi
callq 0x20c0
cvtsd2ss %xmm0, %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x34(%rax)
jmp 0x1fe78
movq 0x131fa(%rip), %rax     # 0x32fd8
movq (%rax), %rdi
callq 0x20c0
cvtsd2ss %xmm0, %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x38(%rax)
jmp 0x1fe78
movq 0x131d9(%rip), %rax     # 0x32fd8
movq (%rax), %rdi
callq 0x2310
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x20(%rax)
jmp 0x1fe78
movq 0x131bf(%rip), %rax     # 0x32fd8
movq (%rax), %rdi
leaq -0x28(%rbp), %rsi
movl $0xa, %edx
callq 0x21f0
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
je 0x1fe57
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
je 0x1fe57
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3b, %eax
jne 0x1fe76
movq -0x28(%rbp), %rdi
addq $0x1, %rdi
leaq -0x28(%rbp), %rsi
movl $0xa, %edx
callq 0x21f0
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x28(%rax)
jmp 0x1fe78
jmp 0x1fc48
movl -0x8(%rbp), %eax
movq 0x13149(%rip), %rcx     # 0x32fd0
cmpl (%rcx), %eax
jne 0x200cc
movq 0x13162(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
leaq 0xcb64(%rip), %rsi      # 0x2ca04
movb $0x0, %al
callq 0x21d0
movq 0x1314a(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
leaq 0xd58a(%rip), %rsi      # 0x2d442
movb $0x0, %al
callq 0x21d0
movq 0x13132(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
movq -0x30(%rbp), %rax
movl 0x4(%rax), %edx
leaq 0xd599(%rip), %rsi      # 0x2d470
movb $0x0, %al
callq 0x21d0
movq 0x13113(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
leaq 0xd5c3(%rip), %rsi      # 0x2d4b2
movb $0x0, %al
callq 0x21d0
movq 0x130fb(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
leaq 0xd5e9(%rip), %rsi      # 0x2d4f0
movb $0x0, %al
callq 0x21d0
movq 0x130e3(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
movq -0x30(%rbp), %rax
movl 0x20(%rax), %edx
leaq 0xd613(%rip), %rsi      # 0x2d539
movb $0x0, %al
callq 0x21d0
movq 0x130c4(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
movq -0x30(%rbp), %rax
movss 0x2c(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0xd625(%rip), %rsi      # 0x2d570
movb $0x1, %al
callq 0x21d0
movq 0x1309f(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
leaq 0xd664(%rip), %rsi      # 0x2d5c7
movb $0x0, %al
callq 0x21d0
movq 0x13087(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
movq -0x30(%rbp), %rax
movl 0xc(%rax), %edx
leaq 0xd66e(%rip), %rsi      # 0x2d5f0
movb $0x0, %al
callq 0x21d0
movq 0x13068(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
movq -0x30(%rbp), %rax
movl 0x10(%rax), %edx
leaq 0xd680(%rip), %rsi      # 0x2d621
movb $0x0, %al
callq 0x21d0
movq 0x13049(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
movq -0x30(%rbp), %rax
movl 0x14(%rax), %edx
leaq 0xd696(%rip), %rsi      # 0x2d656
movb $0x0, %al
callq 0x21d0
movq 0x1302a(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
movq -0x30(%rbp), %rax
movl 0x8(%rax), %edx
leaq 0xd6b8(%rip), %rsi      # 0x2d697
movb $0x0, %al
callq 0x21d0
movq 0x1300b(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
movq -0x30(%rbp), %rax
movss 0x30(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0xd6c1(%rip), %rsi      # 0x2d6c5
movb $0x1, %al
callq 0x21d0
movq 0x12fe6(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
leaq 0xd6e8(%rip), %rsi      # 0x2d704
movb $0x0, %al
callq 0x21d0
movq 0x12fce(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
leaq 0xd703(%rip), %rsi      # 0x2d737
movb $0x0, %al
callq 0x21d0
movq 0x12fb6(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
movq -0x30(%rbp), %rax
movss 0x34(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0xd712(%rip), %rsi      # 0x2d76b
movb $0x1, %al
callq 0x21d0
movq 0x12f91(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
movq -0x30(%rbp), %rax
movss 0x38(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0xd72f(%rip), %rsi      # 0x2d7ad
movb $0x1, %al
callq 0x21d0
movq 0x12f6c(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
movq -0x30(%rbp), %rax
movl 0x24(%rax), %edx
movq -0x30(%rbp), %rax
movl 0x28(%rax), %ecx
leaq 0xd74c(%rip), %rsi      # 0x2d7f0
movb $0x0, %al
callq 0x21d0
movq 0x12f46(%rip), %rax     # 0x32ff8
movq (%rax), %rdi
leaq 0xc948(%rip), %rsi      # 0x2ca04
movb $0x0, %al
callq 0x21d0
movl $0x1, -0x4(%rbp)
jmp 0x20127
movq -0x10(%rbp), %rax
movq 0x12ef9(%rip), %rcx     # 0x32fd0
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x30(%rbp), %rsi
callq 0x1a2e0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x1f660
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x1fbc0
movq -0x18(%rbp), %rdi
callq 0x1a220
movq -0x18(%rbp), %rdi
callq 0x1b310
movq -0x30(%rbp), %rdi
callq 0x2040
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq