// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/redis-cli.c
// Function: parseOptions
static int parseOptions(int argc, char **argv) {
    int i;

    for (i = 1; i < argc; i++) {
        int lastarg = i==argc-1;

        if (!strcmp(argv[i],"-h") && !lastarg) {
            sdsfree(config.hostip);
            config.hostip = sdsnew(argv[++i]);
        } else if (!strcmp(argv[i],"-h") && lastarg) {
            usage();
        } else if (!strcmp(argv[i],"--help")) {
            usage();
        } else if (!strcmp(argv[i],"-x")) {
            config.stdinarg = 1;
        } else if (!strcmp(argv[i],"-p") && !lastarg) {
            config.hostport = atoi(argv[++i]);
        } else if (!strcmp(argv[i],"-s") && !lastarg) {
            config.hostsocket = argv[++i];
        } else if (!strcmp(argv[i],"-r") && !lastarg) {
            config.repeat = strtoll(argv[++i],NULL,10);
        } else if (!strcmp(argv[i],"-i") && !lastarg) {
            double seconds = atof(argv[++i]);
            config.interval = seconds*1000000;
        } else if (!strcmp(argv[i],"-n") && !lastarg) {
            config.dbnum = atoi(argv[++i]);
        } else if (!strcmp(argv[i],"-a") && !lastarg) {
            config.auth = argv[++i];
        } else if (!strcmp(argv[i],"--raw")) {
            config.output = OUTPUT_RAW;
        } else if (!strcmp(argv[i],"--csv")) {
            config.output = OUTPUT_CSV;
        } else if (!strcmp(argv[i],"--latency")) {
            config.latency_mode = 1;
        } else if (!strcmp(argv[i],"--latency-history")) {
            config.latency_mode = 1;
            config.latency_history = 1;
        } else if (!strcmp(argv[i],"--slave")) {
            config.slave_mode = 1;
        } else if (!strcmp(argv[i],"--stat")) {
            config.stat_mode = 1;
        } else if (!strcmp(argv[i],"--scan")) {
            config.scan_mode = 1;
        } else if (!strcmp(argv[i],"--pattern") && !lastarg) {
            config.pattern = argv[++i];
        } else if (!strcmp(argv[i],"--intrinsic-latency") && !lastarg) {
            config.intrinsic_latency_mode = 1;
            config.intrinsic_latency_duration = atoi(argv[++i]);
        } else if (!strcmp(argv[i],"--rdb") && !lastarg) {
            config.getrdb_mode = 1;
            config.rdb_filename = argv[++i];
        } else if (!strcmp(argv[i],"--pipe")) {
            config.pipe_mode = 1;
        } else if (!strcmp(argv[i],"--pipe-timeout") && !lastarg) {
            config.pipe_timeout = atoi(argv[++i]);
        } else if (!strcmp(argv[i],"--bigkeys")) {
            config.bigkeys = 1;
        } else if (!strcmp(argv[i],"--eval") && !lastarg) {
            config.eval = argv[++i];
        } else if (!strcmp(argv[i],"-c")) {
            config.cluster_mode = 1;
        } else if (!strcmp(argv[i],"-d") && !lastarg) {
            sdsfree(config.mb_delim);
            config.mb_delim = sdsnew(argv[++i]);
        } else if (!strcmp(argv[i],"-v") || !strcmp(argv[i], "--version")) {
            sds version = cliVersion();
            printf("redis-cli %s\n", version);
            sdsfree(version);
            exit(0);
        } else {
            if (argv[i][0] == '-') {
                fprintf(stderr,
                    "Unrecognized option or bad number of args for: '%s'\n",
                    argv[i]);
                exit(1);
            } else {
                /* Likely the command name, stop here. */
                break;
            }
        }
    }
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x1275c
movl -0x14(%rbp), %eax
movl -0x4(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3bce1(%rip), %rsi     # 0x4dd4c
callq 0xd300
cmpl $0x0, %eax
jne 0x120ac
cmpl $0x0, -0x18(%rbp)
jne 0x120ac
movq 0x4ed36(%rip), %rdi     # 0x60db8
callq 0xf070
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0xeff0
movq %rax, 0x4ed11(%rip)     # 0x60db8
jmp 0x1274c
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3bc8d(%rip), %rsi     # 0x4dd4c
callq 0xd300
cmpl $0x0, %eax
jne 0x120d9
cmpl $0x0, -0x18(%rbp)
je 0x120d9
callq 0x142f0
jmp 0x1274a
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3bc63(%rip), %rsi     # 0x4dd4f
callq 0xd300
cmpl $0x0, %eax
jne 0x12100
callq 0x142f0
jmp 0x12748
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3bc43(%rip), %rsi     # 0x4dd56
callq 0xd300
cmpl $0x0, %eax
jne 0x1212c
movl $0x1, 0x4ed15(%rip)     # 0x60e3c
jmp 0x12746
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3bc1a(%rip), %rsi     # 0x4dd59
callq 0xd300
cmpl $0x0, %eax
jne 0x12173
cmpl $0x0, -0x18(%rbp)
jne 0x12173
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0xd580
movl %eax, 0x4ec52(%rip)     # 0x60dc0
jmp 0x12744
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3bbd6(%rip), %rsi     # 0x4dd5c
callq 0xd300
cmpl $0x0, %eax
jne 0x121b6
cmpl $0x0, -0x18(%rbp)
jne 0x121b6
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x4ec17(%rip)     # 0x60dc8
jmp 0x12742
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3bb96(%rip), %rsi     # 0x4dd5f
callq 0xd300
cmpl $0x0, %eax
jne 0x12207
cmpl $0x0, -0x18(%rbp)
jne 0x12207
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0xd310
movq %rax, 0x4ebce(%rip)     # 0x60dd0
jmp 0x12740
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3bb48(%rip), %rsi     # 0x4dd62
callq 0xd300
cmpl $0x0, %eax
jne 0x12266
cmpl $0x0, -0x18(%rbp)
jne 0x12266
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0xd110
movsd %xmm0, -0x20(%rbp)
movsd 0x390b0(%rip), %xmm0    # 0x4b300
mulsd -0x20(%rbp), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, 0x4eb77(%rip)     # 0x60dd8
jmp 0x1273e
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3baec(%rip), %rsi     # 0x4dd65
callq 0xd300
cmpl $0x0, %eax
jne 0x122ad
cmpl $0x0, -0x18(%rbp)
jne 0x122ad
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0xd580
movl %eax, 0x4eb38(%rip)     # 0x60de0
jmp 0x1273c
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3baa8(%rip), %rsi     # 0x4dd68
callq 0xd300
cmpl $0x0, %eax
jne 0x122f0
cmpl $0x0, -0x18(%rbp)
jne 0x122f0
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x4eb55(%rip)     # 0x60e40
jmp 0x1273a
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3ba68(%rip), %rsi     # 0x4dd6b
callq 0xd300
cmpl $0x0, %eax
jne 0x1231c
movl $0x1, 0x4eb31(%rip)     # 0x60e48
jmp 0x12738
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3ba42(%rip), %rsi     # 0x4dd71
callq 0xd300
cmpl $0x0, %eax
jne 0x12348
movl $0x2, 0x4eb05(%rip)     # 0x60e48
jmp 0x12736
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3ba1c(%rip), %rsi     # 0x4dd77
callq 0xd300
cmpl $0x0, %eax
jne 0x12374
movl $0x1, 0x4ea85(%rip)     # 0x60df4
jmp 0x12734
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3b9fa(%rip), %rsi     # 0x4dd81
callq 0xd300
cmpl $0x0, %eax
jne 0x123aa
movl $0x1, 0x4ea59(%rip)     # 0x60df4
movl $0x1, 0x4ea53(%rip)     # 0x60df8
jmp 0x12732
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3b9d6(%rip), %rsi     # 0x4dd93
callq 0xd300
cmpl $0x0, %eax
jne 0x123d6
movl $0x1, 0x4ea33(%rip)     # 0x60e04
jmp 0x12730
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3b9b2(%rip), %rsi     # 0x4dd9b
callq 0xd300
cmpl $0x0, %eax
jne 0x12402
movl $0x1, 0x4ea17(%rip)     # 0x60e14
jmp 0x1272e
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3b98d(%rip), %rsi     # 0x4dda2
callq 0xd300
cmpl $0x0, %eax
jne 0x1242e
movl $0x1, 0x4e9ef(%rip)     # 0x60e18
jmp 0x1272c
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3b968(%rip), %rsi     # 0x4dda9
callq 0xd300
cmpl $0x0, %eax
jne 0x12471
cmpl $0x0, -0x18(%rbp)
jne 0x12471
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x4e9bc(%rip)     # 0x60e28
jmp 0x1272a
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3b92f(%rip), %rsi     # 0x4ddb3
callq 0xd300
cmpl $0x0, %eax
jne 0x124c2
cmpl $0x0, -0x18(%rbp)
jne 0x124c2
movl $0x1, 0x4e97e(%rip)     # 0x60e1c
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0xd580
movl %eax, 0x4e963(%rip)     # 0x60e20
jmp 0x12728
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3b8f2(%rip), %rsi     # 0x4ddc7
callq 0xd300
cmpl $0x0, %eax
jne 0x1250f
cmpl $0x0, -0x18(%rbp)
jne 0x1250f
movl $0x1, 0x4e921(%rip)     # 0x60e10
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x4e926(%rip)     # 0x60e30
jmp 0x12726
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3b8ab(%rip), %rsi     # 0x4ddcd
callq 0xd300
cmpl $0x0, %eax
jne 0x1253b
movl $0x1, 0x4e8d2(%rip)     # 0x60e08
jmp 0x12724
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3b886(%rip), %rsi     # 0x4ddd4
callq 0xd300
cmpl $0x0, %eax
jne 0x12582
cmpl $0x0, -0x18(%rbp)
jne 0x12582
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0xd580
movl %eax, 0x4e88f(%rip)     # 0x60e0c
jmp 0x12722
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3b84e(%rip), %rsi     # 0x4dde3
callq 0xd300
cmpl $0x0, %eax
jne 0x125ae
movl $0x1, 0x4e88f(%rip)     # 0x60e38
jmp 0x12720
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3b82c(%rip), %rsi     # 0x4dded
callq 0xd300
cmpl $0x0, %eax
jne 0x125f1
cmpl $0x0, -0x18(%rbp)
jne 0x125f1
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x4e8ec(%rip)     # 0x60ed8
jmp 0x1271e
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3b7f0(%rip), %rsi     # 0x4ddf4
callq 0xd300
cmpl $0x0, %eax
jne 0x1261d
movl $0x1, 0x4e7e4(%rip)     # 0x60dfc
jmp 0x1271c
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3b7c7(%rip), %rsi     # 0x4ddf7
callq 0xd300
cmpl $0x0, %eax
jne 0x12671
cmpl $0x0, -0x18(%rbp)
jne 0x12671
movq 0x4e809(%rip), %rdi     # 0x60e50
callq 0xf070
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0xeff0
movq %rax, 0x4e7e4(%rip)     # 0x60e50
jmp 0x1271a
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3b776(%rip), %rsi     # 0x4ddfa
callq 0xd300
cmpl $0x0, %eax
je 0x126ab
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3b75c(%rip), %rsi     # 0x4ddfd
callq 0xd300
cmpl $0x0, %eax
jne 0x126d6
callq 0x14340
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rsi
leaq 0x3b748(%rip), %rdi     # 0x4de07
movb $0x0, %al
callq 0xd1c0
movq -0x28(%rbp), %rdi
callq 0xf070
xorl %edi, %edi
callq 0xd5c0
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x12718
movq 0x4c907(%rip), %rax     # 0x5eff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x3b70e(%rip), %rsi     # 0x4de15
movb $0x0, %al
callq 0xd320
movl $0x1, %edi
callq 0xd5c0
jmp 0x1275c
jmp 0x1271c
jmp 0x1271e
jmp 0x12720
jmp 0x12722
jmp 0x12724
jmp 0x12726
jmp 0x12728
jmp 0x1272a
jmp 0x1272c
jmp 0x1272e
jmp 0x12730
jmp 0x12732
jmp 0x12734
jmp 0x12736
jmp 0x12738
jmp 0x1273a
jmp 0x1273c
jmp 0x1273e
jmp 0x12740
jmp 0x12742
jmp 0x12744
jmp 0x12746
jmp 0x12748
jmp 0x1274a
jmp 0x1274c
jmp 0x1274e
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x12036
movl -0x14(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)