// File: /workspace/github_c_makefile_star2_O0/darwin-on-arm[P]darwin-sdk/image3maker/image3maker.c
// Function: process_options
static int process_options(int argc, char* argv[])
{
    int c = 0;
    
    while(1) {
        static struct option user_options[] = {
            {"certificateBlob", required_argument, 0, 'c'},
            {"dataFile",        required_argument, 0, 'f'},
            {"imageTag",        required_argument, 0, 't'},
            {"imageVersion",    required_argument, 0, 'v'},
            {"imageSecurityEpoch", required_argument, 0, 's'},
            {"imageDomain",     required_argument, 0, 'd'},
            {"imageProduction", required_argument, 0, 'p'},
            {"hardwareEpoch",   required_argument, 0, 'h'},
            {"chipType",        required_argument, 0, 'y'},
            {"boardType",       required_argument, 0, 'b'},
            {"uniqueIdentifier", required_argument, 0, 'e'},
            {"aesKey",          required_argument, 0, 'a'},
            {"aesIv",           required_argument, 0, 'i'},
            {"outputFile",      required_argument, 0, 'o'},
            {"help", no_argument, 0, '?'},
        };
        int option_index = 0;
        
        c = getopt_long(argc, argv, "c:f:t:v:d:p:h:y:b:s:e:a:i:o:",
                        user_options, &option_index);
        
        if(c == -1)
            break;
        
        switch(c) {
            case 's':
                imageSecurityEpoch = optarg;
                break;
            case 'c':
                certificateBlob = optarg;
                break;
            case 'f':
                inputFile = optarg;
                break;
            case 'o':
                outputFile = optarg;
                break;
            case 't':
                imageTag = optarg;
                break;
            case 'v':
                imageVersion = optarg;
                break;
            case 'd':
                imageDomain = optarg;
                break;
            case 'p':
                imageProduction = optarg;
                break;
            case 'h':
                hardwareEpoch = optarg;
                break;
            case 'y':
                chipType = optarg;
                break;
            case 'b':
                boardType = optarg;
                break;
            case 'e':
                uniqueIdentifier = optarg;
                break;
            case 'a':
                aesKey = optarg;
                break;
            case 'i':
                aesIv = optarg;
                break;
            default:
                print_usage();
                break;
        }
    }
    
    if(!inputFile) {
        printf("No input file\n");
        print_usage();
    }
    
    if(!outputFile) {
        printf("No output file\n");
        print_usage();
    }
    
    if(!imageTag) {
        printf("No image tag\n");
        print_usage();
    }
    
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x1e2f(%rip), %rdx      # 0x310a
leaq 0x4dee(%rip), %rcx      # 0x60d0
leaq -0x18(%rbp), %r8
callq 0x1080
movl %eax, -0x14(%rbp)
cmpl $-0x1, -0x14(%rbp)
jne 0x12f9
jmp 0x144b
movl -0x14(%rbp), %eax
addl $-0x61, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x18, %eax
ja 0x1441
movq -0x20(%rbp), %rax
leaq 0x1ceb(%rip), %rcx      # 0x3004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x4cb7(%rip), %rax      # 0x5fe0
movq (%rax), %rax
movq %rax, 0x4fe5(%rip)      # 0x6318
jmp 0x1446
movq 0x4ca1(%rip), %rax      # 0x5fe0
movq (%rax), %rax
movq %rax, 0x4fd7(%rip)      # 0x6320
jmp 0x1446
movq 0x4c8b(%rip), %rax      # 0x5fe0
movq (%rax), %rax
movq %rax, 0x4fc9(%rip)      # 0x6328
jmp 0x1446
movq 0x4c75(%rip), %rax      # 0x5fe0
movq (%rax), %rax
movq %rax, 0x4fbb(%rip)      # 0x6330
jmp 0x1446
movq 0x4c5f(%rip), %rax      # 0x5fe0
movq (%rax), %rax
movq %rax, 0x4fad(%rip)      # 0x6338
jmp 0x1446
movq 0x4c49(%rip), %rax      # 0x5fe0
movq (%rax), %rax
movq %rax, 0x4f9f(%rip)      # 0x6340
jmp 0x1446
movq 0x4c33(%rip), %rax      # 0x5fe0
movq (%rax), %rax
movq %rax, 0x4f91(%rip)      # 0x6348
jmp 0x1446
movq 0x4c1d(%rip), %rax      # 0x5fe0
movq (%rax), %rax
movq %rax, 0x4f83(%rip)      # 0x6350
jmp 0x1446
movq 0x4c0a(%rip), %rax      # 0x5fe0
movq (%rax), %rax
movq %rax, 0x4f78(%rip)      # 0x6358
jmp 0x1446
movq 0x4bf7(%rip), %rax      # 0x5fe0
movq (%rax), %rax
movq %rax, 0x4f6d(%rip)      # 0x6360
jmp 0x1446
movq 0x4be4(%rip), %rax      # 0x5fe0
movq (%rax), %rax
movq %rax, 0x4f62(%rip)      # 0x6368
jmp 0x1446
movq 0x4bd1(%rip), %rax      # 0x5fe0
movq (%rax), %rax
movq %rax, 0x4f57(%rip)      # 0x6370
jmp 0x1446
movq 0x4bbe(%rip), %rax      # 0x5fe0
movq (%rax), %rax
movq %rax, 0x4f4c(%rip)      # 0x6378
jmp 0x1446
movq 0x4bab(%rip), %rax      # 0x5fe0
movq (%rax), %rax
movq %rax, 0x4f41(%rip)      # 0x6380
jmp 0x1446
callq 0x1d90
jmp 0x12c6
cmpq $0x0, 0x4ed5(%rip)      # 0x6328
jne 0x1468
leaq 0x1ccb(%rip), %rdi      # 0x3127
movb $0x0, %al
callq 0x1090
callq 0x1d90
cmpq $0x0, 0x4ec0(%rip)      # 0x6330
jne 0x1485
leaq 0x1cbd(%rip), %rdi      # 0x3136
movb $0x0, %al
callq 0x1090
callq 0x1d90
cmpq $0x0, 0x4eab(%rip)      # 0x6338
jne 0x14a2
leaq 0x1cb0(%rip), %rdi      # 0x3146
movb $0x0, %al
callq 0x1090
callq 0x1d90
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)