int main(int argc, char** argv) {
    char line[11];
    int size;
    int count = 0;
    int int_size = strtol(argv[1], NULL, 10);
    char new[10];

    if (!(argc == 2 || argc == 3)) {
        fprintf(stderr, "USAGE: count_large size [permissions]\n");
        return 1;
    }

    else if (argc == 3) {
        // Skip first line
        scanf("%*s, %*d");
        while(scanf("%10s %*d %*s %*s %d %*s %*d %*s %*s",line, &size) != EOF) {
            // Checks if first index is '-' because we ignore if 'd'
            if (line[0] == '-') {
                // input elements of line into new array without first element
                for (int i = 0; i < 10; i++){
                    new[i] = line[i + 1];
                }
                if ((check_permissions(new, argv[2]) == 0) && (size > int_size)) {
                    count += 1;
                }
            }
        }
        printf("%d\n", count);
    }
    else {
        scanf("%*s, %*d");
        while(scanf("%*s %*d %*s %*s %d %*s %*d %*s %*s", &size) != EOF) {
            if (size > int_size) {
                count += 1;
            }
        }
        printf("%d\n", count);

    }
    return 0;
}
EXC_BAD_ACCESS (code=1, address=0x0) in line 5.