LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_byte_array_stop_encode_store
int cram_byte_array_stop_encode_store(cram_codec *c, cram_block *b,
                                      char *prefix, int version) {
    int len = 0;
    char buf[20], *cp = buf;

    if (prefix) {
        size_t l = strlen(prefix);
        BLOCK_APPEND(b, prefix, l);
        len += l;
    }

    cp += c->vv->varint_put32(cp, buf+20, c->codec);

    if (CRAM_MAJOR_VERS(version) == 1) {
        cp += c->vv->varint_put32(cp, buf+20, 5);
        *cp++ = c->u.e_byte_array_stop.stop;
        *cp++ = (c->u.e_byte_array_stop.content_id >>  0) & 0xff;
        *cp++ = (c->u.e_byte_array_stop.content_id >>  8) & 0xff;
        *cp++ = (c->u.e_byte_array_stop.content_id >> 16) & 0xff;
        *cp++ = (c->u.e_byte_array_stop.content_id >> 24) & 0xff;
    } else {
        cp += c->vv->varint_put32(cp, buf+20, 1 +
                                  c->vv->varint_size(c->u.e_byte_array_stop.content_id));
        *cp++ = c->u.e_byte_array_stop.stop;
        cp += c->vv->varint_put32(cp, buf+20, c->u.e_byte_array_stop.content_id);
    }

    BLOCK_APPEND(b, buf, cp-buf);
    len += cp-buf;

    return len;

 block_err:
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %ebp
movq %rdi, %r15
pushq $-0x1
popq %r14
testq %rdx, %rdx
movq %rsi, 0x8(%rsp)
je 0x744ed
movq %rdx, %r12
movq %rsi, %rbx
movq %rdx, %rdi
callq 0x41d0
movq %rax, %r13
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x6f15a
xorl %ebx, %ebx
testl %eax, %eax
cmovnsq %r13, %rbx
jns 0x744ef
jmp 0x745b0
xorl %ebx, %ebx
movq 0x10(%r15), %rax
leaq 0x24(%rsp), %r13
movl (%r15), %edx
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq *0x38(%rax)
cltq
leaq (%rsp,%rax), %r12
addq $0x10, %r12
andl $0xffffff00, %ebp       # imm = 0xFFFFFF00
movq 0x10(%r15), %rax
movq 0x38(%rax), %r14
cmpl $0x100, %ebp            # imm = 0x100
jne 0x7454f
pushq $0x5
popq %rdx
movq %r12, %rdi
movq %r13, %rsi
callq *%r14
cltq
movb 0x60(%r15), %cl
addq %rax, %r12
addq $0x5, %r12
movb %cl, -0x5(%r12)
movl 0x64(%r15), %eax
movl %eax, -0x4(%r12)
jmp 0x7458d
movslq 0x64(%r15), %rdi
callq *0x78(%rax)
leal 0x1(%rax), %edx
movq %r12, %rdi
movq %r13, %rsi
callq *%r14
cltq
leaq (%r12,%rax), %r14
movb 0x60(%r15), %cl
leaq (%r12,%rax), %rdi
incq %rdi
movb %cl, -0x1(%rdi)
movq 0x10(%r15), %rax
movl 0x64(%r15), %edx
movq %r13, %rsi
callq *0x38(%rax)
cltq
leaq (%rax,%r14), %r12
incq %r12
leaq 0x10(%rsp), %rsi
subq %rsi, %r12
movq 0x8(%rsp), %rdi
movq %r12, %rdx
callq 0x6f15a
testl %eax, %eax
pushq $-0x1
popq %r14
js 0x745b0
addl %ebx, %r12d
movl %r12d, %r14d
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x7460c
movl $0x5, (%rax)
leaq -0x149(%rip), %rcx      # 0x74499
movq %rcx, 0x20(%rax)
leaq -0x1b1(%rip), %rcx      # 0x7443c
movq %rcx, 0x30(%rax)
leaq -0x15a(%rip), %rcx      # 0x7449e
movq %rcx, 0x38(%rax)
andq $0x0, 0x48(%rax)
movb (%rbx), %cl
movb %cl, 0x60(%rax)
movl 0x4(%rbx), %ecx
movl %ecx, 0x64(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x7462d
movl %edi, %eax
leaq 0xfb58(%rip), %rcx      # 0x84174
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x424b(%rip), %rax      # 0x78877
retq
addl $-0x29, %edi
cmpl $0x3, %edi
ja 0x746ad
leaq 0xfb60(%rip), %rax      # 0x8419c
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x1027a(%rip), %rax     # 0x848c6
retq
leaq 0x10235(%rip), %rax     # 0x84889
retq
leaq 0x10264(%rip), %rax     # 0x848c0
retq
leaq 0x10216(%rip), %rax     # 0x8487a
retq
leaq 0x10278(%rip), %rax     # 0x848e4
retq
leaq 0x1020d(%rip), %rax     # 0x84881
retq
leaq 0x10231(%rip), %rax     # 0x848ad
retq
leaq 0x878b(%rip), %rax      # 0x7ce0f
retq
leaq 0x10263(%rip), %rax     # 0x848ef
retq
leaq 0x10242(%rip), %rax     # 0x848d6
retq
leaq 0x101fc(%rip), %rax     # 0x84898
retq
leaq 0x10204(%rip), %rax     # 0x848a8
retq
leaq 0x10208(%rip), %rax     # 0x848b4
retq
leaq 0x58a6(%rip), %rax      # 0x79f5a
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $-0x2
popq %rbp
cmpq $0x9, %rcx
ja 0x746e3
leaq 0xfad8(%rip), %rax      # 0x841ac
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
pushq $-0x1
popq %r14
jmp 0x74730
leal -0x29(%rcx), %eax
cmpl $0x2, %eax
jb 0x746f8
leal -0x2b(%rcx), %eax
cmpl $0x2, %eax
jae 0x74745
movl %ebp, %r14d
jmp 0x74730
movl 0x60(%r15), %r14d
jmp 0x74730
movl 0x64(%r15), %r14d
jmp 0x74730
xorl %r14d, %r14d
cmpl $0x1, 0x60(%r15)
sete %r14b
notl %r14d
jmp 0x74730
movq 0x60(%r15), %rdi
xorl %esi, %esi
callq 0x746b5
movl %eax, %r14d
movq 0x68(%r15), %rdi
xorl %esi, %esi
callq 0x746b5
movl %eax, %ebp
testq %rbx, %rbx
je 0x74737
movl %ebp, (%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10216(%rip), %rsi     # 0x84962
leaq 0x10220(%rip), %rdx     # 0x84973
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x110c6
jmp 0x746dd
// File: /workspace/github_c_makefile_star2_O2/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
movq %rbx, %rdi
callq 0x1080
cmpl $-0x1, %eax
je 0x11c6
movl %eax, %edi
callq 0x1030
jmp 0x11b0
pushq $0xa
popq %rdi
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/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 0x2ea6(%rip), %rdi      # 0x4080
leaq 0xe23(%rip), %rdx       # 0x2004
movl $0x100, %esi            # imm = 0x100
callq 0x1040
testq %rax, %rax
je 0x1239
movq %rax, %r14
leaq 0xe16(%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 0xe13(%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 0xdc7(%rip), %rdi       # 0x2007
callq 0x10a0
pushq $-0x1
popq %rbx
jmp 0x122f
// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x15e22(%rip), %rax     # 0x16fd0
movq (%rax), %rbx
cmpl $0x2, %edi
jl 0x11e8
movq %rsi, %r15
movl %edi, %ebp
movq 0x8(%rsi), %rdi
leaq 0x1e3e(%rip), %rsi      # 0x3004
callq 0x1080
movq %rax, %r14
cmpl $0x2, %ebp
je 0x11f2
movq 0x10(%r15), %rdi
leaq 0x1e29(%rip), %rsi      # 0x3007
callq 0x1080
movq %rax, %rbx
jmp 0x11f2
movq 0x15de9(%rip), %rax     # 0x16fd8
movq (%rax), %r14
movq 0x15dff(%rip), %r13     # 0x16ff8
leaq 0x1e0a(%rip), %r15      # 0x300a
movq %r14, %rdi
callq 0x1483
movl %eax, %ebp
cmpl $-0x2, %eax
je 0x1228
cmpl $-0x1, %ebp
je 0x1246
movzwl %bp, %edi
callq 0x15f0
movl %eax, %edi
movq %rbx, %rsi
callq 0x25f7
jmp 0x1200
movq (%r13), %r12
movq %r14, %rdi
callq 0x1070
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1060
jmp 0x1214
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x2dfe(%rip), %rdi      # 0x4052
callq 0x1060
leaq 0x2e1a(%rip), %rdi      # 0x407a
callq 0x1060
leaq 0x2e4a(%rip), %rdi      # 0x40b6
callq 0x1060
leaq 0x2e4c(%rip), %rdi      # 0x40c4
callq 0x1060
leaq 0x2e73(%rip), %rdi      # 0x40f7
callq 0x1060
leaq 0x2e98(%rip), %rdi      # 0x4128
callq 0x1060
leaq 0x2ebe(%rip), %rdi      # 0x415a
callq 0x1060
leaq 0x2edc(%rip), %rdi      # 0x4184
callq 0x1060
leaq 0x2efe(%rip), %rdi      # 0x41b2
callq 0x1060
leaq 0x2f2c(%rip), %rdi      # 0x41ec
callq 0x1060
leaq 0x2fa0(%rip), %rdi      # 0x426c
popq %rax
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O2/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
movl %edx, %ebx
movq %rsi, %r14
xorl %r15d, %r15d
testl %edx, %edx
cmovlel %r15d, %ebx
movsbl %dil, %ebp
xorl %r12d, %r12d
subl $0x1, %ebx
jb 0x165e
cmpl $0x1, %ebp
je 0x1646
cmpl $0x2, %ebp
jne 0x1658
shlq $0x8, %r12
movq %r14, %rdi
callq 0x10a0
jmp 0x1653
movq %r14, %rdi
callq 0x10a0
movl %r15d, %ecx
shll %cl, %eax
cltq
orq %rax, %r12
addl $0x8, %r15d
jmp 0x1629
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
imulq $0x28, %rax, %r12
movl 0x14(%r15,%r12), %edi
callq 0x10d0
movq %rax, %r14
testq %rax, %rax
je 0x1d04
addq %r12, %r15
addq $0x14, %r15
movl -0x4(%r15), %esi
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %edx, %edx
callq 0x10e0
movl (%r15), %eax
cmpq %rax, %r12
jae 0x1d10
movq %rbx, %rdi
callq 0x10a0
movb %al, (%r14,%r12)
incq %r12
jmp 0x1ceb
leaq 0x2c82(%rip), %rdi      # 0x498d
callq 0x1060
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %r14d
xorl %eax, %eax
leal (%r14,%rax), %ecx
incq %rax
cmpb $0x0, (%rbx,%rcx)
jne 0x1d2b
movl %eax, %edi
callq 0x10d0
xorl %ecx, %ecx
leal (%r14,%rcx), %edx
movb (%rbx,%rdx), %dl
testb %dl, %dl
je 0x1d54
movb %dl, (%rax,%rcx)
incq %rcx
jmp 0x1d41
movl %ecx, %ecx
movb $0x0, (%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %rbx
pushq %rax
movl %edi, %ebp
pushq $0x4
popq %rdi
callq 0x10d0
movq %rax, %rbx
testq %rax, %rax
je 0x1e43
xorl %eax, %eax
testb $0x1, %bpl
je 0x1d92
movb $0x57, (%rbx)
pushq $0x1
popq %rax
testb $0x2, %bpl
je 0x1da0
movl %eax, %ecx
incl %eax
movb $0x41, (%rbx,%rcx)
testb $0x4, %bpl
je 0x1dae
movl %eax, %ecx
incl %eax
movb $0x58, (%rbx,%rcx)
testb $0x10, %bpl
je 0x1dbc
movl %eax, %ecx
incl %eax
movb $0x4d, (%rbx,%rcx)
testb $0x20, %bpl
je 0x1dca
movl %eax, %ecx
incl %eax
movb $0x53, (%rbx,%rcx)
testb $0x40, %bpl
je 0x1dd8
movl %eax, %ecx
incl %eax
movb $0x49, (%rbx,%rcx)
testb %bpl, %bpl
jns 0x1de5
movl %eax, %ecx
incl %eax
movb $0x4c, (%rbx,%rcx)
btl $0x9, %ebp
jae 0x1df3
movl %eax, %ecx
incl %eax
movb $0x47, (%rbx,%rcx)
btl $0xa, %ebp
jae 0x1e01
movl %eax, %ecx
incl %eax
movb $0x54, (%rbx,%rcx)
testl %ebp, %ebp
jns 0x1e0d
movl %eax, %ecx
incl %eax
movb $0x45, (%rbx,%rcx)
btl $0x8, %ebp
jae 0x1e1b
movl %eax, %ecx
incl %eax
movb $0x4f, (%rbx,%rcx)
testl $0xff00000, %ebp        # imm = 0xFF00000
je 0x1e2b
movl %eax, %ecx
incl %eax
movb $0x6f, (%rbx,%rcx)
cmpl $0x10000000, %ebp       # imm = 0x10000000
jb 0x1e3b
movl %eax, %ecx
incl %eax
movb $0x70, (%rbx,%rcx)
movl %eax, %eax
movb $0x0, (%rbx,%rax)
jmp 0x1e4f
leaq 0x2b7f(%rip), %rdi      # 0x49c9
callq 0x1060
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
movl 0x98(%rsp), %ebx
movl 0x70(%rsp), %edx
leaq 0x2aa2(%rip), %rdi      # 0x491b
xorl %r14d, %r14d
movl %ebx, %esi
xorl %eax, %eax
callq 0x1090
leaq 0x2b67(%rip), %rdi      # 0x49f3
callq 0x1060
leaq 0x2b6c(%rip), %rdi      # 0x4a04
callq 0x1060
movq 0x88(%rsp), %r15
testl %ebx, %ebx
cmovlel %r14d, %ebx
movq %rbx, 0x8(%rsp)
movq 0x90(%rsp), %rax
movq %rax, (%rsp)
addq $0x24, %r15
xorl %ebp, %ebp
cmpq %rbp, 0x8(%rsp)
je 0x1f67
movl -0x24(%r15), %esi
movq (%rsp), %rdi
callq 0x1d1f
movq %rax, %r13
movq %rax, %rdi
callq 0x1080
cmpq $0x12, %rax
jb 0x1ef0
movb $0x0, 0x11(%r13)
movl -0x1c(%r15), %edi
callq 0x1d6b
movq %rax, 0x10(%rsp)
movl -0x20(%r15), %edi
callq 0x1bb0
movl -0x18(%r15), %r8d
movl -0x14(%r15), %r9d
movl -0x10(%r15), %r10d
movl (%r15), %r11d
movl -0xc(%r15), %ebx
movl -0x8(%r15), %r14d
movl -0x4(%r15), %r12d
leaq 0x2a2b(%rip), %rdi      # 0x4954
movl %ebp, %esi
movq %r13, %rdx
movq %rax, %rcx
xorl %eax, %eax
pushq %r12
pushq %r14
pushq %rbx
movq 0x28(%rsp), %rbx
pushq %rbx
pushq %r11
pushq %r10
callq 0x1090
addq $0x30, %rsp
movq %rbx, %rdi
callq 0x1030
movq %r13, %rdi
callq 0x1030
incq %rbp
addq $0x28, %r15
jmp 0x1ec2
leaq 0x2ae7(%rip), %rdi      # 0x4a55
callq 0x1060
leaq 0x2ae9(%rip), %rdi      # 0x4a63
callq 0x1060
leaq 0x2b19(%rip), %rdi      # 0x4a9f
callq 0x1060
leaq 0x2b56(%rip), %rdi      # 0x4ae8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O2/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, %ebx
movq %rdi, %r14
xorl %eax, %eax
cmpq $0x11, %rax
je 0x21ce
movb $0x0, (%rsp,%rax)
incq %rax
jmp 0x21bf
leaq 0x299b(%rip), %rdi      # 0x4b70
xorl %r15d, %r15d
xorl %esi, %esi
xorl %eax, %eax
callq 0x1090
testl %ebx, %ebx
cmovlel %r15d, %ebx
movl %ebx, %r12d
negb %r12b
leaq 0x2986(%rip), %r15      # 0x4b7a
xorl %ebp, %ebp
cmpq %rbx, %rbp
je 0x226e
testq %rbp, %rbp
je 0x223d
movl %ebp, %r13d
andl $0xf, %r13d
je 0x2219
testb $0x3, %bpl
jne 0x2240
pushq $0x20
popq %rdi
callq 0x1040
jmp 0x2240
leaq 0x294c(%rip), %rdi      # 0x4b6c
movq %rsp, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x1090
xorl %eax, %eax
cmpq $0x11, %rax
je 0x223d
movb $0x0, (%rsp,%rax)
incq %rax
jmp 0x222e
xorl %r13d, %r13d
movzbl (%r14,%rbp), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x1090
movzbl (%r14,%rbp), %eax
leal -0x7f(%rax), %ecx
cmpb $-0x5f, %cl
pushq $0x2e
popq %rcx
cmovbl %ecx, %eax
movl %r13d, %ecx
movb %al, (%rsp,%rcx)
incq %rbp
incb %r12b
jmp 0x21f6
andb $0xf, %r12b
pushq $0x20
popq %rbp
leaq 0x2179(%rip), %r14      # 0x43f5
movl %ebx, %eax
andb $0xf, %al
cmpb %al, %r12b
je 0x229f
testb $0x3, %bl
jne 0x2291
movl %ebp, %edi
callq 0x1040
movq %r14, %rdi
xorl %eax, %eax
callq 0x1090
incl %ebx
jmp 0x227c
leaq 0x1da6(%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_O2/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:
movb (%rdi), %dl
pushq $-0x1
popq %rax
testb %dl, %dl
je 0x2417
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
leaq 0xa0(%rsp), %rcx
leaq 0x1(%rdi), %rsi
xorl %ebp, %ebp
leal -0x3a(%rdx), %edi
cmpb $-0xa, %dil
jb 0x2307
imull $0xa, %ebp, %edi
movzbl %dl, %edx
leal (%rdi,%rdx), %ebp
addl $-0x30, %ebp
movb (%rsi), %dl
incq %rsi
jmp 0x22eb
movslq 0x10(%rcx), %r12
testb %dl, %dl
je 0x239f
movq %rbx, 0x60(%rsp)
decq %r12
movq (%rcx), %rbx
movq 0x8(%rcx), %r14
pushq $0x1
popq %rbp
pushq $-0x1
popq %r13
cmpq %r12, %r13
jge 0x2394
testl %ebp, %ebp
je 0x2394
incq %r13
movq 0x20(%rbx), %rax
movq %rax, 0x50(%rsp)
movups (%rbx), %xmm0
movups 0x10(%rbx), %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 0x1d62
movq %rax, %r15
movq 0x60(%rsp), %rdi
movq %rax, %rsi
callq 0x10b0
movl %eax, %ebp
movq %r15, %rdi
callq 0x1030
addq $0x28, %rbx
jmp 0x2329
xorl %eax, %eax
negl %ebp
sbbl %eax, %eax
orl %r13d, %eax
jmp 0x2409
cmpl %r12d, %ebp
jge 0x2409
movq (%rcx), %rax
movq 0x8(%rcx), %rdi
movslq %ebp, %rcx
imulq $0x28, %rcx, %rcx
movq 0x20(%rax,%rcx), %rdx
movq %rdx, 0x50(%rsp)
movups (%rax,%rcx), %xmm0
movups 0x10(%rax,%rcx), %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 0x1d62
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1050
movq %r14, %rdi
callq 0x1030
movl %ebp, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
xorl %r14d, %r14d
testl %esi, %esi
js 0x267f
cmpl %esi, 0x40(%rsp)
jle 0x267f
movq %rdi, %rbx
leaq 0x30(%rsp), %rax
movq (%rax), %r12
movl %esi, %eax
imulq $0x28, %rax, %r13
movl 0x10(%r12,%r13), %esi
xorl %edx, %edx
callq 0x10e0
movl 0x14(%r12,%r13), %r15d
movq %r15, %rdi
callq 0x10d0
testq %rax, %rax
je 0x268c
movq %rax, %r14
addq %r13, %r12
addq $0x14, %r12
xorl %r13d, %r13d
movl %r15d, %eax
cmpq %rax, %r13
jae 0x267f
movq %rbx, %rdi
callq 0x10a0
movb %al, (%r14,%r13)
incq %r13
movl (%r12), %r15d
jmp 0x2662
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x4965(%rip), %rax      # 0x6ff8
movq (%rax), %rcx
leaq 0x25b7(%rip), %rdi      # 0x4c54
pushq $0x16
popq %rsi
pushq $0x1
popq %rdx
callq 0x1140
pushq $0x2a
popq %rdi
callq 0x1130
// File: /workspace/github_c_makefile_star2_O2/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, %rbx
movq 0x30(%rsp), %r15
incl %esi
movslq %esi, %rax
imulq $0x28, %rax, %r12
movl 0x14(%r15,%r12), %edi
callq 0x10d0
movq %rax, %r14
testq %rax, %rax
je 0x29f0
addq %r12, %r15
addq $0x14, %r15
movl -0x4(%r15), %esi
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %edx, %edx
callq 0x10e0
movl (%r15), %eax
cmpq %rax, %r12
jae 0x29fe
movq %rbx, %rdi
callq 0x10a0
movb %al, (%r14,%r12)
incq %r12
jmp 0x29d7
leaq 0x1f97(%rip), %rdi      # 0x498e
xorl %eax, %eax
callq 0x1090
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 $0x28, %rsp
movl 0x70(%rsp), %r14d
leaq 0x22aa(%rip), %rdi      # 0x4cd1
xorl %ebx, %ebx
movl %r14d, %esi
xorl %eax, %eax
callq 0x1090
leaq 0x235a(%rip), %rdi      # 0x4d94
callq 0x1060
movq 0x60(%rsp), %rbp
movq 0x68(%rsp), %rax
movq %rax, 0x10(%rsp)
testl %r14d, %r14d
cmovlel %ebx, %r14d
movq %r14, 0x18(%rsp)
addq $0xe, %rbp
xorl %r13d, %r13d
cmpq %r13, 0x18(%rsp)
je 0x2b45
movzbl -0x2(%rbp), %r12d
movl -0xe(%rbp), %esi
movq 0x10(%rsp), %rdi
callq 0x2bdd
movq %rax, 0x20(%rsp)
movl -0xa(%rbp), %r15d
movl -0x6(%rbp), %r14d
movl %r12d, %edi
andl $0xf, %edi
callq 0x2b59
movq %rax, %rbx
andl $-0x10, %r12d
movl %r12d, %edi
callq 0x2b7a
cmpb $0x0, -0x1(%rbp)
leaq 0x1e63(%rip), %rcx      # 0x4913
leaq 0x22a8(%rip), %rdx      # 0x4d5f
cmoveq %rdx, %rcx
movq %rcx, (%rsp)
leaq 0x2239(%rip), %rdi      # 0x4cff
movl %r13d, %esi
movl %r15d, %edx
movl %r14d, %ecx
movq %rbx, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x1090
movzwl (%rbp), %esi
cmpl $0xfff2, %esi           # imm = 0xFFF2
je 0x2b06
cmpl $0xfff1, %esi           # imm = 0xFFF1
je 0x2afd
testl %esi, %esi
jne 0x2b16
leaq 0x2226(%rip), %rdi      # 0x4d21
jmp 0x2b0d
leaq 0x2222(%rip), %rdi      # 0x4d26
jmp 0x2b0d
leaq 0x221e(%rip), %rdi      # 0x4d2b
xorl %eax, %eax
callq 0x1090
jmp 0x2b24
leaq 0x2213(%rip), %rdi      # 0x4d30
xorl %eax, %eax
callq 0x1090
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x1060
movq %rbx, %rdi
callq 0x1030
incq %r13
addq $0x10, %rbp
jmp 0x2a61
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %r14d
xorl %eax, %eax
leal (%r14,%rax), %ecx
incq %rax
cmpb $0x0, (%rbx,%rcx)
jne 0x2be9
movl %eax, %edi
callq 0x10d0
xorl %ecx, %ecx
leal (%r14,%rcx), %edx
movb (%rbx,%rdx), %dl
testb %dl, %dl
je 0x2c12
movb %dl, (%rax,%rcx)
incq %rcx
jmp 0x2bff
movl %ecx, %ecx
movb $0x0, (%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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:
movslq %edx, %rdx
xorl %r8d, %r8d
testl %ecx, %ecx
cmovgl %ecx, %r8d
addq %rdi, %rdx
cmpl $0x2, %esi
jne 0x2c4d
xorl %ecx, %ecx
xorl %eax, %eax
cmpq %rcx, %r8
je 0x2c6e
shlq $0x8, %rax
movzbl (%rdx,%rcx), %esi
orq %rsi, %rax
incq %rcx
jmp 0x2c38
shlq $0x3, %r8
xorl %ecx, %ecx
xorl %eax, %eax
cmpq %rcx, %r8
je 0x2c6e
movzbl (%rdx), %esi
shll %cl, %esi
movslq %esi, %rsi
orq %rsi, %rax
incq %rdx
addq $0x8, %rcx
jmp 0x2c55
retq
// File: /workspace/github_c_makefile_star2_O2/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
movq %rdi, %rbx
movzwl 0x88(%rsp), %r15d
movq 0x40(%rsp), %r12
movq 0x48(%rsp), %r13
addq $0x14, %r12
leaq 0x1ebf(%rip), %r14      # 0x4b7f
xorl %ebp, %ebp
cmpq %r15, %rbp
jae 0x2cf5
movl -0x4(%r12), %eax
cmpq %rbx, %rax
ja 0x2cec
addl (%r12), %eax
cmpq %rbx, %rax
jb 0x2cec
movl -0x14(%r12), %esi
addq %r13, %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1090
incq %rbp
addq $0x28, %r12
jmp 0x2cc2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x2353(%rip), %rdi      # 0x507f
xorl %eax, %eax
callq 0x1090
movb 0xc(%r14,%r15), %al
andb $0xf, %al
cmpb $0x3, %al
jne 0x2d96
leaq 0xd0(%rsp), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rdi
movzwl 0xe(%rbx), %eax
imulq $0x28, %rax, %rax
movq 0x20(%rcx,%rax), %rdx
movq %rdx, 0x50(%rsp)
movups (%rcx,%rax), %xmm0
movups 0x10(%rcx,%rax), %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 0x1d62
jmp 0x2dae
leaq 0x80(%rsp), %rax
movq 0x8(%rax), %rdi
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
callq 0x2b54
movq %rax, %rbx
leaq 0x1dc7(%rip), %rdi      # 0x4b7f
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_O2/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
leaq 0xe8(%rsp), %r13
andl $0x0, (%rdi)
leaq 0xb0(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movzwl 0x30(%rax), %r14d
xorl %ebp, %ebp
xorl %r15d, %r15d
xorl %eax, %eax
cmpq %r15, %r14
je 0x319a
movq (%r13), %rdx
movq 0x8(%r13), %rsi
movl (%rdx,%rbp), %edx
cmpb $0x2e, (%rsi,%rdx)
jne 0x318e
cmpb $0x72, 0x1(%rsi,%rdx)
jne 0x318e
cmpb $0x65, 0x2(%rsi,%rdx)
jne 0x318e
cmpb $0x6c, 0x3(%rsi,%rdx)
jne 0x318e
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 0x2dd3
pushq $0x1
popq %rax
incq %r15
addq $0x28, %rbp
jmp 0x30f5
orl %r12d, %eax
jne 0x31ab
leaq 0x1f68(%rip), %rdi      # 0x510e
callq 0x1060
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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 0x7e12
movl 0x40(%rbx), %edx
leaq 0x10(%r14), %rcx
movl $0x84c0, %esi           # imm = 0x84C0
callq 0x81d2
movl 0x44(%rbx), %edx
leaq 0x30(%r14), %rcx
movl $0x84c1, %esi           # imm = 0x84C1
callq 0x81d2
movl 0x48(%rbx), %edx
leaq 0x20(%r14), %rcx
movl $0x84c2, %esi           # imm = 0x84C2
callq 0x81d2
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 0x6156(%rip), %rax      # 0xdf60
movq (%rax), %rax
movl 0x4c(%rbx), %edi
jmp 0x7e79
movq 0x58(%rbx), %rsi
imull $0x3, 0x8(%r14), %edx
movq %r14, %rdi
callq 0x5540
movl 0x50(%rbx), %esi
movl $0xde1, %edi            # imm = 0xDE1
callq 0x21e0
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 0x60f8(%rip), %rax      # 0xdf60
movq (%rax), %rax
movl 0x4c(%rbx), %edi
movss 0x2822(%rip), %xmm0     # 0xa698
movaps %xmm0, %xmm1
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/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 0x60ef(%rip), %rax      # 0xdfa0
callq *(%rax)
movl %eax, %ebx
movq 0x60d4(%rip), %rax      # 0xdf90
pushq $0x1
popq %rsi
movl %ebx, %edi
movq %r14, %rdx
xorl %ecx, %ecx
callq *(%rax)
movq 0x60b1(%rip), %rax      # 0xdf80
movl %ebx, %edi
callq *(%rax)
movq 0x608e(%rip), %rax      # 0xdf68
leaq 0x4(%rsp), %r14
movl %ebx, %edi
movl $0x8b81, %esi           # imm = 0x8B81
movq %r14, %rdx
callq *(%rax)
cmpl $0x0, (%r14)
jne 0x7f1d
movq 0x60b0(%rip), %rax      # 0xdfa8
movq %rsp, %rdx
leaq 0x10(%rsp), %r14
movl %ebx, %edi
movl $0x100, %esi            # imm = 0x100
movq %r14, %rcx
callq *(%rax)
leaq 0x2b83(%rip), %rdi      # 0xaa96
movq %r14, %rsi
xorl %eax, %eax
callq 0x2200
movl %ebx, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/phoboslab[P]pl_mpeg/pl_mpeg_player_gl.c
// Function: app_create_texture
GLuint app_create_texture(app_t *self, GLuint index, const char *name) {
	GLuint texture;
	glCreateTextures(GL_TEXTURE_2D, 1, &texture);
	
	glBindTexture(GL_TEXTURE_2D, texture);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
	
	glUniform1i(glGetUniformLocation(self->shader_program, name), index);
	return texture;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r12
movq 0x6032(%rip), %rax      # 0xdf78
pushq $0x1
popq %rsi
leaq 0xc(%rsp), %r14
movl $0xde1, %edi            # imm = 0xDE1
movq %r14, %rdx
callq *(%rax)
movl (%r14), %esi
movl $0xde1, %edi            # imm = 0xDE1
callq 0x21e0
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2800, %esi           # imm = 0x2800
movl $0x2601, %edx           # imm = 0x2601
callq 0x2220
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2801, %esi           # imm = 0x2801
movl $0x2601, %edx           # imm = 0x2601
callq 0x2220
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2802, %esi           # imm = 0x2802
movl $0x812f, %edx           # imm = 0x812F
callq 0x2220
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2803, %esi           # imm = 0x2803
movl $0x812f, %edx           # imm = 0x812F
callq 0x2220
movq 0x5ffc(%rip), %rax      # 0xdfb8
movq (%rax), %r13
movq 0x5f92(%rip), %rax      # 0xdf58
movl 0x30(%r12), %edi
movq %r15, %rsi
callq *(%rax)
movl %eax, %edi
movl %ebx, %esi
callq *%r13
movl (%r14), %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/phoboslab[P]pl_mpeg/pl_mpeg_player_gl.c
// Function: app_destroy
void app_destroy(app_t *self) {
	plm_destroy(self->plm);
	
	if (self->texture_mode == APP_TEXTURE_MODE_RGB) {
		free(self->rgb_data);
	}

	if (self->audio_device) {
		SDL_CloseAudioDevice(self->audio_device);
	}
	
	SDL_GL_DeleteContext(self->gl);
	SDL_Quit();
	
	free(self);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x28a1
cmpl $0x2, 0x3c(%rbx)
jne 0x8003
movq 0x58(%rbx), %rdi
callq 0x21b0
movl 0x20(%rbx), %edi
testl %edi, %edi
je 0x800f
callq 0x20d0
movq 0x28(%rbx), %rdi
callq 0x2060
callq 0x2050
movq %rbx, %rdi
popq %rbx
jmp 0x21b0
// File: /workspace/github_c_makefile_star2_O2/phoboslab[P]pl_mpeg/pl_mpeg_player_gl.c
// Function: app_update_texture
void app_update_texture(app_t *self, GLuint unit, GLuint texture, plm_plane_t *plane) {
	glActiveTexture(unit);
	glBindTexture(GL_TEXTURE_2D, texture);
	glTexImage2D(
		GL_TEXTURE_2D, 0, GL_LUMINANCE, plane->width, plane->height, 0,
		GL_LUMINANCE, GL_UNSIGNED_BYTE, plane->data
	);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %edi
movq 0x5ddd(%rip), %rax      # 0xdfc0
callq *(%rax)
movl $0xde1, %edi            # imm = 0xDE1
movl %ebp, %esi
callq 0x21e0
movl (%rbx), %ecx
movl 0x4(%rbx), %r8d
subq $0x8, %rsp
movl $0xde1, %edi            # imm = 0xDE1
xorl %esi, %esi
movl $0x1909, %edx           # imm = 0x1909
xorl %r9d, %r9d
pushq 0x8(%rbx)
pushq $0x1401                 # imm = 0x1401
pushq $0x1909                 # imm = 0x1909
callq 0x20b0
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/phoboslab[P]pl_mpeg/pl_mpeg_player_gl.c
// Function: main
int main(int argc, char *argv[]) {
	if (argc < 2) {
		SDL_Log("Usage: pl_mpeg_player_gl <file.mpg>");
		exit(1);
	}
	
	app_t *app = app_create(argv[1], APP_TEXTURE_MODE_YCRCB);
	while (!app->wants_to_quit) {
		app_update(app);
	}
	app_destroy(app);
	
	return EXIT_SUCCESS;
}

// Assembly:
pushq %rbx
cmpl $0x1, %edi
jle 0x8254
movq 0x8(%rsi), %rdi
pushq $0x1
popq %rsi
callq 0x7a9c
movq %rax, %rbx
cmpl $0x0, 0x10(%rbx)
jne 0x8248
movq %rbx, %rdi
callq 0x8026
jmp 0x8238
movq %rbx, %rdi
callq 0x7fe8
xorl %eax, %eax
popq %rbx
retq
leaq 0x2858(%rip), %rdi      # 0xaab3
xorl %eax, %eax
callq 0x2200
pushq $0x1
popq %rdi
callq 0x21c0
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/trivia128v2/ref/encrypt.c
// Function: Key_Ext64
u64 Key_Ext64(u64 *S)
{
u64 Z;
u64 t1 = (S[0] << (66 - 64) | S[1] >> (128 - 66)) ^ (S[1] << (132 - 128) | S[2] >> (192 - 132));
u64 t2 = (S[3] << (69 - 64) | S[4] >> (128 - 69)) ^ (S[3] << (105 - 64) | S[4] >> (128 - 105));
u64 t3 = (S[5] << (66 - 64) | S[6] >> (128 - 66)) ^ (S[6] << (147 - 128) | S[7] >> (192 - 147));
Z = t1 ^ t2 ^ t3 ^ ((S[0] << 38 | S[1] >> 26) & (S[3] << 2 | S[4] >> 62)); // Key Block generated

return Z;
}

// Assembly:
movq (%rdi), %rsi
movq 0x8(%rdi), %r8
movq %rsi, %rax
shldq $0x2, %r8, %rax
movq 0x10(%rdi), %rdx
shrdq $0x3c, %r8, %rdx
movq 0x18(%rdi), %rcx
movq 0x20(%rdi), %r9
vmovdqu 0x30(%rdi), %xmm0
vmovq 0x28(%rdi), %xmm1
vmovq %rcx, %xmm2
vinserti128 $0x1, %xmm1, %ymm2, %ymm1
vpmovsxbq 0xc5a(%rip), %ymm2 # 0x2060
vpermi2q %ymm0, %ymm1, %ymm2
vinserti128 $0x1, %xmm0, %ymm0, %ymm0
vpbroadcastq %r9, %xmm1
vpblendd $0xf0, %ymm0, %ymm1, %ymm0 # ymm0 = ymm1[0,1,2,3],ymm0[4,5,6,7]
vpsrlvq 0xbf9(%rip), %ymm0, %ymm0 # 0x2020
vpsllvq 0xc10(%rip), %ymm2, %ymm1 # 0x2040
vpor %ymm0, %ymm1, %ymm0
shldq $0x26, %r8, %rsi
shldq $0x2, %r9, %rcx
andq %rsi, %rcx
xorq %rax, %rcx
xorq %rdx, %rcx
vextracti128 $0x1, %ymm0, %xmm1
vpxor %xmm1, %xmm0, %xmm0
vpshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
vpxor %xmm1, %xmm0, %xmm0
vmovq %xmm0, %rax
xorq %rcx, %rax
vzeroupper
retq