// File: /workspace/github_c_makefile_star2_O3/imaya[P]zopfli-for-emscripten/zopfli_bin.c
// Function: main
int main(int argc, char* argv[]) {
  ZopfliOptions options;
  ZopfliFormat output_type = ZOPFLI_FORMAT_GZIP;
  const char* filename = 0;
  int output_to_stdout = 0;
  int i;

  ZopfliInitOptions(&options);

  for (i = 1; i < argc; i++) {
    if (StringsEqual(argv[i], "-v")) options.verbose = 1;
    else if (StringsEqual(argv[i], "-c")) output_to_stdout = 1;
    else if (StringsEqual(argv[i], "--deflate")) {
      output_type = ZOPFLI_FORMAT_DEFLATE;
    }
    else if (StringsEqual(argv[i], "--zlib")) output_type = ZOPFLI_FORMAT_ZLIB;
    else if (StringsEqual(argv[i], "--gzip")) output_type = ZOPFLI_FORMAT_GZIP;
    else if (StringsEqual(argv[i], "--i5")) options.numiterations = 5;
    else if (StringsEqual(argv[i], "--i10")) options.numiterations = 10;
    else if (StringsEqual(argv[i], "--i15")) options.numiterations = 15;
    else if (StringsEqual(argv[i], "--i25")) options.numiterations = 25;
    else if (StringsEqual(argv[i], "--i50")) options.numiterations = 50;
    else if (StringsEqual(argv[i], "--i100")) options.numiterations = 100;
    else if (StringsEqual(argv[i], "--i250")) options.numiterations = 250;
    else if (StringsEqual(argv[i], "--i500")) options.numiterations = 500;
    else if (StringsEqual(argv[i], "--i1000")) options.numiterations = 1000;
    else if (StringsEqual(argv[i], "-h")) {
      fprintf(stderr, "Usage: zopfli [OPTION]... FILE\n"
          "  -h    gives this help\n"
          "  -c    write the result on standard output, instead of disk"
          " filename + '.gz'\n"
          "  -v    verbose mode\n"
          "  --gzip  output to gzip format (default)\n"
          "  --deflate  output to deflate format instead of gzip\n"
          "  --zlib  output to zlib format instead of gzip\n");
      fprintf(stderr, "  --i5  less compression, but faster\n"
          "  --i10  less compression, but faster\n"
          "  --i15  default compression, 15 iterations\n"
          "  --i25  more compression, but slower\n"
          "  --i50  more compression, but slower\n"
          "  --i100  more compression, but slower\n"
          "  --i250  more compression, but slower\n"
          "  --i500  more compression, but slower\n"
          "  --i1000  more compression, but slower\n");
      return 0;
    }
  }

  for (i = 1; i < argc; i++) {
    if (argv[i][0] != '-') {
      char* outfilename;
      filename = argv[i];
      if (output_to_stdout) {
        outfilename = 0;
      } else if (output_type == ZOPFLI_FORMAT_GZIP) {
        outfilename = AddStrings(filename, ".gz");
      } else if (output_type == ZOPFLI_FORMAT_ZLIB) {
        outfilename = AddStrings(filename, ".zlib");
      } else {
        assert(output_type == ZOPFLI_FORMAT_DEFLATE);
        outfilename = AddStrings(filename, ".deflate");
      }
      if (options.verbose && outfilename) {
        fprintf(stderr, "Saving to: %s\n", outfilename);
      }
      CompressFile(&options, output_type, filename, outfilename);
      free(outfilename);
    }
  }

  if (!filename) {
    fprintf(stderr,
            "Please provide filename\nFor help, type: %s -h\n", argv[0]);
  }

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, 0x40(%rsp)
movl %edi, %ebx
leaq 0x14(%rsp), %rdi
callq 0x9374
cmpl $0x2, %ebx
jl 0x92ec
movl %ebx, 0x38(%rsp)
movl %ebx, %eax
movq %rax, 0x48(%rsp)
movl $0x0, 0x10(%rsp)
movl $0x1, %ebx
leaq 0x30b5(%rip), %r15      # 0xbf4c
leaq 0x30b8(%rip), %r12      # 0xbf56
leaq 0x30b8(%rip), %r13      # 0xbf5d
movl $0x0, 0xc(%rsp)
movq 0x40(%rsp), %rax
movq (%rax,%rbx,8), %r14
movb (%r14), %bpl
cmpb $0x2d, %bpl
jne 0x8ee3
cmpb $0x76, 0x1(%r14)
jne 0x8ed1
cmpb $0x0, 0x2(%r14)
je 0x9031
cmpb $0x63, 0x1(%r14)
jne 0x8ee3
cmpb $0x0, 0x2(%r14)
je 0x903b
movq %r14, %rdi
movq %r15, %rsi
callq 0x10f0
testl %eax, %eax
je 0x9010
movq %r14, %rdi
movq %r12, %rsi
callq 0x10f0
testl %eax, %eax
je 0x901d
movq %r14, %rdi
movq %r13, %rsi
callq 0x10f0
testl %eax, %eax
je 0x9027
movq %r14, %rdi
leaq 0x303e(%rip), %rsi      # 0xbf64
callq 0x10f0
testl %eax, %eax
je 0x9045
movq %r14, %rdi
leaq 0x302c(%rip), %rsi      # 0xbf69
callq 0x10f0
testl %eax, %eax
je 0x904f
movq %r14, %rdi
leaq 0x301b(%rip), %rsi      # 0xbf6f
callq 0x10f0
testl %eax, %eax
je 0x9059
movq %r14, %rdi
leaq 0x300a(%rip), %rsi      # 0xbf75
callq 0x10f0
testl %eax, %eax
je 0x9063
movq %r14, %rdi
leaq 0x2ff9(%rip), %rsi      # 0xbf7b
callq 0x10f0
testl %eax, %eax
je 0x906d
movq %r14, %rdi
leaq 0x2fe8(%rip), %rsi      # 0xbf81
callq 0x10f0
testl %eax, %eax
je 0x9077
movq %r14, %rdi
leaq 0x2fd8(%rip), %rsi      # 0xbf88
callq 0x10f0
testl %eax, %eax
je 0x9081
movq %r14, %rdi
leaq 0x2fc8(%rip), %rsi      # 0xbf8f
callq 0x10f0
testl %eax, %eax
je 0x908b
movq %r14, %rdi
leaq 0x2fb8(%rip), %rsi      # 0xbf96
callq 0x10f0
testl %eax, %eax
je 0x9095
cmpb $0x2d, %bpl
jne 0x909d
cmpb $0x68, 0x1(%r14)
jne 0x909d
cmpb $0x0, 0x2(%r14)
jne 0x909d
jmp 0x92f8
movl $0x2, 0xc(%rsp)
jmp 0x909d
movl $0x1, 0xc(%rsp)
jmp 0x909d
movl $0x0, 0xc(%rsp)
jmp 0x909d
movl $0x1, 0x14(%rsp)
jmp 0x909d
movl $0x1, 0x10(%rsp)
jmp 0x909d
movl $0x5, 0x18(%rsp)
jmp 0x909d
movl $0xa, 0x18(%rsp)
jmp 0x909d
movl $0xf, 0x18(%rsp)
jmp 0x909d
movl $0x19, 0x18(%rsp)
jmp 0x909d
movl $0x32, 0x18(%rsp)
jmp 0x909d
movl $0x64, 0x18(%rsp)
jmp 0x909d
movl $0xfa, 0x18(%rsp)
jmp 0x909d
movl $0x1f4, 0x18(%rsp)      # imm = 0x1F4
jmp 0x909d
movl $0x3e8, 0x18(%rsp)      # imm = 0x3E8
incq %rbx
cmpq %rbx, 0x48(%rsp)
jne 0x8ead
cmpl $0x2, 0x38(%rsp)
jl 0x92ec
movl 0xc(%rsp), %edx
cmpl $0x1, %edx
leaq 0x316a(%rip), %rax      # 0xc22e
leaq 0x3176(%rip), %rcx      # 0xc241
cmoveq %rax, %rcx
testl %edx, %edx
leaq 0x3152(%rip), %rax      # 0xc22a
cmovneq %rcx, %rax
movq %rax, 0x50(%rsp)
movl $0x1, %r15d
xorl %eax, %eax
movq 0x40(%rsp), %rcx
movq (%rcx,%r15,8), %r13
cmpb $0x2d, (%r13)
je 0x9279
cmpl $0x0, 0x10(%rsp)
je 0x9108
xorl %ebx, %ebx
jmp 0x9128
movq %r13, %rdi
movq 0x50(%rsp), %rsi
callq 0x931e
movq %rax, %rbx
testq %rax, %rax
je 0x9128
cmpl $0x0, 0x14(%rsp)
jne 0x92b6
xorl %eax, %eax
movq %rax, 0x30(%rsp)
movq %rax, 0x28(%rsp)
movq %r13, %rdi
leaq 0x3160(%rip), %rsi      # 0xc29e
callq 0x1160
testq %rax, %rax
je 0x9299
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x1140
movq %r14, %rdi
callq 0x1110
movq %rax, %rbp
movq %r14, %rdi
callq 0x10a0
movq %rbp, %rdi
callq 0x1130
movq %rax, %r12
testq %rbp, %rbp
sete %al
testq %r12, %r12
sete %cl
orb %al, %cl
je 0x919e
movq %r14, %rdi
callq 0x1080
testq %rbp, %rbp
jne 0x91c2
jmp 0x9299
movl $0x1, %esi
movq %r12, %rdi
movq %rbp, %rdx
movq %r14, %rcx
callq 0x1070
cmpq %rbp, %rax
jne 0x9289
movq %r14, %rdi
callq 0x1080
movq %r13, 0x38(%rsp)
leaq 0x14(%rsp), %rdi
movl 0xc(%rsp), %esi
movq %r12, %rdx
movq %rbp, %rcx
leaq 0x30(%rsp), %r8
leaq 0x28(%rsp), %r9
callq 0x9386
testq %rbx, %rbx
je 0x922f
movq 0x30(%rsp), %r14
movq 0x28(%rsp), %rbp
movq %rbx, %r13
movq %rbx, %rdi
leaq 0x30a0(%rip), %rsi      # 0xc2a1
callq 0x1160
testq %rax, %rax
je 0x92ff
movq %rax, %rbx
movl $0x1, %esi
movq %r14, %rdi
movq %rbp, %rdx
movq %rax, %rcx
callq 0x1190
movq %rbx, %rdi
callq 0x1080
jmp 0x9254
movq %rbx, %r13
cmpq $0x0, 0x28(%rsp)
je 0x9254
xorl %ebx, %ebx
movq 0x30(%rsp), %rax
movzbl (%rax,%rbx), %edi
callq 0x1040
incq %rbx
cmpq 0x28(%rsp), %rbx
jb 0x923c
movq 0x30(%rsp), %rdi
callq 0x1030
movq %r12, %rdi
callq 0x1030
movq %r13, %rbx
movq 0x38(%rsp), %r13
movq %rbx, %rdi
callq 0x1030
movq %r13, %rax
incq %r15
cmpq 0x48(%rsp), %r15
jne 0x90e9
jmp 0x92d6
movq %r12, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1080
movq 0x5d58(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x2fde(%rip), %rsi      # 0xc288
movq %r13, %rdx
xorl %eax, %eax
callq 0x1100
jmp 0x926e
movq 0x5d3b(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x2f83(%rip), %rsi      # 0xc24a
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1100
jmp 0x9128
testq %rax, %rax
je 0x92ec
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x40(%rsp), %rdi
callq 0x13b8
jmp 0x92db
callq 0x1374
jmp 0x92db
leaq 0x2f9e(%rip), %rdi      # 0xc2a4
leaq 0x2f27(%rip), %rsi      # 0xc234
leaq 0x2f95(%rip), %rcx      # 0xc2a9
movl $0x4a, %edx
callq 0x10b0