LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_byte_array_len_encode_free
void cram_byte_array_len_encode_free(cram_codec *c) {
    if (!c)
        return;

    if (c->u.e_byte_array_len.len_codec)
        c->u.e_byte_array_len.len_codec->free(c->u.e_byte_array_len.len_codec);

    if (c->u.e_byte_array_len.val_codec)
        c->u.e_byte_array_len.val_codec->free(c->u.e_byte_array_len.val_codec);

    free(c);
}

// Assembly:
testq %rdi, %rdi
je 0x945db
pushq %rbx
movq %rdi, %rbx
movq 0x78(%rdi), %rdi
testq %rdi, %rdi
je 0x945c3
callq *0x20(%rdi)
movq 0x80(%rbx), %rdi
testq %rdi, %rdi
je 0x945d2
callq *0x20(%rdi)
movq %rbx, %rdi
popq %rbx
jmp 0x45c0
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_byte_array_len_encode_init
cram_codec *cram_byte_array_len_encode_init(cram_stats *st,
                                            enum cram_encoding codec,
                                            enum cram_external_type option,
                                            void *dat,
                                            int version, varint_vec *vv) {
    cram_codec *c;
    cram_byte_array_len_encoder *e = (cram_byte_array_len_encoder *)dat;

    c = malloc(sizeof(*c));
    if (!c)
        return NULL;
    c->codec = E_BYTE_ARRAY_LEN;
    c->free = cram_byte_array_len_encode_free;
    c->encode = cram_byte_array_len_encode;
    c->store = cram_byte_array_len_encode_store;
    c->flush = NULL;

    c->u.e_byte_array_len.len_codec = cram_encoder_init(e->len_encoding,
                                                        st, E_INT,
                                                        e->len_dat,
                                                        version, vv);
    c->u.e_byte_array_len.val_codec = cram_encoder_init(e->val_encoding,
                                                        NULL, E_BYTE_ARRAY,
                                                        e->val_dat,
                                                        version, vv);

    if (!c->u.e_byte_array_len.len_codec ||
        !c->u.e_byte_array_len.val_codec) {
        cram_byte_array_len_encode_free(c);
        return NULL;
    }

    return c;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r9, %r14
movl %r8d, %ebp
movq %rcx, %r15
movq %rdi, %r12
movl $0x880, %edi            # imm = 0x880
callq 0x4680
testq %rax, %rax
je 0x94940
movq %rax, %rbx
movl $0x4, (%rax)
leaq -0x315(%rip), %rax      # 0x945ae
movq %rax, 0x20(%rbx)
leaq -0x36d(%rip), %rax      # 0x94561
movq %rax, 0x30(%rbx)
leaq -0x2fd(%rip), %rax      # 0x945dc
movq %rax, 0x38(%rbx)
movq $0x0, 0x48(%rbx)
movl (%r15), %edi
movq 0x8(%r15), %rcx
movq %r12, %rsi
movl $0x1, %edx
movl %ebp, %r8d
movq %r14, %r9
callq 0x90e2c
movq %rax, 0x78(%rbx)
movl 0x4(%r15), %edi
movq 0x10(%r15), %rcx
xorl %esi, %esi
movl $0x4, %edx
movl %ebp, %r8d
movq %r14, %r9
callq 0x90e2c
movq %rax, 0x80(%rbx)
cmpq $0x0, 0x78(%rbx)
sete %cl
testq %rax, %rax
sete %al
orb %cl, %al
cmpb $0x1, %al
jne 0x94942
movq %rbx, %rdi
callq 0x945ae
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_byte_array_stop_describe
int cram_byte_array_stop_describe(cram_codec *c, kstring_t *ks) {
    return ksprintf(ks, "BYTE_ARRAY_STOP(stop=%d,id=%d)",
                    c->u.byte_array_stop.stop,
                    c->u.byte_array_stop.content_id)
        < 0 ? -1 : 0;
}

// Assembly:
pushq %rax
movq %rsi, %rax
movzbl 0x60(%rdi), %edx
movl 0x64(%rdi), %ecx
leaq 0x10bcc(%rip), %rsi     # 0xa576e
movq %rax, %rdi
xorl %eax, %eax
callq 0x9aab
sarl $0x1f, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_byte_array_stop_encode
int cram_byte_array_stop_encode(cram_slice *slice, cram_codec *c,
                                char *in, int in_size) {
    BLOCK_APPEND(c->out, in, in_size);
    BLOCK_APPEND_CHAR(c->out, c->u.e_byte_array_stop.stop);
    return 0;

 block_err:
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %rbx
movq 0x8(%rsi), %r13
movslq %ecx, %r14
movq 0x30(%r13), %r12
addq %r14, %r12
movq 0x28(%r13), %rax
cmpq %r12, %rax
ja 0x94ea7
leaq 0x320(%rax), %rcx
shrq $0x2, %rcx
addq %rcx, %rax
addq $0x320, %rax            # imm = 0x320
cmpq %r12, %rax
cmovaq %rax, %r12
movq 0x20(%r13), %rdi
movq %r12, %rsi
callq 0x4840
testq %rax, %rax
je 0x94f26
movq %r12, 0x28(%r13)
movq %rax, 0x20(%r13)
testl %ebp, %ebp
je 0x94ec2
movq 0x20(%r13), %rdi
addq 0x30(%r13), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x43c0
addq %r14, 0x30(%r13)
movq 0x8(%rbx), %r14
movb 0x60(%rbx), %bpl
movq 0x28(%r14), %rax
movq 0x30(%r14), %rbx
incq %rbx
cmpq %rbx, %rax
ja 0x94f0e
leaq 0x320(%rax), %rcx
shrq $0x2, %rcx
addq %rcx, %rax
addq $0x320, %rax            # imm = 0x320
cmpq %rbx, %rax
cmovaq %rax, %rbx
movq 0x20(%r14), %rdi
movq %rbx, %rsi
callq 0x4840
testq %rax, %rax
je 0x94f26
movq %rbx, 0x28(%r14)
movq %rax, 0x20(%r14)
movq 0x20(%r14), %rax
movq 0x30(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x30(%r14)
movb %bpl, (%rax,%rcx)
xorl %eax, %eax
jmp 0x94f2b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_byte_array_stop_encode_init
cram_codec *cram_byte_array_stop_encode_init(cram_stats *st,
                                             enum cram_encoding codec,
                                             enum cram_external_type option,
                                             void *dat,
                                             int version, varint_vec *vv) {
    cram_codec *c;

    c = malloc(sizeof(*c));
    if (!c)
        return NULL;
    c->codec = E_BYTE_ARRAY_STOP;
    c->free = cram_byte_array_stop_encode_free;
    c->encode = cram_byte_array_stop_encode;
    c->store = cram_byte_array_stop_encode_store;
    c->flush = NULL;

    c->u.e_byte_array_stop.stop = ((int *)dat)[0];
    c->u.e_byte_array_stop.content_id = ((int *)dat)[1];

    return c;
}

// Assembly:
pushq %rbx
movq %rcx, %rbx
movl $0x880, %edi            # imm = 0x880
callq 0x4680
testq %rax, %rax
je 0x95169
movl $0x5, (%rax)
leaq -0x200(%rip), %rcx      # 0x94f3a
movq %rcx, 0x20(%rax)
leaq -0x300(%rip), %rcx      # 0x94e45
movq %rcx, 0x30(%rax)
leaq -0x20c(%rip), %rcx      # 0x94f44
movq %rcx, 0x38(%rax)
movq $0x0, 0x48(%rax)
movb (%rbx), %cl
movb %cl, 0x60(%rax)
movl 0x4(%rbx), %ecx
movl %ecx, 0x64(%rax)
jmp 0x9516b
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_encoding2str
const char *cram_encoding2str(enum cram_encoding t) {
    switch (t) {
    case E_NULL:            return "NULL";
    case E_EXTERNAL:        return "EXTERNAL";
    case E_GOLOMB:          return "GOLOMB";
    case E_HUFFMAN:         return "HUFFMAN";
    case E_BYTE_ARRAY_LEN:  return "BYTE_ARRAY_LEN";
    case E_BYTE_ARRAY_STOP: return "BYTE_ARRAY_STOP";
    case E_BETA:            return "BETA";
    case E_SUBEXP:          return "SUBEXP";
    case E_GOLOMB_RICE:     return "GOLOMB_RICE";
    case E_GAMMA:           return "GAMMA";

    case E_VARINT_UNSIGNED: return "VARINT_UNSIGNED";
    case E_VARINT_SIGNED:   return "VARINT_SIGNED";
    case E_CONST_BYTE:      return "CONST_BYTE";
    case E_CONST_INT:       return "CONST_INT";

    case E_NUM_CODECS:
    default:                return "?";
    }
}

// Assembly:
cmpl $0x9, %edi
ja 0x9518c
movl %edi, %eax
leaq 0xff89(%rip), %rcx      # 0xa5104
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x465b(%rip), %rax      # 0x997e6
retq
addl $-0x29, %edi
cmpl $0x3, %edi
ja 0x9520c
leaq 0xff91(%rip), %rax      # 0xa512c
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x106ab(%rip), %rax     # 0xa5856
retq
leaq 0x10666(%rip), %rax     # 0xa5819
retq
leaq 0x10695(%rip), %rax     # 0xa5850
retq
leaq 0x10647(%rip), %rax     # 0xa580a
retq
leaq 0x106a9(%rip), %rax     # 0xa5874
retq
leaq 0x1063e(%rip), %rax     # 0xa5811
retq
leaq 0x10662(%rip), %rax     # 0xa583d
retq
leaq 0x8c34(%rip), %rax      # 0x9de17
retq
leaq 0x10694(%rip), %rax     # 0xa587f
retq
leaq 0x10673(%rip), %rax     # 0xa5866
retq
leaq 0x1062d(%rip), %rax     # 0xa5828
retq
leaq 0x10635(%rip), %rax     # 0xa5838
retq
leaq 0x10639(%rip), %rax     # 0xa5844
retq
leaq 0x5dd9(%rip), %rax      # 0x9afec
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_codec_to_id
int cram_codec_to_id(cram_codec *c, int *id2) {
    int bnum1, bnum2 = -2;

    switch (c->codec) {
    case E_CONST_INT:
    case E_CONST_BYTE:
        bnum1 = -2; // no blocks used
        break;

    case E_HUFFMAN:
        bnum1 = c->u.huffman.ncodes == 1 ? -2 : -1;
        break;

    case E_GOLOMB:
    case E_BETA:
    case E_SUBEXP:
    case E_GOLOMB_RICE:
    case E_GAMMA:
        // CORE block
        bnum1 = -1;
        break;

    case E_EXTERNAL:
    case E_VARINT_UNSIGNED:
    case E_VARINT_SIGNED:
        bnum1 = c->u.external.content_id;
        break;

    case E_BYTE_ARRAY_LEN:
        bnum1 = cram_codec_to_id(c->u.byte_array_len.len_codec, NULL);
        bnum2 = cram_codec_to_id(c->u.byte_array_len.val_codec, NULL);
        break;

    case E_BYTE_ARRAY_STOP:
        bnum1 = c->u.byte_array_stop.content_id;
        break;

    case E_NULL:
        bnum1 = -2;
        break;

    default:
        hts_log_error("Unknown codec type %d", c->codec);
        bnum1 = -1;
    }

    if (id2)
        *id2 = bnum2;
    return bnum1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
movl (%rdi), %ecx
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
cmpq $0x9, %rcx
ja 0x95246
leaq 0xff07(%rip), %rax      # 0xa513c
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0x95296
leal -0x29(%rcx), %eax
cmpl $0x2, %eax
jb 0x9525e
leal -0x2b(%rcx), %eax
cmpl $0x2, %eax
jae 0x952ab
movl $0xfffffffe, %r14d      # imm = 0xFFFFFFFE
jmp 0x95296
movl 0x60(%r15), %r14d
jmp 0x95296
movl 0x64(%r15), %r14d
jmp 0x95296
xorl %r14d, %r14d
cmpl $0x1, 0x60(%r15)
sete %r14b
notl %r14d
jmp 0x95296
movq 0x60(%r15), %rdi
xorl %esi, %esi
callq 0x95214
movl %eax, %r14d
movq 0x68(%r15), %rdi
xorl %esi, %esi
callq 0x95214
movl %eax, %ebp
testq %rbx, %rbx
je 0x9529d
movl %ebp, (%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10640(%rip), %rsi     # 0xa58f2
leaq 0x1064a(%rip), %rdx     # 0xa5903
movl $0x1, %edi
xorl %eax, %eax
callq 0x14378
jmp 0x9523e
// File: /workspace/github_c_makefile_star2_O1/giometti[P]mastering_UNIX_programming/chapter_07/fmemopen.c
// Function: dump
void dump(FILE *fp)
{
	int c;
	while ((c = fgetc(fp)) != EOF)
		printf("%c", c);
	printf("\n");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x1080
cmpl $-0x1, %eax
je 0x11c6
movl %eax, %edi
callq 0x1030
movq %rbx, %rdi
jmp 0x11b0
movl $0xa, %edi
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/giometti[P]mastering_UNIX_programming/chapter_07/fmemopen.c
// Function: main
int main(void)
{
	FILE *fp;

	fp = fmemopen(buf, BUF_SIZE, "r+");
	if (!fp) {
		perror("fmemopen");
		return -1;
	}

	/* Write something in the stream */
	fprintf(fp, "the buffer is %d bytes long\n", BUF_SIZE);

	/* Rewind the "current position" pointer */
	rewind(fp);

	printf("Data in the stream:\n");
	dump(fp);

	fclose(fp);

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x2ea4(%rip), %rdi      # 0x4080
leaq 0xe21(%rip), %rdx       # 0x2004
movl $0x100, %esi            # imm = 0x100
callq 0x1040
testq %rax, %rax
je 0x123b
movq %rax, %r14
leaq 0xe14(%rip), %rsi       # 0x2010
xorl %ebx, %ebx
movq %rax, %rdi
movl $0x100, %edx            # imm = 0x100
xorl %eax, %eax
callq 0x1090
movq %r14, %rdi
callq 0x1070
leaq 0xe11(%rip), %rdi       # 0x202d
callq 0x1050
movq %r14, %rdi
callq 0x11ac
movq %r14, %rdi
callq 0x1060
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xdc5(%rip), %rdi       # 0x2007
callq 0x10a0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x1231
// File: /workspace/github_c_makefile_star2_O1/vampirefrog[P]x68ksjis/sjis2utf8.c
// Function: main
int main(int argc, char **argv) {
	FILE *in = stdin, *out = stdout;
	if(argc > 1) in = fopen(argv[1], "rb");
	if(argc > 2) out = fopen(argv[2], "wb");

	int last_byte = 0;
	int b = 0;
	while((b = sjis_fgetc(in)) != EOF) {
		if(b == -2) fprintf(stderr, "Invalid char found at %d\n", ftell(in));
		utf8_fputc(sjis_char_to_unicode(b), out);
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movl %edi, %ebp
movq 0x15df1(%rip), %rax     # 0x16fd0
movq (%rax), %rbx
cmpl $0x2, %edi
jl 0x11fc
movq 0x8(%r15), %rdi
leaq 0x1e12(%rip), %rsi      # 0x3004
callq 0x1080
movq %rax, %r14
jmp 0x1206
movq 0x15dd5(%rip), %rax     # 0x16fd8
movq (%rax), %r14
cmpl $0x3, %ebp
jl 0x121e
movq 0x10(%r15), %rdi
leaq 0x1df1(%rip), %rsi      # 0x3007
callq 0x1080
movq %rax, %rbx
movq %r14, %rdi
callq 0x14b9
movl %eax, %ebp
cmpl $-0x2, %eax
je 0x1246
cmpl $-0x1, %ebp
je 0x1250
movzwl %bp, %edi
callq 0x163c
movl %eax, %edi
movq %rbx, %rsi
callq 0x26e7
jmp 0x121e
movq %r14, %rdi
callq 0x10b0
jmp 0x1232
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/Astor-Bizard[P]ProjetS5_Groupe2/src/lecture_ELF.c
// Function: print_usage
void print_usage() {
	printf("Usage: lecture_ELF <option(s)> elf-file\n");
	printf(" Display information about the contents of ELF format files\n");
	printf(" Options are:\n");
	printf("  -a                 Equivalent to: -h -S -s -x -r\n");
	printf("  -h                 Display the ELF file header\n");
	printf("  -S                 Display the sections' header\n");
	printf("  -e                 Equivalent to: -h -S\n");
	printf("  -s                 Display the symbol table\n");
	printf("  -r                 Display the relocations (if present)\n");
	printf("  -x <number|name>   Dump the contents of section <number|name> as bytes. If no name/number, it will be asked during execution.\n");
	printf("  -H                 Display this information\n\n");
}

// Assembly:
pushq %rax
leaq 0x2dae(%rip), %rdi      # 0x4052
callq 0x1060
leaq 0x2dca(%rip), %rdi      # 0x407a
callq 0x1060
leaq 0x2dfa(%rip), %rdi      # 0x40b6
callq 0x1060
leaq 0x2dfc(%rip), %rdi      # 0x40c4
callq 0x1060
leaq 0x2e23(%rip), %rdi      # 0x40f7
callq 0x1060
leaq 0x2e48(%rip), %rdi      # 0x4128
callq 0x1060
leaq 0x2e6e(%rip), %rdi      # 0x415a
callq 0x1060
leaq 0x2e8c(%rip), %rdi      # 0x4184
callq 0x1060
leaq 0x2eae(%rip), %rdi      # 0x41b2
callq 0x1060
leaq 0x2edc(%rip), %rdi      # 0x41ec
callq 0x1060
leaq 0x2f50(%rip), %rdi      # 0x426c
popq %rax
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O1/Astor-Bizard[P]ProjetS5_Groupe2/src/lecture_headers.c
// Function: lire_octets
long long int lire_octets(char mode, FILE *f, int nb_octet)
{
	int i;
	long long int retour = 0;
	for(i=0 ; i<nb_octet;i++)
	{
		if(mode == B_ENDIAN) 
		{
			retour = (retour << 8) | fgetc(f);			
		}
		else if (mode == L_ENDIAN)
		{
			
			retour = retour | (fgetc(f) << 8*i);
		}
	}
	return retour;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %r15d, %r15d
testl %edx, %edx
jle 0x16cf
movl %edx, %ebx
movq %rsi, %r14
movsbl %dil, %ebp
xorl %r12d, %r12d
cmpl $0x1, %ebp
je 0x16b3
cmpl $0x2, %ebp
jne 0x16c5
shlq $0x8, %r12
movq %r14, %rdi
callq 0x10a0
jmp 0x16c0
movq %r14, %rdi
callq 0x10a0
movl %r15d, %ecx
shll %cl, %eax
cltq
orq %rax, %r12
addl $0x8, %r15d
decl %ebx
jne 0x169b
jmp 0x16d2
xorl %r12d, %r12d
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Astor-Bizard[P]ProjetS5_Groupe2/src/lectureSH.c
// Function: fetchSectionNames
char* fetchSectionNames(FILE* f, Elf32_Ehdr elfHeader, SectionsHeadersList shList) {
	int i;

	char* names = (char*) malloc(sizeof(char)*shList.headers[elfHeader.e_shstrndx].sh_size);
	if (names==NULL) {
		printf("\nErreur lors de l'allocation initiale de la table des noms.\n");
		return NULL;
	}

	fseek(f, shList.headers[elfHeader.e_shstrndx].sh_offset, 0);
	for(i=0; i<shList.headers[elfHeader.e_shstrndx].sh_size; i++)
		names[i] = fgetc(f);
	
	return names;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x68(%rsp), %r15
movzwl 0x62(%rsp), %eax
leaq (%rax,%rax,4), %r12
movl 0x14(%r15,%r12,8), %edi
callq 0x10d0
testq %rax, %rax
je 0x1dc3
movq %rax, %r14
leaq (%r15,%r12,8), %r15
addq $0x14, %r15
movl -0x4(%r15), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x10e0
cmpl $0x0, (%r15)
je 0x1dd2
xorl %r12d, %r12d
movq %rbx, %rdi
callq 0x10a0
movb %al, (%r14,%r12)
incq %r12
movl (%r15), %eax
cmpq %rax, %r12
jb 0x1daa
jmp 0x1dd2
leaq 0x2bc3(%rip), %rdi      # 0x498d
callq 0x1060
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Astor-Bizard[P]ProjetS5_Groupe2/src/lectureSH.c
// Function: getSectionName
char* getSectionName(char* names, uint32_t sh_name) {
	int i = 0;

	while(names[sh_name+i] != '\0')
		i++;
	i++;

	char* sectionName = (char*) malloc(sizeof(char)*i);
	if (names==NULL) {
		printf("\nErreur lors de l'allocation initiale d'un nom de section.\n");
		return NULL;
	}

	i = 0;
	while(names[sh_name+i] != '\0') {
		sectionName[i] = names[sh_name+i];
		i++;
	}
	sectionName[i] = '\0';

	return sectionName;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movl %esi, %r15d
xorl %eax, %eax
leal (%r15,%rax), %ecx
incq %rax
cmpb $0x0, (%r14,%rcx)
jne 0x1df0
movl %eax, %edi
callq 0x10d0
testq %r14, %r14
je 0x1e2d
movb (%r14,%r15), %cl
testb %cl, %cl
je 0x1e3d
incl %ebx
xorl %edx, %edx
movq %rdx, %rsi
movb %cl, (%rax,%rdx)
incq %rdx
addl %ebx, %esi
movb (%r14,%rsi), %cl
testb %cl, %cl
jne 0x1e16
movl %edx, %ecx
jmp 0x1e3f
leaq 0x2b95(%rip), %rdi      # 0x49c9
callq 0x1060
xorl %eax, %eax
jmp 0x1e43
xorl %ecx, %ecx
movb $0x0, (%rax,%rcx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Astor-Bizard[P]ProjetS5_Groupe2/src/lectureSH.c
// Function: sectionFlagsTranslation
char* sectionFlagsTranslation(uint32_t flags) {
	char* flagsString = (char*) malloc(sizeof(char)*FLAG_STRING_LENGTH);
	if (flagsString==NULL) {
		printf("\nErreur lors d'allocation de flagsString.\n");
		return NULL;
	}

	int i = 0;
	if (flags&SHF_WRITE) {
		flagsString[i++] = 'W';
	}
	if (flags&SHF_ALLOC) {
		flagsString[i++] = 'A';
	}
	if (flags&SHF_EXECINSTR) {
		flagsString[i++] = 'X';
	}
	if (flags&SHF_MERGE) {
		flagsString[i++] = 'M';
	}
	if (flags&SHF_STRINGS) {
		flagsString[i++] = 'S';
	}
	if (flags&SHF_INFO_LINK) {
		flagsString[i++] = 'I';
	}
	if (flags&SHF_LINK_ORDER) {
		flagsString[i++] = 'L';
	}
	if (flags&SHF_GROUP) {
		flagsString[i++] = 'G';
	}
	if (flags&SHF_TLS) {
		flagsString[i++] = 'T';
	}
	if (flags&SHF_EXCLUDE) {
		flagsString[i++] = 'E';
	}
	if (flags&SHF_OS_NONCONFORMING) {
		flagsString[i++] = 'O';
	}
	if (flags&SHF_MASKOS) {
		flagsString[i++] = 'o';
	}
	if (flags&SHF_MASKPROC) {
		flagsString[i++] = 'p';
	}
	flagsString[i] = '\0';

	return flagsString;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
movl $0x4, %edi
callq 0x10d0
testq %rax, %rax
je 0x1f22
xorl %ecx, %ecx
testb $0x1, %bl
je 0x1e77
movb $0x57, (%rax)
movl $0x1, %ecx
testb $0x2, %bl
je 0x1e84
movl %ecx, %edx
incl %ecx
movb $0x41, (%rax,%rdx)
testb $0x4, %bl
je 0x1e91
movl %ecx, %edx
incl %ecx
movb $0x58, (%rax,%rdx)
testb $0x10, %bl
je 0x1e9e
movl %ecx, %edx
incl %ecx
movb $0x4d, (%rax,%rdx)
testb $0x20, %bl
je 0x1eab
movl %ecx, %edx
incl %ecx
movb $0x53, (%rax,%rdx)
testb $0x40, %bl
je 0x1eb8
movl %ecx, %edx
incl %ecx
movb $0x49, (%rax,%rdx)
testb %bl, %bl
jns 0x1ec4
movl %ecx, %edx
incl %ecx
movb $0x4c, (%rax,%rdx)
btl $0x9, %ebx
jae 0x1ed2
movl %ecx, %edx
incl %ecx
movb $0x47, (%rax,%rdx)
btl $0xa, %ebx
jae 0x1ee0
movl %ecx, %edx
incl %ecx
movb $0x54, (%rax,%rdx)
testl %ebx, %ebx
jns 0x1eec
movl %ecx, %edx
incl %ecx
movb $0x45, (%rax,%rdx)
btl $0x8, %ebx
jae 0x1efa
movl %ecx, %edx
incl %ecx
movb $0x4f, (%rax,%rdx)
testl $0xff00000, %ebx        # imm = 0xFF00000
je 0x1f0a
movl %ecx, %edx
incl %ecx
movb $0x6f, (%rax,%rdx)
cmpl $0x10000000, %ebx       # imm = 0x10000000
jb 0x1f1a
movl %ecx, %edx
incl %ecx
movb $0x70, (%rax,%rdx)
movl %ecx, %ecx
movb $0x0, (%rax,%rcx)
jmp 0x1f30
leaq 0x2adb(%rip), %rdi      # 0x4a04
callq 0x1060
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Astor-Bizard[P]ProjetS5_Groupe2/src/lectureSH.c
// Function: displaySectionsHeaders
void displaySectionsHeaders(Elf32_Ehdr elfHeader, SectionsHeadersList shList) {
	int i;
	char* sectionName;
	char* flags;

	printf("There are %d section headers, starting at offset 0x%x:\n\n", shList.size, elfHeader.e_shoff);
	printf("Section Headers:\n");
	printf("  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al\n");
	
	for(i=0; i<shList.size; i++) {
		sectionName = getSectionName(shList.names, shList.headers[i].sh_name);
		if(strlen(sectionName)>17)
			sectionName[17] = '\0';
		flags = sectionFlagsTranslation(shList.headers[i].sh_flags);

		printf("  [%2d] %-17s %-15s %08x %06x %06x %02x %3s %2d %3d %2d\n", i, sectionName, typeNameFromValue(shList.headers[i].sh_type), shList.headers[i].sh_addr, shList.headers[i].sh_offset, shList.headers[i].sh_size, shList.headers[i].sh_entsize, flags, shList.headers[i].sh_link, shList.headers[i].sh_info, shList.headers[i].sh_addralign);
		
		free(flags);
		free(sectionName);
	}
	printf("Key to Flags:\n");
	printf("  W (write), A (alloc), X (execute), M (merge), S (strings)\n");
	printf("  I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)\n");
	printf("  O (extra OS processing required) o (OS specific), p (processor specific)\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movslq 0x98(%rsp), %rbx
movl 0x70(%rsp), %edx
leaq 0x29c8(%rip), %rdi      # 0x491b
movl %ebx, %esi
xorl %eax, %eax
callq 0x1090
leaq 0x2acb(%rip), %rdi      # 0x4a2e
callq 0x1060
leaq 0x2ad0(%rip), %rdi      # 0x4a3f
callq 0x1060
movq %rbx, 0x8(%rsp)
testq %rbx, %rbx
jle 0x203d
leaq 0x88(%rsp), %rax
movq (%rax), %r15
movq 0x8(%rax), %rax
movq %rax, (%rsp)
addq $0x24, %r15
xorl %r12d, %r12d
movl -0x24(%r15), %esi
movq (%rsp), %rdi
callq 0x1de1
movq %rax, %r13
movq %rax, %rdi
callq 0x1080
cmpq $0x12, %rax
jb 0x1fbf
movb $0x0, 0x11(%r13)
movl -0x1c(%r15), %edi
callq 0x1e52
movq %rax, %rbp
movl -0x20(%r15), %edi
callq 0x1c58
movl -0x18(%r15), %r8d
movl -0x14(%r15), %r9d
movl -0x10(%r15), %ecx
movq %rcx, 0x10(%rsp)
movl (%r15), %r11d
movl -0xc(%r15), %ebx
movl -0x8(%r15), %r14d
movl -0x4(%r15), %r10d
leaq 0x2959(%rip), %rdi      # 0x4954
movl %r12d, %esi
movq %r13, %rdx
movq %rax, %rcx
xorl %eax, %eax
pushq %r10
pushq %r14
pushq %rbx
pushq %rbp
pushq %r11
pushq 0x38(%rsp)
callq 0x1090
addq $0x30, %rsp
movq %rbp, %rdi
callq 0x1030
movq %r13, %rdi
callq 0x1030
incq %r12
addq $0x28, %r15
cmpq %r12, 0x8(%rsp)
jne 0x1f9c
leaq 0x2a4c(%rip), %rdi      # 0x4a90
callq 0x1060
leaq 0x2a4e(%rip), %rdi      # 0x4a9e
callq 0x1060
leaq 0x2a7e(%rip), %rdi      # 0x4ada
callq 0x1060
leaq 0x2abb(%rip), %rdi      # 0x4b23
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O1/Astor-Bizard[P]ProjetS5_Groupe2/src/afficher_section.c
// Function: afficher_string
void afficher_string(unsigned char *section, int size){
	int i,j;
	unsigned char aff[17];
	for(j=0;j<17;j++)aff[j]='\0';
	printf("  0x%08x ",0);
	i=0;
	// On affiche le contenu de la section
	while(i<size){
		// Affichage de l'offset
		if(i!=0){
			if(i%16==0){
				printf(" %s\n  0x%08x ",aff,i);	// Affichage non hexa
				for(j=0;j<17;j++)aff[j]='\0';
			}
			else if(i%4==0) printf(" ");
		}

		// Affichage hexa
		printf("%02x",section[i]);

		// Memorisation du caractère pour écriture non hexa
		aff[i%16]=section[i];
		if(aff[i%16]<32 || aff[i%16]>126) aff[i%16]='.';
		i++;
	}

	// Terminaison de l'affichage
	while(i%16!=0){
		if(i%4==0) printf(" ");
		printf("  ");
		i++;
	}
	printf(" %s\n\n",aff);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movb $0x0, 0x10(%rsp)
leaq 0x28ec(%rip), %rdi      # 0x4bc4
xorl %ebx, %ebx
xorl %esi, %esi
xorl %eax, %eax
callq 0x1090
testl %ebp, %ebp
jle 0x2363
movl %ebp, %ebp
leaq 0x28de(%rip), %r15      # 0x4bce
movl $0x2e, %r12d
movq %rsp, %r13
xorl %ebx, %ebx
testq %rbx, %rbx
je 0x2335
testb $0xf, %bl
je 0x2316
testb $0x3, %bl
jne 0x2335
movl $0x20, %edi
callq 0x1040
jmp 0x2335
leaq 0x28a3(%rip), %rdi      # 0x4bc0
movq %r13, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x1090
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movb $0x0, 0x10(%rsp)
movzbl (%r14,%rbx), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x1090
movzbl (%r14,%rbx), %eax
movl %ebx, %ecx
andl $0xf, %ecx
leal -0x7f(%rax), %edx
cmpb $-0x5f, %dl
cmovbl %r12d, %eax
movb %al, (%rsp,%rcx)
incq %rbx
cmpq %rbx, %rbp
jne 0x22fb
testb $0xf, %bl
je 0x238f
leaq 0x2086(%rip), %r14      # 0x43f5
testb $0x3, %bl
jne 0x237e
movl $0x20, %edi
callq 0x1040
movq %r14, %rdi
xorl %eax, %eax
callq 0x1090
incl %ebx
testb $0xf, %bl
jne 0x236f
leaq 0x1cb6(%rip), %rdi      # 0x404c
movq %rsp, %rsi
xorl %eax, %eax
callq 0x1090
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Astor-Bizard[P]ProjetS5_Groupe2/src/afficher_section.c
// Function: index_Shdr
int index_Shdr(char str[], SectionsHeadersList shList) {
	int i,num_sh;
	char *name;
	int different;
	if(str[0]!='\0'){
		// Cas nombre : on traduit le nombre (string) en int
		i=0;
		num_sh=0;
		while(is_digit(str[i])){
			num_sh = num_sh*10 + str[i]-ASCII_0;
			i++;
		}
		if(str[i]=='\0'){
			if(num_sh<shList.size){
				name=getSectionNameBis(shList.names, shList.headers[num_sh]);
				strcpy(str, name);
				free(name);
			}
			else num_sh=-1;
		}
		// Cas nom : on le cherche dans la table shstrtab
		else{
			num_sh=-1;
			different=1;
			while(num_sh<shList.size-1 && different){
				num_sh++;
				name=getSectionNameBis(shList.names, shList.headers[num_sh]);
				different=strcmp(str, name);
				free(name);
			}
			if(different) num_sh=-1;
		}
		return num_sh;
	}
	else return -1;
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0x0, (%rdi)
je 0x2523
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
leaq 0xa0(%rsp), %rcx
movb (%rdi), %dl
leal -0x3a(%rdx), %esi
xorl %r15d, %r15d
cmpb $-0xa, %sil
jb 0x2408
leaq 0x1(%rbx), %rsi
xorl %r15d, %r15d
leal (%r15,%r15,4), %edi
movzbl %dl, %edx
leal (%rdx,%rdi,2), %r15d
addl $-0x30, %r15d
movb (%rsi), %dl
leal -0x3a(%rdx), %edi
incq %rsi
cmpb $-0xb, %dil
ja 0x23eb
movslq 0x10(%rcx), %r12
testb %dl, %dl
je 0x24aa
testl %r12d, %r12d
jle 0x2515
movq %rbx, 0x60(%rsp)
decq %r12
movq (%rcx), %r13
movq 0x8(%rcx), %r14
xorl %ecx, %ecx
movq %rcx, %rbx
movq 0x20(%r13), %rax
movq %rax, 0x50(%rsp)
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movaps %xmm1, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x20(%rsp)
movaps 0x30(%rsp), %xmm0
movaps 0x40(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r14, %rdi
callq 0x1e49
movq %rax, %r15
movq 0x60(%rsp), %rdi
movq %rax, %rsi
callq 0x10b0
movl %eax, %ebp
movq %r15, %rdi
callq 0x1030
leaq 0x1(%rbx), %rcx
cmpq %r12, %rbx
jge 0x249e
addq $0x28, %r13
testl %ebp, %ebp
jne 0x242e
decl %ecx
xorl %eax, %eax
negl %ebp
sbbl %eax, %eax
orl %ecx, %eax
jmp 0x2515
cmpl %r12d, %r15d
jge 0x2515
movq (%rcx), %rax
movq 0x8(%rcx), %rdi
movslq %r15d, %rcx
leaq (%rcx,%rcx,4), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movq %rdx, 0x50(%rsp)
movups (%rax,%rcx,8), %xmm0
movups 0x10(%rax,%rcx,8), %xmm1
movaps %xmm1, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x20(%rsp)
movaps 0x30(%rsp), %xmm0
movaps 0x40(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x1e49
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1050
movq %r14, %rdi
callq 0x1030
movl %r15d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Astor-Bizard[P]ProjetS5_Groupe2/src/afficher_section.c
// Function: recuperer_section_num
unsigned char *recuperer_section_num(FILE *f, SectionsHeadersList shList, int num_sh) {
	int i;
	unsigned char c;
	unsigned char *section;

	if(num_sh<0 || num_sh>=shList.size){
		return NULL;
	}
	else{
		// On se place
		fseek(f,shList.headers[num_sh].sh_offset,0);
		section=malloc(sizeof(unsigned char)*shList.headers[num_sh].sh_size);
		if(section != NULL){
			// On mémorise le contenu de la section
			for(i=0;i<shList.headers[num_sh].sh_size;i++){
				c=fgetc(f);
				section[i]=c;
			}
		}
		else{
			fprintf(stderr,"Erreur d'allocation !\n");
			exit(42);
		}
	}
	return section;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
xorl %r14d, %r14d
testl %esi, %esi
js 0x2784
cmpl %esi, 0x40(%rsp)
jle 0x2784
movq %rdi, %rbx
leaq 0x30(%rsp), %rax
movq (%rax), %r15
movl %esi, %eax
leaq (%rax,%rax,4), %r12
movl 0x10(%r15,%r12,8), %esi
xorl %edx, %edx
callq 0x10e0
movl 0x14(%r15,%r12,8), %edi
callq 0x10d0
testq %rax, %rax
je 0x2793
movq %rax, %r14
leaq (%r15,%r12,8), %r15
addq $0x14, %r15
cmpl $0x0, (%r15)
je 0x2784
xorl %r12d, %r12d
movq %rbx, %rdi
callq 0x10a0
movb %al, (%r14,%r12)
incq %r12
movl (%r15), %eax
cmpq %rax, %r12
jb 0x276d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x1185
// File: /workspace/github_c_makefile_star2_O1/Astor-Bizard[P]ProjetS5_Groupe2/src/lectureST.c
// Function: fetchSymbolNames
char* fetchSymbolNames(FILE* f, SectionsHeadersList shList, int symbolTabIndex) 
{
	int i;

	char* symbols = (char*) malloc(sizeof(char)*shList.headers[symbolTabIndex+1].sh_size);
	if (symbols==NULL) {
		printf("Erreur lors de l'allocation initiale de la table des noms.");
		return NULL;
	}

	fseek(f, shList.headers[symbolTabIndex+1].sh_offset, 0);
	for(i=0; i<shList.headers[symbolTabIndex+1].sh_size; i++)
		symbols[i] = fgetc(f);
	
	return symbols;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x30(%rsp), %r15
incl %esi
movslq %esi, %rax
leaq (%rax,%rax,4), %r12
movl 0x14(%r15,%r12,8), %edi
callq 0x10d0
testq %rax, %rax
je 0x2ad3
movq %rax, %rbx
leaq (%r15,%r12,8), %r15
addq $0x14, %r15
movl -0x4(%r15), %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x10e0
cmpl $0x0, (%r15)
je 0x2ae3
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x10a0
movb %al, (%rbx,%r12)
incq %r12
movl (%r15), %eax
cmpq %rax, %r12
jb 0x2aba
jmp 0x2ae3
leaq 0x1eb4(%rip), %rdi      # 0x498e
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1090
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Astor-Bizard[P]ProjetS5_Groupe2/src/lectureST.c
// Function: afficherTableSymboles
void afficherTableSymboles(ListeSymboles listeSymboles, Elf32_Ehdr elfHeader) {
	char* symbolString;
	unsigned char bind, info;
	int j;

	printf("\nSymbol table '.symtab' contains %d entries:\n", listeSymboles.nbSymboles);
	printf("   Num:    Value  Size Type    Bind   Vis      Ndx Name\n");

	for(j=0; j<listeSymboles.nbSymboles; j++)
	{
		info = 15 & listeSymboles.symboles[j].st_info;
		bind = 15<<4 & listeSymboles.symboles[j].st_info;

		symbolString = getSymbolNameBis(listeSymboles.names, listeSymboles.symboles[j]);

		printf("   %3d: %08x %5d %-7s %-6s %-7s  ", j, listeSymboles.symboles[j].st_value, listeSymboles.symboles[j].st_size, typeSymbole(info), bindSymbole(bind), visionSymbole(listeSymboles.symboles[j].st_other));
		switch(listeSymboles.symboles[j].st_shndx)
		{
			case 0: printf("UND ");
				break;
			case 65521: printf("ABS ");
				break;
			case 65522: printf("COM ");
				break;
			default: printf("%3d ", listeSymboles.symboles[j].st_shndx);
		}
		printf("%s\n", symbolString);
		free(symbolString);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movslq 0x60(%rsp), %rbx
leaq 0x2219(%rip), %rdi      # 0x4d25
movl %ebx, %esi
xorl %eax, %eax
callq 0x1090
leaq 0x22cc(%rip), %rdi      # 0x4de8
callq 0x1060
movq %rbx, 0x10(%rsp)
testq %rbx, %rbx
jle 0x2c65
leaq 0x50(%rsp), %rax
movq (%rax), %rbx
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
addq $0xe, %rbx
xorl %r13d, %r13d
movzbl -0x2(%rbx), %r14d
movl -0xe(%rbx), %esi
movq 0x8(%rsp), %rdi
callq 0x2d04
movq %rax, %rbp
movl -0xa(%rbx), %r12d
movl -0x6(%rbx), %r15d
movl %r14d, %edi
andl $0xf, %edi
callq 0x2c79
shrl $0x4, %r14d
cmpl $0x1, %r14d
jle 0x2b94
cmpl $0x2, %r14d
je 0x2baf
cmpl $0xd, %r14d
je 0x2bb8
cmpl $0xf, %r14d
jne 0x2bc1
leaq 0x1d20(%rip), %r9       # 0x48b2
jmp 0x2bc8
leaq 0x2206(%rip), %r9       # 0x4da1
testl %r14d, %r14d
je 0x2bc8
cmpl $0x1, %r14d
jne 0x2bc1
leaq 0x21fa(%rip), %r9       # 0x4da7
jmp 0x2bc8
leaq 0x21f8(%rip), %r9       # 0x4dae
jmp 0x2bc8
leaq 0x1cec(%rip), %r9       # 0x48ab
jmp 0x2bc8
leaq 0x1d4b(%rip), %r9       # 0x4913
cmpb $0x0, -0x1(%rbx)
leaq 0x1d40(%rip), %rcx      # 0x4913
leaq 0x21d9(%rip), %rdx      # 0x4db3
cmoveq %rdx, %rcx
movq %rcx, (%rsp)
leaq 0x216a(%rip), %rdi      # 0x4d53
movl %r13d, %esi
movl %r12d, %edx
movl %r15d, %ecx
movq %rax, %r8
xorl %eax, %eax
callq 0x1090
movzwl (%rbx), %esi
cmpl $0xfff2, %esi           # imm = 0xFFF2
je 0x2c25
cmpl $0xfff1, %esi           # imm = 0xFFF1
je 0x2c1c
testl %esi, %esi
jne 0x2c35
leaq 0x215b(%rip), %rdi      # 0x4d75
jmp 0x2c2c
leaq 0x2157(%rip), %rdi      # 0x4d7a
jmp 0x2c2c
leaq 0x2153(%rip), %rdi      # 0x4d7f
xorl %eax, %eax
callq 0x1090
jmp 0x2c43
leaq 0x2148(%rip), %rdi      # 0x4d84
xorl %eax, %eax
callq 0x1090
movq %rbp, %rdi
callq 0x1060
movq %rbp, %rdi
callq 0x1030
incq %r13
addq $0x10, %rbx
cmpq %r13, 0x10(%rsp)
jne 0x2b47
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Astor-Bizard[P]ProjetS5_Groupe2/src/lectureST.c
// Function: bindSymbole
char* bindSymbole(unsigned char bind)
{
	char* bindSymboleChar;

	switch(bind>>4)
	{
		case STB_LOCAL:
			bindSymboleChar = "LOCAL";
			break;
		case STB_GLOBAL:
			bindSymboleChar = "GLOBAL";
			break;
		case STB_WEAK:
			bindSymboleChar = "WEAK";
			break;
		case STB_LOPROC:
			bindSymboleChar = "LOPROC";
			break;
		case STB_HIPROC:
			bindSymboleChar = "HIPROC";
			break;
		default:
			bindSymboleChar = "# ERR #";
			break;
	}
	return bindSymboleChar;
}

// Assembly:
shrb $0x4, %dil
movzbl %dil, %eax
cmpl $0x1, %eax
jle 0x2cbe
cmpl $0x2, %eax
je 0x2ccf
cmpl $0xd, %eax
je 0x2cd7
cmpl $0xf, %eax
jne 0x2ce7
leaq 0x1bf5(%rip), %rax      # 0x48b2
retq
testl %eax, %eax
je 0x2cdf
cmpl $0x1, %eax
jne 0x2ce7
leaq 0x20d9(%rip), %rax      # 0x4da7
retq
leaq 0x20d8(%rip), %rax      # 0x4dae
retq
leaq 0x1bcd(%rip), %rax      # 0x48ab
retq
leaq 0x20bb(%rip), %rax      # 0x4da1
retq
leaq 0x1c25(%rip), %rax      # 0x4913
retq
// File: /workspace/github_c_makefile_star2_O1/Astor-Bizard[P]ProjetS5_Groupe2/src/lectureST.c
// Function: getSymbolName
char* getSymbolName(char* symbols, uint32_t symbolIndex) 
{
	int i = 0;

	while(symbols[symbolIndex+i] != '\0')
		i++;
	i++;

	char* symbolName = (char*) malloc(sizeof(char)*i);
	if (symbols==NULL) {
		printf("Erreur lors de l'allocation initiale d'un nom de section.");
		return NULL;
	}

	i = 0;
	while(symbols[symbolIndex+i] != '\0') {
		symbolName[i] = symbols[symbolIndex+i];
		i++;
	}
	symbolName[i] = '\0';

	return symbolName;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl %esi, %r12d
xorl %eax, %eax
leal (%r12,%rax), %ecx
incq %rax
cmpb $0x0, (%r14,%rcx)
jne 0x2d16
movl %eax, %edi
callq 0x10d0
testq %r14, %r14
je 0x2d57
movq %rax, %r15
movb (%r14,%r12), %al
testb %al, %al
je 0x2d6a
incl %ebx
xorl %ecx, %ecx
movq %rcx, %rdx
movb %al, (%r15,%rcx)
incq %rcx
addl %ebx, %edx
movb (%r14,%rdx), %al
testb %al, %al
jne 0x2d3f
movl %ecx, %eax
jmp 0x2d6c
leaq 0x1c6c(%rip), %rdi      # 0x49ca
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x1090
jmp 0x2d71
xorl %eax, %eax
movb $0x0, (%r15,%rax)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Astor-Bizard[P]ProjetS5_Groupe2/src/affichage_relocation.c
// Function: lire_octets_charT
long long unsigned int lire_octets_charT(unsigned char *tableau, 
    int hdr_mode, 
    int debut, 
    int nombre)
{
	int i;
	long long unsigned int R=0;
	if(hdr_mode == B_ENDIAN)
	{
		for(i=0;i<nombre;i++)
		{
			R = (R<<8) | tableau[debut+i];
		}
	}
	else
	{
		for(i=0; i<nombre; i++)
		{
			R =  R | (tableau[debut+i] << (i*8));
		}
	}
    return R;
}

// Assembly:
cmpl $0x2, %esi
jne 0x2daa
testl %ecx, %ecx
jle 0x2dd6
movslq %edx, %rax
movl %ecx, %ecx
addq %rax, %rdi
xorl %edx, %edx
xorl %eax, %eax
shlq $0x8, %rax
movzbl (%rdi,%rdx), %esi
orq %rsi, %rax
incq %rdx
cmpq %rdx, %rcx
jne 0x2d95
jmp 0x2dd5
testl %ecx, %ecx
jle 0x2dd6
movslq %edx, %rax
movl %ecx, %edx
addq %rax, %rdi
shlq $0x3, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
movzbl (%rdi), %esi
shll %cl, %esi
movslq %esi, %rsi
orq %rsi, %rax
incq %rdi
addq $0x8, %rcx
cmpq %rcx, %rdx
jne 0x2dbe
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/Astor-Bizard[P]ProjetS5_Groupe2/src/affichage_relocation.c
// Function: print_section
void print_section(unsigned long long int addr, SectionsHeadersList liste_sections, Elf32_Ehdr header)
{
    int i;
    for(i=0; i< header.e_shnum;i++)
    {
        if(liste_sections.headers[i].sh_offset <= addr && addr <= liste_sections.headers[i].sh_offset + liste_sections.headers[i].sh_size)
        {
            printf("%s", liste_sections.names + liste_sections.headers[i].sh_name);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movzwl 0x88(%rsp), %eax
testq %rax, %rax
je 0x2e63
movq %rdi, %rbx
leaq 0x40(%rsp), %rcx
movq (%rcx), %r15
movq 0x8(%rcx), %r12
shll $0x3, %eax
leaq (%rax,%rax,4), %r13
leaq 0x1da0(%rip), %r14      # 0x4bd3
xorl %ebp, %ebp
movl 0x10(%r15,%rbp), %eax
cmpq %rbx, %rax
ja 0x2e5a
addl 0x14(%r15,%rbp), %eax
cmpq %rbx, %rax
jb 0x2e5a
movl (%r15,%rbp), %esi
addq %r12, %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1090
addq $0x28, %rbp
cmpq %rbp, %r13
jne 0x2e35
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Astor-Bizard[P]ProjetS5_Groupe2/src/affichage_relocation.c
// Function: print_symbol
void print_symbol(int sym, ListeSymboles table_symbol, Elf32_Ehdr header, SectionsHeadersList liste_sections)
{
    printf("%08x   ", table_symbol.symboles[sym].st_value);
		char *name;
    if((table_symbol.symboles[sym].st_info & 0xf) != 3)
    {
	   name = getSymbolNameBis(table_symbol.names, table_symbol.symboles[sym]);
    }
    else
    {
		name = getSectionNameBis(liste_sections.names, liste_sections.headers[table_symbol.symboles[sym].st_shndx]);
    }
	printf("%s",name);
	free(name);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq 0x80(%rsp), %r14
movslq %edi, %r15
shlq $0x4, %r15
leaq (%r14,%r15), %rbx
movl 0x4(%r14,%r15), %esi
leaq 0x2239(%rip), %rdi      # 0x50d3
xorl %eax, %eax
callq 0x1090
movb 0xc(%r14,%r15), %al
andb $0xf, %al
cmpb $0x3, %al
jne 0x2f04
leaq 0xd0(%rsp), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rdi
movzwl 0xe(%rbx), %eax
leaq (%rax,%rax,4), %rax
movq 0x20(%rcx,%rax,8), %rdx
movq %rdx, 0x50(%rsp)
movups (%rcx,%rax,8), %xmm0
movups 0x10(%rcx,%rax,8), %xmm1
movaps %xmm1, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x20(%rsp)
movaps 0x30(%rsp), %xmm0
movaps 0x40(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x1e49
jmp 0x2f1c
leaq 0x80(%rsp), %rax
movq 0x8(%rax), %rdi
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
callq 0x2c74
movq %rax, %rbx
leaq 0x1cad(%rip), %rdi      # 0x4bd3
movq %rax, %rsi
xorl %eax, %eax
callq 0x1090
movq %rbx, %rdi
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/Astor-Bizard[P]ProjetS5_Groupe2/src/affichage_relocation.c
// Function: affichage_relocation
Str_Reloc affichage_relocation(FILE* f,
    Elf32_Ehdr header,
    SectionsHeadersList liste_sections, 
    ListeSymboles table_symbol,
    int silent)
{
    // initialisation
    Str_Reloc RETOUR;
    RETOUR.nb_Rel=0;
    RETOUR.Rel=NULL;
    RETOUR.Sec_Rel=NULL;

	int i=0,ok=0;
    char* CurrentSectionName;

    // on parcours les titres des sections pour trouver les sections de reallocation.
    i=0;
	while(i<header.e_shnum)
	{
        CurrentSectionName = liste_sections.names + liste_sections.headers[i].sh_name;
		// on vérifie toutes les sections
		// si ce sont des sections de relocations:
		/*if( CurrentSectionName[0]=='.' 
			&& CurrentSectionName[1]=='r' 
			&& CurrentSectionName[2]=='e' 
			&& CurrentSectionName[3]=='l' 
			&& CurrentSectionName[4]=='a' )
		{
            //printf("Nom de la section courante:%s n°%i\n",CurrentSectionName,i);
			//afficher_sectionRA(f, liste_sections, header, i, &RETOUR, table_symbol);
		}
		else */if (CurrentSectionName[0]=='.' 
            && CurrentSectionName[1]=='r' 
            && CurrentSectionName[2]=='e' 
            && CurrentSectionName[3]=='l' )
		{
            //printf("Nom de la section courante:%s n°%i\n", CurrentSectionName, i);
			afficher_sectionR(f, liste_sections, header, i, &RETOUR, table_symbol, silent);
			ok = 1;
		}
        i++;
	}
	if(!ok && !silent) printf("\nThere are no relocations in this file.\n");
    return RETOUR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %edx, %r12d
movq %rsi, 0x70(%rsp)
movq %rdi, %rbx
movl $0x0, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movzwl 0xe0(%rsp), %eax
testq %rax, %rax
je 0x3382
leaq 0xe8(%rsp), %r13
shll $0x3, %eax
leaq (%rax,%rax,4), %r14
xorl %ebp, %ebp
xorl %r15d, %r15d
xorl %eax, %eax
movq (%r13), %rdx
movq 0x8(%r13), %rsi
movl (%rdx,%rbp), %edx
cmpb $0x2e, (%rsi,%rdx)
jne 0x3370
cmpb $0x72, 0x1(%rsi,%rdx)
jne 0x3370
cmpb $0x65, 0x2(%rsi,%rdx)
jne 0x3370
cmpb $0x6c, 0x3(%rsi,%rdx)
jne 0x3370
leaq 0x100(%rsp), %rdx
movq 0x10(%rdx), %rax
movq %rax, 0x60(%rsp)
movups (%rdx), %xmm0
movups %xmm0, 0x50(%rsp)
leaq 0xb0(%rsp), %rdx
movl 0x30(%rdx), %eax
movl %eax, 0x48(%rsp)
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movups 0x20(%rdx), %xmm2
movups %xmm2, 0x38(%rsp)
movups %xmm1, 0x28(%rsp)
movups %xmm0, 0x18(%rsp)
movq 0x10(%r13), %rax
movq %rax, 0x10(%rsp)
movups (%r13), %xmm0
movups %xmm0, (%rsp)
movq 0x70(%rsp), %rdi
movl %r15d, %esi
movq %rbx, %rdx
movl %r12d, %ecx
callq 0x2f41
movl $0x1, %eax
incl %r15d
addq $0x28, %rbp
cmpq %rbp, %r14
jne 0x32da
jmp 0x3384
xorl %eax, %eax
orl %r12d, %eax
jne 0x3395
leaq 0x1dd2(%rip), %rdi      # 0x5162
callq 0x1060
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/phoboslab[P]pl_mpeg/pl_mpeg_player_gl.c
// Function: app_on_video
void app_on_video(plm_t *mpeg, plm_frame_t *frame, void *user) {
	app_t *self = (app_t *)user;
	
	// Hand the decoded data over to OpenGL. For the RGB texture mode, the
	// YCrCb->RGB conversion is done on the CPU.

	if (self->texture_mode == APP_TEXTURE_MODE_YCRCB) {
		app_update_texture(self, GL_TEXTURE0, self->texture_y, &frame->y);
		app_update_texture(self, GL_TEXTURE1, self->texture_cb, &frame->cb);
		app_update_texture(self, GL_TEXTURE2, self->texture_cr, &frame->cr);

		// The dimensions of the planes are always rounded up to the next
		// multiple of 16. We don't want to display these extra pixels, so
		// calculate the crop w/h and hand it over to the shader program.
		float cw = (float)frame->width / (float)frame->y.width;
		float ch = (float)frame->height / (float)frame->y.height;
		glUniform2f(self->texture_crop_size, cw, ch);
	}
	else {
		plm_frame_to_rgb(frame, self->rgb_data, frame->width * 3);
	
		glBindTexture(GL_TEXTURE_2D, self->texture_rgb);
		glTexImage2D(
			GL_TEXTURE_2D, 0, GL_RGB, frame->width, frame->height, 0,
			GL_RGB, GL_UNSIGNED_BYTE, self->rgb_data
		);

		// plm_frame_to_rgb() always returns the cropped portion of the display
		// size, so the crop size is always 1.0, 1.0
		glUniform2f(self->texture_crop_size, 1.0, 1.0);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
cmpl $0x1, 0x3c(%rdx)
jne 0x8d26
movl 0x40(%rbx), %edx
leaq 0x10(%r14), %rcx
movl $0x84c0, %esi           # imm = 0x84C0
callq 0x9114
movl 0x44(%rbx), %edx
leaq 0x30(%r14), %rcx
movl $0x84c1, %esi           # imm = 0x84C1
callq 0x9114
movl 0x48(%rbx), %edx
leaq 0x20(%r14), %rcx
movl $0x84c2, %esi           # imm = 0x84C2
callq 0x9114
movl 0x8(%r14), %eax
cvtsi2ss %rax, %xmm0
movl 0x10(%r14), %eax
cvtsi2ss %rax, %xmm2
movl 0xc(%r14), %eax
cvtsi2ss %rax, %xmm1
movl 0x14(%r14), %eax
cvtsi2ss %rax, %xmm3
divss %xmm2, %xmm0
divss %xmm3, %xmm1
movq 0x624a(%rip), %rax      # 0xef68
movq (%rax), %rax
movl 0x4c(%rbx), %edi
jmp 0x8d8f
movq 0x58(%rbx), %rsi
movl 0x8(%r14), %eax
leal (%rax,%rax,2), %edx
movq %r14, %rdi
callq 0x5f62
movl 0x50(%rbx), %esi
movl $0xde1, %edi            # imm = 0xDE1
callq 0x21d0
movl 0x8(%r14), %ecx
movl 0xc(%r14), %r8d
subq $0x8, %rsp
movl $0xde1, %edi            # imm = 0xDE1
xorl %esi, %esi
movl $0x1907, %edx           # imm = 0x1907
xorl %r9d, %r9d
pushq 0x58(%rbx)
pushq $0x1401                 # imm = 0x1401
pushq $0x1907                 # imm = 0x1907
callq 0x20b0
addq $0x20, %rsp
movq 0x61ea(%rip), %rax      # 0xef68
movq (%rax), %rax
movl 0x4c(%rbx), %edi
movss 0x2794(%rip), %xmm0     # 0xb520
movaps %xmm0, %xmm1
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O1/phoboslab[P]pl_mpeg/pl_mpeg_player_gl.c
// Function: app_compile_shader
GLuint app_compile_shader(app_t *self, GLenum type, const char *source) {
	GLuint shader = glCreateShader(type);
	glShaderSource(shader, 1, &source, NULL);
	glCompileShader(shader);
	
	GLint success;
	glGetShaderiv(shader, GL_COMPILE_STATUS, &success);
	if (!success) {
		int log_written;
		char log[256];
		glGetShaderInfoLog(shader, 256, &log_written, log);
		SDL_Log("Error compiling shader: %s.\n", log);
	}
	return shader;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movl %esi, %edi
leaq 0x8(%rsp), %r14
movq %rdx, (%r14)
movq 0x61e1(%rip), %rax      # 0xefa8
callq *(%rax)
movl %eax, %ebx
movq 0x61c6(%rip), %rax      # 0xef98
movl %ebx, %edi
movl $0x1, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq *(%rax)
movq 0x61a1(%rip), %rax      # 0xef88
movl %ebx, %edi
callq *(%rax)
movq 0x617e(%rip), %rax      # 0xef70
leaq 0x4(%rsp), %r14
movl %ebx, %edi
movl $0x8b81, %esi           # imm = 0x8B81
movq %r14, %rdx
callq *(%rax)
cmpl $0x0, (%r14)
jne 0x8e35
movq 0x61a0(%rip), %rax      # 0xefb0
movq %rsp, %rdx
leaq 0x10(%rsp), %r14
movl %ebx, %edi
movl $0x100, %esi            # imm = 0x100
movq %r14, %rcx
callq *(%rax)
leaq 0x2af3(%rip), %rdi      # 0xb91e
movq %r14, %rsi
xorl %eax, %eax
callq 0x21f0
movl %ebx, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r14
retq