// File: /workspace/github_c_makefile_star2_O1/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, 0x38(%rsp)
movl %edi, %r14d
leaq 0x14(%rsp), %rdi
callq 0x91ec
movl %r14d, %eax
movq %rax, 0x40(%rsp)
cmpl $0x2, %r14d
jl 0x8f24
xorl %ebx, %ebx
movl $0x1, %ebp
leaq 0x3244(%rip), %r15      # 0xbf5c
leaq 0x3240(%rip), %r12      # 0xbf5f
movl $0x0, 0x10(%rsp)
movq 0x38(%rsp), %rax
movq (%rax,%rbp,8), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x10e0
testl %eax, %eax
je 0x8e86
movq %r13, %rdi
movq %r12, %rsi
callq 0x10e0
testl %eax, %eax
je 0x8e90
movq %r13, %rdi
leaq 0x3202(%rip), %rsi      # 0xbf62
callq 0x10e0
testl %eax, %eax
je 0x8e97
movq %r13, %rdi
leaq 0x31f5(%rip), %rsi      # 0xbf6c
callq 0x10e0
testl %eax, %eax
je 0x8ea1
movq %r13, %rdi
leaq 0x31e5(%rip), %rsi      # 0xbf73
callq 0x10e0
testl %eax, %eax
je 0x8eab
movq %r13, %rdi
leaq 0x31d5(%rip), %rsi      # 0xbf7a
callq 0x10e0
testl %eax, %eax
je 0x8eb5
movq %r13, %rdi
leaq 0x31c3(%rip), %rsi      # 0xbf7f
callq 0x10e0
testl %eax, %eax
je 0x8ebf
movq %r13, %rdi
leaq 0x31b2(%rip), %rsi      # 0xbf85
callq 0x10e0
testl %eax, %eax
je 0x8ec9
movq %r13, %rdi
leaq 0x31a1(%rip), %rsi      # 0xbf8b
callq 0x10e0
testl %eax, %eax
je 0x8ed3
movq %r13, %rdi
leaq 0x3190(%rip), %rsi      # 0xbf91
callq 0x10e0
testl %eax, %eax
je 0x8edd
movq %r13, %rdi
leaq 0x317f(%rip), %rsi      # 0xbf97
callq 0x10e0
testl %eax, %eax
je 0x8ee7
movq %r13, %rdi
leaq 0x316f(%rip), %rsi      # 0xbf9e
callq 0x10e0
testl %eax, %eax
je 0x8ef1
movq %r13, %rdi
leaq 0x315f(%rip), %rsi      # 0xbfa5
callq 0x10e0
testl %eax, %eax
je 0x8efb
movq %r13, %rdi
leaq 0x314f(%rip), %rsi      # 0xbfac
callq 0x10e0
testl %eax, %eax
je 0x8f05
movq %r13, %rdi
leaq 0x3140(%rip), %rsi      # 0xbfb4
callq 0x10e0
testl %eax, %eax
jne 0x8f0d
jmp 0x9170
movl $0x1, 0x14(%rsp)
jmp 0x8f0d
movl $0x1, %ebx
jmp 0x8f0d
movl $0x2, 0x10(%rsp)
jmp 0x8f0d
movl $0x1, 0x10(%rsp)
jmp 0x8f0d
movl $0x0, 0x10(%rsp)
jmp 0x8f0d
movl $0x5, 0x18(%rsp)
jmp 0x8f0d
movl $0xa, 0x18(%rsp)
jmp 0x8f0d
movl $0xf, 0x18(%rsp)
jmp 0x8f0d
movl $0x19, 0x18(%rsp)
jmp 0x8f0d
movl $0x32, 0x18(%rsp)
jmp 0x8f0d
movl $0x64, 0x18(%rsp)
jmp 0x8f0d
movl $0xfa, 0x18(%rsp)
jmp 0x8f0d
movl $0x1f4, 0x18(%rsp)      # imm = 0x1F4
jmp 0x8f0d
movl $0x3e8, 0x18(%rsp)      # imm = 0x3E8
incq %rbp
cmpq %rbp, 0x40(%rsp)
jne 0x8d27
testl %ebx, %ebx
sete 0xf(%rsp)
jmp 0x8f31
movb $0x1, 0xf(%rsp)
movl $0x0, 0x10(%rsp)
cmpl $0x2, %r14d
jl 0x9164
movl 0x10(%rsp), %edx
cmpl $0x1, %edx
leaq 0x32fe(%rip), %rax      # 0xc247
leaq 0x330a(%rip), %rcx      # 0xc25a
cmoveq %rax, %rcx
testl %edx, %edx
leaq 0x32e6(%rip), %rax      # 0xc243
cmovneq %rcx, %rax
movq %rax, 0x48(%rsp)
movl $0x1, %r15d
xorl %eax, %eax
movq 0x38(%rsp), %rcx
movq (%rcx,%r15,8), %r13
cmpb $0x2d, (%r13)
je 0x9101
cmpb $0x0, 0xf(%rsp)
je 0x8f9b
movq %r13, %rdi
movq 0x48(%rsp), %rsi
callq 0x9196
movq %rax, %rbx
jmp 0x8f9d
xorl %ebx, %ebx
testq %rbx, %rbx
je 0x8fad
cmpl $0x0, 0x14(%rsp)
jne 0x9111
xorl %eax, %eax
movq %rax, 0x30(%rsp)
movq %rax, 0x28(%rsp)
movq %r13, %rdi
leaq 0x32f4(%rip), %rsi      # 0xc2b7
callq 0x1150
testq %rax, %rax
je 0x903c
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x1130
movq %r14, %rdi
callq 0x1100
movq %rax, %rbp
movq %r14, %rdi
callq 0x10a0
movq %rbp, %rdi
callq 0x1120
movq %rax, %r12
testq %rbp, %rbp
sete %al
testq %r12, %r12
sete %cl
orb %al, %cl
jne 0x9032
movl $0x1, %esi
movq %r12, %rdi
movq %rbp, %rdx
movq %r14, %rcx
callq 0x1070
cmpq %rbp, %rax
je 0x9032
movq %r12, %rdi
callq 0x1030
xorl %r12d, %r12d
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x1080
jmp 0x9041
xorl %r12d, %r12d
xorl %ebp, %ebp
testq %rbp, %rbp
je 0x9131
movq %r13, 0x50(%rsp)
leaq 0x14(%rsp), %rdi
movl 0x10(%rsp), %esi
movq %r12, %rdx
movq %rbp, %rcx
leaq 0x30(%rsp), %r8
leaq 0x28(%rsp), %r9
callq 0x91fe
testq %rbx, %rbx
je 0x90b7
movq 0x30(%rsp), %r14
movq 0x28(%rsp), %rbp
movq %rbx, %r13
movq %rbx, %rdi
leaq 0x3231(%rip), %rsi      # 0xc2ba
callq 0x1150
testq %rax, %rax
je 0x9177
movq %rax, %rbx
movl $0x1, %esi
movq %r14, %rdi
movq %rbp, %rdx
movq %rax, %rcx
callq 0x1180
movq %rbx, %rdi
callq 0x1080
jmp 0x90dc
movq %rbx, %r13
cmpq $0x0, 0x28(%rsp)
je 0x90dc
xorl %ebx, %ebx
movq 0x30(%rsp), %rax
movzbl (%rax,%rbx), %edi
callq 0x1040
incq %rbx
cmpq 0x28(%rsp), %rbx
jb 0x90c4
movq 0x30(%rsp), %rdi
callq 0x1030
movq %r12, %rdi
callq 0x1030
movq %r13, %rbx
movq 0x50(%rsp), %r13
movq %rbx, %rdi
callq 0x1030
movq %r13, %rax
incq %r15
cmpq 0x40(%rsp), %r15
jne 0x8f6e
jmp 0x914e
movq 0x5ee0(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x3141(%rip), %rsi      # 0xc263
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10f0
jmp 0x8fad
movq 0x5ec0(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x315f(%rip), %rsi      # 0xc2a1
movq %r13, %rdx
xorl %eax, %eax
callq 0x10f0
jmp 0x90f6
testq %rax, %rax
je 0x9164
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x38(%rsp), %rdi
callq 0x139e
jmp 0x9153
callq 0x135a
jmp 0x9153
leaq 0x313f(%rip), %rdi      # 0xc2bd
leaq 0x30c8(%rip), %rsi      # 0xc24d
leaq 0x3136(%rip), %rcx      # 0xc2c2
movl $0x4a, %edx
callq 0x10b0