// File: /workspace/github_c_makefile_star2_O2/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, 0x30(%rsp)
movl %edi, %ebx
leaq 0x14(%rsp), %rdi
callq 0x6ba0
movslq %ebx, %rax
movq %rax, 0x40(%rsp)
movl $0x0, 0xc(%rsp)
pushq $0x1
popq %rbx
leaq 0x273b(%rip), %r14      # 0x8dfc
leaq 0x2737(%rip), %r15      # 0x8dff
pushq $0x1
popq %rbp
leaq 0x2730(%rip), %r12      # 0x8e02
movl $0x0, 0x10(%rsp)
cmpq 0x40(%rsp), %rbx
jge 0x68ac
movq 0x30(%rsp), %rax
movq (%rax,%rbx,8), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x6b41
testb %al, %al
je 0x670a
movl $0x1, 0x14(%rsp)
jmp 0x68a4
movq %r13, %rdi
movq %r15, %rsi
callq 0x6b41
testb %al, %al
je 0x6722
movl %ebp, 0x10(%rsp)
jmp 0x68a4
movq %r13, %rdi
movq %r12, %rsi
callq 0x6b41
testb %al, %al
je 0x673d
pushq $0x2
popq %rax
movl %eax, 0xc(%rsp)
jmp 0x68a4
movq %r13, %rdi
leaq 0x26c5(%rip), %rsi      # 0x8e0c
callq 0x6b41
testb %al, %al
je 0x6759
movl %ebp, 0xc(%rsp)
jmp 0x68a4
movq %r13, %rdi
leaq 0x26b0(%rip), %rsi      # 0x8e13
callq 0x6b41
testb %al, %al
je 0x6779
movl $0x0, 0xc(%rsp)
jmp 0x68a4
movq %r13, %rdi
leaq 0x2697(%rip), %rsi      # 0x8e1a
callq 0x6b41
testb %al, %al
je 0x6799
movl $0x5, 0x18(%rsp)
jmp 0x68a4
movq %r13, %rdi
leaq 0x267c(%rip), %rsi      # 0x8e1f
callq 0x6b41
testb %al, %al
je 0x67b9
movl $0xa, 0x18(%rsp)
jmp 0x68a4
movq %r13, %rdi
leaq 0x2662(%rip), %rsi      # 0x8e25
callq 0x6b41
testb %al, %al
je 0x67d9
movl $0xf, 0x18(%rsp)
jmp 0x68a4
movq %r13, %rdi
leaq 0x2648(%rip), %rsi      # 0x8e2b
callq 0x6b41
testb %al, %al
je 0x67f9
movl $0x19, 0x18(%rsp)
jmp 0x68a4
movq %r13, %rdi
leaq 0x262e(%rip), %rsi      # 0x8e31
callq 0x6b41
testb %al, %al
je 0x6819
movl $0x32, 0x18(%rsp)
jmp 0x68a4
movq %r13, %rdi
leaq 0x2614(%rip), %rsi      # 0x8e37
callq 0x6b41
testb %al, %al
je 0x6836
movl $0x64, 0x18(%rsp)
jmp 0x68a4
movq %r13, %rdi
leaq 0x25fe(%rip), %rsi      # 0x8e3e
callq 0x6b41
testb %al, %al
je 0x6853
movl $0xfa, 0x18(%rsp)
jmp 0x68a4
movq %r13, %rdi
leaq 0x25e8(%rip), %rsi      # 0x8e45
callq 0x6b41
testb %al, %al
je 0x6870
movl $0x1f4, 0x18(%rsp)      # imm = 0x1F4
jmp 0x68a4
movq %r13, %rdi
leaq 0x25d2(%rip), %rsi      # 0x8e4c
callq 0x6b41
testb %al, %al
je 0x688d
movl $0x3e8, 0x18(%rsp)      # imm = 0x3E8
jmp 0x68a4
movq %r13, %rdi
leaq 0x25bd(%rip), %rsi      # 0x8e54
callq 0x6b41
testb %al, %al
jne 0x6b04
incq %rbx
jmp 0x66da
movl 0xc(%rsp), %edx
cmpl $0x1, %edx
leaq 0x282d(%rip), %rax      # 0x90e7
leaq 0x2839(%rip), %rcx      # 0x90fa
cmoveq %rax, %rcx
testl %edx, %edx
leaq 0x2815(%rip), %rax      # 0x90e3
cmovneq %rcx, %rax
movq %rax, 0x48(%rsp)
pushq $0x1
popq %r13
xorl %eax, %eax
cmpq 0x40(%rsp), %r13
jge 0x6aaf
movq 0x30(%rsp), %rcx
movq (%rcx,%r13,8), %r12
cmpb $0x2d, (%r12)
je 0x6a4b
cmpl $0x0, 0x10(%rsp)
je 0x6907
xorl %ebx, %ebx
jmp 0x6917
movq %r12, %rdi
movq 0x48(%rsp), %rsi
callq 0x6b4e
movq %rax, %rbx
testq %rbx, %rbx
je 0x6927
cmpl $0x0, 0x14(%rsp)
jne 0x6a8f
andq $0x0, 0x28(%rsp)
andq $0x0, 0x38(%rsp)
movq %r12, %rdi
leaq 0x281a(%rip), %rsi      # 0x9157
callq 0x1150
testq %rax, %rax
je 0x6a72
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
pushq $0x2
popq %rdx
callq 0x1130
movq %r15, %rdi
callq 0x1100
movq %rax, %rbp
movq %r15, %rdi
callq 0x10a0
movq %rbp, %rdi
callq 0x1120
movq %rax, %r14
testq %rbp, %rbp
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x69ac
movq %r14, %rdi
pushq $0x1
popq %rsi
movq %rbp, %rdx
movq %r15, %rcx
callq 0x1070
cmpq %rbp, %rax
je 0x69ac
movq %r14, %rdi
callq 0x1030
xorl %r14d, %r14d
xorl %ebp, %ebp
movq %r15, %rdi
callq 0x1080
testq %rbp, %rbp
je 0x6a72
movq %r12, 0x50(%rsp)
leaq 0x14(%rsp), %rdi
movl 0xc(%rsp), %esi
movq %r14, %rdx
movq %rbp, %rcx
leaq 0x28(%rsp), %r8
leaq 0x38(%rsp), %r9
callq 0x6bb2
testq %rbx, %rbx
je 0x6a53
movq 0x28(%rsp), %rbp
movq 0x38(%rsp), %r15
movq %rbx, %r12
movq %rbx, %rdi
leaq 0x275e(%rip), %rsi      # 0x915a
callq 0x1150
testq %rax, %rax
je 0x6ae7
movq %rax, %rbx
movq %rbp, %rdi
pushq $0x1
popq %rsi
movq %r15, %rdx
movq %rax, %rcx
callq 0x1180
movq %rbx, %rdi
callq 0x1080
movq 0x28(%rsp), %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1030
movq %r12, %rbx
movq 0x50(%rsp), %r12
movq %rbx, %rdi
callq 0x1030
movq %r12, %rax
incq %r13
jmp 0x68dd
movq %rbx, %r12
xorl %ebx, %ebx
cmpq 0x38(%rsp), %rbx
jae 0x6a26
movq 0x28(%rsp), %rax
movzbl (%rax,%rbx), %edi
callq 0x1040
incq %rbx
jmp 0x6a58
movq 0x557f(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x26be(%rip), %rsi      # 0x9141
movq %r12, %rdx
xorl %eax, %eax
callq 0x10f0
jmp 0x6a40
movq 0x5562(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x2663(%rip), %rsi      # 0x9103
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10f0
jmp 0x6927
testq %rax, %rax
je 0x6ac5
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x552c(%rip), %rax      # 0xbff8
movq (%rax), %rdi
movq 0x30(%rsp), %rax
movq (%rax), %rdx
leaq 0x2634(%rip), %rsi      # 0x9112
xorl %eax, %eax
callq 0x10f0
jmp 0x6ab4
leaq 0x266f(%rip), %rdi      # 0x915d
leaq 0x25f8(%rip), %rsi      # 0x90ed
leaq 0x2666(%rip), %rcx      # 0x9162
pushq $0x4a
popq %rdx
callq 0x10b0
movq 0x54ed(%rip), %r14      # 0xbff8
movq (%r14), %rcx
leaq 0x2342(%rip), %rdi      # 0x8e57
pushq $0x1
popq %rbx
movl $0x12a, %esi            # imm = 0x12A
movq %rbx, %rdx
callq 0x1180
movq (%r14), %rcx
leaq 0x2453(%rip), %rdi      # 0x8f82
movl $0x160, %esi            # imm = 0x160
movq %rbx, %rdx
callq 0x1180
jmp 0x6ab4