Thread: Why does this code not compile?

  1. #1
    Registered User
    Join Date
    Feb 2019
    Posts
    69

    Why does this code not compile?

    Hey

    given this code:

    Code:
    #include <stdio.h>#include <stdlib.h>
    #include <string.h>
    #include <unistd.h>
    #include <sys/types.h>
    #include <sys/socket.h>
    #include <netinet/in.h>
    #include <pthread.h>
    #include <stdbool.h>
    
    
    #define BUFLEN 255
    #define MAX_CONNECTIONS 128
    #define MAX_NAME_LENGTH 30
    
    
    struct JOB_INFO {
    	int socket_ids[MAX_CONNECTIONS];
    	bool endprogram;
    	int open_cnncts;
    	pthread_mutex_t socketids_changingMutex;
    };
    
    
    struct SERVER_DATA {
        struct sockaddr_in serv_add;
        struct sockaddr_in cli_adr;
        socklen_t clilen;
        pthread_t writethread;
    };
    
    
    void delete_socket(int socketid, struct JOB_INFO* pjob_data);
    void* job_read(void*);
    void* job_write(void*);
    void error(const char* msg);
    inline void setUpFileStream(int argc, char* argv[]);
    inline int setUpConnections(struct SERVER_DATA* pserver_data, char portnumc[]);
    
    
    //Global Variables
    FILE* plogfile;
    
    
    void error(const char* msg){
        perror(msg);
        exit(1);
    }
    uint16_t portnum;
    
    
    int main(int argc, char* argv[]) {
    	setUpFileStream(argc, argv);
    
    
    	int sockfd;
        struct JOB_INFO job_data;
        job_data.endprogram = false;
        job_data.open_cnncts = 0;
    
    
    
    
        struct SERVER_DATA server_data;
        //Create mutex
        if(pthread_mutex_init(&(job_data.socketids_changingMutex), NULL) < 0){
            error("Could not initialize Mutex");
        }
        //Initialzing threads and create writethread
        pthread_create(&server_data.writethread, NULL, job_write, (void*)&job_data);
    
    
    
    
        //Setup for connections
        sockfd = setUpConnections(&server_data, argv[2]);
    
    
        fprintf(plogfile,"Listening....");
        listen(sockfd, MAX_CONNECTIONS);
    
    
        for(job_data.open_cnncts = 0; (!job_data.endprogram); /*mutex needs to be set*/ ){
    
    
        	void** p = malloc(2*sizeof(void*));
        	p[0] = (void*)&job_data;
        	p[1] = (void*)&(job_data.socket_ids[job_data.open_cnncts]);
        	job_data.socket_ids[job_data.open_cnncts] = accept(sockfd, (struct sockaddr*) &server_data.cli_adr, &server_data.clilen);
            pthread_mutex_lock(&job_data.socketids_changingMutex);
            fprintf(plogfile,"Client connected.\n");
            pthread_t thread;
            pthread_create(&thread , NULL, job_read, p);
            job_data.open_cnncts++;
            pthread_mutex_unlock(&job_data.socketids_changingMutex);
        }
    
    
        job_data.endprogram = true;
        close(sockfd);
    
    
        pthread_join(server_data.writethread, NULL);
        pthread_mutex_destroy(&job_data.socketids_changingMutex);
        return EXIT_SUCCESS;
    }
    
    
    void* job_read(void * p){
    
    
    	char** pc = (char**)p; //allow pointer arithmetic
        int newsockfd = *((int*) (pc[0]));  //Casting
        struct JOB_INFO* pjob_data = ((struct JOB_INFO*) (pc[1])); //Casting
    
    
        ssize_t n; //Error catching variable
        ssize_t m; //Error catching variable
        char buffer[BUFLEN];
        char name[MAX_NAME_LENGTH];
        sprintf(name, "Client %d: ", newsockfd);
    
    
        while(!pjob_data->endprogram){
            bzero(buffer, BUFLEN);
            n = read(newsockfd, buffer, BUFLEN);
    
    
            if(n<0){
                printf("Buffer: %s", buffer);
                error("Reading Failed");
            }
            if(n == 0){
                delete_socket(newsockfd, pjob_data);
                pthread_exit(NULL);
            }
    
    
            pthread_mutex_lock(&pjob_data->socketids_changingMutex);
            for(int i = 0; i < pjob_data->open_cnncts; i++){
                if(pjob_data->socket_ids[i] == newsockfd){
                    continue;
                }
                m = write(pjob_data->socket_ids[i], name, strlen(name));
                n = write(pjob_data->socket_ids[i], buffer, strlen(buffer));
                if((n < 0) | (m < 0)){
                    error("Writing failed");
                }
            }
            pthread_mutex_unlock(&pjob_data->socketids_changingMutex);
            printf("%s%s", name, buffer);
        }
        delete_socket(newsockfd, pjob_data);
        pthread_exit( NULL );
    }
    
    
    void* job_write(void* args){
        struct JOB_INFO* job_data = (struct JOB_INFO*)(args);
        fprintf(plogfile, "Started writing thread...\n");
        ssize_t n; //Error catching variable
        ssize_t m; //Error catching variable
        char buffer[BUFLEN];
        char* name = "Server: \0";
    
    
        while(!job_data->endprogram) {
            fgets(buffer, BUFLEN, stdin);
    
    
            pthread_mutex_lock(&job_data->socketids_changingMutex);
            for(int i = 0; i < job_data->open_cnncts; i++){
                m = write(job_data->socket_ids[i], name,  strlen(name));
                n = write(job_data->socket_ids[i], buffer, strlen(buffer));
                if((n < 0) | (m < 0)){
                    printf("Writing failed");
                }
            }
            pthread_mutex_unlock(&job_data->socketids_changingMutex);
            if(strcmp("Bye\n", buffer) == 0){
                exit(EXIT_SUCCESS);
            }
        }
        job_data->endprogram = true;
        pthread_exit( NULL );
    }
    
    
    void delete_socket(int socketid, struct JOB_INFO* pjob_data){
        bool found = false;
        for(int i = 0; i < pjob_data->open_cnncts; i++){
            if(found){
            	pjob_data->socket_ids[i-1] = pjob_data->socket_ids[i];
            }
            if(pjob_data->socket_ids[i] == socketid){
                close(socketid);
                found = true;
            }
        }
        if(found){
        	pjob_data->open_cnncts--;
        }
    }
    
    
    inline void setUpFileStream(int argc, char* argv[]){
        printf("Server started...\n");
        if(argc < 2){
            fprintf(stderr, "You must provide a port number");
            exit(EXIT_FAILURE);
        }
        if(argc == 3){
            plogfile = fopen(argv[2], "w");
        } else {
            plogfile = fopen("logfile.txt", "w");
        }
        stderr = plogfile;
    }
    
    
    inline int setUpConnections(struct SERVER_DATA* pserver_data, char portnumc[]){
        pserver_data->clilen = sizeof(pserver_data->cli_adr);
        bzero((char*)&(pserver_data->serv_add), sizeof(struct sockaddr_in));
    
    
        uint16_t portnum = (uint16_t)atoi(&portnumc[0]);
        pserver_data->serv_add.sin_family = AF_INET;
        pserver_data->serv_add.sin_addr.s_addr = INADDR_ANY;
        pserver_data->serv_add.sin_port = htons(portnum);
    
    
        int sockfd = socket(AF_INET, SOCK_STREAM, 0);
        if(sockfd < 0){
            error("Error opening socket.");
        }
    
    
        if(bind(sockfd, (struct sockaddr*) (&pserver_data->serv_add), sizeof(pserver_data->serv_add)) < 0){
            error("Binding failed.");
        }
        return sockfd;
    }
    I cannot make a compilation:

    make all
    Building target: Server
    Invoking: GCC C Linker
    gcc -o "Server" ./src/main.o -lpthread
    ./src/main.o: In function `main':
    /home/niclas/eclipse-workspace/Server/Debug/../src/main.c:46: undefined reference to `setUpFileStream'
    makefile:30: recipe for target 'Server' failed
    /home/niclas/eclipse-workspace/Server/Debug/../src/main.c:64: undefined reference to `setUpConnections'
    collect2: error: ld returned 1 exit status
    make: *** [Server] Error 1
    "make all" terminated with exit code 2. Build might be incomplete.


    14:04:26 Build Failed. 4 errors, 0 warnings. (took 481ms)


    WTF?!? Thre prototypes are correct.

  2. #2
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,738
    Delete all *.o files and try again. If you could show us your Makefile, the problem may be somewhere in there.

    EDIT: Wait, no, it seems like making the prototype inline makes the function invisible...
    Last edited by GReaper; 07-17-2019 at 06:32 AM.
    Devoted my life to programming...

  3. #3
    Registered User
    Join Date
    Feb 2019
    Posts
    69
    Quote Originally Posted by GReaper View Post
    Delete all *.o files and try again. If you could show us your Makefile, the problem may be somewhere in there.
    Sure - Eclipse created it:

    Code:
    ################################################################################
    # Automatically-generated file. Do not edit!
    ################################################################################
    
    
    -include ../makefile.init
    
    
    RM := rm -rf
    
    
    # All of the sources participating in the build are defined here
    -include sources.mk
    -include src/subdir.mk
    -include subdir.mk
    -include objects.mk
    
    
    ifneq ($(MAKECMDGOALS),clean)
    ifneq ($(strip $(C_DEPS)),)
    -include $(C_DEPS)
    endif
    endif
    
    
    -include ../makefile.defs
    
    
    # Add inputs and outputs from these tool invocations to the build variables 
    
    
    # All Target
    all: Server
    
    
    # Tool invocations
    Server: $(OBJS) $(USER_OBJS)
        @echo 'Building target: $@'
        @echo 'Invoking: GCC C Linker'
        gcc  -o "Server" $(OBJS) $(USER_OBJS) $(LIBS)
        @echo 'Finished building target: $@'
        @echo ' '
    
    
    # Other Targets
    clean:
        -$(RM) $(EXECUTABLES)$(OBJS)$(C_DEPS) Server
        -@echo ' '
    
    
    .PHONY: all clean dependents
    
    
    -include ../makefile.targets
    And this beauty will be generated as main.o

    Code:
    /home/niclas/eclipse-workspace/Server/Debug/src/main.o:     file format elf64-x86-64
    /home/niclas/eclipse-workspace/Server/Debug/src/main.o
    architecture: i386:x86-64, flags 0x00000011:
    HAS_RELOC, HAS_SYMS
    start address 0x0000000000000000
    
    
    Sections:
    Idx Name          Size      VMA               LMA               File off  Algn
      0 .group        0000000c  0000000000000000  0000000000000000  00000040  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
      1 .group        0000000c  0000000000000000  0000000000000000  0000004c  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
      2 .group        0000000c  0000000000000000  0000000000000000  00000058  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
      3 .group        0000000c  0000000000000000  0000000000000000  00000064  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
      4 .group        0000000c  0000000000000000  0000000000000000  00000070  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
      5 .group        0000000c  0000000000000000  0000000000000000  0000007c  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
      6 .group        0000000c  0000000000000000  0000000000000000  00000088  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
      7 .group        0000000c  0000000000000000  0000000000000000  00000094  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
      8 .group        0000000c  0000000000000000  0000000000000000  000000a0  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
      9 .group        0000000c  0000000000000000  0000000000000000  000000ac  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     10 .group        0000000c  0000000000000000  0000000000000000  000000b8  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     11 .group        0000000c  0000000000000000  0000000000000000  000000c4  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     12 .group        0000000c  0000000000000000  0000000000000000  000000d0  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     13 .group        0000000c  0000000000000000  0000000000000000  000000dc  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     14 .group        0000000c  0000000000000000  0000000000000000  000000e8  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     15 .group        0000000c  0000000000000000  0000000000000000  000000f4  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     16 .group        0000000c  0000000000000000  0000000000000000  00000100  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     17 .group        0000000c  0000000000000000  0000000000000000  0000010c  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     18 .group        0000000c  0000000000000000  0000000000000000  00000118  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     19 .group        0000000c  0000000000000000  0000000000000000  00000124  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     20 .group        0000000c  0000000000000000  0000000000000000  00000130  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     21 .group        0000000c  0000000000000000  0000000000000000  0000013c  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     22 .group        0000000c  0000000000000000  0000000000000000  00000148  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     23 .group        0000000c  0000000000000000  0000000000000000  00000154  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     24 .group        0000000c  0000000000000000  0000000000000000  00000160  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     25 .group        0000000c  0000000000000000  0000000000000000  0000016c  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     26 .group        0000000c  0000000000000000  0000000000000000  00000178  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     27 .group        0000000c  0000000000000000  0000000000000000  00000184  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     28 .group        0000000c  0000000000000000  0000000000000000  00000190  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     29 .group        0000000c  0000000000000000  0000000000000000  0000019c  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     30 .group        0000000c  0000000000000000  0000000000000000  000001a8  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     31 .group        0000000c  0000000000000000  0000000000000000  000001b4  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     32 .group        0000000c  0000000000000000  0000000000000000  000001c0  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     33 .group        0000000c  0000000000000000  0000000000000000  000001cc  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     34 .group        0000000c  0000000000000000  0000000000000000  000001d8  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     35 .group        0000000c  0000000000000000  0000000000000000  000001e4  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     36 .group        0000000c  0000000000000000  0000000000000000  000001f0  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     37 .group        0000000c  0000000000000000  0000000000000000  000001fc  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     38 .group        0000000c  0000000000000000  0000000000000000  00000208  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     39 .group        0000000c  0000000000000000  0000000000000000  00000214  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     40 .group        0000000c  0000000000000000  0000000000000000  00000220  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     41 .group        0000000c  0000000000000000  0000000000000000  0000022c  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     42 .group        0000000c  0000000000000000  0000000000000000  00000238  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     43 .group        0000000c  0000000000000000  0000000000000000  00000244  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     44 .group        0000000c  0000000000000000  0000000000000000  00000250  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     45 .group        0000000c  0000000000000000  0000000000000000  0000025c  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     46 .group        0000000c  0000000000000000  0000000000000000  00000268  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     47 .group        0000000c  0000000000000000  0000000000000000  00000274  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     48 .group        0000000c  0000000000000000  0000000000000000  00000280  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     49 .group        0000000c  0000000000000000  0000000000000000  0000028c  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     50 .group        0000000c  0000000000000000  0000000000000000  00000298  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     51 .group        0000000c  0000000000000000  0000000000000000  000002a4  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     52 .group        0000000c  0000000000000000  0000000000000000  000002b0  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     53 .group        0000000c  0000000000000000  0000000000000000  000002bc  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     54 .group        0000000c  0000000000000000  0000000000000000  000002c8  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     55 .group        0000000c  0000000000000000  0000000000000000  000002d4  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     56 .group        0000000c  0000000000000000  0000000000000000  000002e0  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     57 .group        0000000c  0000000000000000  0000000000000000  000002ec  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     58 .group        0000000c  0000000000000000  0000000000000000  000002f8  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     59 .group        0000000c  0000000000000000  0000000000000000  00000304  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     60 .group        0000000c  0000000000000000  0000000000000000  00000310  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     61 .group        0000000c  0000000000000000  0000000000000000  0000031c  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     62 .group        0000000c  0000000000000000  0000000000000000  00000328  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     63 .group        0000000c  0000000000000000  0000000000000000  00000334  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     64 .group        0000000c  0000000000000000  0000000000000000  00000340  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     65 .group        0000000c  0000000000000000  0000000000000000  0000034c  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     66 .group        0000000c  0000000000000000  0000000000000000  00000358  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     67 .group        0000000c  0000000000000000  0000000000000000  00000364  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     68 .group        0000000c  0000000000000000  0000000000000000  00000370  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     69 .group        0000000c  0000000000000000  0000000000000000  0000037c  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     70 .group        0000000c  0000000000000000  0000000000000000  00000388  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     71 .group        0000000c  0000000000000000  0000000000000000  00000394  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     72 .group        0000000c  0000000000000000  0000000000000000  000003a0  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     73 .group        0000000c  0000000000000000  0000000000000000  000003ac  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     74 .group        0000000c  0000000000000000  0000000000000000  000003b8  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     75 .group        0000000c  0000000000000000  0000000000000000  000003c4  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     76 .group        0000000c  0000000000000000  0000000000000000  000003d0  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     77 .group        0000000c  0000000000000000  0000000000000000  000003dc  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     78 .group        0000000c  0000000000000000  0000000000000000  000003e8  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     79 .group        0000000c  0000000000000000  0000000000000000  000003f4  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     80 .group        0000000c  0000000000000000  0000000000000000  00000400  2**2
                      CONTENTS, READONLY, GROUP, LINK_ONCE_DISCARD
     81 .text         00000776  0000000000000000  0000000000000000  0000040c  2**0
                      CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
     82 .data         00000000  0000000000000000  0000000000000000  00000b82  2**0
                      CONTENTS, ALLOC, LOAD, DATA
     83 .bss          00000000  0000000000000000  0000000000000000  00000b82  2**0
                      ALLOC
     84 .rodata       000000a0  0000000000000000  0000000000000000  00000b82  2**0
                      CONTENTS, ALLOC, LOAD, READONLY, DATA
     85 .debug_info   000009bc  0000000000000000  0000000000000000  00000c22  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
     86 .debug_abbrev 000001b4  0000000000000000  0000000000000000  000015de  2**0
                      CONTENTS, READONLY, DEBUGGING
     87 .debug_aranges 00000030  0000000000000000  0000000000000000  00001792  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
     88 .debug_macro  000004e6  0000000000000000  0000000000000000  000017c2  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
     89 .debug_macro  00000808  0000000000000000  0000000000000000  00001ca8  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
     90 .debug_macro  00000022  0000000000000000  0000000000000000  000024b0  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
     91 .debug_macro  00000010  0000000000000000  0000000000000000  000024d2  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
     92 .debug_macro  0000019e  0000000000000000  0000000000000000  000024e2  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
     93 .debug_macro  00000168  0000000000000000  0000000000000000  00002680  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
     94 .debug_macro  00000016  0000000000000000  0000000000000000  000027e8  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
     95 .debug_macro  0000004a  0000000000000000  0000000000000000  000027fe  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
     96 .debug_macro  00000058  0000000000000000  0000000000000000  00002848  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
     97 .debug_macro  00000034  0000000000000000  0000000000000000  000028a0  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
     98 .debug_macro  00000010  0000000000000000  0000000000000000  000028d4  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
     99 .debug_macro  00000097  0000000000000000  0000000000000000  000028e4  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    100 .debug_macro  0000005e  0000000000000000  0000000000000000  0000297b  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    101 .debug_macro  000000ee  0000000000000000  0000000000000000  000029d9  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    102 .debug_macro  00000016  0000000000000000  0000000000000000  00002ac7  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    103 .debug_macro  00000020  0000000000000000  0000000000000000  00002add  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    104 .debug_macro  00000028  0000000000000000  0000000000000000  00002afd  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    105 .debug_macro  00000058  0000000000000000  0000000000000000  00002b25  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    106 .debug_macro  00000010  0000000000000000  0000000000000000  00002b7d  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    107 .debug_macro  000001cc  0000000000000000  0000000000000000  00002b8d  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    108 .debug_macro  00000046  0000000000000000  0000000000000000  00002d59  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    109 .debug_macro  0000002e  0000000000000000  0000000000000000  00002d9f  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    110 .debug_macro  00000027  0000000000000000  0000000000000000  00002dcd  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    111 .debug_macro  0000003a  0000000000000000  0000000000000000  00002df4  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    112 .debug_macro  00000016  0000000000000000  0000000000000000  00002e2e  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    113 .debug_macro  00000097  0000000000000000  0000000000000000  00002e44  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    114 .debug_macro  00000052  0000000000000000  0000000000000000  00002edb  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    115 .debug_macro  0000004c  0000000000000000  0000000000000000  00002f2d  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    116 .debug_macro  0000002e  0000000000000000  0000000000000000  00002f79  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    117 .debug_macro  0000002e  0000000000000000  0000000000000000  00002fa7  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    118 .debug_macro  00000080  0000000000000000  0000000000000000  00002fd5  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    119 .debug_macro  00000028  0000000000000000  0000000000000000  00003055  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    120 .debug_macro  0000004c  0000000000000000  0000000000000000  0000307d  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    121 .debug_macro  00000012  0000000000000000  0000000000000000  000030c9  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    122 .debug_macro  00000012  0000000000000000  0000000000000000  000030db  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    123 .debug_macro  0000001c  0000000000000000  0000000000000000  000030ed  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    124 .debug_macro  00000028  0000000000000000  0000000000000000  00003109  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    125 .debug_macro  00000010  0000000000000000  0000000000000000  00003131  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    126 .debug_macro  0000004c  0000000000000000  0000000000000000  00003141  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    127 .debug_macro  00000022  0000000000000000  0000000000000000  0000318d  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    128 .debug_macro  00000010  0000000000000000  0000000000000000  000031af  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    129 .debug_macro  0000004c  0000000000000000  0000000000000000  000031bf  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    130 .debug_macro  0000001c  0000000000000000  0000000000000000  0000320b  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    131 .debug_macro  0000002e  0000000000000000  0000000000000000  00003227  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    132 .debug_macro  0000005e  0000000000000000  0000000000000000  00003255  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    133 .debug_macro  00000027  0000000000000000  0000000000000000  000032b3  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    134 .debug_macro  00000076  0000000000000000  0000000000000000  000032da  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    135 .debug_macro  00000017  0000000000000000  0000000000000000  00003350  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    136 .debug_macro  00000010  0000000000000000  0000000000000000  00003367  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    137 .debug_macro  00000010  0000000000000000  0000000000000000  00003377  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    138 .debug_macro  00000010  0000000000000000  0000000000000000  00003387  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    139 .debug_macro  00000010  0000000000000000  0000000000000000  00003397  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    140 .debug_macro  00000010  0000000000000000  0000000000000000  000033a7  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    141 .debug_macro  00000070  0000000000000000  0000000000000000  000033b7  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    142 .debug_macro  00000190  0000000000000000  0000000000000000  00003427  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    143 .debug_macro  0000004c  0000000000000000  0000000000000000  000035b7  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    144 .debug_macro  00000027  0000000000000000  0000000000000000  00003603  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    145 .debug_macro  0000004a  0000000000000000  0000000000000000  0000362a  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    146 .debug_macro  00000824  0000000000000000  0000000000000000  00003674  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    147 .debug_macro  00000020  0000000000000000  0000000000000000  00003e98  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    148 .debug_macro  00000010  0000000000000000  0000000000000000  00003eb8  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    149 .debug_macro  00000010  0000000000000000  0000000000000000  00003ec8  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    150 .debug_macro  0000003a  0000000000000000  0000000000000000  00003ed8  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    151 .debug_macro  000002f7  0000000000000000  0000000000000000  00003f12  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    152 .debug_macro  0000001c  0000000000000000  0000000000000000  00004209  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    153 .debug_macro  000000f9  0000000000000000  0000000000000000  00004225  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    154 .debug_macro  00000034  0000000000000000  0000000000000000  0000431e  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    155 .debug_macro  00000196  0000000000000000  0000000000000000  00004352  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    156 .debug_macro  0000004a  0000000000000000  0000000000000000  000044e8  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    157 .debug_macro  00000022  0000000000000000  0000000000000000  00004532  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    158 .debug_macro  0000038e  0000000000000000  0000000000000000  00004554  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    159 .debug_macro  000001c0  0000000000000000  0000000000000000  000048e2  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    160 .debug_macro  0000005f  0000000000000000  0000000000000000  00004aa2  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    161 .debug_macro  00000016  0000000000000000  0000000000000000  00004b01  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    162 .debug_macro  0000001c  0000000000000000  0000000000000000  00004b17  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    163 .debug_macro  0000005e  0000000000000000  0000000000000000  00004b33  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    164 .debug_macro  00000010  0000000000000000  0000000000000000  00004b91  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    165 .debug_macro  00000016  0000000000000000  0000000000000000  00004ba1  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    166 .debug_macro  00000058  0000000000000000  0000000000000000  00004bb7  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    167 .debug_macro  00000011  0000000000000000  0000000000000000  00004c0f  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    168 .debug_macro  00000094  0000000000000000  0000000000000000  00004c20  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    169 .debug_macro  00000022  0000000000000000  0000000000000000  00004cb4  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    170 .debug_line   000006ca  0000000000000000  0000000000000000  00004cd6  2**0
                      CONTENTS, RELOC, READONLY, DEBUGGING
    171 .debug_str    0000eab9  0000000000000000  0000000000000000  000053a0  2**0
                      CONTENTS, READONLY, DEBUGGING
    172 .comment      0000002c  0000000000000000  0000000000000000  00013e59  2**0
                      CONTENTS, READONLY
    173 .note.GNU-stack 00000000  0000000000000000  0000000000000000  00013e85  2**0
                      CONTENTS, READONLY
    174 .eh_frame     000000b0  0000000000000000  0000000000000000  00013e88  2**3
                      CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
    SYMBOL TABLE:
    0000000000000000 l    df *ABS*	0000000000000000 main.c
    0000000000000000 l    d  .text	0000000000000000 .text
    0000000000000000 l    d  .data	0000000000000000 .data
    0000000000000000 l    d  .bss	0000000000000000 .bss
    0000000000000000 l    d  .rodata	0000000000000000 .rodata
    0000000000000000 l    d  .debug_info	0000000000000000 .debug_info
    0000000000000000 l    d  .debug_abbrev	0000000000000000 .debug_abbrev
    0000000000000000 l    d  .debug_aranges	0000000000000000 .debug_aranges
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_line	0000000000000000 .debug_line
    0000000000000000 l    d  .debug_str	0000000000000000 .debug_str
    0000000000000000 l    d  .note.GNU-stack	0000000000000000 .note.GNU-stack
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .debug_macro	0000000000000000 .debug_macro
    0000000000000000 l    d  .eh_frame	0000000000000000 .eh_frame
    0000000000000000 l       .group	0000000000000000 wm4.0.95615acb7fdd2245926e9524be894509
    0000000000000000 l       .group	0000000000000000 wm4.stdcpredef.h.19.006d14bbbe0dc07ba9b1ce3fdc8e40d3
    0000000000000000 l       .group	0000000000000000 wm4.stdio.h.24.5c1b97eef3c86b7a2549420f69f4f128
    0000000000000000 l       .group	0000000000000000 wm4.features.h.19.1be55438336ba50251e758fdf3017259
    0000000000000000 l       .group	0000000000000000 wm4.cdefs.h.19.03c02fc74e2fa9127d728e4a4b2cb426
    0000000000000000 l       .group	0000000000000000 wm4.wordsize.h.4.baf119258a1e53d8dba67ceac44ab6bc
    0000000000000000 l       .group	0000000000000000 wm4.cdefs.h.450.b8b622c02668a696f36e4785e7471677
    0000000000000000 l       .group	0000000000000000 wm4.stubs64.h.10.918ceb5fa58268542bf143e4c1efbcf3
    0000000000000000 l       .group	0000000000000000 wm4.libcheaderstart.h.37.59f0e5f6a6103fb6c1d4abef1aacf8fb
    0000000000000000 l       .group	0000000000000000 wm4.stdio.h.31.e39a94e203ad4e1d978c0fc68ce016ee
    0000000000000000 l       .group	0000000000000000 wm4.stddef.h.187.2ff233552538c6ff9b8575ca8ea52cb3
    0000000000000000 l       .group	0000000000000000 wm4.types.h.98.2414c985b07b6bc05c8aeed70b12c683
    0000000000000000 l       .group	0000000000000000 wm4.typesizes.h.24.292526668b3d7d0c797f011b553fed17
    0000000000000000 l       .group	0000000000000000 wm4._G_config.h.5.13ce51c385dcc835f259e1016a4e99c8
    0000000000000000 l       .group	0000000000000000 wm4.stddef.h.238.04cc7214bceba497b20d15c10fd97511
    0000000000000000 l       .group	0000000000000000 wm4._G_config.h.51.34b843a0419f1549acdb14c3c66edb4e
    0000000000000000 l       .group	0000000000000000 wm4.libio.h.37.a10f23ff0c406c3c402d761ed92ba872
    0000000000000000 l       .group	0000000000000000 wm4.stdarg.h.34.3a23a216c0c293b3d2ea2e89281481e6
    0000000000000000 l       .group	0000000000000000 wm4.libio.h.55.2264ffedaa8d3f567283a630afe6e738
    0000000000000000 l       .group	0000000000000000 wm4.stdio.h.47.29bae166896130ef16bc0206bf46f074
    0000000000000000 l       .group	0000000000000000 wm4.stdio_lim.h.19.e4b00b560d878dcfbc6635b3406640c5
    0000000000000000 l       .group	0000000000000000 wm4.stdio.h.139.81d529aa6b2372d0b323a208652caa26
    0000000000000000 l       .group	0000000000000000 wm4.libcheaderstart.h.31.80e4950905f3c07b663af4c98f48a7c0
    0000000000000000 l       .group	0000000000000000 wm4.stdlib.h.28.2cffa49d94c5d85f4538f55f7b59771d
    0000000000000000 l       .group	0000000000000000 wm4.stddef.h.238.5c3398669aab31a6fd426ff45ca6ab2c
    0000000000000000 l       .group	0000000000000000 wm4.waitflags.h.25.41934de4af99038521c2782f418699b1
    0000000000000000 l       .group	0000000000000000 wm4.waitstatus.h.28.93f167f49d64e2b9b99f98d1162a93bf
    0000000000000000 l       .group	0000000000000000 wm4.stdlib.h.43.9fa4f727a2f1cb8d2450a574c9195553
    0000000000000000 l       .group	0000000000000000 wm4.floatn.h.20.80c7cf8a8dfad237004b28d051d5afda
    0000000000000000 l       .group	0000000000000000 wm4.floatncommon.h.34.aa3f5ad8d18e646b8f6ecd3758c3e3df
    0000000000000000 l       .group	0000000000000000 wm4.stdlib.h.71.2927e068ec678159b4f68ec2f089f7e6
    0000000000000000 l       .group	0000000000000000 wm4.types.h.23.2d1642c69c19460d2bcb07f6ddc4852a
    0000000000000000 l       .group	0000000000000000 wm4.stddef.h.238.847b6907dabda77be90a9ab7ad789e2e
    0000000000000000 l       .group	0000000000000000 wm4.types.h.175.e5c9810a2b35492c3aae80a957d5f393
    0000000000000000 l       .group	0000000000000000 wm4.endian.h.19.ff00c9c0f5e9f9a9719c5de76ace57b4
    0000000000000000 l       .group	0000000000000000 wm4.endian.h.41.24cced64aef71195a51d4daa8e4f4a95
    0000000000000000 l       .group	0000000000000000 wm4.byteswap.h.38.11ee5fdc0f6cc53a16c505b9233cecef
    0000000000000000 l       .group	0000000000000000 wm4.endian.h.64.2d674ba9109a6d52d2a5fe14c9acf78f
    0000000000000000 l       .group	0000000000000000 wm4.select.h.28.eb2f3debdbcffd1442ebddaebc4fb6ff
    0000000000000000 l       .group	0000000000000000 wm4.__sigset_t.h.2.6b1ab6ff3d7b8fd9c0c42b0d80afbd80
    0000000000000000 l       .group	0000000000000000 wm4.select.h.44.887a4ff60aa97fcd9c1be017735e1675
    0000000000000000 l       .group	0000000000000000 wm4.sysmacros.h.30.1c12047a18b4d58a289b6868436f8a56
    0000000000000000 l       .group	0000000000000000 wm4.sysmacros.h.20.f376cf0587998a15dd322284414521cd
    0000000000000000 l       .group	0000000000000000 wm4.sysmacros.h.52.9e2620974975a46f97a39f84517c176e
    0000000000000000 l       .group	0000000000000000 wm4.types.h.206.18407d3836aebf354b893f605f14800a
    0000000000000000 l       .group	0000000000000000 wm4.pthreadtypesarch.h.25.8051e5758fcf2d82059ce10b4877106a
    0000000000000000 l       .group	0000000000000000 wm4.threadsharedtypes.h.97.180e0e7d7a69e8d1b13330d1144ca2eb
    0000000000000000 l       .group	0000000000000000 wm4.alloca.h.19.edefa922a76c1cbaaf1e416903ba2d1c
    0000000000000000 l       .group	0000000000000000 wm4.alloca.h.29.156e12058824cc23d961c4d3b13031f6
    0000000000000000 l       .group	0000000000000000 wm4.string.h.23.93403f89af7dba8212345449bb14b09d
    0000000000000000 l       .group	0000000000000000 wm4.string.h.31.e39a94e203ad4e1d978c0fc68ce016ee
    0000000000000000 l       .group	0000000000000000 wm4.strings.h.19.a259f126920b1bb5ef76bc62b3984a3c
    0000000000000000 l       .group	0000000000000000 wm4.unistd.h.23.a608ae63b1bee638e80d9e2a8598bd8e
    0000000000000000 l       .group	0000000000000000 wm4.posix_opt.h.20.8587404e00639bdcc5f6a74591f95259
    0000000000000000 l       .group	0000000000000000 wm4.environments.h.56.c5802092ccc191baeb41f8d355bb878f
    0000000000000000 l       .group	0000000000000000 wm4.unistd.h.213.4c582e35260d661b081322974b7c1e74
    0000000000000000 l       .group	0000000000000000 wm4.unistd.h.259.cd5f00c2d63db91fbd4bc06478f562cf
    0000000000000000 l       .group	0000000000000000 wm4.confname.h.27.6b00117a32f457cc72e5ac810a9adade
    0000000000000000 l       .group	0000000000000000 wm4.unistd.h.1076.2218220186d77e411760038aa22c76e2
    0000000000000000 l       .group	0000000000000000 wm4.struct_iovec.h.20.64e3c6cefa401374951f8ea68dba2a0a
    0000000000000000 l       .group	0000000000000000 wm4.socket.h.20.08bd3c6531df306b747ad30a61a6808b
    0000000000000000 l       .group	0000000000000000 wm4.socket_type.h.28.5a26c72aa620989d56a4a7f4b904e12a
    0000000000000000 l       .group	0000000000000000 wm4.socket.h.41.58034c68121eed6b84dfb47d72346df4
    0000000000000000 l       .group	0000000000000000 wm4.sockaddr.h.24.0f72ba81a432198016bbf84b8b7dd664
    0000000000000000 l       .group	0000000000000000 wm4.socket.h.184.98f70e1a54051f1e783bf42813a4b70b
    0000000000000000 l       .group	0000000000000000 wm4.sockios.h.3.a7c20b8c160ec58dc6df7f36d7878e4c
    0000000000000000 l       .group	0000000000000000 wm4.socket.h.8.a8331f2763b27784f81fda2e9f34ff81
    0000000000000000 l       .group	0000000000000000 wm4.socket.h.423.ba4ccc582511d25b44ead05c4489c13e
    0000000000000000 l       .group	0000000000000000 wm4.socket.h.44.faa1ad965e926697db19cbab56850849
    0000000000000000 l       .group	0000000000000000 wm4.in.h.41.c3700c5473b99baebf51d490c7e98074
    0000000000000000 l       .group	0000000000000000 wm4.in.h.43.780762d8f5f7d3199a6f663745c8776d
    0000000000000000 l       .group	0000000000000000 wm4.in.h.410.2062ddcdf15cd60beefe9cddbd3dc10e
    0000000000000000 l       .group	0000000000000000 wm4.sched.h.20.a907bc5f65174526cd045cceda75e484
    0000000000000000 l       .group	0000000000000000 wm4.sched.h.21.1f3eb4a9831fcf790f46c9e4cef5237a
    0000000000000000 l       .group	0000000000000000 wm4.cpuset.h.21.819c5d0fbb06c94c4652b537360ff25a
    0000000000000000 l       .group	0000000000000000 wm4.sched.h.47.6980b6f6208683ca72242049c0cd7055
    0000000000000000 l       .group	0000000000000000 wm4.time.h.23.18ede267f3a48794bef4705df80339de
    0000000000000000 l       .group	0000000000000000 wm4.time.h.24.2a1e1114b014e13763222c5cd6400760
    0000000000000000 l       .group	0000000000000000 wm4.time.h.65.e980eed03a6ec8365dbd0bcb761e4251
    0000000000000000 l       .group	0000000000000000 wm4.pthread.h.36.c7523f4e094a5995b93b70a68b2ccc77
    0000000000000000 l       .group	0000000000000000 wm4.stdbool.h.29.07dce69c3b78884144b7f7bd19483461
    0000000000000000 l    d  .comment	0000000000000000 .comment
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000000 l    d  .group	0000000000000000 .group
    0000000000000008       O *COM*	0000000000000008 plogfile
    0000000000000000 g     F .text	0000000000000022 error
    0000000000000000         *UND*	0000000000000000 _GLOBAL_OFFSET_TABLE_
    0000000000000000         *UND*	0000000000000000 perror
    0000000000000000         *UND*	0000000000000000 exit
    0000000000000002       O *COM*	0000000000000002 portnum
    0000000000000022 g     F .text	000000000000025b main
    0000000000000000         *UND*	0000000000000000 setUpFileStream
    0000000000000000         *UND*	0000000000000000 pthread_mutex_init
    000000000000050a g     F .text	00000000000001da job_write
    0000000000000000         *UND*	0000000000000000 pthread_create
    0000000000000000         *UND*	0000000000000000 setUpConnections
    0000000000000000         *UND*	0000000000000000 fwrite
    0000000000000000         *UND*	0000000000000000 listen
    0000000000000000         *UND*	0000000000000000 malloc
    0000000000000000         *UND*	0000000000000000 accept
    0000000000000000         *UND*	0000000000000000 pthread_mutex_lock
    000000000000027d g     F .text	000000000000028d job_read
    0000000000000000         *UND*	0000000000000000 pthread_mutex_unlock
    0000000000000000         *UND*	0000000000000000 close
    0000000000000000         *UND*	0000000000000000 pthread_join
    0000000000000000         *UND*	0000000000000000 pthread_mutex_destroy
    0000000000000000         *UND*	0000000000000000 __stack_chk_fail
    0000000000000000         *UND*	0000000000000000 sprintf
    0000000000000000         *UND*	0000000000000000 bzero
    0000000000000000         *UND*	0000000000000000 read
    0000000000000000         *UND*	0000000000000000 printf
    00000000000006e4 g     F .text	0000000000000092 delete_socket
    0000000000000000         *UND*	0000000000000000 pthread_exit
    0000000000000000         *UND*	0000000000000000 strlen
    0000000000000000         *UND*	0000000000000000 write
    0000000000000000         *UND*	0000000000000000 stdin
    0000000000000000         *UND*	0000000000000000 fgets
    0000000000000000         *UND*	0000000000000000 strcmp
    
    
    
    
    
    
    Disassembly of section .text:
    
    
    0000000000000000 <error>:
    void* job_write(void*);
    void error(const char* msg);
    inline void setUpFileStream(int argc, char* argv[]);
    inline int setUpConnections(struct SERVER_INFO* pserver_data, char* portnumc);
    
    
    void error(const char* msg){
       0:	55                   	push   %rbp
       1:	48 89 e5             	mov    %rsp,%rbp
       4:	48 83 ec 10          	sub    $0x10,%rsp
       8:	48 89 7d f8          	mov    %rdi,-0x8(%rbp)
        perror(msg);
       c:	48 8b 45 f8          	mov    -0x8(%rbp),%rax
      10:	48 89 c7             	mov    %rax,%rdi
      13:	e8 00 00 00 00       	callq  18 <error+0x18>
    			14: R_X86_64_PLT32	perror-0x4
        exit(1);
      18:	bf 01 00 00 00       	mov    $0x1,%edi
      1d:	e8 00 00 00 00       	callq  22 <main>
    			1e: R_X86_64_PLT32	exit-0x4
    
    
    0000000000000022 <main>:
    }
    uint16_t portnum;
    
    
    int main(int argc, char* argv[]) {
      22:	55                   	push   %rbp
      23:	48 89 e5             	mov    %rsp,%rbp
      26:	53                   	push   %rbx
      27:	48 81 ec a8 02 00 00 	sub    $0x2a8,%rsp
      2e:	89 bd 5c fd ff ff    	mov    %edi,-0x2a4(%rbp)
      34:	48 89 b5 50 fd ff ff 	mov    %rsi,-0x2b0(%rbp)
      3b:	64 48 8b 04 25 28 00 	mov    %fs:0x28,%rax
      42:	00 00 
      44:	48 89 45 e8          	mov    %rax,-0x18(%rbp)
      48:	31 c0                	xor    %eax,%eax
    	setUpFileStream(argc, argv);
      4a:	48 8b 95 50 fd ff ff 	mov    -0x2b0(%rbp),%rdx
      51:	8b 85 5c fd ff ff    	mov    -0x2a4(%rbp),%eax
      57:	48 89 d6             	mov    %rdx,%rsi
      5a:	89 c7                	mov    %eax,%edi
      5c:	e8 00 00 00 00       	callq  61 <main+0x3f>
    			5d: R_X86_64_PLT32	setUpFileStream-0x4
    
    
    	int sockfd;
        struct JOB_INFO job_data;
        job_data.endprogram = false;
      61:	c6 45 b0 00          	movb   $0x0,-0x50(%rbp)
        job_data.open_cnncts = 0;
      65:	c7 45 b4 00 00 00 00 	movl   $0x0,-0x4c(%rbp)
    
    
    
    
        struct SERVER_INFO server_data;
        //Create mutex
        if(pthread_mutex_init(&(job_data.socketids_changingMutex), NULL) < 0){
      6c:	48 8d 85 b0 fd ff ff 	lea    -0x250(%rbp),%rax
      73:	48 05 08 02 00 00    	add    $0x208,%rax
      79:	be 00 00 00 00       	mov    $0x0,%esi
      7e:	48 89 c7             	mov    %rax,%rdi
      81:	e8 00 00 00 00       	callq  86 <main+0x64>
    			82: R_X86_64_PLT32	pthread_mutex_init-0x4
      86:	85 c0                	test   %eax,%eax
      88:	79 0c                	jns    96 <main+0x74>
            error("Could not initialize Mutex");
      8a:	48 8d 3d 00 00 00 00 	lea    0x0(%rip),%rdi        # 91 <main+0x6f>
    			8d: R_X86_64_PC32	.rodata-0x4
      91:	e8 00 00 00 00       	callq  96 <main+0x74>
    			92: R_X86_64_PC32	error-0x4
        }
        //Initialzing threads and create writethread
        pthread_create(&server_data.writethread, NULL, job_write, (void*)&job_data);
      96:	48 8d 85 b0 fd ff ff 	lea    -0x250(%rbp),%rax
      9d:	48 8d 95 80 fd ff ff 	lea    -0x280(%rbp),%rdx
      a4:	48 8d 7a 28          	lea    0x28(%rdx),%rdi
      a8:	48 89 c1             	mov    %rax,%rcx
      ab:	48 8d 15 00 00 00 00 	lea    0x0(%rip),%rdx        # b2 <main+0x90>
    			ae: R_X86_64_PC32	job_write-0x4
      b2:	be 00 00 00 00       	mov    $0x0,%esi
      b7:	e8 00 00 00 00       	callq  bc <main+0x9a>
    			b8: R_X86_64_PLT32	pthread_create-0x4
    
    
    
    
        //Setup for connections
        sockfd = setUpConnections(&server_data, argv[2]);
      bc:	48 8b 85 50 fd ff ff 	mov    -0x2b0(%rbp),%rax
      c3:	48 83 c0 10          	add    $0x10,%rax
      c7:	48 8b 10             	mov    (%rax),%rdx
      ca:	48 8d 85 80 fd ff ff 	lea    -0x280(%rbp),%rax
      d1:	48 89 d6             	mov    %rdx,%rsi
      d4:	48 89 c7             	mov    %rax,%rdi
      d7:	e8 00 00 00 00       	callq  dc <main+0xba>
    			d8: R_X86_64_PLT32	setUpConnections-0x4
      dc:	89 85 6c fd ff ff    	mov    %eax,-0x294(%rbp)
    
    
        fprintf(plogfile,"Listening....");
      e2:	48 8b 05 00 00 00 00 	mov    0x0(%rip),%rax        # e9 <main+0xc7>
    			e5: R_X86_64_PC32	plogfile-0x4
      e9:	48 89 c1             	mov    %rax,%rcx
      ec:	ba 0d 00 00 00       	mov    $0xd,%edx
      f1:	be 01 00 00 00       	mov    $0x1,%esi
      f6:	48 8d 3d 00 00 00 00 	lea    0x0(%rip),%rdi        # fd <main+0xdb>
    			f9: R_X86_64_PC32	.rodata+0x17
      fd:	e8 00 00 00 00       	callq  102 <main+0xe0>
    			fe: R_X86_64_PLT32	fwrite-0x4
        listen(sockfd, MAX_CONNECTIONS);
     102:	8b 85 6c fd ff ff    	mov    -0x294(%rbp),%eax
     108:	be 80 00 00 00       	mov    $0x80,%esi
     10d:	89 c7                	mov    %eax,%edi
     10f:	e8 00 00 00 00       	callq  114 <main+0xf2>
    			110: R_X86_64_PLT32	listen-0x4
    
    
        for(job_data.open_cnncts = 0; (!job_data.endprogram); /*mutex needs to be set*/ ){
     114:	c7 45 b4 00 00 00 00 	movl   $0x0,-0x4c(%rbp)
     11b:	e9 f1 00 00 00       	jmpq   211 <main+0x1ef>
    
    
        	void** p = malloc(2*sizeof(void*));
     120:	bf 10 00 00 00       	mov    $0x10,%edi
     125:	e8 00 00 00 00       	callq  12a <main+0x108>
    			126: R_X86_64_PLT32	malloc-0x4
     12a:	48 89 85 78 fd ff ff 	mov    %rax,-0x288(%rbp)
        	p[0] = (void*)&job_data;
     131:	48 8b 85 78 fd ff ff 	mov    -0x288(%rbp),%rax
     138:	48 8d 95 b0 fd ff ff 	lea    -0x250(%rbp),%rdx
     13f:	48 89 10             	mov    %rdx,(%rax)
        	p[1] = (void*)&(job_data.socket_ids[job_data.open_cnncts]);
     142:	8b 4d b4             	mov    -0x4c(%rbp),%ecx
     145:	48 8b 85 78 fd ff ff 	mov    -0x288(%rbp),%rax
     14c:	48 83 c0 08          	add    $0x8,%rax
     150:	48 8d 95 b0 fd ff ff 	lea    -0x250(%rbp),%rdx
     157:	48 63 c9             	movslq %ecx,%rcx
     15a:	48 c1 e1 02          	shl    $0x2,%rcx
     15e:	48 01 ca             	add    %rcx,%rdx
     161:	48 89 10             	mov    %rdx,(%rax)
        	job_data.socket_ids[job_data.open_cnncts] = accept(sockfd, (struct sockaddr*) &server_data.cli_adr, &server_data.clilen);
     164:	8b 5d b4             	mov    -0x4c(%rbp),%ebx
     167:	48 8d 85 80 fd ff ff 	lea    -0x280(%rbp),%rax
     16e:	48 8d 50 20          	lea    0x20(%rax),%rdx
     172:	48 8d 85 80 fd ff ff 	lea    -0x280(%rbp),%rax
     179:	48 8d 48 10          	lea    0x10(%rax),%rcx
     17d:	8b 85 6c fd ff ff    	mov    -0x294(%rbp),%eax
     183:	48 89 ce             	mov    %rcx,%rsi
     186:	89 c7                	mov    %eax,%edi
     188:	e8 00 00 00 00       	callq  18d <main+0x16b>
    			189: R_X86_64_PLT32	accept-0x4
     18d:	89 c2                	mov    %eax,%edx
     18f:	48 63 c3             	movslq %ebx,%rax
     192:	89 94 85 b0 fd ff ff 	mov    %edx,-0x250(%rbp,%rax,4)
            pthread_mutex_lock(&job_data.socketids_changingMutex);
     199:	48 8d 85 b0 fd ff ff 	lea    -0x250(%rbp),%rax
     1a0:	48 05 08 02 00 00    	add    $0x208,%rax
     1a6:	48 89 c7             	mov    %rax,%rdi
     1a9:	e8 00 00 00 00       	callq  1ae <main+0x18c>
    			1aa: R_X86_64_PLT32	pthread_mutex_lock-0x4
            fprintf(plogfile,"Client connected.\n");
     1ae:	48 8b 05 00 00 00 00 	mov    0x0(%rip),%rax        # 1b5 <main+0x193>
    			1b1: R_X86_64_PC32	plogfile-0x4
     1b5:	48 89 c1             	mov    %rax,%rcx
     1b8:	ba 12 00 00 00       	mov    $0x12,%edx
     1bd:	be 01 00 00 00       	mov    $0x1,%esi
     1c2:	48 8d 3d 00 00 00 00 	lea    0x0(%rip),%rdi        # 1c9 <main+0x1a7>
    			1c5: R_X86_64_PC32	.rodata+0x25
     1c9:	e8 00 00 00 00       	callq  1ce <main+0x1ac>
    			1ca: R_X86_64_PLT32	fwrite-0x4
            pthread_t thread;
            pthread_create(&thread , NULL, job_read, p);
     1ce:	48 8b 95 78 fd ff ff 	mov    -0x288(%rbp),%rdx
     1d5:	48 8d 85 70 fd ff ff 	lea    -0x290(%rbp),%rax
     1dc:	48 89 d1             	mov    %rdx,%rcx
     1df:	48 8d 15 00 00 00 00 	lea    0x0(%rip),%rdx        # 1e6 <main+0x1c4>
    			1e2: R_X86_64_PC32	job_read-0x4
     1e6:	be 00 00 00 00       	mov    $0x0,%esi
     1eb:	48 89 c7             	mov    %rax,%rdi
     1ee:	e8 00 00 00 00       	callq  1f3 <main+0x1d1>
    			1ef: R_X86_64_PLT32	pthread_create-0x4
            job_data.open_cnncts++;
     1f3:	8b 45 b4             	mov    -0x4c(%rbp),%eax
     1f6:	83 c0 01             	add    $0x1,%eax
     1f9:	89 45 b4             	mov    %eax,-0x4c(%rbp)
            pthread_mutex_unlock(&job_data.socketids_changingMutex);
     1fc:	48 8d 85 b0 fd ff ff 	lea    -0x250(%rbp),%rax
     203:	48 05 08 02 00 00    	add    $0x208,%rax
     209:	48 89 c7             	mov    %rax,%rdi
     20c:	e8 00 00 00 00       	callq  211 <main+0x1ef>
    			20d: R_X86_64_PLT32	pthread_mutex_unlock-0x4
        for(job_data.open_cnncts = 0; (!job_data.endprogram); /*mutex needs to be set*/ ){
     211:	0f b6 45 b0          	movzbl -0x50(%rbp),%eax
     215:	83 f0 01             	xor    $0x1,%eax
     218:	84 c0                	test   %al,%al
     21a:	0f 85 00 ff ff ff    	jne    120 <main+0xfe>
        }
    
    
        job_data.endprogram = true;
     220:	c6 45 b0 01          	movb   $0x1,-0x50(%rbp)
        close(sockfd);
     224:	8b 85 6c fd ff ff    	mov    -0x294(%rbp),%eax
     22a:	89 c7                	mov    %eax,%edi
     22c:	e8 00 00 00 00       	callq  231 <main+0x20f>
    			22d: R_X86_64_PLT32	close-0x4
    
    
        pthread_join(server_data.writethread, NULL);
     231:	48 8b 85 a8 fd ff ff 	mov    -0x258(%rbp),%rax
     238:	be 00 00 00 00       	mov    $0x0,%esi
     23d:	48 89 c7             	mov    %rax,%rdi
     240:	e8 00 00 00 00       	callq  245 <main+0x223>
    			241: R_X86_64_PLT32	pthread_join-0x4
        pthread_mutex_destroy(&job_data.socketids_changingMutex);
     245:	48 8d 85 b0 fd ff ff 	lea    -0x250(%rbp),%rax
     24c:	48 05 08 02 00 00    	add    $0x208,%rax
     252:	48 89 c7             	mov    %rax,%rdi
     255:	e8 00 00 00 00       	callq  25a <main+0x238>
    			256: R_X86_64_PLT32	pthread_mutex_destroy-0x4
        return EXIT_SUCCESS;
     25a:	b8 00 00 00 00       	mov    $0x0,%eax
    }
     25f:	48 8b 5d e8          	mov    -0x18(%rbp),%rbx
     263:	64 48 33 1c 25 28 00 	xor    %fs:0x28,%rbx
     26a:	00 00 
     26c:	74 05                	je     273 <main+0x251>
     26e:	e8 00 00 00 00       	callq  273 <main+0x251>
    			26f: R_X86_64_PLT32	__stack_chk_fail-0x4
     273:	48 81 c4 a8 02 00 00 	add    $0x2a8,%rsp
     27a:	5b                   	pop    %rbx
     27b:	5d                   	pop    %rbp
     27c:	c3                   	retq   
    
    
    000000000000027d <job_read>:
    
    
    void* job_read(void * p){
     27d:	55                   	push   %rbp
     27e:	48 89 e5             	mov    %rsp,%rbp
     281:	48 81 ec 70 01 00 00 	sub    $0x170,%rsp
     288:	48 89 bd 98 fe ff ff 	mov    %rdi,-0x168(%rbp)
     28f:	64 48 8b 04 25 28 00 	mov    %fs:0x28,%rax
     296:	00 00 
     298:	48 89 45 f8          	mov    %rax,-0x8(%rbp)
     29c:	31 c0                	xor    %eax,%eax
    
    
    	char** pc = (char**)p; //allow pointer arithmetic
     29e:	48 8b 85 98 fe ff ff 	mov    -0x168(%rbp),%rax
     2a5:	48 89 85 b0 fe ff ff 	mov    %rax,-0x150(%rbp)
        int newsockfd = *((int*) (pc[0]));  //Casting
     2ac:	48 8b 85 b0 fe ff ff 	mov    -0x150(%rbp),%rax
     2b3:	48 8b 00             	mov    (%rax),%rax
     2b6:	8b 00                	mov    (%rax),%eax
     2b8:	89 85 ac fe ff ff    	mov    %eax,-0x154(%rbp)
        struct JOB_INFO* pjob_data = ((struct JOB_INFO*) (pc[1])); //Casting
     2be:	48 8b 85 b0 fe ff ff 	mov    -0x150(%rbp),%rax
     2c5:	48 8b 40 08          	mov    0x8(%rax),%rax
     2c9:	48 89 85 b8 fe ff ff 	mov    %rax,-0x148(%rbp)
    
    
        ssize_t n; //Error catching variable
        ssize_t m; //Error catching variable
        char buffer[BUFLEN];
        char name[MAX_NAME_LENGTH];
        sprintf(name, "Client %d: ", newsockfd);
     2d0:	8b 95 ac fe ff ff    	mov    -0x154(%rbp),%edx
     2d6:	48 8d 85 d0 fe ff ff 	lea    -0x130(%rbp),%rax
     2dd:	48 8d 35 00 00 00 00 	lea    0x0(%rip),%rsi        # 2e4 <job_read+0x67>
    			2e0: R_X86_64_PC32	.rodata+0x38
     2e4:	48 89 c7             	mov    %rax,%rdi
     2e7:	b8 00 00 00 00       	mov    $0x0,%eax
     2ec:	e8 00 00 00 00       	callq  2f1 <job_read+0x74>
    			2ed: R_X86_64_PLT32	sprintf-0x4
    
    
        while(!pjob_data->endprogram){
     2f1:	e9 da 01 00 00       	jmpq   4d0 <job_read+0x253>
            bzero(buffer, BUFLEN);
     2f6:	48 8d 85 f0 fe ff ff 	lea    -0x110(%rbp),%rax
     2fd:	be ff 00 00 00       	mov    $0xff,%esi
     302:	48 89 c7             	mov    %rax,%rdi
     305:	e8 00 00 00 00       	callq  30a <job_read+0x8d>
    			306: R_X86_64_PLT32	bzero-0x4
            n = read(newsockfd, buffer, BUFLEN);
     30a:	48 8d 8d f0 fe ff ff 	lea    -0x110(%rbp),%rcx
     311:	8b 85 ac fe ff ff    	mov    -0x154(%rbp),%eax
     317:	ba ff 00 00 00       	mov    $0xff,%edx
     31c:	48 89 ce             	mov    %rcx,%rsi
     31f:	89 c7                	mov    %eax,%edi
     321:	e8 00 00 00 00       	callq  326 <job_read+0xa9>
    			322: R_X86_64_PLT32	read-0x4
     326:	48 89 85 c0 fe ff ff 	mov    %rax,-0x140(%rbp)
    
    
            if(n<0){
     32d:	48 83 bd c0 fe ff ff 	cmpq   $0x0,-0x140(%rbp)
     334:	00 
     335:	79 27                	jns    35e <job_read+0xe1>
                printf("Buffer: %s", buffer);
     337:	48 8d 85 f0 fe ff ff 	lea    -0x110(%rbp),%rax
     33e:	48 89 c6             	mov    %rax,%rsi
     341:	48 8d 3d 00 00 00 00 	lea    0x0(%rip),%rdi        # 348 <job_read+0xcb>
    			344: R_X86_64_PC32	.rodata+0x44
     348:	b8 00 00 00 00       	mov    $0x0,%eax
     34d:	e8 00 00 00 00       	callq  352 <job_read+0xd5>
    			34e: R_X86_64_PLT32	printf-0x4
                error("Reading Failed");
     352:	48 8d 3d 00 00 00 00 	lea    0x0(%rip),%rdi        # 359 <job_read+0xdc>
    			355: R_X86_64_PC32	.rodata+0x4f
     359:	e8 00 00 00 00       	callq  35e <job_read+0xe1>
    			35a: R_X86_64_PC32	error-0x4
            }
            if(n == 0){
     35e:	48 83 bd c0 fe ff ff 	cmpq   $0x0,-0x140(%rbp)
     365:	00 
     366:	75 21                	jne    389 <job_read+0x10c>
                delete_socket(newsockfd, pjob_data);
     368:	48 8b 95 b8 fe ff ff 	mov    -0x148(%rbp),%rdx
     36f:	8b 85 ac fe ff ff    	mov    -0x154(%rbp),%eax
     375:	48 89 d6             	mov    %rdx,%rsi
     378:	89 c7                	mov    %eax,%edi
     37a:	e8 00 00 00 00       	callq  37f <job_read+0x102>
    			37b: R_X86_64_PC32	delete_socket-0x4
                pthread_exit(NULL);
     37f:	bf 00 00 00 00       	mov    $0x0,%edi
     384:	e8 00 00 00 00       	callq  389 <job_read+0x10c>
    			385: R_X86_64_PLT32	pthread_exit-0x4
            }
    
    
            pthread_mutex_lock(&pjob_data->socketids_changingMutex);
     389:	48 8b 85 b8 fe ff ff 	mov    -0x148(%rbp),%rax
     390:	48 05 08 02 00 00    	add    $0x208,%rax
     396:	48 89 c7             	mov    %rax,%rdi
     399:	e8 00 00 00 00       	callq  39e <job_read+0x121>
    			39a: R_X86_64_PLT32	pthread_mutex_lock-0x4
            for(int i = 0; i < pjob_data->open_cnncts; i++){
     39e:	c7 85 a8 fe ff ff 00 	movl   $0x0,-0x158(%rbp)
     3a5:	00 00 00 
     3a8:	e9 d3 00 00 00       	jmpq   480 <job_read+0x203>
                if(pjob_data->socket_ids[i] == newsockfd){
     3ad:	48 8b 85 b8 fe ff ff 	mov    -0x148(%rbp),%rax
     3b4:	8b 95 a8 fe ff ff    	mov    -0x158(%rbp),%edx
     3ba:	48 63 d2             	movslq %edx,%rdx
     3bd:	8b 04 90             	mov    (%rax,%rdx,4),%eax
     3c0:	39 85 ac fe ff ff    	cmp    %eax,-0x154(%rbp)
     3c6:	0f 84 ac 00 00 00    	je     478 <job_read+0x1fb>
                    continue;
                }
                m = write(pjob_data->socket_ids[i], name, strlen(name));
     3cc:	48 8d 85 d0 fe ff ff 	lea    -0x130(%rbp),%rax
     3d3:	48 89 c7             	mov    %rax,%rdi
     3d6:	e8 00 00 00 00       	callq  3db <job_read+0x15e>
    			3d7: R_X86_64_PLT32	strlen-0x4
     3db:	48 89 c6             	mov    %rax,%rsi
     3de:	48 8b 85 b8 fe ff ff 	mov    -0x148(%rbp),%rax
     3e5:	8b 95 a8 fe ff ff    	mov    -0x158(%rbp),%edx
     3eb:	48 63 d2             	movslq %edx,%rdx
     3ee:	8b 04 90             	mov    (%rax,%rdx,4),%eax
     3f1:	48 8d 8d d0 fe ff ff 	lea    -0x130(%rbp),%rcx
     3f8:	48 89 f2             	mov    %rsi,%rdx
     3fb:	48 89 ce             	mov    %rcx,%rsi
     3fe:	89 c7                	mov    %eax,%edi
     400:	e8 00 00 00 00       	callq  405 <job_read+0x188>
    			401: R_X86_64_PLT32	write-0x4
     405:	48 89 85 c8 fe ff ff 	mov    %rax,-0x138(%rbp)
                n = write(pjob_data->socket_ids[i], buffer, strlen(buffer));
     40c:	48 8d 85 f0 fe ff ff 	lea    -0x110(%rbp),%rax
     413:	48 89 c7             	mov    %rax,%rdi
     416:	e8 00 00 00 00       	callq  41b <job_read+0x19e>
    			417: R_X86_64_PLT32	strlen-0x4
     41b:	48 89 c6             	mov    %rax,%rsi
     41e:	48 8b 85 b8 fe ff ff 	mov    -0x148(%rbp),%rax
     425:	8b 95 a8 fe ff ff    	mov    -0x158(%rbp),%edx
     42b:	48 63 d2             	movslq %edx,%rdx
     42e:	8b 04 90             	mov    (%rax,%rdx,4),%eax
     431:	48 8d 8d f0 fe ff ff 	lea    -0x110(%rbp),%rcx
     438:	48 89 f2             	mov    %rsi,%rdx
     43b:	48 89 ce             	mov    %rcx,%rsi
     43e:	89 c7                	mov    %eax,%edi
     440:	e8 00 00 00 00       	callq  445 <job_read+0x1c8>
    			441: R_X86_64_PLT32	write-0x4
     445:	48 89 85 c0 fe ff ff 	mov    %rax,-0x140(%rbp)
                if((n < 0) | (m < 0)){
     44c:	48 8b 85 c0 fe ff ff 	mov    -0x140(%rbp),%rax
     453:	48 c1 e8 3f          	shr    $0x3f,%rax
     457:	89 c2                	mov    %eax,%edx
     459:	48 8b 85 c8 fe ff ff 	mov    -0x138(%rbp),%rax
     460:	48 c1 e8 3f          	shr    $0x3f,%rax
     464:	09 d0                	or     %edx,%eax
     466:	84 c0                	test   %al,%al
     468:	74 0f                	je     479 <job_read+0x1fc>
                    error("Writing failed");
     46a:	48 8d 3d 00 00 00 00 	lea    0x0(%rip),%rdi        # 471 <job_read+0x1f4>
    			46d: R_X86_64_PC32	.rodata+0x5e
     471:	e8 00 00 00 00       	callq  476 <job_read+0x1f9>
    			472: R_X86_64_PC32	error-0x4
     476:	eb 01                	jmp    479 <job_read+0x1fc>
                    continue;
     478:	90                   	nop
            for(int i = 0; i < pjob_data->open_cnncts; i++){
     479:	83 85 a8 fe ff ff 01 	addl   $0x1,-0x158(%rbp)
     480:	48 8b 85 b8 fe ff ff 	mov    -0x148(%rbp),%rax
     487:	8b 80 04 02 00 00    	mov    0x204(%rax),%eax
     48d:	39 85 a8 fe ff ff    	cmp    %eax,-0x158(%rbp)
     493:	0f 8c 14 ff ff ff    	jl     3ad <job_read+0x130>
                }
            }
            pthread_mutex_unlock(&pjob_data->socketids_changingMutex);
     499:	48 8b 85 b8 fe ff ff 	mov    -0x148(%rbp),%rax
     4a0:	48 05 08 02 00 00    	add    $0x208,%rax
     4a6:	48 89 c7             	mov    %rax,%rdi
     4a9:	e8 00 00 00 00       	callq  4ae <job_read+0x231>
    			4aa: R_X86_64_PLT32	pthread_mutex_unlock-0x4
            printf("%s%s", name, buffer);
     4ae:	48 8d 95 f0 fe ff ff 	lea    -0x110(%rbp),%rdx
     4b5:	48 8d 85 d0 fe ff ff 	lea    -0x130(%rbp),%rax
     4bc:	48 89 c6             	mov    %rax,%rsi
     4bf:	48 8d 3d 00 00 00 00 	lea    0x0(%rip),%rdi        # 4c6 <job_read+0x249>
    			4c2: R_X86_64_PC32	.rodata+0x6d
     4c6:	b8 00 00 00 00       	mov    $0x0,%eax
     4cb:	e8 00 00 00 00       	callq  4d0 <job_read+0x253>
    			4cc: R_X86_64_PLT32	printf-0x4
        while(!pjob_data->endprogram){
     4d0:	48 8b 85 b8 fe ff ff 	mov    -0x148(%rbp),%rax
     4d7:	0f b6 80 00 02 00 00 	movzbl 0x200(%rax),%eax
     4de:	83 f0 01             	xor    $0x1,%eax
     4e1:	84 c0                	test   %al,%al
     4e3:	0f 85 0d fe ff ff    	jne    2f6 <job_read+0x79>
        }
        delete_socket(newsockfd, pjob_data);
     4e9:	48 8b 95 b8 fe ff ff 	mov    -0x148(%rbp),%rdx
     4f0:	8b 85 ac fe ff ff    	mov    -0x154(%rbp),%eax
     4f6:	48 89 d6             	mov    %rdx,%rsi
     4f9:	89 c7                	mov    %eax,%edi
     4fb:	e8 00 00 00 00       	callq  500 <job_read+0x283>
    			4fc: R_X86_64_PC32	delete_socket-0x4
        pthread_exit( NULL );
     500:	bf 00 00 00 00       	mov    $0x0,%edi
     505:	e8 00 00 00 00       	callq  50a <job_write>
    			506: R_X86_64_PLT32	pthread_exit-0x4
    
    
    000000000000050a <job_write>:
    }
    
    
    void* job_write(void* args){
     50a:	55                   	push   %rbp
     50b:	48 89 e5             	mov    %rsp,%rbp
     50e:	48 81 ec 50 01 00 00 	sub    $0x150,%rsp
     515:	48 89 bd b8 fe ff ff 	mov    %rdi,-0x148(%rbp)
     51c:	64 48 8b 04 25 28 00 	mov    %fs:0x28,%rax
     523:	00 00 
     525:	48 89 45 f8          	mov    %rax,-0x8(%rbp)
     529:	31 c0                	xor    %eax,%eax
        struct JOB_INFO* job_data = (struct JOB_INFO*)(args);
     52b:	48 8b 85 b8 fe ff ff 	mov    -0x148(%rbp),%rax
     532:	48 89 85 d0 fe ff ff 	mov    %rax,-0x130(%rbp)
        fprintf(plogfile, "Started writing thread...\n");
     539:	48 8b 05 00 00 00 00 	mov    0x0(%rip),%rax        # 540 <job_write+0x36>
    			53c: R_X86_64_PC32	plogfile-0x4
     540:	48 89 c1             	mov    %rax,%rcx
     543:	ba 1a 00 00 00       	mov    $0x1a,%edx
     548:	be 01 00 00 00       	mov    $0x1,%esi
     54d:	48 8d 3d 00 00 00 00 	lea    0x0(%rip),%rdi        # 554 <job_write+0x4a>
    			550: R_X86_64_PC32	.rodata+0x72
     554:	e8 00 00 00 00       	callq  559 <job_write+0x4f>
    			555: R_X86_64_PLT32	fwrite-0x4
        ssize_t n; //Error catching variable
        ssize_t m; //Error catching variable
        char buffer[BUFLEN];
        char* name = "Server: \0";
     559:	48 8d 05 00 00 00 00 	lea    0x0(%rip),%rax        # 560 <job_write+0x56>
    			55c: R_X86_64_PC32	.rodata+0x8d
     560:	48 89 85 d8 fe ff ff 	mov    %rax,-0x128(%rbp)
    
    
        while(!job_data->endprogram) {
     567:	e9 47 01 00 00       	jmpq   6b3 <job_write+0x1a9>
            fgets(buffer, BUFLEN, stdin);
     56c:	48 8b 15 00 00 00 00 	mov    0x0(%rip),%rdx        # 573 <job_write+0x69>
    			56f: R_X86_64_PC32	stdin-0x4
     573:	48 8d 85 f0 fe ff ff 	lea    -0x110(%rbp),%rax
     57a:	be ff 00 00 00       	mov    $0xff,%esi
     57f:	48 89 c7             	mov    %rax,%rdi
     582:	e8 00 00 00 00       	callq  587 <job_write+0x7d>
    			583: R_X86_64_PLT32	fgets-0x4
    
    
            pthread_mutex_lock(&job_data->socketids_changingMutex);
     587:	48 8b 85 d0 fe ff ff 	mov    -0x130(%rbp),%rax
     58e:	48 05 08 02 00 00    	add    $0x208,%rax
     594:	48 89 c7             	mov    %rax,%rdi
     597:	e8 00 00 00 00       	callq  59c <job_write+0x92>
    			598: R_X86_64_PLT32	pthread_mutex_lock-0x4
            for(int i = 0; i < job_data->open_cnncts; i++){
     59c:	c7 85 cc fe ff ff 00 	movl   $0x0,-0x134(%rbp)
     5a3:	00 00 00 
     5a6:	e9 b6 00 00 00       	jmpq   661 <job_write+0x157>
                m = write(job_data->socket_ids[i], name,  strlen(name));
     5ab:	48 8b 85 d8 fe ff ff 	mov    -0x128(%rbp),%rax
     5b2:	48 89 c7             	mov    %rax,%rdi
     5b5:	e8 00 00 00 00       	callq  5ba <job_write+0xb0>
    			5b6: R_X86_64_PLT32	strlen-0x4
     5ba:	48 89 c6             	mov    %rax,%rsi
     5bd:	48 8b 85 d0 fe ff ff 	mov    -0x130(%rbp),%rax
     5c4:	8b 95 cc fe ff ff    	mov    -0x134(%rbp),%edx
     5ca:	48 63 d2             	movslq %edx,%rdx
     5cd:	8b 04 90             	mov    (%rax,%rdx,4),%eax
     5d0:	48 8b 8d d8 fe ff ff 	mov    -0x128(%rbp),%rcx
     5d7:	48 89 f2             	mov    %rsi,%rdx
     5da:	48 89 ce             	mov    %rcx,%rsi
     5dd:	89 c7                	mov    %eax,%edi
     5df:	e8 00 00 00 00       	callq  5e4 <job_write+0xda>
    			5e0: R_X86_64_PLT32	write-0x4
     5e4:	48 89 85 e0 fe ff ff 	mov    %rax,-0x120(%rbp)
                n = write(job_data->socket_ids[i], buffer, strlen(buffer));
     5eb:	48 8d 85 f0 fe ff ff 	lea    -0x110(%rbp),%rax
     5f2:	48 89 c7             	mov    %rax,%rdi
     5f5:	e8 00 00 00 00       	callq  5fa <job_write+0xf0>
    			5f6: R_X86_64_PLT32	strlen-0x4
     5fa:	48 89 c6             	mov    %rax,%rsi
     5fd:	48 8b 85 d0 fe ff ff 	mov    -0x130(%rbp),%rax
     604:	8b 95 cc fe ff ff    	mov    -0x134(%rbp),%edx
     60a:	48 63 d2             	movslq %edx,%rdx
     60d:	8b 04 90             	mov    (%rax,%rdx,4),%eax
     610:	48 8d 8d f0 fe ff ff 	lea    -0x110(%rbp),%rcx
     617:	48 89 f2             	mov    %rsi,%rdx
     61a:	48 89 ce             	mov    %rcx,%rsi
     61d:	89 c7                	mov    %eax,%edi
     61f:	e8 00 00 00 00       	callq  624 <job_write+0x11a>
    			620: R_X86_64_PLT32	write-0x4
     624:	48 89 85 e8 fe ff ff 	mov    %rax,-0x118(%rbp)
                if((n < 0) | (m < 0)){
     62b:	48 8b 85 e8 fe ff ff 	mov    -0x118(%rbp),%rax
     632:	48 c1 e8 3f          	shr    $0x3f,%rax
     636:	89 c2                	mov    %eax,%edx
     638:	48 8b 85 e0 fe ff ff 	mov    -0x120(%rbp),%rax
     63f:	48 c1 e8 3f          	shr    $0x3f,%rax
     643:	09 d0                	or     %edx,%eax
     645:	84 c0                	test   %al,%al
     647:	74 11                	je     65a <job_write+0x150>
                    printf("Writing failed");
     649:	48 8d 3d 00 00 00 00 	lea    0x0(%rip),%rdi        # 650 <job_write+0x146>
    			64c: R_X86_64_PC32	.rodata+0x5e
     650:	b8 00 00 00 00       	mov    $0x0,%eax
     655:	e8 00 00 00 00       	callq  65a <job_write+0x150>
    			656: R_X86_64_PLT32	printf-0x4
            for(int i = 0; i < job_data->open_cnncts; i++){
     65a:	83 85 cc fe ff ff 01 	addl   $0x1,-0x134(%rbp)
     661:	48 8b 85 d0 fe ff ff 	mov    -0x130(%rbp),%rax
     668:	8b 80 04 02 00 00    	mov    0x204(%rax),%eax
     66e:	39 85 cc fe ff ff    	cmp    %eax,-0x134(%rbp)
     674:	0f 8c 31 ff ff ff    	jl     5ab <job_write+0xa1>
                }
            }
            pthread_mutex_unlock(&job_data->socketids_changingMutex);
     67a:	48 8b 85 d0 fe ff ff 	mov    -0x130(%rbp),%rax
     681:	48 05 08 02 00 00    	add    $0x208,%rax
     687:	48 89 c7             	mov    %rax,%rdi
     68a:	e8 00 00 00 00       	callq  68f <job_write+0x185>
    			68b: R_X86_64_PLT32	pthread_mutex_unlock-0x4
            if(strcmp("Bye\n", buffer) == 0){
     68f:	48 8d 85 f0 fe ff ff 	lea    -0x110(%rbp),%rax
     696:	48 89 c6             	mov    %rax,%rsi
     699:	48 8d 3d 00 00 00 00 	lea    0x0(%rip),%rdi        # 6a0 <job_write+0x196>
    			69c: R_X86_64_PC32	.rodata+0x97
     6a0:	e8 00 00 00 00       	callq  6a5 <job_write+0x19b>
    			6a1: R_X86_64_PLT32	strcmp-0x4
     6a5:	85 c0                	test   %eax,%eax
     6a7:	75 0a                	jne    6b3 <job_write+0x1a9>
                exit(EXIT_SUCCESS);
     6a9:	bf 00 00 00 00       	mov    $0x0,%edi
     6ae:	e8 00 00 00 00       	callq  6b3 <job_write+0x1a9>
    			6af: R_X86_64_PLT32	exit-0x4
        while(!job_data->endprogram) {
     6b3:	48 8b 85 d0 fe ff ff 	mov    -0x130(%rbp),%rax
     6ba:	0f b6 80 00 02 00 00 	movzbl 0x200(%rax),%eax
     6c1:	83 f0 01             	xor    $0x1,%eax
     6c4:	84 c0                	test   %al,%al
     6c6:	0f 85 a0 fe ff ff    	jne    56c <job_write+0x62>
            }
        }
        job_data->endprogram = true;
     6cc:	48 8b 85 d0 fe ff ff 	mov    -0x130(%rbp),%rax
     6d3:	c6 80 00 02 00 00 01 	movb   $0x1,0x200(%rax)
        pthread_exit( NULL );
     6da:	bf 00 00 00 00       	mov    $0x0,%edi
     6df:	e8 00 00 00 00       	callq  6e4 <delete_socket>
    			6e0: R_X86_64_PLT32	pthread_exit-0x4
    
    
    00000000000006e4 <delete_socket>:
    }
    
    
    void delete_socket(int socketid, struct JOB_INFO* pjob_data){
     6e4:	55                   	push   %rbp
     6e5:	48 89 e5             	mov    %rsp,%rbp
     6e8:	48 83 ec 20          	sub    $0x20,%rsp
     6ec:	89 7d ec             	mov    %edi,-0x14(%rbp)
     6ef:	48 89 75 e0          	mov    %rsi,-0x20(%rbp)
        bool found = false;
     6f3:	c6 45 fb 00          	movb   $0x0,-0x5(%rbp)
        for(int i = 0; i < pjob_data->open_cnncts; i++){
     6f7:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%rbp)
     6fe:	eb 47                	jmp    747 <delete_socket+0x63>
            if(found){
     700:	80 7d fb 00          	cmpb   $0x0,-0x5(%rbp)
     704:	74 1d                	je     723 <delete_socket+0x3f>
            	pjob_data->socket_ids[i-1] = pjob_data->socket_ids[i];
     706:	8b 45 fc             	mov    -0x4(%rbp),%eax
     709:	8d 70 ff             	lea    -0x1(%rax),%esi
     70c:	48 8b 45 e0          	mov    -0x20(%rbp),%rax
     710:	8b 55 fc             	mov    -0x4(%rbp),%edx
     713:	48 63 d2             	movslq %edx,%rdx
     716:	8b 0c 90             	mov    (%rax,%rdx,4),%ecx
     719:	48 8b 45 e0          	mov    -0x20(%rbp),%rax
     71d:	48 63 d6             	movslq %esi,%rdx
     720:	89 0c 90             	mov    %ecx,(%rax,%rdx,4)
            }
            if(pjob_data->socket_ids[i] == socketid){
     723:	48 8b 45 e0          	mov    -0x20(%rbp),%rax
     727:	8b 55 fc             	mov    -0x4(%rbp),%edx
     72a:	48 63 d2             	movslq %edx,%rdx
     72d:	8b 04 90             	mov    (%rax,%rdx,4),%eax
     730:	39 45 ec             	cmp    %eax,-0x14(%rbp)
     733:	75 0e                	jne    743 <delete_socket+0x5f>
                close(socketid);
     735:	8b 45 ec             	mov    -0x14(%rbp),%eax
     738:	89 c7                	mov    %eax,%edi
     73a:	e8 00 00 00 00       	callq  73f <delete_socket+0x5b>
    			73b: R_X86_64_PLT32	close-0x4
                found = true;
     73f:	c6 45 fb 01          	movb   $0x1,-0x5(%rbp)
        for(int i = 0; i < pjob_data->open_cnncts; i++){
     743:	83 45 fc 01          	addl   $0x1,-0x4(%rbp)
     747:	48 8b 45 e0          	mov    -0x20(%rbp),%rax
     74b:	8b 80 04 02 00 00    	mov    0x204(%rax),%eax
     751:	39 45 fc             	cmp    %eax,-0x4(%rbp)
     754:	7c aa                	jl     700 <delete_socket+0x1c>
            }
        }
        if(found){
     756:	80 7d fb 00          	cmpb   $0x0,-0x5(%rbp)
     75a:	74 17                	je     773 <delete_socket+0x8f>
        	pjob_data->open_cnncts--;
     75c:	48 8b 45 e0          	mov    -0x20(%rbp),%rax
     760:	8b 80 04 02 00 00    	mov    0x204(%rax),%eax
     766:	8d 50 ff             	lea    -0x1(%rax),%edx
     769:	48 8b 45 e0          	mov    -0x20(%rbp),%rax
     76d:	89 90 04 02 00 00    	mov    %edx,0x204(%rax)
        }
    }
     773:	90                   	nop
     774:	c9                   	leaveq 
     775:	c3                   	retq

  4. #4
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,738
    Yeah, I haven't come across this problem before, but it looks like you shouldn't declare a prototype as inline.
    Devoted my life to programming...

  5. #5
    Registered User
    Join Date
    Feb 2019
    Posts
    69
    How should I declare inlines methods then?


    EDIT: Worked! Thank you!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Why won't this code compile??????
    By comp1911 in forum C Programming
    Replies: 15
    Last Post: 04-25-2010, 10:23 PM
  2. code won't compile
    By the_winky_files in forum C Programming
    Replies: 3
    Last Post: 11-14-2005, 10:57 AM
  3. Code will not compile - code from a book!
    By Chubz in forum C++ Programming
    Replies: 19
    Last Post: 09-12-2004, 10:21 PM
  4. Replies: 3
    Last Post: 03-07-2003, 09:06 PM

Tags for this Thread