// File: /workspace/github_c_makefile_star2_O1/hcmiya[P]opuscomment/src/main.c
// Function: main
int main(int argc, char **argv) {
	struct sigaction sa;
	sa.sa_handler = interrupted;
	sigemptyset(&sa.sa_mask);
	sigaddset(&sa.sa_mask, SIGINT);
	sigaddset(&sa.sa_mask, SIGQUIT);
	sigaddset(&sa.sa_mask, SIGTERM);
	sigaddset(&sa.sa_mask, SIGPIPE);
	sa.sa_flags = 0;
	sigaction(SIGINT, &sa, NULL);
	sigaction(SIGQUIT, &sa, NULL);
	sigaction(SIGTERM, &sa, NULL);
	
	setlocale(LC_ALL, "");
	if (*argv[0]) {
		char *p = strrchr(argv[0], '/');
		program_name = p ? p + 1 : argv[0];
	}
	else {
		program_name = program_name_default;
	}
	select_codec();
	default_codec = codec;
	
#ifdef NLS
#define co catd = catopen("opuscomment", NL_CAT_LOCALE)
#ifdef DEFAULT_NLS_PATH
	char const *nlspath = getenv("NLSPATH");
	if (nlspath && *nlspath) {
		co;
	}
	else {
		setenv("NLSPATH", DEFAULT_NLS_PATH, true);
		co;
		if (catd == (nl_catd)-1) {
			unsetenv("NLSPATH");
			co;
		}
	}
#else
	co;
#endif
#undef co
#endif
	if (argc == 1) usage();
	
	parse_args(argc, argv);
	if (!argv[optind]) {
		mainerror(err_main_no_file);
	}
	if (argv[optind + 1]) {
		if (O.edit == EDIT_LIST) {
			mainerror(err_main_many_args);
		}
		if (argv[optind + 2]) {
			mainerror(err_main_many_args);
		}
		O.out = argv[optind + 1];
	}
	
	O.in = argv[optind];
	if (strcmp(O.in, "-")) {
		stream_input = fopen(O.in, "r");
		if (!stream_input) {
			fileerror(O.in);
		}
		struct stat sb;
		fstat(fileno(stream_input), &sb);
		input_is_regular_file = S_ISREG(sb.st_mode);
	}
	else {
		stream_input = stdin;
	}
	
	open_output_file();
	if (codec->type == CODEC_FLAC) read_flac();
	else read_ogg();
	
	if (opst < PAGE_SOUND) {
		opuserror(err_opus_interrupted);
	}
	
	move_file();
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x88e(%rip), %rax       # 0x7a67
leaq 0xb8(%rsp), %r14
movq %rax, -0x8(%r14)
movq %r14, %rdi
callq 0x2270
movq %r14, %rdi
movl $0x2, %esi
callq 0x24c0
movq %r14, %rdi
movl $0x3, %esi
callq 0x24c0
movq %r14, %rdi
movl $0xf, %esi
callq 0x24c0
movq %r14, %rdi
movl $0xd, %esi
callq 0x24c0
movl $0x0, 0x80(%r14)
leaq 0xb0(%rsp), %r14
movl $0x2, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x20d0
movl $0x3, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x20d0
movl $0xf, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x20d0
leaq 0x144e(%rip), %rsi      # 0x86b6
movl $0x6, %edi
callq 0x2350
movq (%rbx), %r14
cmpb $0x0, (%r14)
je 0x7295
movq %r14, %rdi
movl $0x2f, %esi
callq 0x2170
leaq 0x1(%rax), %rcx
testq %rax, %rax
cmoveq %r14, %rcx
jmp 0x729c
leaq 0x1354(%rip), %rcx      # 0x85f0
movq %rcx, 0x153c5(%rip)     # 0x1c668
callq 0x68c4
movq 0x153c1(%rip), %rax     # 0x1c670
movq %rax, 0x153c2(%rip)     # 0x1c678
leaq 0x1333(%rip), %rdi      # 0x85f0
movl $0x1, %esi
callq 0x22e0
movq %rax, 0x153b2(%rip)     # 0x1c680
cmpl $0x1, %ebp
je 0x7a62
movl $0x0, 0x4(%rsp)
leaq 0x1b0a(%rip), %r15      # 0x8df0
movq 0x4ceb(%rip), %r13      # 0xbfd8
leaq 0x1244(%rip), %r14      # 0x8538
movl $0x0, 0x8(%rsp)
movl %ebp, %edi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x23f0
movl %eax, %r12d
cmpl $0x42, %eax
jle 0x7411
leal -0x51(%r12), %eax
cmpl $0x2d, %eax
ja 0x7442
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
movb $0x1, 0x15359(%rip)     # 0x1c68c
movq (%r13), %rdi
leaq 0x20(%rsp), %rsi
callq 0x20f0
movq (%r13), %rax
cmpq 0x20(%rsp), %rax
movdqa %xmm0, 0x10(%rsp)
jne 0x7382
movq 0x15327(%rip), %rdi     # 0x1c680
movl $0x7, %esi
movl $0x1, %edx
leaq 0x1aba(%rip), %rcx      # 0x8e24
callq 0x2440
movl %r12d, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x70c0
movdqa 0x10(%rsp), %xmm0
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jl 0x73cb
movq 0x152de(%rip), %rdi     # 0x1c680
movl $0x7, %esi
movl $0x2, %edx
leaq 0x1a87(%rip), %rcx      # 0x8e3a
callq 0x2440
movl %r12d, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x70c0
movdqa 0x10(%rsp), %xmm0
pand 0x113d(%rip), %xmm0     # 0x8510
ucomisd 0x1145(%rip), %xmm0     # 0x8520
jbe 0x7407
movq 0x1529c(%rip), %rdi     # 0x1c680
movl $0x7, %esi
movl $0x2, %edx
leaq 0x1a45(%rip), %rcx      # 0x8e3a
callq 0x2440
movl %r12d, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x70c0
movl %r12d, 0xc(%rsp)
jmp 0x72fc
cmpl $0x30, %r12d
jg 0x742c
jne 0x763b
movl $0x2, 0x15271(%rip)     # 0x1c698
jmp 0x72fc
cmpl $0x31, %r12d
jne 0x7647
movb $0x1, 0x15251(%rip)     # 0x1c68e
jmp 0x72fc
cmpl $0x43, %r12d
je 0x75f7
cmpl $0x44, %r12d
jne 0x72fc
movw $0x101, 0x15249(%rip)   # imm = 0x101
movb $0x1, 0x15244(%rip)     # 0x1c6aa
jmp 0x72fc
movb $0x1, 0x1522a(%rip)     # 0x1c69c
jmp 0x72fc
movq (%r13), %rdi
leaq 0x20(%rsp), %rsi
movl $0xa, %edx
callq 0x2410
movq %r13, %rcx
movq %rax, %r13
movq 0x20(%rsp), %rax
cmpq (%rcx), %rax
je 0x749f
cmpb $0x0, (%rax)
je 0x74c9
movq 0x151da(%rip), %rdi     # 0x1c680
movl $0x7, %esi
movl $0x1, %edx
leaq 0x196d(%rip), %rcx      # 0x8e24
callq 0x2440
movl %r12d, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x70c0
callq 0x2050
cmpl $0x22, (%rax)
sete %al
leaq -0x80000000(%r13), %rcx
cmpq $-0x7fffffff, %rcx      # imm = 0x80000001
setb %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x7516
movq 0x1518d(%rip), %rdi     # 0x1c680
movl $0x7, %esi
movl $0x2, %edx
leaq 0x1936(%rip), %rcx      # 0x8e3a
callq 0x2440
movl %r12d, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x70c0
movl %r13d, 0x1518f(%rip)    # 0x1c6ac
movq 0x4ab4(%rip), %r13      # 0xbfd8
jmp 0x72fc
movb $0x1, 0x15166(%rip)     # 0x1c696
jmp 0x72fc
movl $0x1, 0x15149(%rip)     # 0x1c688
jmp 0x72fc
movl $0x2, 0x1513a(%rip)     # 0x1c688
jmp 0x72fc
movq (%r13), %rax
movq %rax, 0x15142(%rip)     # 0x1c6a0
jmp 0x72fc
movl $0x3, 0x1511b(%rip)     # 0x1c688
jmp 0x72fc
movb $0x1, 0x15125(%rip)     # 0x1c69e
jmp 0x72fc
movb $0x1, 0x1510a(%rip)     # 0x1c68f
jmp 0x72fc
movq (%r13), %rsi
movl %r12d, %edi
callq 0x364e
movb $0x1, %al
movl %eax, 0x8(%rsp)
jmp 0x72fc
movl $0x1, 0x150ed(%rip)     # 0x1c698
jmp 0x72fc
movb $0x1, 0x150f2(%rip)     # 0x1c6a9
jmp 0x72fc
movq (%r13), %rsi
movl %r12d, %edi
callq 0x364e
movb $0x1, %al
movl %eax, 0x4(%rsp)
jmp 0x72fc
movb $0x1, 0x150c3(%rip)     # 0x1c69d
jmp 0x72fc
movb $0x1, 0x150a7(%rip)     # 0x1c68d
jmp 0x72fc
movb $0x1, 0x150a3(%rip)     # 0x1c695
jmp 0x72fc
movq (%r13), %rdi
callq 0x6943
testb %al, %al
jne 0x72fc
movq 0x15071(%rip), %rdi     # 0x1c680
movl $0x7, %esi
movl $0x4, %edx
leaq 0x17f1(%rip), %rcx      # 0x8e11
callq 0x2440
movq (%r13), %rdx
movl %r12d, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x70c0
jmp 0x72fc
cmpl $-0x1, %r12d
jne 0x72fc
jmp 0x765b
cmpl $0x3f, %r12d
jne 0x72fc
movl $0x1, %edi
callq 0x2450
movl 0x4(%rsp), %r14d
testb $0x1, %r14b
movl 0x8(%rsp), %ebp
jne 0x7670
testb $0x1, %bpl
je 0x7675
callq 0x3783
testb $0x1, %r14b
je 0x76a2
movl 0x15007(%rip), %eax     # 0x1c688
cmpl $0x3, %eax
je 0x76a2
testl %eax, %eax
jne 0x7696
movl $0x3, 0x14ff4(%rip)     # 0x1c688
jmp 0x76a2
movl $0xe, %edi
xorl %eax, %eax
callq 0x6d34
testb $0x1, %bpl
je 0x76bd
cmpl $0x1, 0x14fd9(%rip)     # 0x1c688
jne 0x76bd
movl $0x5, %edi
xorl %eax, %eax
callq 0x6d34
testb $0x1, %bpl
je 0x76d8
cmpl $0x0, 0x14fbe(%rip)     # 0x1c688
jne 0x76d8
movl $0x6, %edi
xorl %eax, %eax
callq 0x6d34
movb 0x14fae(%rip), %al      # 0x1c68c
testb %al, %al
movapd 0x10(%rsp), %xmm0
jne 0x7700
cmpl $0x0, 0x14f99(%rip)     # 0x1c688
jne 0x7700
movl $0x1, 0x14f8d(%rip)     # 0x1c688
jmp 0x780f
testb %al, %al
je 0x780f
movl 0xc(%rsp), %eax
cmpl $0x73, %eax
je 0x772f
cmpl $0x67, %eax
jne 0x7795
cmpb $0x0, 0x14f72(%rip)     # 0x1c68f
jne 0x7780
movsd 0xe09(%rip), %xmm0      # 0x8530
mulsd 0x10(%rsp), %xmm0
jmp 0x7780
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jb 0x776b
movq 0x14f40(%rip), %rdi     # 0x1c680
leaq 0x16f3(%rip), %rcx      # 0x8e3a
movl $0x7, %esi
movl $0x2, %edx
callq 0x2440
movl $0x73, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x70c0
movapd 0x10(%rsp), %xmm0
callq 0x2250
mulsd 0xdb0(%rip), %xmm0      # 0x8528
mulsd 0xdb0(%rip), %xmm0      # 0x8530
callq 0x20a0
cvttsd2si %xmm0, %eax
movl %eax, 0x14f01(%rip)     # 0x1c690
movapd 0x10(%rsp), %xmm0
movmskpd %xmm0, %eax
andl $0x1, %eax
movb %al, 0x14ef2(%rip)      # 0x1c694
cmpb $0x0, 0x14ee4(%rip)     # 0x1c68d
jne 0x77e3
movl 0x14edf(%rip), %eax     # 0x1c690
movswl %ax, %ecx
cmpl %eax, %ecx
je 0x77e3
movq 0x14ec1(%rip), %rdi     # 0x1c680
leaq 0x1674(%rip), %rcx      # 0x8e3a
movl $0x7, %esi
movl $0x2, %edx
callq 0x2440
movl 0xc(%rsp), %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x70c0
movl 0x14e9f(%rip), %eax     # 0x1c688
cmpl $0x1, %eax
jne 0x77f5
movl $0x7, %edi
jmp 0x7808
testl %eax, %eax
jne 0x780f
cmpq $0x0, 0x14e9f(%rip)     # 0x1c6a0
je 0x780f
movl $0x6, %edi
xorl %eax, %eax
callq 0x6d34
cmpl $0x3, 0x14e72(%rip)     # 0x1c688
jne 0x781f
movb $0x0, 0x14e77(%rip)     # 0x1c696
movq 0x14e4a(%rip), %rax     # 0x1c670
cmpq $0x0, 0x8(%rax)
je 0x783b
xorl %eax, %eax
movb %al, 0x14e57(%rip)      # 0x1c68c
movb %al, 0x14e5a(%rip)      # 0x1c695
movq 0x478e(%rip), %r14      # 0xbfd0
movslq (%r14), %rax
cmpq $0x0, (%rbx,%rax,8)
jne 0x7858
movl $0x8, %edi
xorl %eax, %eax
callq 0x6d34
movslq (%r14), %rax
cmpq $0x0, 0x8(%rbx,%rax,8)
je 0x789e
cmpl $0x1, 0x14e1e(%rip)     # 0x1c688
jne 0x7878
movl $0x9, %edi
xorl %eax, %eax
callq 0x6d34
movslq (%r14), %rax
cmpq $0x0, 0x10(%rbx,%rax,8)
je 0x788f
movl $0x9, %edi
xorl %eax, %eax
callq 0x6d34
movslq (%r14), %rax
movq 0x8(%rbx,%rax,8), %rax
movq %rax, 0x14e1a(%rip)     # 0x1c6b8
movslq (%r14), %rax
movq (%rbx,%rax,8), %rbx
movq %rbx, 0x14e04(%rip)     # 0x1c6b0
leaq 0x78c(%rip), %rsi       # 0x803f
movq %rbx, %rdi
callq 0x2240
testl %eax, %eax
je 0x7917
leaq 0x7b9(%rip), %rsi       # 0x807f
movq %rbx, %rdi
callq 0x23c0
movq %rax, 0x14deb(%rip)     # 0x1c6c0
testq %rax, %rax
jne 0x78e6
movq 0x14dcf(%rip), %rdi     # 0x1c6b0
callq 0x7069
movq 0x14dd3(%rip), %rdi     # 0x1c6c0
callq 0x22d0
leaq 0x20(%rsp), %rbx
movl %eax, %edi
movq %rbx, %rsi
callq 0x24b0
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%rbx), %eax
cmpl $0x8000, %eax           # imm = 0x8000
sete 0x14db3(%rip)           # 0x1c6c8
jmp 0x7928
movq 0x46aa(%rip), %rax      # 0xbfc8
movq (%rax), %rax
movq %rax, 0x14d98(%rip)     # 0x1c6c0
callq 0x452f
movq 0x14d3c(%rip), %rax     # 0x1c670
cmpl $0x2, (%rax)
jne 0x7943
callq 0x5121
jmp 0x7a34
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x2480
movl $0x20000, %esi          # imm = 0x20000
movq %rbx, %rdi
callq 0x21d0
movq %rax, %r14
movq 0x14d59(%rip), %rcx     # 0x1c6c0
movl $0x1, %esi
movl $0x20000, %edx          # imm = 0x20000
movq %rax, %rdi
callq 0x20e0
movq %rax, %rbx
cmpq $-0x1, %rax
jne 0x7987
callq 0x6f9b
cmpq $0x3, %rbx
ja 0x7999
movl $0x1, %edi
xorl %eax, %eax
callq 0x6e10
cmpl $0x5367674f, (%r14)     # imm = 0x5367674F
je 0x79ae
movl $0x1, %edi
xorl %eax, %eax
callq 0x6e10
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2210
movq %r14, %rdi
callq 0x4d9b
movl $0x20000, %esi          # imm = 0x20000
movq %r14, %rdi
callq 0x21d0
movq 0x14ce6(%rip), %rcx     # 0x1c6c0
movl $0x1, %esi
movl $0x20000, %edx          # imm = 0x20000
movq %rax, %rdi
callq 0x20e0
testq %rax, %rax
je 0x7a34
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x4d9b
movl $0x20000, %esi          # imm = 0x20000
movq %rbx, %rdi
callq 0x21d0
movq 0x14ca3(%rip), %rcx     # 0x1c6c0
movl $0x1, %esi
movl $0x20000, %edx          # imm = 0x20000
movq %rax, %rdi
callq 0x20e0
testq %rax, %rax
jne 0x79f6
cmpl $0x3, 0x14c91(%rip)     # 0x1c6cc
ja 0x7a49
movl $0x2, %edi
xorl %eax, %eax
callq 0x6e10
callq 0x3ec4
xorl %eax, %eax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x7a72