// File: /workspace/github_c_makefile_star2_O2/soso7885[P]OPCUA_example/demo_src/server.c
// Function: main
int main(int argc, char** argv) {
    signal(SIGINT, stopHandler); /* catches ctrl-c */
#ifdef UA_ENABLE_MULTITHREADING
    pthread_rwlock_init(&writeLock, 0);
#endif

    UA_ServerNetworkLayer nl = UA_ServerNetworkLayerTCP(UA_ConnectionConfig_standard, 16664);
    UA_ServerConfig config = UA_ServerConfig_standard;
    config.serverCertificate = loadCertificate();
    config.networkLayers = &nl;
    config.networkLayersSize = 1;
    UA_Server *server = UA_Server_new(config);

    // add node with the datetime data source
    UA_DataSource dateDataSource = (UA_DataSource) {.handle = NULL, .read = readTimeData, .write = NULL};
    UA_VariableAttributes v_attr;
    UA_VariableAttributes_init(&v_attr);
    v_attr.description = UA_LOCALIZEDTEXT("en_US","current time");
    v_attr.displayName = UA_LOCALIZEDTEXT("en_US","current time");
    const UA_QualifiedName dateName = UA_QUALIFIEDNAME(1, "current time");
    UA_NodeId dataSourceId;
    UA_Server_addDataSourceVariableNode(server, UA_NODEID_NULL,
                                        UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER),
                                        UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES), dateName,
                                        UA_NODEID_NULL, v_attr, dateDataSource, &dataSourceId);

#ifndef _WIN32
    /* cpu temperature monitoring for linux machines */
    const char *temperatureFileName = "/sys/class/thermal/thermal_zone0/temp"; // RaspberryPi
    // const char *temperatureFileName = "/sys/class/hwmon/hwmon0/device/temp1_input"; // Beaglebone
    // const char *temperatureFileName = "/sys/class/thermal/thermal_zone3/temp"; // Intel Edison Alternative 1
    // const char *temperatureFileName = "/sys/class/thermal/thermal_zone4/temp"; // Intel Edison Alternative 2
    if((temperatureFile = fopen(temperatureFileName, "r"))) {
        // add node with the data source
        UA_DataSource temperatureDataSource = (UA_DataSource) {
            .handle = NULL, .read = readTemperature, .write = NULL};
        const UA_QualifiedName tempName = UA_QUALIFIEDNAME(1, "cpu temperature");
        UA_VariableAttributes_init(&v_attr);
        v_attr.description = UA_LOCALIZEDTEXT("en_US","temperature");
        v_attr.displayName = UA_LOCALIZEDTEXT("en_US","temperature");
        UA_Server_addDataSourceVariableNode(server, UA_NODEID_NULL,
                                            UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER),
                                            UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES), tempName,
                                            UA_NODEID_NULL, v_attr, temperatureDataSource, NULL);
    }

    /* LED control for rpi */
    if(access("/sys/class/leds/led0/trigger", F_OK ) != -1 ||
       access("/sys/class/leds/led0/brightness", F_OK ) != -1) {
        if((triggerFile = fopen("/sys/class/leds/led0/trigger", "w")) &&
           (ledFile = fopen("/sys/class/leds/led0/brightness", "w"))) {
            //setting led mode to manual
            fprintf(triggerFile, "%s", "none");
            fflush(triggerFile);

            //turning off led initially
            fprintf(ledFile, "%s", "1");
            fflush(ledFile);

            // add node with the LED status data source
            UA_DataSource ledStatusDataSource = (UA_DataSource) {
                .handle = NULL, .read = readLedStatus, .write = writeLedStatus};
            UA_VariableAttributes_init(&v_attr);
            v_attr.description = UA_LOCALIZEDTEXT("en_US","status LED");
            v_attr.displayName = UA_LOCALIZEDTEXT("en_US","status LED");
            const UA_QualifiedName statusName = UA_QUALIFIEDNAME(0, "status LED");
            UA_Server_addDataSourceVariableNode(server, UA_NODEID_NULL,
                                                UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER),
                                                UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES), statusName,
                                                UA_NODEID_NULL, v_attr, ledStatusDataSource, NULL);
        } else
            UA_LOG_WARNING(logger, UA_LOGCATEGORY_USERLAND,
                           "[Raspberry Pi] LED file exist, but is not accessible (try to run server with sudo)");
    }
#endif

    // add a static variable node to the adresspace
    UA_VariableAttributes myVar;
    UA_VariableAttributes_init(&myVar);
    myVar.description = UA_LOCALIZEDTEXT("en_US", "the answer");
    myVar.displayName = UA_LOCALIZEDTEXT("en_US", "the answer");
    UA_Int32 myInteger = 42;
    UA_Variant_setScalarCopy(&myVar.value, &myInteger, &UA_TYPES[UA_TYPES_INT32]);
    const UA_QualifiedName myIntegerName = UA_QUALIFIEDNAME(1, "the answer");
    const UA_NodeId myIntegerNodeId = UA_NODEID_STRING(1, "the.answer");
    UA_NodeId parentNodeId = UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER);
    UA_NodeId parentReferenceNodeId = UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES);
    /* Instantiation Callback can be used when a typeDefinition creates new nodes under this added one.
     * The method will be called for each created node.
     */
    UA_InstantiationCallback theAnswerCallback = {.method=instantiationHandle, .handle=(void*) server};
    UA_Server_addVariableNode(server, myIntegerNodeId, parentNodeId, parentReferenceNodeId,
                              myIntegerName, UA_NODEID_NULL, myVar, &theAnswerCallback, NULL);
    UA_Variant_deleteMembers(&myVar.value);

    /**************/
    /* Demo Nodes */
    /**************/

#define DEMOID 50000
    UA_ObjectAttributes object_attr;
    UA_ObjectAttributes_init(&object_attr);
    object_attr.description = UA_LOCALIZEDTEXT("en_US","Demo");
    object_attr.displayName = UA_LOCALIZEDTEXT("en_US","Demo");
    UA_Server_addObjectNode(server, UA_NODEID_NUMERIC(1, DEMOID),
                            UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER),
                            UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES), UA_QUALIFIEDNAME(1, "Demo"),
                            UA_NODEID_NUMERIC(0, UA_NS0ID_FOLDERTYPE), object_attr, NULL, NULL);

#define SCALARID 50001
    object_attr.description = UA_LOCALIZEDTEXT("en_US","Scalar");
    object_attr.displayName = UA_LOCALIZEDTEXT("en_US","Scalar");
    UA_Server_addObjectNode(server, UA_NODEID_NUMERIC(1, SCALARID),
                            UA_NODEID_NUMERIC(1, DEMOID), UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES),
                            UA_QUALIFIEDNAME(1, "Scalar"),
                            UA_NODEID_NUMERIC(0, UA_NS0ID_FOLDERTYPE), object_attr, NULL, NULL);

#define ARRAYID 50002
    object_attr.description = UA_LOCALIZEDTEXT("en_US","Array");
    object_attr.displayName = UA_LOCALIZEDTEXT("en_US","Array");
    UA_Server_addObjectNode(server, UA_NODEID_NUMERIC(1, ARRAYID),
                            UA_NODEID_NUMERIC(1, DEMOID), UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES),
                            UA_QUALIFIEDNAME(1, "Array"),
                            UA_NODEID_NUMERIC(0, UA_NS0ID_FOLDERTYPE), object_attr, NULL, NULL);

#define MATRIXID 50003
    object_attr.description = UA_LOCALIZEDTEXT("en_US","Matrix");
    object_attr.displayName = UA_LOCALIZEDTEXT("en_US","Matrix");
    UA_Server_addObjectNode(server, UA_NODEID_NUMERIC(1, MATRIXID), UA_NODEID_NUMERIC(1, DEMOID),
                            UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES), UA_QUALIFIEDNAME(1, "Matrix"),
                            UA_NODEID_NUMERIC(0, UA_NS0ID_FOLDERTYPE), object_attr, NULL, NULL);

    UA_UInt32 id = 51000; // running id in namespace 0
    for(UA_UInt32 type = 0; type < UA_TYPES_DIAGNOSTICINFO; type++) {
        if(type == UA_TYPES_VARIANT || type == UA_TYPES_DIAGNOSTICINFO)
            continue;

        UA_VariableAttributes attr;
        UA_VariableAttributes_init(&attr);
        char name[15];
        sprintf(name, "%02d", type);
        attr.displayName = UA_LOCALIZEDTEXT("en_US",name);
        UA_QualifiedName qualifiedName = UA_QUALIFIEDNAME(1, name);

        /* add a scalar node for every built-in type */
        void *value = UA_new(&UA_TYPES[type]);
        UA_Variant_setScalar(&attr.value, value, &UA_TYPES[type]);
        UA_Server_addVariableNode(server, UA_NODEID_NUMERIC(1, ++id),
                                  UA_NODEID_NUMERIC(1, SCALARID),
                                  UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES),
                                  qualifiedName, UA_NODEID_NULL, attr, NULL, NULL);
        UA_Variant_deleteMembers(&attr.value);

        /* add an array node for every built-in type */
        UA_Variant_setArray(&attr.value, UA_Array_new(10, &UA_TYPES[type]),
                            10, &UA_TYPES[type]);
        UA_Server_addVariableNode(server, UA_NODEID_NUMERIC(1, ++id),
                                  UA_NODEID_NUMERIC(1, ARRAYID),
                                  UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES),
                                  qualifiedName, UA_NODEID_NULL, attr, NULL, NULL);
        UA_Variant_deleteMembers(&attr.value);

        /* add an matrix node for every built-in type */
        void* myMultiArray = UA_Array_new(9, &UA_TYPES[type]);
        attr.value.arrayDimensions = UA_Array_new(2, &UA_TYPES[UA_TYPES_INT32]);
        attr.value.arrayDimensions[0] = 3;
        attr.value.arrayDimensions[1] = 3;
        attr.value.arrayDimensionsSize = 2;
        attr.value.arrayLength = 9;
        attr.value.data = myMultiArray;
        attr.value.type = &UA_TYPES[type];
        UA_Server_addVariableNode(server, UA_NODEID_NUMERIC(1, ++id),
                                  UA_NODEID_NUMERIC(1, MATRIXID),
                                  UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES),
                                  qualifiedName, UA_NODEID_NULL, attr, NULL, NULL);
        UA_Variant_deleteMembers(&attr.value);
    }

#ifdef UA_ENABLE_METHODCALLS
    UA_Argument inputArguments;
    UA_Argument_init(&inputArguments);
    inputArguments.arrayDimensionsSize = 0;
    inputArguments.arrayDimensions = NULL;
    inputArguments.dataType = UA_TYPES[UA_TYPES_STRING].typeId;
    inputArguments.description = UA_LOCALIZEDTEXT("en_US", "A String");
    inputArguments.name = UA_STRING("Input an integer");
    inputArguments.valueRank = -1;

    UA_Argument outputArguments;
    UA_Argument_init(&outputArguments);
    outputArguments.arrayDimensionsSize = 0;
    outputArguments.arrayDimensions = NULL;
    outputArguments.dataType = UA_TYPES[UA_TYPES_STRING].typeId;
    outputArguments.description = UA_LOCALIZEDTEXT("en_US", "A String");
    outputArguments.name = UA_STRING("Input an integer");
    outputArguments.valueRank = -1;

    UA_MethodAttributes addmethodattributes;
    UA_MethodAttributes_init(&addmethodattributes);
    addmethodattributes.description = UA_LOCALIZEDTEXT("en_US", "Return a single argument as passed by the caller");
    addmethodattributes.displayName = UA_LOCALIZEDTEXT("en_US", "ping");
    addmethodattributes.executable = true;
    addmethodattributes.userExecutable = true;
    UA_Server_addMethodNode(server, UA_NODEID_NUMERIC(1,62541),
                            UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER),
                            UA_NODEID_NUMERIC(0, UA_NS0ID_HASCOMPONENT),
                            UA_QUALIFIEDNAME(1,"ping"), addmethodattributes,
                            &getMonitoredItems, // Call this method
                            (void *) server,    // Pass our server pointer as a handle to the method
                            1, &inputArguments, 1, &outputArguments, NULL);
#endif
   
    // Example for iterating over all nodes referenced by "Objects":
    //printf("Nodes connected to 'Objects':\n=============================\n");
    UA_Server_forEachChildNodeCall(server, UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER), nodeIter, NULL);
  
    // Some easy localization
    UA_LocalizedText objectsName = UA_LOCALIZEDTEXT("de_DE", "Objekte");
    UA_Server_writeDisplayName(server, UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER), objectsName);
  
    //start server
    UA_StatusCode retval = UA_Server_run(server, &running); //blocks until running=false

    //ctrl-c received -> clean up
    UA_Server_delete(server);
    nl.deleteMembers(&nl);

    if(temperatureFile)
        fclose(temperatureFile);

    if(triggerFile) {
        fseek(triggerFile, 0, SEEK_SET);
        //setting led mode to default
        fprintf(triggerFile, "%s", "mmc0");
        fclose(triggerFile);
    }
  
    if(ledFile)
        fclose(ledFile);

#ifdef UA_ENABLE_MULTITHREADING
    pthread_rwlock_destroy(&writeLock);
#endif

    UA_ByteString_deleteMembers(&config.serverCertificate);
    return (int)retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x8c8, %rsp            # imm = 0x8C8
leaq 0x13fa(%rip), %rsi      # 0x3781
pushq $0x2
popq %rdi
callq 0x21a0
movq 0x3c5a(%rip), %rax      # 0x5ff0
movl 0x10(%rax), %ecx
leaq -0x790(%rbp), %r14
movl %ecx, 0x10(%r14)
movups (%rax), %xmm0
movaps %xmm0, (%r14)
movl 0x10(%r14), %eax
movl %eax, 0x10(%rsp)
movaps (%r14), %xmm0
movups %xmm0, (%rsp)
leaq -0x498(%rbp), %rbx
movq %rbx, %rdi
movl $0x4118, %esi           # imm = 0x4118
callq 0x20b0
movq 0x3c02(%rip), %rsi      # 0x5fd8
movl $0x160, %edx            # imm = 0x160
movq %r14, %rdi
callq 0x2190
movq 0x3bf6(%rip), %rax      # 0x5fe0
movups (%rax), %xmm0
movaps %xmm0, -0x360(%rbp)
leaq 0x1da9(%rip), %rdi      # 0x41a4
leaq 0x1db2(%rip), %rsi      # 0x41b4
callq 0x2220
testq %rax, %rax
je 0x247d
movq %rax, %r14
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x21f0
movq %r14, %rdi
callq 0x2180
movq %rax, %r15
movq %rax, -0x360(%rbp)
movq %rax, %rdi
callq 0x21b0
movq %rax, -0x358(%rbp)
testq %rax, %rax
je 0x2473
movq %rax, %r12
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21f0
pushq $0x1
popq %rsi
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2090
cmpq %r15, %rax
jae 0x2473
leaq -0x360(%rbp), %rdi
callq 0x3a7a
movq %r14, %rdi
callq 0x20c0
jmp 0x2485
callq 0x2050
andl $0x0, (%rax)
movaps -0x360(%rbp), %xmm0
leaq -0x790(%rbp), %rsi
movups %xmm0, 0xe0(%rsi)
movq %rbx, 0xf8(%rsi)
movq $0x1, 0xf0(%rsi)
pushq $0x2c
popq %rcx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x2030
movq %rax, %rbx
leaq -0x560(%rbp), %r15
movl $0xc8, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x2130
leaq -0x538(%rbp), %rdi
leaq 0x1b2f(%rip), %r12      # 0x4010
leaq 0x1b2e(%rip), %r13      # 0x4016
movq %r12, %rsi
movq %r13, %rdx
callq 0x3813
leaq -0x558(%rbp), %r14
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %r12
movq %r13, %rdx
callq 0x3813
movw $0x1, -0x130(%rbp)
movq %r13, %rdi
callq 0x3a0e
movq %rax, -0x128(%rbp)
andw $0x0, -0x238(%rbp)
movq %rdx, -0x120(%rbp)
andw $0x0, -0x220(%rbp)
movabsq $0x5500000000, %rbx     # imm = 0x5500000000
movq %rbx, -0x234(%rbp)
movabsq $0x2300000000, %r13     # imm = 0x2300000000
movq %r13, -0x21c(%rbp)
leaq 0x78(%rsp), %rdi
pushq $0x19
popq %rcx
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq 0x3817(%rip), %rax      # 0x5d88
movq %rax, 0x150(%rsp)
movups 0x37f8(%rip), %xmm0     # 0x5d78
movups %xmm0, 0x140(%rsp)
movq 0x3a31(%rip), %rcx      # 0x5fc0
movq 0x10(%rcx), %rax
movq %rax, 0x70(%rsp)
movups (%rcx), %xmm0
movups %xmm0, 0x60(%rsp)
movq -0x120(%rbp), %rcx
movq %rcx, 0x58(%rsp)
movups -0x130(%rbp), %xmm1
movups %xmm1, 0x48(%rsp)
movq -0x210(%rbp), %rcx
movq %rcx, 0x40(%rsp)
movups -0x220(%rbp), %xmm1
movups %xmm1, 0x30(%rsp)
movq -0x228(%rbp), %rcx
movq %rcx, 0x28(%rsp)
movups -0x238(%rbp), %xmm1
movups %xmm1, 0x18(%rsp)
movq %rax, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq -0x460(%rbp), %rsi
movq %r12, %rdi
callq 0x20a0
leaq 0x1a1c(%rip), %rdi      # 0x4023
leaq 0x1b0f(%rip), %rsi      # 0x411d
callq 0x2220
movq %rax, 0x3b46(%rip)      # 0x6160
testq %rax, %rax
movq %r12, -0x80(%rbp)
je 0x2750
movw $0x1, -0x360(%rbp)
leaq 0x1a12(%rip), %rdi      # 0x4049
callq 0x3a0e
movq %rax, -0x358(%rbp)
movq %rdx, -0x350(%rbp)
movl $0xc8, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x2130
leaq 0x19b0(%rip), %r12      # 0x4010
leaq 0x1b62(%rip), %r13      # 0x41c9
leaq -0x538(%rbp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x3813
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
movabsq $0x2300000000, %r13     # imm = 0x2300000000
callq 0x3813
andw $0x0, -0x208(%rbp)
movq %rbx, -0x204(%rbp)
andw $0x0, -0x1f0(%rbp)
movq %r13, -0x1ec(%rbp)
leaq 0x78(%rsp), %rdi
pushq $0x19
popq %rcx
movq %r15, %rsi
movq 0x38ff(%rip), %r15      # 0x5fc0
rep  movsq (%rsi), %es:(%rdi)
movq 0x36d5(%rip), %rax      # 0x5da0
movq %rax, 0x150(%rsp)
movups 0x36b6(%rip), %xmm0     # 0x5d90
movups %xmm0, 0x140(%rsp)
movq 0x10(%r15), %rax
movq %rax, 0x70(%rsp)
movups (%r15), %xmm0
movups %xmm0, 0x60(%rsp)
movq -0x350(%rbp), %rcx
movq %rcx, 0x58(%rsp)
movups -0x360(%rbp), %xmm1
movups %xmm1, 0x48(%rsp)
movq -0x1e0(%rbp), %rcx
movq %rcx, 0x40(%rsp)
movups -0x1f0(%rbp), %xmm1
movups %xmm1, 0x30(%rsp)
movq -0x1f8(%rbp), %rcx
movq %rcx, 0x28(%rsp)
movups -0x208(%rbp), %xmm1
movups %xmm1, 0x18(%rsp)
movq %rax, 0x10(%rsp)
movups %xmm0, (%rsp)
movq -0x80(%rbp), %rdi
xorl %esi, %esi
callq 0x20a0
movq %r14, %rbx
leaq -0x538(%rbp), %r14
leaq 0x18f8(%rip), %rdi      # 0x4059
xorl %esi, %esi
callq 0x2210
cmpl $-0x1, %eax
jne 0x2784
leaq 0x1902(%rip), %rdi      # 0x4076
xorl %esi, %esi
callq 0x2210
cmpl $-0x1, %eax
je 0x2958
leaq 0x18ce(%rip), %rdi      # 0x4059
leaq 0x1904(%rip), %rsi      # 0x4096
callq 0x2220
movq %rax, 0x39ca(%rip)      # 0x6168
testq %rax, %rax
je 0x293b
leaq 0x18c8(%rip), %rdi      # 0x4076
leaq 0x18e1(%rip), %rsi      # 0x4096
callq 0x2220
movq %rax, 0x39af(%rip)      # 0x6170
testq %rax, %rax
je 0x293b
movq 0x3997(%rip), %rsi      # 0x6168
leaq 0x18c0(%rip), %rdi      # 0x4098
callq 0x2120
movq 0x3984(%rip), %rdi      # 0x6168
callq 0x21c0
movq 0x3980(%rip), %rsi      # 0x6170
leaq 0x18a6(%rip), %rdi      # 0x409d
callq 0x2120
movq 0x396d(%rip), %rdi      # 0x6170
callq 0x21c0
leaq -0x560(%rbp), %r15
movl $0xc8, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x2130
leaq 0x17eb(%rip), %r12      # 0x4010
leaq 0x1873(%rip), %r13      # 0x409f
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x3813
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x3813
andw $0x0, -0x360(%rbp)
movq %r13, %rdi
movabsq $0x2300000000, %r13     # imm = 0x2300000000
callq 0x3a0e
movq %rax, -0x358(%rbp)
movq %rdx, -0x350(%rbp)
andw $0x0, -0x1d8(%rbp)
movabsq $0x5500000000, %rax     # imm = 0x5500000000
movq %rax, -0x1d4(%rbp)
andw $0x0, -0x1c0(%rbp)
movq %r13, -0x1bc(%rbp)
leaq 0x78(%rsp), %rdi
pushq $0x19
popq %rcx
movq %r15, %rsi
movq 0x3716(%rip), %r15      # 0x5fc0
rep  movsq (%rsi), %es:(%rdi)
movq 0x3504(%rip), %rax      # 0x5db8
movq %rax, 0x150(%rsp)
movups 0x34e5(%rip), %xmm0     # 0x5da8
movups %xmm0, 0x140(%rsp)
movq 0x10(%r15), %rax
movq %rax, 0x70(%rsp)
movups (%r15), %xmm0
movups %xmm0, 0x60(%rsp)
movq -0x350(%rbp), %rcx
movq %rcx, 0x58(%rsp)
movups -0x360(%rbp), %xmm1
movups %xmm1, 0x48(%rsp)
movq -0x1b0(%rbp), %rcx
movq %rcx, 0x40(%rsp)
movups -0x1c0(%rbp), %xmm1
movups %xmm1, 0x30(%rsp)
movq -0x1c8(%rbp), %rcx
movq %rcx, 0x28(%rsp)
movups -0x1d8(%rbp), %xmm1
movups %xmm1, 0x18(%rsp)
movq %rax, 0x10(%rsp)
movups %xmm0, (%rsp)
movq -0x80(%rbp), %rdi
xorl %esi, %esi
callq 0x20a0
jmp 0x2958
movq 0x380e(%rip), %rcx      # 0x6150
testq %rcx, %rcx
je 0x2958
leaq 0x175c(%rip), %rdx      # 0x40aa
pushq $0x3
popq %rdi
pushq $0x5
popq %rsi
xorl %eax, %eax
callq *%rcx
leaq -0x628(%rbp), %rdi
movl $0xc8, %edx
xorl %esi, %esi
callq 0x2130
leaq -0x600(%rbp), %rdi
leaq 0x1697(%rip), %rbx      # 0x4010
leaq 0x177d(%rip), %r15      # 0x40fd
movq %rbx, %rsi
movq %r15, %rdx
callq 0x3813
leaq -0x620(%rbp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x3813
leaq -0x114(%rbp), %rsi
movl $0x2a, (%rsi)
leaq -0x5d8(%rbp), %rdi
movq 0x3618(%rip), %rax      # 0x5fd0
leaq 0xc8(%rax), %rdx
movq %rdx, -0x100(%rbp)
callq 0x2170
movq %r15, %rdi
callq 0x3a0e
movq %rax, %r14
movq %rdx, %rbx
leaq 0x1728(%rip), %rdi      # 0x4108
callq 0x3a0e
movq %rax, -0x90(%rbp)
movq %rdx, %r12
leaq 0xfdd(%rip), %rax       # 0x39d3
leaq -0x370(%rbp), %rcx
movq %rax, (%rcx)
movq -0x80(%rbp), %r15
movq %r15, 0x8(%rcx)
leaq -0x360(%rbp), %rdi
movl $0xc8, %edx
leaq -0x628(%rbp), %rsi
callq 0x2190
movw $0x1, %cx
leaq -0x430(%rbp), %rax
movw %cx, -0x8(%rax)
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
movq %rax, %rdx
leaq -0x268(%rbp), %rbx
andw $0x0, -0x28(%rbx)
movq %r13, -0x24(%rbx)
andw $0x0, -0xf0(%rbp)
movabsq $0x5500000000, %rax     # imm = 0x5500000000
movq %rax, -0xec(%rbp)
movw %cx, -0x78(%rbp)
movl $0x3, -0x74(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x70(%rbp)
movq %r12, -0x68(%rbp)
movq 0x353d(%rip), %rcx      # 0x5fc0
movq 0x10(%rcx), %rax
movq %rax, 0x70(%rsp)
movups (%rcx), %xmm0
movups %xmm0, 0x60(%rsp)
movq 0x8(%rdx), %rax
movq %rax, 0x58(%rsp)
movups -0x8(%rdx), %xmm0
movups %xmm0, 0x48(%rsp)
movq -0x18(%rbx), %rax
movq %rax, 0x40(%rsp)
movups -0x28(%rbx), %xmm0
movups %xmm0, 0x30(%rsp)
movq -0xe0(%rbp), %rax
movq %rax, 0x28(%rsp)
movups -0xf0(%rbp), %xmm0
movups %xmm0, 0x18(%rsp)
movq %r12, 0x10(%rsp)
movups -0x78(%rbp), %xmm0
movups %xmm0, (%rsp)
movq 0x34ec(%rip), %rax      # 0x5fd0
leaq 0x528(%rax), %rcx
pushq $0x2
popq %rsi
movq %r15, %rdi
leaq -0x360(%rbp), %rdx
movq %rcx, -0xf8(%rbp)
leaq -0x370(%rbp), %r8
xorl %r9d, %r9d
callq 0x21e0
leaq -0x5d8(%rbp), %rdi
callq 0x39f8
xorps %xmm0, %xmm0
movq %rbx, %rdi
movaps %xmm0, 0x18(%rbx)
movaps %xmm0, 0x8(%rbx)
movaps %xmm0, -0x8(%rbx)
movaps %xmm0, -0x18(%rbx)
movaps %xmm0, -0x28(%rbx)
andq $0x0, 0x28(%rbx)
leaq 0x15d3(%rip), %r14      # 0x4113
leaq 0x14c9(%rip), %rbx      # 0x4010
movq %rbx, %rsi
movq %r14, %rdx
callq 0x3813
leaq -0x288(%rbp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x3813
movq %r14, %rdi
callq 0x3a0e
pushq $0xb
popq %rcx
leaq -0x360(%rbp), %r8
leaq -0x290(%rbp), %rsi
movq %r8, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq -0x430(%rbp), %rsi
andw $0x0, -0x8(%rsi)
movabsq $0x3d00000000, %rcx     # imm = 0x3D00000000
movq %rcx, -0x4(%rsi)
movw $0x1, %cx
movw %cx, -0xf0(%rbp)
movq %rax, -0xe8(%rbp)
movq %rdx, -0xe0(%rbp)
andw $0x0, -0x78(%rbp)
movq %r13, -0x74(%rbp)
andw $0x0, -0x58(%rbp)
movabsq $0x5500000000, %rax     # imm = 0x5500000000
movq %rax, -0x54(%rbp)
movw %cx, -0x40(%rbp)
movabsq $0xc35000000000, %rax   # imm = 0xC35000000000
movq %rax, -0x3c(%rbp)
movq 0x8(%rsi), %rax
movq %rax, 0x70(%rsp)
movups -0x8(%rsi), %xmm0
movq %rsi, %r12
movups %xmm0, 0x60(%rsp)
movq -0xe0(%rbp), %rax
movq %rax, 0x58(%rsp)
movups -0xf0(%rbp), %xmm0
movups %xmm0, 0x48(%rsp)
movq -0x68(%rbp), %rax
movq %rax, 0x40(%rsp)
movups -0x78(%rbp), %xmm0
movups %xmm0, 0x30(%rsp)
movq -0x48(%rbp), %rax
movq %rax, 0x28(%rsp)
movups -0x58(%rbp), %xmm0
movups %xmm0, 0x18(%rsp)
movq -0x30(%rbp), %rax
movq %rax, 0x10(%rsp)
movups -0x40(%rbp), %xmm0
movups %xmm0, (%rsp)
movq 0x3383(%rip), %rax      # 0x5fd0
leaq 0x1018(%rax), %rcx
pushq $0x1
popq %rsi
movq %r15, %rdi
movq %r15, %r13
movq %r8, %rdx
movq %rcx, %rbx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x21e0
leaq 0x14a3(%rip), %r15      # 0x4118
leaq -0x268(%rbp), %rdi
leaq 0x138d(%rip), %r14      # 0x4010
movq %r14, %rsi
movq %r15, %rdx
callq 0x3813
leaq -0x288(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3813
movq %r15, %rdi
callq 0x3a0e
leaq -0x360(%rbp), %r8
pushq $0xb
popq %rcx
movq %r8, %rdi
leaq -0x290(%rbp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %r12, %r14
andw $0x0, -0x8(%r12)
movabsq $0x3d00000000, %rcx     # imm = 0x3D00000000
movq %rcx, -0x4(%r12)
movw $0x1, %cx
movw %cx, -0xf0(%rbp)
andw $0x0, -0x78(%rbp)
movq %rax, -0xe8(%rbp)
movq %rdx, -0xe0(%rbp)
movabsq $0x2300000000, %r12     # imm = 0x2300000000
movq %r12, -0x74(%rbp)
movw %cx, -0x58(%rbp)
movabsq $0xc35000000000, %rax   # imm = 0xC35000000000
movq %rax, -0x54(%rbp)
movw %cx, -0x40(%rbp)
movabsq $0xc35100000000, %rax   # imm = 0xC35100000000
movq %rax, -0x3c(%rbp)
movq 0x8(%r14), %rax
movq %rax, 0x70(%rsp)
movups -0x8(%r14), %xmm0
movups %xmm0, 0x60(%rsp)
movq -0xe0(%rbp), %rax
movq %rax, 0x58(%rsp)
movups -0xf0(%rbp), %xmm0
movups %xmm0, 0x48(%rsp)
movq -0x68(%rbp), %rax
movq %rax, 0x40(%rsp)
movups -0x78(%rbp), %xmm0
movups %xmm0, 0x30(%rsp)
movq -0x48(%rbp), %rax
movq %rax, 0x28(%rsp)
movups -0x58(%rbp), %xmm0
movups %xmm0, 0x18(%rsp)
movq -0x30(%rbp), %rax
movq %rax, 0x10(%rsp)
movups -0x40(%rbp), %xmm0
movups %xmm0, (%rsp)
movq %r13, %rdi
pushq $0x1
popq %rsi
movq %r8, %rdx
movq %rbx, %rcx
movq %rbx, -0x90(%rbp)
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x21e0
leaq 0x1372(%rip), %r15      # 0x411f
leaq -0x268(%rbp), %rdi
leaq 0x1255(%rip), %rbx      # 0x4010
movq %rbx, %rsi
movq %r15, %rdx
callq 0x3813
leaq -0x288(%rbp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x3813
movq %r15, %rdi
callq 0x3a0e
leaq -0x360(%rbp), %r8
pushq $0xb
popq %rcx
movq %r8, %rdi
leaq -0x290(%rbp), %rsi
rep  movsq (%rsi), %es:(%rdi)
andw $0x0, -0x8(%r14)
movabsq $0x3d00000000, %rcx     # imm = 0x3D00000000
movq %rcx, -0x4(%r14)
movw $0x1, %cx
movw %cx, -0xf0(%rbp)
andw $0x0, -0x78(%rbp)
movq %rax, -0xe8(%rbp)
movq %rdx, -0xe0(%rbp)
movq %r12, -0x74(%rbp)
movw %cx, -0x58(%rbp)
movabsq $0xc35000000000, %rax   # imm = 0xC35000000000
movq %rax, -0x54(%rbp)
movw %cx, -0x40(%rbp)
movabsq $0xc35200000000, %rax   # imm = 0xC35200000000
movq %rax, -0x3c(%rbp)
movq 0x8(%r14), %rax
movq %rax, 0x70(%rsp)
movups -0x8(%r14), %xmm0
movups %xmm0, 0x60(%rsp)
movq -0xe0(%rbp), %rax
movq %rax, 0x58(%rsp)
movups -0xf0(%rbp), %xmm0
movups %xmm0, 0x48(%rsp)
movq -0x68(%rbp), %rax
movq %rax, 0x40(%rsp)
movups -0x78(%rbp), %xmm0
movups %xmm0, 0x30(%rsp)
movq -0x48(%rbp), %rax
movq %rax, 0x28(%rsp)
movups -0x58(%rbp), %xmm0
movups %xmm0, 0x18(%rsp)
movq -0x30(%rbp), %rax
movq %rax, 0x10(%rsp)
movups -0x40(%rbp), %xmm0
movups %xmm0, (%rsp)
movq %r13, %rdi
pushq $0x1
popq %rsi
movq %r8, %rdx
movq -0x90(%rbp), %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x21e0
leaq 0x1252(%rip), %r15      # 0x4125
leaq -0x268(%rbp), %rdi
movq 0x30ef(%rip), %rbx      # 0x5fd0
leaq 0x1128(%rip), %r13      # 0x4010
movq %r13, %rsi
movq %r15, %rdx
callq 0x3813
leaq -0x288(%rbp), %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x3813
movq %r15, %rdi
callq 0x3a0e
leaq -0x360(%rbp), %r8
pushq $0xb
popq %rcx
movq %r8, %rdi
leaq -0x290(%rbp), %rsi
rep  movsq (%rsi), %es:(%rdi)
andw $0x0, -0x8(%r14)
movabsq $0x3d00000000, %rsi     # imm = 0x3D00000000
movq %rsi, -0x4(%r14)
movw $0x1, %si
movw %si, -0xf0(%rbp)
andw $0x0, -0x78(%rbp)
movq %rax, -0xe8(%rbp)
movq %rdx, -0xe0(%rbp)
movq %r12, -0x74(%rbp)
movw %si, -0x58(%rbp)
movw $0x1, %dx
movabsq $0xc35000000000, %rax   # imm = 0xC35000000000
movq %rax, -0x54(%rbp)
movw %dx, -0x40(%rbp)
movabsq $0xc35300000000, %rax   # imm = 0xC35300000000
movq %rax, -0x3c(%rbp)
movq 0x8(%r14), %rax
movq %rax, 0x70(%rsp)
movups -0x8(%r14), %xmm0
movups %xmm0, 0x60(%rsp)
movq -0xe0(%rbp), %rax
movq %rax, 0x58(%rsp)
movups -0xf0(%rbp), %xmm0
movups %xmm0, 0x48(%rsp)
movq -0x68(%rbp), %rax
movq %rax, 0x40(%rsp)
movups -0x78(%rbp), %xmm0
movups %xmm0, 0x30(%rsp)
movq -0x48(%rbp), %rax
movq %rax, 0x28(%rsp)
movups -0x58(%rbp), %xmm0
movups %xmm0, 0x18(%rsp)
movq -0x30(%rbp), %rax
movq %rax, 0x10(%rsp)
movups -0x40(%rbp), %xmm0
movups %xmm0, (%rsp)
movq -0x80(%rbp), %rdi
pushq $0x1
popq %rsi
movq %r8, %rdx
movq -0x90(%rbp), %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x21e0
movl $0xc738, %eax           # imm = 0xC738
movq %rax, -0x90(%rbp)
xorl %r13d, %r13d
cmpq $0x17, %r13
je 0x3432
cmpq $0x18, %r13
je 0x343e
movl $0xc8, %edx
leaq -0x438(%rbp), %rdi
xorl %esi, %esi
callq 0x2130
leaq -0x447(%rbp), %r14
movq %r14, %rdi
leaq 0x10e7(%rip), %rsi      # 0x412c
movl %r13d, %edx
xorl %eax, %eax
callq 0x2230
leaq -0x430(%rbp), %rdi
leaq 0xfb3(%rip), %rsi       # 0x4010
movq %r14, %rdx
callq 0x3813
movq %r14, %rdi
callq 0x3a0e
movq %r13, -0x110(%rbp)
movq %rax, %r13
movq %rdx, %r15
movq %rbx, %rdi
callq 0x2150
leaq -0x3e8(%rbp), %r12
movq %r12, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x2140
movq %rbx, -0x98(%rbp)
movq -0x90(%rbp), %rax
leal 0x1(%rax), %ebx
movl $0xc8, %edx
leaq -0x360(%rbp), %rdi
leaq -0x438(%rbp), %rsi
callq 0x2190
movw $0x1, %cx
movw %cx, -0xf0(%rbp)
movq %r13, -0xe8(%rbp)
movq %r15, -0xe0(%rbp)
movq %r15, -0x108(%rbp)
andw $0x0, -0x78(%rbp)
movabsq $0x2300000000, %rax     # imm = 0x2300000000
movq %rax, -0x74(%rbp)
movw %cx, -0x58(%rbp)
movabsq $0xc35100000000, %rax   # imm = 0xC35100000000
movq %rax, -0x54(%rbp)
movw %cx, -0x40(%rbp)
andl $0x0, -0x3c(%rbp)
movl %ebx, -0x38(%rbp)
movq 0x2ea9(%rip), %rcx      # 0x5fc0
movq 0x10(%rcx), %rax
movq %rax, 0x70(%rsp)
movups (%rcx), %xmm0
movups %xmm0, 0x60(%rsp)
movq -0xe0(%rbp), %rax
movq %rax, 0x58(%rsp)
movups -0xf0(%rbp), %xmm0
movups %xmm0, 0x48(%rsp)
movq -0x68(%rbp), %rax
movq %rax, 0x40(%rsp)
movups -0x78(%rbp), %xmm0
movups %xmm0, 0x30(%rsp)
movq -0x48(%rbp), %rax
movq %rax, 0x28(%rsp)
movups -0x58(%rbp), %xmm0
movups %xmm0, 0x18(%rsp)
movq -0x30(%rbp), %rax
movq %rax, 0x10(%rsp)
movups -0x40(%rbp), %xmm0
movups %xmm0, (%rsp)
movq -0x80(%rbp), %r14
movq %r14, %rdi
pushq $0x2
popq %rsi
leaq -0x360(%rbp), %rdx
movq -0xf8(%rbp), %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x21e0
movq %r12, %rdi
callq 0x39f8
pushq $0xa
popq %rbx
movq %rbx, %rdi
movq -0x98(%rbp), %rsi
callq 0x2060
movq %r12, %rdi
movq %rax, %rsi
movq %rbx, %rdx
movq -0x98(%rbp), %rcx
callq 0x2160
movq -0x90(%rbp), %rax
leal 0x2(%rax), %ebx
movl $0xc8, %edx
leaq -0x360(%rbp), %rdi
movq %rdi, %r12
leaq -0x438(%rbp), %rsi
callq 0x2190
movw $0x1, %cx
movw %cx, -0xf0(%rbp)
movq %r13, -0xe8(%rbp)
movq %r15, -0xe0(%rbp)
andw $0x0, -0x78(%rbp)
movabsq $0x2300000000, %rax     # imm = 0x2300000000
movq %rax, -0x74(%rbp)
movw %cx, -0x58(%rbp)
movabsq $0xc35200000000, %rax   # imm = 0xC35200000000
movq %rax, -0x54(%rbp)
movw %cx, -0x40(%rbp)
andl $0x0, -0x3c(%rbp)
movl %ebx, -0x38(%rbp)
movq 0x2d84(%rip), %rcx      # 0x5fc0
movq 0x10(%rcx), %rax
movq %rax, 0x70(%rsp)
movups (%rcx), %xmm0
movups %xmm0, 0x60(%rsp)
movq -0xe0(%rbp), %rax
movq %rax, 0x58(%rsp)
movups -0xf0(%rbp), %xmm0
movups %xmm0, 0x48(%rsp)
movq -0x68(%rbp), %rax
movq %rax, 0x40(%rsp)
movups -0x78(%rbp), %xmm0
movups %xmm0, 0x30(%rsp)
movq -0x48(%rbp), %rax
movq %rax, 0x28(%rsp)
movups -0x58(%rbp), %xmm0
movups %xmm0, 0x18(%rsp)
movq -0x30(%rbp), %rax
movq %rax, 0x10(%rsp)
movups -0x40(%rbp), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
pushq $0x2
popq %rsi
movq %r12, %rdx
movq %r12, %r15
movq -0xf8(%rbp), %r12
movq %r12, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x21e0
leaq -0x3e8(%rbp), %rdi
callq 0x39f8
pushq $0x9
popq %rdi
movq -0x98(%rbp), %rsi
callq 0x2060
movq %rax, %rbx
pushq $0x2
popq %rdi
movq -0x100(%rbp), %rsi
callq 0x2060
movq %rax, -0x3c0(%rbp)
movabsq $0x300000003, %rcx      # imm = 0x300000003
movq %rcx, (%rax)
movq $0x2, -0x3c8(%rbp)
movq $0x9, -0x3d8(%rbp)
movq %rbx, -0x3d0(%rbp)
movq -0x98(%rbp), %rbx
movq %rbx, -0x3e8(%rbp)
movq -0x90(%rbp), %rax
addl $0x3, %eax
movq %rax, -0x90(%rbp)
movl $0xc8, %edx
movq %r15, %rdi
leaq -0x438(%rbp), %rsi
callq 0x2190
movw $0x1, %cx
movw %cx, -0xf0(%rbp)
movq %r13, -0xe8(%rbp)
movq -0x110(%rbp), %r13
movq -0x108(%rbp), %rax
movq %rax, -0xe0(%rbp)
andw $0x0, -0x78(%rbp)
movabsq $0x2300000000, %rax     # imm = 0x2300000000
movq %rax, -0x74(%rbp)
movw %cx, -0x58(%rbp)
movabsq $0xc35300000000, %rax   # imm = 0xC35300000000
movq %rax, -0x54(%rbp)
movw %cx, -0x40(%rbp)
andl $0x0, -0x3c(%rbp)
movq -0x90(%rbp), %rax
movl %eax, -0x38(%rbp)
movq 0x2c0f(%rip), %rcx      # 0x5fc0
movq 0x10(%rcx), %rax
movq %rax, 0x70(%rsp)
movups (%rcx), %xmm0
movups %xmm0, 0x60(%rsp)
movq -0xe0(%rbp), %rax
movq %rax, 0x58(%rsp)
movups -0xf0(%rbp), %xmm0
movups %xmm0, 0x48(%rsp)
movq -0x68(%rbp), %rax
movq %rax, 0x40(%rsp)
movups -0x78(%rbp), %xmm0
movups %xmm0, 0x30(%rsp)
movq -0x48(%rbp), %rax
movq %rax, 0x28(%rsp)
movups -0x58(%rbp), %xmm0
movups %xmm0, 0x18(%rsp)
movq -0x30(%rbp), %rax
movq %rax, 0x10(%rsp)
movups -0x40(%rbp), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
pushq $0x2
popq %rsi
movq %r15, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x21e0
leaq -0x3e8(%rbp), %rdi
callq 0x39f8
incq %r13
addq $0x28, %rbx
jmp 0x300d
xorps %xmm0, %xmm0
leaq -0x320(%rbp), %r15
movups %xmm0, 0x8(%r15)
movups %xmm0, -0x8(%r15)
movups %xmm0, -0x18(%r15)
andq $0x0, 0x18(%r15)
movq 0x2b6d(%rip), %rbx      # 0x5fd0
movups 0x1b8(%rbx), %xmm0
movaps %xmm0, -0x90(%rbp)
movups %xmm0, -0x30(%r15)
movq 0x1c8(%rbx), %r14
movq %r14, -0x20(%r15)
leaq 0xb88(%rip), %rsi       # 0x4010
leaq 0xca2(%rip), %rdx       # 0x4131
movq %r15, %rdi
callq 0x3813
leaq 0xc9c(%rip), %rdi       # 0x413a
callq 0x3a0e
movq %rax, %r13
movq %rdx, %r12
movq %rax, -0x40(%r15)
movq %rdx, -0x38(%r15)
orl $-0x1, -0x18(%r15)
leaq -0x3f8(%rbp), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r15)
andq $0x0, 0x18(%r15)
movups %xmm0, -0x8(%r15)
movups %xmm0, -0x18(%r15)
movaps -0x90(%rbp), %xmm0
movups %xmm0, -0x30(%r15)
movq %r14, -0x20(%r15)
movq %r15, %rdi
leaq 0xb22(%rip), %rsi       # 0x4010
leaq 0xc3c(%rip), %rdx       # 0x4131
callq 0x3813
movq %r13, -0x40(%r15)
movq %r12, -0x38(%r15)
orl $-0x1, -0x18(%r15)
leaq -0xc8(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x18(%rdi)
movaps %xmm0, 0x8(%rdi)
movaps %xmm0, -0x8(%rdi)
movaps %xmm0, -0x18(%rdi)
movaps %xmm0, -0x28(%rdi)
andq $0x0, 0x28(%rdi)
leaq 0xc1a(%rip), %rdx       # 0x414b
leaq 0xad8(%rip), %r14       # 0x4010
movq %r14, %rsi
callq 0x3813
leaq -0xe8(%rbp), %r15
leaq 0xc2e(%rip), %r12       # 0x417c
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x3813
movw $0x101, 0x48(%r15)      # imm = 0x101
movw $0x1, %ax
movw %ax, -0x1a8(%rbp)
movabsq $0xf44d00000000, %rcx   # imm = 0xF44D00000000
andw $0x0, -0x190(%rbp)
movq %rcx, -0x1a4(%rbp)
andw $0x0, -0x178(%rbp)
movabsq $0x5500000000, %r13     # imm = 0x5500000000
movq %r13, -0x18c(%rbp)
movabsq $0x2f00000000, %rcx     # imm = 0x2F00000000
movq %rcx, -0x174(%rbp)
movw %ax, -0x160(%rbp)
movq %r12, %rdi
callq 0x3a0e
movq %rax, -0x158(%rbp)
movq %rdx, -0x150(%rbp)
leaq 0x60(%rsp), %rdi
pushq $0xb
popq %rcx
leaq -0xf0(%rbp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rdx, 0x58(%rsp)
movups -0x160(%rbp), %xmm0
movups %xmm0, 0x48(%rsp)
movq -0x168(%rbp), %rax
movq %rax, 0x40(%rsp)
movups -0x178(%rbp), %xmm0
movups %xmm0, 0x30(%rsp)
movq -0x180(%rbp), %rax
movq %rax, 0x28(%rsp)
movups -0x190(%rbp), %xmm0
movups %xmm0, 0x18(%rsp)
movq -0x198(%rbp), %rax
movq %rax, 0x10(%rsp)
movups -0x1a8(%rbp), %xmm0
movups %xmm0, (%rsp)
leaq -0x438(%rbp), %rax
movq %rax, 0xb8(%rsp)
andq $0x0, 0xc0(%rsp)
leaq 0x3cf(%rip), %rsi       # 0x3a26
leaq -0x360(%rbp), %r8
pushq $0x1
popq %rcx
movq -0x80(%rbp), %r15
movq %r15, %rdi
movq %r15, %rdx
movq %rcx, %r9
callq 0x2040
andw $0x0, -0x148(%rbp)
movq %r13, -0x144(%rbp)
movq -0x138(%rbp), %rax
movq %rax, 0x10(%rsp)
movups -0x148(%rbp), %xmm0
movups %xmm0, (%rsp)
leaq 0x3d2(%rip), %rsi       # 0x3a72
movq %r15, %rdi
xorl %edx, %edx
callq 0x20d0
leaq 0xad0(%rip), %rsi       # 0x4181
leaq 0xacf(%rip), %rdx       # 0x4187
leaq -0x78(%rbp), %r14
movq %r14, %rdi
callq 0x3813
leaq -0x58(%rbp), %rsi
andw $0x0, (%rsi)
movq %r13, 0x4(%rsi)
addq $0x320, %rbx            # imm = 0x320
pushq $0x4
popq %rdx
movq %r15, %rdi
movq %rbx, %rcx
movq %r14, %r8
callq 0x2260
leaq 0x2a59(%rip), %rsi      # 0x6148
movq %r15, %rdi
callq 0x21d0
movl %eax, %ebx
movq %r15, %rdi
callq 0x2250
leaq -0x498(%rbp), %rdi
callq *0x30(%rdi)
movq 0x2a4e(%rip), %rdi      # 0x6160
testq %rdi, %rdi
je 0x371c
callq 0x20c0
movq 0x2a45(%rip), %rdi      # 0x6168
testq %rdi, %rdi
je 0x3750
xorl %esi, %esi
xorl %edx, %edx
callq 0x21f0
movq 0x2a30(%rip), %rsi      # 0x6168
leaq 0xa50(%rip), %rdi       # 0x418f
callq 0x2120
movq 0x2a1d(%rip), %rdi      # 0x6168
callq 0x20c0
movq 0x2a19(%rip), %rdi      # 0x6170
testq %rdi, %rdi
je 0x3761
callq 0x20c0
leaq -0x6b0(%rbp), %rdi
callq 0x3a7a
movl %ebx, %eax
addq $0x8c8, %rsp            # imm = 0x8C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq