// File: /workspace/github_c_makefile_star2_O2/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, %r15d
leaq 0x722(%rip), %rax       # 0x7108
leaq 0xb8(%rsp), %r14
movq %rax, -0x8(%r14)
movq %r14, %rdi
callq 0x2270
pushq $0x2
popq %rbp
movq %r14, %rdi
movl %ebp, %esi
callq 0x24c0
pushq $0x3
popq %r12
movq %r14, %rdi
movl %r12d, %esi
callq 0x24c0
pushq $0xf
popq %r13
movq %r14, %rdi
movl %r13d, %esi
callq 0x24c0
pushq $0xd
popq %rsi
movq %r14, %rdi
callq 0x24c0
andl $0x0, 0x80(%r14)
leaq 0xb0(%rsp), %r14
movl %ebp, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x20d0
movl %r12d, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x20d0
movl %r13d, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x20d0
leaq 0x1c49(%rip), %rsi      # 0x86b6
pushq $0x6
popq %rdi
callq 0x2350
movq (%rbx), %r14
cmpb $0x0, (%r14)
je 0x6a96
pushq $0x2f
popq %rsi
movq %r14, %rdi
callq 0x2170
leaq 0x1(%rax), %rcx
testq %rax, %rax
cmoveq %r14, %rcx
jmp 0x6a9d
leaq 0x1b53(%rip), %rcx      # 0x85f0
movq %rcx, 0x15bc4(%rip)     # 0x1c668
callq 0x6124
movq 0x15bc0(%rip), %rax     # 0x1c670
movq %rax, 0x15bc1(%rip)     # 0x1c678
leaq 0x1b32(%rip), %rdi      # 0x85f0
pushq $0x1
popq %rsi
callq 0x22e0
movq %rax, 0x15bb3(%rip)     # 0x1c680
cmpl $0x1, %r15d
je 0x70fb
movl $0x0, (%rsp)
leaq 0x230b(%rip), %r13      # 0x8df0
movq 0x54ec(%rip), %r14      # 0xbfd8
pushq $0x7
popq %rax
movl %eax, 0x4(%rsp)
leaq 0x1a3e(%rip), %r12      # 0x8538
movl $0x0, 0x8(%rsp)
movl %r15d, %edi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x23f0
movl %eax, %ebp
leal -0x51(%rbp), %eax
cmpl $0x2d, %eax
ja 0x6ba0
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
movb $0x1, 0x15b5e(%rip)     # 0x1c68c
movq (%r14), %rdi
leaq 0x20(%rsp), %rsi
callq 0x20f0
movq (%r14), %rax
cmpq 0x20(%rsp), %rax
movdqa %xmm0, 0x10(%rsp)
jne 0x6b58
movl %ebp, %edi
callq 0x7225
movdqa 0x10(%rsp), %xmm0
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jl 0x6b7e
movl %ebp, %edi
callq 0x724e
movdqa 0x10(%rsp), %xmm0
pand 0x198a(%rip), %xmm0     # 0x8510
ucomisd 0x1992(%rip), %xmm0     # 0x8520
jbe 0x6b97
movl %ebp, %edi
callq 0x724e
movl %ebp, 0xc(%rsp)
jmp 0x6b02
cmpl $0x30, %ebp
je 0x6d11
cmpl $0x31, %ebp
je 0x6d73
cmpl $0x43, %ebp
je 0x6d20
cmpl $0x44, %ebp
je 0x6d5e
cmpl $-0x1, %ebp
je 0x6d7f
cmpl $0x3f, %ebp
jne 0x6b02
jmp 0x7100
movb $0x1, 0x15aba(%rip)     # 0x1c69c
jmp 0x6b02
movq (%r14), %rdi
leaq 0x20(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x2410
movq %rax, %rbp
movq 0x20(%rsp), %rax
cmpq (%r14), %rax
je 0x6c09
cmpb $0x0, (%rax)
je 0x6c11
pushq $0x69
popq %rdi
callq 0x7225
callq 0x2050
cmpl $0x22, (%rax)
sete %al
leaq -0x80000000(%rbp), %rcx
cmpq $-0x7fffffff, %rcx      # imm = 0x80000001
setb %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x6c3c
pushq $0x69
popq %rdi
callq 0x724e
movl %ebp, 0x15a6a(%rip)     # 0x1c6ac
jmp 0x6b02
movb $0x1, 0x15a48(%rip)     # 0x1c696
jmp 0x6b02
movl $0x1, 0x15a2b(%rip)     # 0x1c688
jmp 0x6b02
movl $0x2, 0x15a1c(%rip)     # 0x1c688
jmp 0x6b02
movq (%r14), %rax
movq %rax, 0x15a25(%rip)     # 0x1c6a0
jmp 0x6b02
movl $0x3, 0x159fe(%rip)     # 0x1c688
jmp 0x6b02
movb $0x1, 0x15a08(%rip)     # 0x1c69e
jmp 0x6b02
movq (%r14), %rsi
pushq $0x74
popq %rdi
callq 0x33b2
movb $0x1, %al
movl %eax, (%rsp)
jmp 0x6b02
movl $0x1, 0x159de(%rip)     # 0x1c698
jmp 0x6b02
movb $0x1, 0x159e3(%rip)     # 0x1c6a9
jmp 0x6b02
movq (%r14), %rsi
pushq $0x64
popq %rdi
callq 0x33b2
movb $0x1, %al
movl %eax, 0x8(%rsp)
jmp 0x6b02
movb $0x1, 0x159b5(%rip)     # 0x1c69d
jmp 0x6b02
movb $0x1, 0x1599b(%rip)     # 0x1c68f
jmp 0x6b02
movb $0x1, 0x1598d(%rip)     # 0x1c68d
jmp 0x6b02
movb $0x1, 0x15989(%rip)     # 0x1c695
jmp 0x6b02
movl $0x2, 0x1597d(%rip)     # 0x1c698
jmp 0x6b02
movq (%r14), %rdi
callq 0x616f
testb %al, %al
jne 0x6b02
movq 0x15949(%rip), %rdi     # 0x1c680
pushq $0x7
popq %rsi
pushq $0x4
popq %rdx
leaq 0x20cd(%rip), %rcx      # 0x8e11
callq 0x2440
movq (%r14), %rdx
pushq $0x43
popq %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x68cf
jmp 0x6b02
movw $0x101, 0x15941(%rip)   # imm = 0x101
movb $0x1, 0x1593c(%rip)     # 0x1c6aa
jmp 0x6b02
movb $0x1, 0x15914(%rip)     # 0x1c68e
jmp 0x6b02
testb $0x1, 0x8(%rsp)
je 0x6da9
callq 0x34dd
movl 0x158f7(%rip), %eax     # 0x1c688
cmpl $0x3, %eax
movl (%rsp), %ebp
je 0x6dc3
testl %eax, %eax
jne 0x6db9
movl $0x3, 0x158e1(%rip)     # 0x1c688
jmp 0x6dc3
movl (%rsp), %ebp
testb $0x1, %bpl
je 0x6dc3
callq 0x34dd
jmp 0x6dc3
pushq $0xe
popq %rdi
xorl %eax, %eax
callq 0x6563
movl 0x158bf(%rip), %eax     # 0x1c688
cmpl $0x1, %eax
sete %cl
andb %bpl, %cl
cmpb $0x1, %cl
jne 0x6de7
pushq $0x5
popq %rdi
xorl %eax, %eax
callq 0x6563
movl 0x158a1(%rip), %eax     # 0x1c688
testl %eax, %eax
sete %cl
andb %cl, %bpl
cmpb $0x1, %bpl
jne 0x6e05
pushq $0x6
popq %rdi
xorl %eax, %eax
callq 0x6563
movl 0x15883(%rip), %eax     # 0x1c688
movb 0x15881(%rip), %cl      # 0x1c68c
testl %eax, %eax
setne %dl
orb %cl, %dl
je 0x6e49
testb %cl, %cl
je 0x6efd
movl 0xc(%rsp), %eax
cmpl $0x73, %eax
je 0x6e58
cmpl $0x67, %eax
movapd 0x10(%rsp), %xmm0
jne 0x6ea0
cmpb $0x0, 0x15858(%rip)     # 0x1c68f
jne 0x6e8b
movsd 0x16ef(%rip), %xmm0     # 0x8530
mulsd 0x10(%rsp), %xmm0
jmp 0x6e8b
movl $0x1, 0x15835(%rip)     # 0x1c688
jmp 0x6f09
xorpd %xmm1, %xmm1
movapd 0x10(%rsp), %xmm0
ucomisd %xmm0, %xmm1
jb 0x6e76
pushq $0x73
popq %rdi
callq 0x724e
movapd 0x10(%rsp), %xmm0
callq 0x2250
mulsd 0x16a5(%rip), %xmm0     # 0x8528
mulsd 0x16a5(%rip), %xmm0     # 0x8530
callq 0x20a0
cvttsd2si %xmm0, %eax
movl %eax, 0x157f6(%rip)     # 0x1c690
movapd 0x10(%rsp), %xmm0
movmskpd %xmm0, %eax
andl $0x1, %eax
movb %al, 0x157e7(%rip)      # 0x1c694
cmpb $0x0, 0x157d9(%rip)     # 0x1c68d
jne 0x6ecc
movl 0x157d4(%rip), %eax     # 0x1c690
movswl %ax, %ecx
cmpl %eax, %ecx
je 0x6ecc
movl 0xc(%rsp), %edi
callq 0x724e
movl 0x157b6(%rip), %eax     # 0x1c688
cmpl $0x1, %eax
je 0x6eec
testl %eax, %eax
jne 0x6efd
cmpq $0x0, 0x157bd(%rip)     # 0x1c6a0
pushq $0x6
popq %rcx
movl %ecx, 0x4(%rsp)
je 0x6efd
movl 0x4(%rsp), %edi
xorl %eax, %eax
callq 0x6563
movl 0x1578b(%rip), %eax     # 0x1c688
cmpl $0x3, %eax
jne 0x6f09
movb $0x0, 0x1578d(%rip)     # 0x1c696
movq 0x15760(%rip), %rax     # 0x1c670
cmpq $0x0, 0x8(%rax)
je 0x6f25
xorl %eax, %eax
movb %al, 0x1576d(%rip)      # 0x1c68c
movb %al, 0x15770(%rip)      # 0x1c695
movq 0x50a4(%rip), %r14      # 0xbfd0
movslq (%r14), %rax
cmpq $0x0, (%rbx,%rax,8)
jne 0x6f43
pushq $0x8
popq %rdi
xorl %eax, %eax
callq 0x6563
movslq (%r14), %rax
cmpq $0x0, 0x8(%rbx,%rax,8)
je 0x6f82
cmpl $0x1, 0x15736(%rip)     # 0x1c688
jne 0x6f61
pushq $0x9
popq %rdi
xorl %eax, %eax
callq 0x6563
movslq (%r14), %rax
cmpq $0x0, 0x10(%rbx,%rax,8)
je 0x6f76
pushq $0x9
popq %rdi
xorl %eax, %eax
callq 0x6563
movslq (%r14), %rax
movq 0x8(%rbx,%rax,8), %rcx
movq %rcx, 0x15736(%rip)     # 0x1c6b8
movq (%rbx,%rax,8), %rdi
movq %rdi, 0x15723(%rip)     # 0x1c6b0
cmpb $0x2d, (%rdi)
jne 0x6f9c
cmpb $0x0, 0x1(%rdi)
je 0x705c
leaq 0x10da(%rip), %rsi      # 0x807d
callq 0x23c0
movq %rax, 0x15711(%rip)     # 0x1c6c0
testq %rax, %rax
jne 0x6fc7
movq 0x156f5(%rip), %rdi     # 0x1c6b0
callq 0x687e
movq 0x156f9(%rip), %rax     # 0x1c6c0
movq %rax, %rdi
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 0x156d6(%rip)           # 0x1c6c8
callq 0x4187
movq 0x15672(%rip), %rax     # 0x1c670
cmpl $0x2, (%rax)
jne 0x700d
callq 0x4c8d
jmp 0x70cf
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x2480
movl $0x20000, %esi          # imm = 0x20000
movq %rbx, %rdi
callq 0x21d0
movq %rax, %r14
movq 0x1568f(%rip), %rcx     # 0x1c6c0
pushq $0x1
popq %rsi
movl $0x20000, %edx          # imm = 0x20000
movq %rax, %rdi
callq 0x20e0
movq %rax, %rbx
cmpq $-0x1, %rax
je 0x706f
cmpq $0x3, %rbx
ja 0x7074
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x6639
jmp 0x7074
movq 0x4f65(%rip), %rax      # 0xbfc8
movq (%rax), %rax
movq %rax, 0x15653(%rip)     # 0x1c6c0
jmp 0x6ff2
callq 0x67b6
cmpl $0x5367674f, (%r14)     # imm = 0x5367674F
je 0x7087
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x6639
leaq 0x20(%rsp), %r14
pushq $0x1
popq %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2210
movq %r14, %rdi
callq 0x497c
movl $0x20000, %esi          # imm = 0x20000
movq %r14, %rdi
callq 0x21d0
movq 0x15609(%rip), %rcx     # 0x1c6c0
movl $0x20000, %edx          # imm = 0x20000
movq %rax, %rdi
movq %r15, %rsi
callq 0x20e0
movq %rax, %rbx
testq %rax, %rax
jne 0x7090
cmpl $0x3, 0x155f6(%rip)     # 0x1c6cc
ja 0x70e2
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x6639
callq 0x3bc0
xorl %eax, %eax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x7111
pushq $0x1
popq %rdi
callq 0x2450