LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/yangtau[P]hedgehog/src/test/../hashset.c
// Function: hg_hashset_put
void hg_hashset_put(struct hg_hashset* set, void* item) {
    hashset_adjust(set);

    struct hg_hashset_bucket* bucket = hashset_find(set, item);

    switch (bucket->state) {
    case HG_HASHSET_BUCKET_EMPTY:
        bucket->state = HG_HASHSET_BUCKET_OCCUPIED;
        bucket->item  = item;
        set->len++;
        break;
    case HG_HASHSET_BUCKET_OCCUPIED:
        bucket->item = item;
        break;
    case HG_HASHSET_BUCKET_TOMBSTONE:
        bucket->state = HG_HASHSET_BUCKET_OCCUPIED;
        bucket->item  = item;
        set->tomb_cnt--;
        break;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rsi
movq %rsi, %rax
shrq $0x2, %rax
movq %rsi, %rcx
subq %rax, %rcx
cmpq 0x8(%rdi), %rcx
jae 0x1268
addq %rsi, %rsi
jmp 0x126e
cmpq 0x10(%r14), %rax
jae 0x12d7
testq %rsi, %rsi
je 0x12d7
movq 0x18(%r14), %rdx
movq 0x20(%r14), %rcx
movq %rsp, %r15
movq %r15, %rdi
callq 0x11dc
pushq $0x8
popq %r12
xorl %r13d, %r13d
cmpq (%r14), %r13
jae 0x12b3
movq 0x28(%r14), %rax
cmpl $0x1, (%rax,%r12)
jne 0x12aa
movq -0x8(%rax,%r12), %rsi
movq %r15, %rdi
callq 0x123a
incq %r13
addq $0x10, %r12
jmp 0x128d
movq %r14, %rdi
callq 0x120f
movups (%rsp), %xmm0
movups 0x10(%rsp), %xmm1
movups 0x20(%rsp), %xmm2
movups %xmm2, 0x20(%r14)
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1324
movl 0x8(%rax), %ecx
cmpl $0x2, %ecx
je 0x1308
cmpl $0x1, %ecx
je 0x1303
testl %ecx, %ecx
jne 0x1316
movl $0x1, 0x8(%rax)
movq %rbx, (%rax)
incq 0x8(%r14)
jmp 0x1316
movq %rbx, (%rax)
jmp 0x1316
movl $0x1, 0x8(%rax)
movq %rbx, (%rax)
decq 0x10(%r14)
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/yangtau[P]hedgehog/src/test/../hashset.c
// Function: hashset_find
static struct hg_hashset_bucket* hashset_find(struct hg_hashset* set, void* item) {
    uint32_t hash = set->hash(item) % set->capacity;

    struct hg_hashset_bucket* tombstone = NULL;
    for (size_t i = 0; i < set->capacity; i++) {
        struct hg_hashset_bucket* bucket = &set->buckets[hash];
        switch (bucket->state) {
        case HG_HASHSET_BUCKET_EMPTY:
            // If we found an empty bucket, we can stop searching, because we know the item is not in the set.
            return tombstone ? tombstone : bucket;
        case HG_HASHSET_BUCKET_OCCUPIED:
            if (set->eq(bucket->item, item))
                return bucket;
            break;
        case HG_HASHSET_BUCKET_TOMBSTONE:
            if (!tombstone)
                tombstone = bucket;
            break;
        }

        hash = (hash + 1) % set->capacity;
    }
    unreachable_();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq *0x18(%r14)
movl %eax, %eax
movq (%r14), %rcx
xorl %r13d, %r13d
xorl %edx, %edx
divq %rcx
movq %rdx, %r15
xorl %ebp, %ebp
cmpq %rcx, %rbp
jae 0x13c6
movq 0x28(%r14), %rax
movl %r15d, %edx
shlq $0x4, %rdx
leaq (%rax,%rdx), %r12
movl 0x8(%rax,%rdx), %eax
cmpl $0x1, %eax
je 0x1385
cmpl $0x2, %eax
je 0x137c
testl %eax, %eax
jne 0x1397
jmp 0x13aa
testq %r13, %r13
cmoveq %r12, %r13
jmp 0x1397
movq (%r12), %rdi
movq %rbx, %rsi
callq *0x20(%r14)
testb %al, %al
jne 0x13b1
movq (%r14), %rcx
incl %r15d
movq %r15, %rax
xorl %edx, %edx
divq %rcx
incq %rbp
movq %rdx, %r15
jmp 0x1354
testq %r13, %r13
cmovneq %r13, %r12
movq %r12, %rax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3c2b(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x1c50(%rip), %rsi      # 0x3027
leaq 0x1c65(%rip), %rdx      # 0x3043
xorl %eax, %eax
callq 0x10b0
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x80, %esi
callq 0x1070
pushq $0x2
popq %rdx
movq %rbx, %rdi
movl %eax, %esi
callq 0x1050
pushq $-0x1
popq %rdi
callq 0x10d0
// File: /workspace/github_c_makefile_star2_O2/yangtau[P]hedgehog/src/test/../hashset.c
// Function: hg_hashset_remove
void* hg_hashset_remove(struct hg_hashset* set, void* item) {
    struct hg_hashset_bucket* bucket = hashset_find(set, item);
    if (bucket->state != HG_HASHSET_BUCKET_OCCUPIED)
        return NULL;

    bucket->state = HG_HASHSET_BUCKET_TOMBSTONE;
    set->tomb_cnt++;
    return bucket->item;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x1324
cmpl $0x1, 0x8(%rax)
jne 0x144d
movl $0x2, 0x8(%rax)
incq 0x10(%rbx)
movq (%rax), %rax
jmp 0x144f
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/yangtau[P]hedgehog/src/test/../hashset.c
// Function: hg_hashset_clear
void hg_hashset_clear(struct hg_hashset* set) {
    for (size_t i = 0; i < set->capacity; i++) {
        set->buckets[i].state = HG_HASHSET_BUCKET_EMPTY;
    }

    set->len      = 0;
    set->tomb_cnt = 0;
}

// Assembly:
movq (%rdi), %rax
pushq $0x8
popq %rcx
xorl %edx, %edx
cmpq %rax, %rdx
jae 0x146f
movq 0x28(%rdi), %rsi
andl $0x0, (%rsi,%rcx)
incq %rdx
addq $0x10, %rcx
jmp 0x1459
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/yangtau[P]hedgehog/src/test/../hashset.c
// Function: hg_hashset_foreach
void hg_hashset_foreach(struct hg_hashset* set, void (*fn)(void*)) {
    for (size_t i = 0; i < set->capacity; i++) {
        struct hg_hashset_bucket* bucket = &set->buckets[i];
        if (bucket->state == HG_HASHSET_BUCKET_OCCUPIED)
            fn(bucket->item);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x8
popq %r15
xorl %r12d, %r12d
cmpq (%r14), %r12
jae 0x14ac
movq 0x28(%r14), %rax
cmpl $0x1, (%rax,%r15)
jne 0x14a3
movq -0x8(%rax,%r15), %rdi
callq *%rbx
incq %r12
addq $0x10, %r15
jmp 0x148c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/yangtau[P]hedgehog/src/test/hashset_test.c
// Function: test_hashset_init
void test_hashset_init() {
    struct hg_hashset set;
    size_t Ns[] = {1, 2, 3, 4, 5, 7, 11, 13, 17, 19};

    for (size_t i = 0; i < sizeof(Ns) / sizeof(size_t); i++) {
        size_t N = Ns[i];

        test_println("hashset init %zu items", N);

        hg_hashset_init(&set, N, hash_int, eq_int);
        test_assert(hg_hashset_len(&set) == 0);

        // put N
        for (size_t i = 0; i < N; i++) {
            hg_hashset_put(&set, (void*)(uint64_t)i);
        }
        test_assert(hg_hashset_len(&set) == (size_t)N);

        // continas N?
        test_assert(!hg_hashset_contains(&set, (void*)(uint64_t)N));

        hg_hashset_destroy(&set);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq -0xb3f(%rip), %r14      # 0x14b8
leaq -0xb38(%rip), %r15      # 0x14c6
leaq 0x8(%rsp), %r12
xorl %ebx, %ebx
cmpq $0xa, %rbx
je 0x2130
leaq 0x141a(%rip), %rax      # 0x3430
movq (%rax,%rbx,8), %rbp
leaq 0x132e(%rip), %rdi      # 0x334f
movq %rbp, %rsi
xorl %eax, %eax
callq 0x1080
movq %r12, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x11dc
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
jne 0x208e
xorl %r13d, %r13d
cmpq %r13, %rbp
je 0x2060
movq %r12, %rdi
movq %r13, %rsi
callq 0x123a
incq %r13
jmp 0x204b
movq 0x10(%rsp), %rax
subq 0x18(%rsp), %rax
cmpq %rbp, %rax
jne 0x20c2
movq %r12, %rdi
movq %rbp, %rsi
callq 0x141f
testb %al, %al
jne 0x20f9
movq %r12, %rdi
callq 0x120f
incq %rbx
jmp 0x2005
movq 0x2f63(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x104d(%rip), %rsi      # 0x30ec
leaq 0x1072(%rip), %rdx      # 0x3118
movl $0x97, %ecx
leaq 0x12c3(%rip), %r8       # 0x3375
leaq 0x118d(%rip), %r9       # 0x3246
xorl %eax, %eax
callq 0x10b0
jmp 0x2048
movq 0x2f2f(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x1019(%rip), %rsi      # 0x30ec
leaq 0x103e(%rip), %rdx      # 0x3118
movl $0x9d, %ecx
leaq 0x128f(%rip), %r8       # 0x3375
leaq 0x129a(%rip), %r9       # 0x3387
xorl %eax, %eax
callq 0x10b0
jmp 0x206f
movq 0x2ef8(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0xfe2(%rip), %rsi       # 0x30ec
leaq 0x1007(%rip), %rdx      # 0x3118
movl $0xa0, %ecx
leaq 0x1258(%rip), %r8       # 0x3375
leaq 0x1285(%rip), %r9       # 0x33a9
xorl %eax, %eax
callq 0x10b0
jmp 0x207e
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sushant8421[P]create_your_own_shell/searchstring.c
// Function: main
int main(int argc, char *argv[]) {
	int result, errno;

	if(argc < 4 || argc > 4) {
		Usage(argv[0]);
		exit(1);
	}

	result = Search_in_File(argv[2], argv[3] , argv[1]);
	if(result == -1) {
		perror("Error");
		printf("Error number = %d\n", errno);
		exit(1);
	}
	return(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x4, %edi
jne 0x11df
movq 0x8(%rsi), %rdx
movq 0x10(%rsi), %rdi
movq 0x18(%rsi), %rsi
callq 0x1219
cmpl $-0x1, %eax
je 0x11e6
xorl %eax, %eax
popq %rbp
retq
callq 0x1208
jmp 0x1200
leaq 0xe17(%rip), %rdi       # 0x2004
callq 0x1090
leaq 0xe11(%rip), %rdi       # 0x200a
xorl %eax, %eax
callq 0x1060
pushq $0x1
popq %rdi
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O2/veltzer[P]xmeltdown/src/dance.c
// Function: ReadRoutineFile
int*ReadRoutineFile(char* filename)
{
	FILE* infile;
	int okayflag=1;
	int* retval;
	int numread=0;

	infile=fopen(filename, "r");
	if (infile == NULL) {
		fprintf(stderr, "Cannot open file %s\n", filename);
		exit(1);
	}
	retval=(int *) calloc (1, sizeof (int));
	numread=0;
	while (okayflag >= 0) {
		okayflag=fscanf(infile, "%d\n", &(retval[numread]));
		if (okayflag >= 0) {
			numread++;
			retval=(int *) realloc (retval, (numread+1)*sizeof (int));
		}
	}
	retval[numread]=-1;
	return (retval);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x1971(%rip), %rsi      # 0x3063
callq 0x10b0
testq %rax, %rax
je 0x1756
movq %rax, %rbx
pushq $0x1
popq %rdi
pushq $0x4
popq %rsi
callq 0x1170
movq %rax, %r14
leaq 0x19dd(%rip), %r15      # 0x30f1
xorl %r12d, %r12d
leaq (%r14,%r12), %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x1050
testl %eax, %eax
js 0x1742
leaq 0x8(%r12), %rsi
movq %r14, %rdi
callq 0x11a0
movq %rax, %r14
addq $0x4, %r12
jmp 0x1717
orl $-0x1, (%r14,%r12)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x388b(%rip), %rax      # 0x4fe8
movq (%rax), %rdi
leaq 0x18fe(%rip), %rsi      # 0x3065
movq %r14, %rdx
xorl %eax, %eax
callq 0x11c0
pushq $0x1
popq %rdi
callq 0x1090
// File: /workspace/github_c_makefile_star2_O2/veltzer[P]xmeltdown/src/dance.c
// Function: DrawTween
void DrawTween(double factor, int which, int curbuf)
/* what fraction the movement is completed
 * which player
 * which buffer not to draw into */
{
	RayPtr toray, fromray, tweenray;
	int bonesize=sizeof(Ray);
	int bone;
/*	int		stepctr, skelctr; */
	/* static int	lastbuf = 0; */
/*	int		flag1 = 1;
 * int		flag2 = 1;
 * int		flag3 = 1;
 * int		flag4 = 0; */
	for (bone=0; bone < 11; bone++) {
		fromray=(RayPtr) ((long) &(fromskel[which]->torso)+(long) (bone*bonesize));
		toray=(RayPtr) ((long) &(toskel[which]->torso)+(long) (bone*bonesize));
		tweenray=(RayPtr) ((long) &(tweenskel[which]->torso)+(long) (bone*bonesize));
/*
** Never rotate through an angle > PI. I.e., take the shortest path.
*/
		if ((fromray->t-toray->t) > M_PI)
			toray->t+=2*M_PI;
		else if ((toray->t-fromray->t) > M_PI)
			fromray->t+=2*M_PI;
		tweenray->t=(fromray->t*factor+toray->t*(1.0-factor));
		tweenray->r=(fromray->r*factor+toray->r*(1.0-factor));
	}
	tweenskel[which]->headradius=fromskel[which]->headradius*factor+toskel[which]->headradius*(1.0-factor);
	tweenskel[which]->waistx=fromskel[which]->waistx*factor+toskel[which]->waistx*(1.0-factor);
	tweenskel[which]->waisty=fromskel[which]->waisty*factor+toskel[which]->waisty*(1.0-factor);

	tweenskel[which]->waistx=OFFSET+(which*OFFSET);

	DrawSkel(tweenskel[which], unset_gc, buffer[!curbuf]);
}

// Assembly:
movl %edi, %eax
movslq %edi, %rdi
leaq 0x3cad(%rip), %rcx      # 0x55d0
movq (%rcx,%rdi,8), %rcx
leaq 0x3cc2(%rip), %rdx      # 0x55f0
movq (%rdx,%rdi,8), %rdx
leaq 0x3c57(%rip), %r8       # 0x5590
movq (%r8,%rdi,8), %rdi
movsd 0x16c3(%rip), %xmm1     # 0x3008
subsd %xmm0, %xmm1
pushq $0x10
popq %r8
movsd 0x16bb(%rip), %xmm2     # 0x3010
movsd 0x16bb(%rip), %xmm3     # 0x3018
cmpq $0x170, %r8             # imm = 0x170
je 0x19f7
movsd 0x8(%rcx,%r8), %xmm4
movsd 0x8(%rdx,%r8), %xmm5
movapd %xmm4, %xmm6
subsd %xmm5, %xmm6
ucomisd %xmm2, %xmm6
jbe 0x199a
addsd %xmm3, %xmm5
movsd %xmm5, 0x8(%rdx,%r8)
movsd 0x8(%rcx,%r8), %xmm4
jmp 0x19ba
movapd %xmm5, %xmm6
subsd %xmm4, %xmm6
ucomisd %xmm2, %xmm6
jbe 0x19ba
addsd %xmm3, %xmm4
movsd %xmm4, 0x8(%rcx,%r8)
movsd 0x8(%rdx,%r8), %xmm5
mulsd %xmm1, %xmm5
mulsd %xmm0, %xmm4
addsd %xmm5, %xmm4
movsd %xmm4, 0x8(%rdi,%r8)
cvtsi2sdl (%rcx,%r8), %xmm4
cvtsi2sdl (%rdx,%r8), %xmm5
mulsd %xmm1, %xmm5
mulsd %xmm0, %xmm4
addsd %xmm5, %xmm4
cvttsd2si %xmm4, %r9d
movl %r9d, (%rdi,%r8)
addq $0x20, %r8
jmp 0x195d
cvtsi2sdl (%rcx), %xmm2
cvtsi2sdl (%rdx), %xmm3
mulsd %xmm1, %xmm3
mulsd %xmm0, %xmm2
addsd %xmm3, %xmm2
cvttsd2si %xmm2, %r8d
movl %r8d, (%rdi)
cvtsi2sdl 0x8(%rcx), %xmm2
cvtsi2sdl 0x8(%rdx), %xmm3
mulsd %xmm1, %xmm3
mulsd %xmm0, %xmm2
addsd %xmm3, %xmm2
cvttsd2si %xmm2, %ecx
movl %ecx, 0x8(%rdi)
imull $0x64, %eax, %eax
addl $0x64, %eax
movl %eax, 0x4(%rdi)
movq 0x3b70(%rip), %rax      # 0x55b0
xorl %ecx, %ecx
testl %esi, %esi
sete %cl
leaq 0x3c52(%rip), %rdx      # 0x56a0
movq (%rdx,%rcx,8), %rdx
movq %rax, %rsi
jmp 0x1c76
// File: /workspace/github_c_makefile_star2_O2/veltzer[P]xmeltdown/src/dance.c
// Function: clock_usleep
void clock_usleep (unsigned long usecs)
{
	struct timeval tv;
	tv.tv_sec=usecs/1000000L;
	tv.tv_usec=usecs%1000000L;
	(void) select (0, 0, 0, 0, &tv);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, %rax
movl $0xf4240, %ecx          # imm = 0xF4240
xorl %edx, %edx
divq %rcx
leaq 0x8(%rsp), %r8
movq %rax, (%r8)
movq %rdx, 0x8(%r8)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x1080
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/veltzer[P]xmeltdown/src/dance.c
// Function: HandleKeyPress
void HandleKeyPress(XKeyEvent* pevent)
{
	char charback;
	/* int	i; */

	XLookupString(pevent, &charback, 1, NULL, NULL);
	if (charback == 'q')
		exit(0);
	if (charback == '+') {
		steps++;
		printf ("Dancing at speed %d\n", steps);
	}
	if (charback == '-') {
		steps--;
		printf ("Dancing at speed %d\n", steps);
	}
	if (charback >= '1' && charback <= '9') {
		steps=(int) (charback-'1')+1;
		printf ("Dancing at speed %d\n", steps);
	}
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0xf(%rsp), %rbx
pushq $0x1
popq %rdx
movq %rbx, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1070
movzbl (%rbx), %eax
cmpl $0x2b, %eax
je 0x1af3
cmpl $0x71, %eax
jne 0x1b13
xorl %edi, %edi
callq 0x1090
movl 0x3637(%rip), %esi      # 0x5130
incl %esi
movl %esi, 0x362f(%rip)      # 0x5130
leaq 0x1546(%rip), %rdi      # 0x304e
xorl %eax, %eax
callq 0x1030
movb 0xf(%rsp), %al
cmpb $0x2d, %al
jne 0x1b37
movl 0x3613(%rip), %esi      # 0x5130
decl %esi
movl %esi, 0x360b(%rip)      # 0x5130
leaq 0x1522(%rip), %rdi      # 0x304e
xorl %eax, %eax
callq 0x1030
movb 0xf(%rsp), %al
leal -0x31(%rax), %ecx
cmpb $0x8, %cl
ja 0x1b59
movzbl %al, %esi
addl $-0x30, %esi
movl %esi, 0x35e5(%rip)      # 0x5130
leaq 0x14fc(%rip), %rdi      # 0x304e
xorl %eax, %eax
callq 0x1030
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/veltzer[P]xmeltdown/src/dance.c
// Function: RandomMove
void RandomMove()
{
	int i;
	int randnum;
	static int lastnum=999;
	do {
		randnum=rand()%numread;
	} while (randnum == lastnum);
	lastnum=randnum;
	for (i=0; i < PLAYERS; i++) {
		fromskel[i]=tweenskel[0];
		toskel[i]=skellist[randnum];
	}
}

// Assembly:
pushq %rax
callq 0x11b0
cltd
idivl 0x3a9c(%rip)            # 0x5608
cmpl 0x359e(%rip), %edx      # 0x5110
je 0x1b60
movl %edx, 0x3596(%rip)      # 0x5110
movq 0x3a0f(%rip), %rax      # 0x5590
movq 0x3a40(%rip), %rcx      # 0x55c8
movslq %edx, %rdx
xorl %esi, %esi
leaq 0x3a3c(%rip), %rdi      # 0x55d0
leaq 0x3a55(%rip), %r8       # 0x55f0
cmpq $0x18, %rsi
je 0x1bb3
movq %rax, (%rsi,%rdi)
movq (%rcx,%rdx,8), %r9
movq %r9, (%rsi,%r8)
addq $0x8, %rsi
jmp 0x1b9b
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/nh13[P]ksw/src/parasail/apps/parasail_aligner.cpp
// Function: pair_check(unsigned long&, std::set<std::pair<int, int>, std::less<std::pair<int, int>>, std::allocator<std::pair<int, int>>>&, int const&, int const&, int const*, unsigned char const*, int const*, std::vector<int, std::allocator<int>> const&, char const&)
inline static void pair_check(
        unsigned long &count_generated,
        PairSet &pairs,
        const int &i,
        const int &j,
        const int * const restrict SA,
        const unsigned char * const restrict BWT,
        const int * const restrict SID,
        const vector<int> &DB,
        const char &sentinal)
{
    const int &sidi = SID[SA[i]];
    const int &sidj = SID[SA[j]];
    if (BWT[i] != BWT[j] || BWT[i] == sentinal) {
        if (DB.empty()) {
            if (sidi != sidj) {
                ++count_generated;
                if (sidi < sidj) {
                    pairs.insert(make_pair(sidi,sidj));
                }
                else {
                    pairs.insert(make_pair(sidj,sidi));
                }
            }
        }
        else {
            if (sidi != sidj && DB[sidi] != DB[sidj]) {
                ++count_generated;
                if (sidi > sidj) {
                    pairs.insert(make_pair(sidi,sidj));
                }
                else {
                    pairs.insert(make_pair(sidj,sidi));
                }
            }
        }
    }
}

// Assembly:
pushq %rax
movslq (%rdx), %rax
movslq (%rcx), %rcx
movzbl (%r9,%rax), %edx
cmpb (%r9,%rcx), %dl
jne 0x2a583a
movq 0x20(%rsp), %r9
movsbl (%r9), %r9d
cmpl %r9d, %edx
jne 0x2a58aa
movq 0x18(%rsp), %r10
movq 0x10(%rsp), %rdx
movslq (%r8,%rcx,4), %r11
movslq (%r8,%rax,4), %rax
movq (%r10), %r9
movslq (%rdx,%rax,4), %rax
movl %eax, %ecx
movslq (%rdx,%r11,4), %r8
movl %r8d, %edx
cmpq 0x8(%r10), %r9
je 0x2a5887
cmpl %edx, %ecx
je 0x2a58aa
movl (%r9,%rax,4), %r10d
cmpl (%r9,%r8,4), %r10d
je 0x2a58aa
incq (%rdi)
cmpl %r8d, %eax
jg 0x2a5892
shlq $0x20, %rcx
orq %rdx, %rcx
movq %rsp, %rax
movq %rcx, (%rax)
jmp 0x2a589f
cmpl %edx, %ecx
je 0x2a58aa
incq (%rdi)
cmpl %edx, %ecx
jge 0x2a5878
shlq $0x20, %rdx
orq %rcx, %rdx
movq %rsp, %rax
movq %rdx, (%rax)
movq %rsi, %rdi
movq %rax, %rsi
callq 0x2a6cd8
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/nh13[P]ksw/src/parasail/apps/parasail_aligner.cpp
// Function: self_score(char const*, int, parasail_matrix const*)
inline static int self_score(
        const char * const restrict seq,
        int len,
        const parasail_matrix_t *matrix)
{
    int score = 0;
    for (int i=0; i<len; ++i) {
        unsigned char mapped = matrix->mapper[(unsigned char)seq[i]];
        score += matrix->matrix[matrix->size*mapped+mapped];
    }
    return score;
}

// Assembly:
xorl %ecx, %ecx
testl %esi, %esi
cmovlel %ecx, %esi
xorl %eax, %eax
cmpq %rcx, %rsi
je 0x2a58e3
movq 0x8(%rdx), %r8
movq 0x10(%rdx), %r9
movzbl (%rdi,%rcx), %r10d
movzbl (%r9,%r10,4), %r9d
movl 0x18(%rdx), %r10d
incl %r10d
imull %r9d, %r10d
movslq %r10d, %r9
addl (%r8,%r9,4), %eax
incq %rcx
jmp 0x2a58b5
retq
// File: /workspace/github_c_makefile_star2_O2/nh13[P]ksw/src/parasail/src/traceback.c
// Function: parasail_traceback_free
void parasail_traceback_free(parasail_traceback_t *traceback)
{
    free(traceback->query);
    free(traceback->comp);
    free(traceback->ref);
    free(traceback);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x2a02f0
movq 0x8(%rbx), %rdi
callq 0x2a02f0
movq 0x10(%rbx), %rdi
callq 0x2a02f0
movq %rbx, %rdi
popq %rbx
jmp 0x2a02f0
// File: /workspace/github_c_makefile_star2_O2/nh13[P]ksw/src/parasail/src/traceback.c
// Function: match_char
static inline char match_char(
        const char *seqA,
        int ai,
        const char *seqB,
        int bi,
        const parasail_matrix_t *matrix,
        char match,
        char pos,
        char neg,
        int case_sensitive,
        const char *alphabet_aliases,
        size_t aliases_size)
{
    char a = missing_char(seqA, ai);
    char b = seqB[bi];
    int matches = case_sensitive ? (a == b) : (toupper(a) == toupper(b));
    if (NULL != alphabet_aliases) {
        size_t i;
        for (i=0; i<aliases_size; i+=1) {
            if (alphabet_aliases[i] == a) {
                matches |= alphabet_aliases[i+1] == b;
            }
            else if (alphabet_aliases[i+1] == a) {
                matches |= alphabet_aliases[i] == b;
            }
        }
    }
    if (matches) {
        return match;
    }
    else {
        int sub = 0;
        if (matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) {
            sub = matrix->matrix[matrix->mapper[(unsigned char)a]*matrix->size + matrix->mapper[(unsigned char)b]];
        }
        else {
            sub = matrix->matrix[ai*matrix->size + matrix->mapper[(unsigned char)b]];
        }
        if (sub > 0) {
            return pos;
        }
        else {
            return neg;
        }
    }

    return 'X'; /* shouldn't happen */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x50(%rsp), %eax
testq %rdi, %rdi
je 0x34780f
movslq %esi, %r10
movb (%rdi,%r10), %r15b
jmp 0x347812
movb $0x2a, %r15b
movq 0x58(%rsp), %r13
movl %ecx, %ecx
movsbq (%rdx,%rcx), %r14
movzbl %r14b, %r12d
testl %eax, %eax
je 0x34782b
cmpb %r12b, %r15b
jmp 0x347852
movq %r8, %rbp
movl %r9d, %ebx
movl %esi, 0x4(%rsp)
callq 0x2a0040
movl 0x4(%rsp), %esi
movl %ebx, %r9d
movq %rbp, %r8
movq (%rax), %rax
movsbq %r15b, %rcx
movl (%rax,%rcx,4), %ecx
cmpl (%rax,%r14,4), %ecx
sete %al
movzbl %al, %eax
testq %r13, %r13
je 0x34789c
movq 0x60(%rsp), %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x34789c
movb (%r13,%rdx), %r10b
movb 0x1(%r13,%rdx), %dil
cmpb %r15b, %r10b
jne 0x347887
xorl %r10d, %r10d
cmpb %r14b, %dil
sete %r10b
orl %r10d, %eax
jmp 0x347897
cmpb %r15b, %dil
jne 0x347897
xorl %edi, %edi
cmpb %r12b, %r10b
sete %dil
orl %edi, %eax
incq %rdx
jmp 0x347864
testl %eax, %eax
jne 0x3478e9
movb 0x48(%rsp), %al
movb 0x40(%rsp), %cl
cmpl $0x0, 0x30(%r8)
movq 0x8(%r8), %rdx
je 0x3478c2
imull 0x18(%r8), %esi
movq 0x10(%r8), %rdi
addl (%rdi,%r12,4), %esi
jmp 0x3478d7
movq 0x10(%r8), %r9
movzbl %r15b, %edi
movl 0x18(%r8), %esi
imull (%r9,%rdi,4), %esi
addl (%r9,%r12,4), %esi
movslq %esi, %rsi
cmpl $0x0, (%rdx,%rsi,4)
movzbl %cl, %ecx
movzbl %al, %r9d
cmovgl %ecx, %r9d
movl %r9d, %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/begriffs[P]pthread-test/backoff.c
// Function: lock_forward
void *lock_forward(void *arg)
{
	(void)arg;

	for (int iterate = 0; iterate < ITERATIONS; iterate++)
	{
		int backoffs = 0;
		for (int i = 0; i < 3; i++)
		{
			if (i == 0 || !backoff)
				pthread_mutex_lock(&mutex[i]);
			else
			{
				if (pthread_mutex_trylock(&mutex[i]) == EBUSY)
				{
					backoffs++;
					while (--i >= 0)
						pthread_mutex_unlock(&mutex[i]);
				}

				switch (yf)
				{
					case YIELD:
						sched_yield();
						break;
					case SLEEP:
						sleep(1);
						break;
					default:
						break;
				}
			}
		}

		printf("F: %d\n", backoffs);
		pthread_mutex_unlock(&mutex[2]);
		pthread_mutex_unlock(&mutex[1]);
		pthread_mutex_unlock(&mutex[0]);
		sched_yield();
	}
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x2ec2(%rip), %rbx      # 0x4090
pushq $0x1
popq %rbp
xorl %r15d, %r15d
cmpl $0xa, %r15d
je 0x12a6
xorl %r13d, %r13d
xorl %r12d, %r12d
cmpl $0x3, %r12d
jge 0x1268
movslq %r12d, %rax
testl %r12d, %r12d
je 0x1231
cmpb $0x0, 0x2e77(%rip)      # 0x4070
je 0x1231
imulq $0x28, %rax, %rdi
addq %rbx, %rdi
callq 0x1040
cmpl $0x10, %eax
jne 0x1248
movl %r12d, %eax
imulq $0x28, %rax, %rax
leaq (%rax,%rbx), %r14
addq $-0x28, %r14
testl %r12d, %r12d
jle 0x1242
movq %r14, %rdi
callq 0x1060
decl %r12d
addq $-0x28, %r14
jmp 0x121b
imulq $0x28, %rax, %rdi
addq %rbx, %rdi
callq 0x10b0
incl %r12d
jmp 0x11e4
incl %r13d
decl %r12d
movl 0x2eba(%rip), %eax      # 0x4108
cmpl $-0x1, %eax
je 0x125f
cmpl $0x1, %eax
jne 0x123d
callq 0x1050
jmp 0x123d
movl %ebp, %edi
callq 0x10a0
jmp 0x123d
leaq 0xd95(%rip), %rdi       # 0x2004
movl %r13d, %esi
xorl %eax, %eax
callq 0x1030
leaq 0x2e60(%rip), %rdi      # 0x40e0
callq 0x1060
leaq 0x2e2c(%rip), %rdi      # 0x40b8
callq 0x1060
movq %rbx, %rdi
callq 0x1060
callq 0x1050
incl %r15d
jmp 0x11d4
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/begriffs[P]pthread-test/backoff.c
// Function: lock_backward
void *lock_backward(void *arg)
{
	(void)arg;

	for (int iterate = 0; iterate < ITERATIONS; iterate++)
	{
		int backoffs = 0;
		for (int i = 2; i >= 0 ; i--)
		{
			if (i == 2 || !backoff)
				pthread_mutex_lock(&mutex[i]);
			else
			{
				if (pthread_mutex_trylock(&mutex[i]) == EBUSY)
				{
					backoffs++;
					while (++i < 3)
						pthread_mutex_unlock(&mutex[i]);
				}

				switch (yf)
				{
					case YIELD:
						sched_yield();
						break;
					case SLEEP:
						sleep(1);
						break;
					default:
						break;
				}
			}
		}

		printf("B: %d\n", backoffs);
		pthread_mutex_unlock(&mutex[0]);
		pthread_mutex_unlock(&mutex[1]);
		pthread_mutex_unlock(&mutex[2]);
		sched_yield();
	}
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x2dc7(%rip), %rbx      # 0x4090
pushq $0x1
popq %rbp
xorl %r15d, %r15d
cmpl $0xa, %r15d
je 0x139c
xorl %r13d, %r13d
pushq $0x2
popq %r12
testl %r12d, %r12d
js 0x135e
movl %r12d, %eax
cmpl $0x2, %r12d
je 0x1327
cmpb $0x0, 0x2d7b(%rip)      # 0x4070
je 0x1327
imulq $0x28, %rax, %r14
leaq (%rbx,%r14), %rdi
callq 0x1040
cmpl $0x10, %eax
jne 0x133e
addq %rbx, %r14
addq $0x28, %r14
cmpl $0x1, %r12d
jg 0x1338
movq %r14, %rdi
callq 0x1060
incl %r12d
addq $0x28, %r14
jmp 0x1310
imulq $0x28, %rax, %rdi
addq %rbx, %rdi
callq 0x10b0
decl %r12d
jmp 0x12e0
incl %r13d
incl %r12d
movl 0x2dc4(%rip), %eax      # 0x4108
cmpl $-0x1, %eax
je 0x1355
cmpl $0x1, %eax
jne 0x1333
callq 0x1050
jmp 0x1333
movl %ebp, %edi
callq 0x10a0
jmp 0x1333
leaq 0xca6(%rip), %rdi       # 0x200b
movl %r13d, %esi
xorl %eax, %eax
callq 0x1030
movq %rbx, %rdi
callq 0x1060
leaq 0x2d3a(%rip), %rdi      # 0x40b8
callq 0x1060
leaq 0x2d56(%rip), %rdi      # 0x40e0
callq 0x1060
callq 0x1050
incl %r15d
jmp 0x12cf
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/begriffs[P]pthread-test/backoff.c
// Function: main
int main(int argc, const char **argv)
{
	pthread_t forward, backward;

	if (argc > 1)
		backoff = atoi(argv[1]);
	if (argc > 2)
		yf = atoi(argv[2]);

	pthread_create(&forward, NULL, lock_forward, NULL);
	pthread_create(&backward, NULL, lock_backward, NULL);

	pthread_exit(NULL);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
cmpl $0x2, %edi
jl 0x13e3
movq %rsi, %rbx
movl %edi, %ebp
movq 0x8(%rsi), %rdi
callq 0x1090
testl %eax, %eax
setne 0x2ca1(%rip)            # 0x4070
cmpl $0x2, %ebp
je 0x13e3
movq 0x10(%rbx), %rdi
callq 0x1090
movl %eax, 0x2d25(%rip)      # 0x4108
leaq -0x22e(%rip), %rdx      # 0x11bc
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x1080
leaq -0x148(%rip), %rdx      # 0x12b7
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x1080
xorl %edi, %edi
callq 0x1070
// File: /workspace/github_c_makefile_star2_O2/vanhauser-thc[P]vulntest/encrypt.c
// Function: encrypt
int encrypt(unsigned char *plaintext, int plaintext_len, unsigned char *key, unsigned char *iv, unsigned char *ciphertext) {
  EVP_CIPHER_CTX *ctx;
  int len;
  int ciphertext_len;

  /* Create and initialise the context */
  if (!(ctx = EVP_CIPHER_CTX_new()))
    exit(-1);

  /*
   * Initialise the encryption operation. IMPORTANT - ensure you use a key
   * and IV size appropriate for your cipher
   * In this example we are using 256 bit AES (i.e. a 256 bit key). The
   * IV size for *most* modes is the same as the block size. For AES this
   * is 128 bits
   */
  if (1 != EVP_EncryptInit_ex(ctx, EVP_des_ecb(), NULL, key, iv))
    exit(-1);

  /*
   * Provide the message to be encrypted, and obtain the encrypted output.
   * EVP_EncryptUpdate can be called multiple times if necessary
   */
  if (1 != EVP_EncryptUpdate(ctx, ciphertext, &len, plaintext, plaintext_len))
    exit(-1);
  ciphertext_len = len;

  /*
   * Finalise the encryption. Further ciphertext bytes may be written at
   * this stage.
   */
  if (1 != EVP_EncryptFinal_ex(ctx, ciphertext + len, &len))
    exit(-1);
  ciphertext_len += len;

  /* Clean up */
  EVP_CIPHER_CTX_free(ctx);

  return ciphertext_len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r13
movl %esi, %ebp
movq %rdi, %r15
callq 0x1080
testq %rax, %rax
je 0x1254
movq %rax, %rbx
callq 0x10a0
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
movq %r13, %rcx
movq %r12, %r8
callq 0x1090
cmpl $0x1, %eax
jne 0x1254
leaq 0x4(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rcx
movl %ebp, %r8d
callq 0x10b0
cmpl $0x1, %eax
jne 0x1254
leaq 0x4(%rsp), %rdx
movslq (%rdx), %r15
addq %r15, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1050
cmpl $0x1, %eax
jne 0x1254
addl 0x4(%rsp), %r15d
movq %rbx, %rdi
callq 0x1070
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $-0x1
popq %rdi
callq 0x1030
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_06/getop.c
// Function: main
int main(void)
{
  char s[100] = "";

  int type = getop(s);

  printf("%d ", type);
  puts(s);

  return 0;
}

// Assembly:
pushq %rbx
subq $0x70, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rbx
movaps %xmm0, 0x50(%rbx)
movaps %xmm0, 0x40(%rbx)
movaps %xmm0, 0x30(%rbx)
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
andl $0x0, 0x60(%rbx)
movq %rbx, %rdi
callq 0x11ca
leaq 0xe53(%rip), %rdi       # 0x2004
movl %eax, %esi
xorl %eax, %eax
callq 0x1040
movq %rbx, %rdi
callq 0x1030
xorl %eax, %eax
addq $0x70, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_06/getop.c
// Function: getop
int getop(char *s)
{
  char c;

  // Skip blanks (spaces and tabs)
  while ((*s = c = getchar()) == ' ' || c == '\t')
    ;

  *(s + 1) = '\0';

  // Not a number
  if (!isdigit(c) && c != '.')
    return c;

  // Collect the integer part
  if (isdigit(c) && c != '.')
    while (isdigit(*(++s) = c = getchar()))
      ;

  // Collect the fraction part
  if (c == '.')
  {
    while (isdigit(*(++s) = c = getchar()))
      ;
  }

  if (c != EOF)
    ungetc(c, stdin);

  *s = '\0';

  return NUMBER;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x1050
movl %eax, %r14d
movb %r14b, (%rbx)
movl %eax, %r12d
shll $0x18, %r12d
cmpl $0x9000000, %r12d       # imm = 0x9000000
je 0x11d5
cmpl $0x20000000, %r12d      # imm = 0x20000000
je 0x11d5
movl %r12d, %ebp
sarl $0x18, %ebp
movb $0x0, 0x1(%rbx)
callq 0x1070
movq %rax, %r15
movq (%rax), %rax
movslq %ebp, %rcx
movzwl (%rax,%rcx,2), %eax
cmpl $0x2e000000, %r12d      # imm = 0x2E000000
je 0x1228
movl %eax, %ecx
andl $0x800, %ecx            # imm = 0x800
je 0x1298
cmpl $0x2e000000, %r12d      # imm = 0x2E000000
je 0x1256
andl $0x800, %eax            # imm = 0x800
je 0x1256
movq (%r15), %r12
callq 0x1050
movl %eax, %r14d
movb %r14b, 0x1(%rbx)
incq %rbx
movsbq %r14b, %rax
testb $0x8, 0x1(%r12,%rax,2)
jne 0x1238
cmpb $0x2e, %r14b
jne 0x127a
movq (%r15), %r12
callq 0x1050
movl %eax, %r14d
movb %r14b, 0x1(%rbx)
incq %rbx
movsbq %r14b, %rax
testb $0x8, 0x1(%r12,%rax,2)
jne 0x125c
cmpb $-0x1, %r14b
je 0x1293
movsbl %r14b, %edi
movq 0x2d55(%rip), %rax      # 0x3fe0
movq (%rax), %rsi
callq 0x1060
movb $0x0, (%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/X1319RAY[P]fileIO/getline.cpp
// Function: main
int main(int argc, char* argv[]){
	using namespace std;
	
	// コマンドライン引数のチェック
	if(argc != 2){
		cerr << "引数の数が間違っています．" << endl;
		cerr << "./getline input.txt" << endl;
		return 1;
	}
	
	// C++のファイル入力のための準備
	ifstream ifs(argv[1], ios::in);
	// ファイルを開くのに失敗したときの処理
	if(!ifs){
		cerr << "Error: file not opened." << endl;
		return 1;
	}
	
	string tmp;
	string str;
	int num;
	int sum = 0;
	// getline()で1行ずつ読み込む
	while(getline(ifs, tmp)){
		// ここでtmpを煮るなり焼くなりする
		cout << tmp << endl; // そのまま出力
		stringstream ss;
		ss << tmp;
		ss >> str >> num; // str == "name:"; num == number;
		sum += num; // 値をsumに加算
	}
	
	cout << "\nsum: " << sum << endl;
	
	// ファイルを閉じる
	ifs.close();
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3d8, %rsp            # imm = 0x3D8
cmpl $0x2, %edi
jne 0x12cf
movq 0x8(%rsi), %rsi
leaq -0x278(%rbp), %rbx
pushq $0x8
popq %rdx
movq %rbx, %rdi
callq 0x1120
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x258(%rbp,%rax)
je 0x130c
movq 0x2d3d(%rip), %rdi      # 0x3ff0
leaq 0xd86(%rip), %rsi       # 0x2040
callq 0x10d0
movq %rax, %rdi
callq 0x1070
pushq $0x1
popq %rbx
jmp 0x13f2
movq 0x2d1a(%rip), %rbx      # 0x3ff0
leaq 0xd27(%rip), %rsi       # 0x2004
movq %rbx, %rdi
callq 0x10d0
movq %rax, %rdi
callq 0x1070
leaq 0xd38(%rip), %rsi       # 0x202c
movq %rbx, %rdi
callq 0x10d0
movq %rax, %rdi
callq 0x1070
pushq $0x1
popq %rbx
jmp 0x13fe
leaq -0x60(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ebx, %ebx
movb %bl, (%rax)
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %bl, (%rax)
leaq -0x70(%rbp), %r12
leaq -0x400(%rbp), %r14
leaq -0x50(%rbp), %r13
leaq -0x2c(%rbp), %r15
leaq -0x278(%rbp), %rdi
movq %r12, %rsi
callq 0x1030
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x13ad
movq 0x2c6d(%rip), %rdi      # 0x3fd0
movq %r12, %rsi
callq 0x10c0
movq %rax, %rdi
callq 0x1070
movq %r14, %rdi
callq 0x1090
leaq -0x3f0(%rbp), %rdi
movq %r12, %rsi
callq 0x10c0
movq %r14, %rdi
movq %r13, %rsi
callq 0x10e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x1080
addl -0x2c(%rbp), %ebx
movq %r14, %rdi
callq 0x10a0
jmp 0x133f
movq 0x2c1c(%rip), %rdi      # 0x3fd0
leaq 0xc9d(%rip), %rsi       # 0x2058
callq 0x10d0
movq %rax, %rdi
movl %ebx, %esi
callq 0x1100
movq %rax, %rdi
callq 0x1070
leaq -0x278(%rbp), %rdi
callq 0x1040
leaq -0x50(%rbp), %rdi
callq 0x1060
leaq -0x70(%rbp), %rdi
callq 0x1060
xorl %ebx, %ebx
leaq -0x278(%rbp), %rdi
callq 0x1050
movl %ebx, %eax
addq $0x3d8, %rsp            # imm = 0x3D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x1441
jmp 0x142c
jmp 0x142c
movq %rax, %rbx
leaq -0x400(%rbp), %rdi
callq 0x10a0
jmp 0x142f
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x1060
leaq -0x70(%rbp), %rdi
callq 0x1060
leaq -0x278(%rbp), %rdi
callq 0x1050
movq %rbx, %rdi
callq 0x1110
// File: /workspace/github_c_makefile_star2_O2/martin-decky[P]ichiglyph/interpreter/brainfuck/brainfuck.c
// Function: data_bound
static int data_bound(data_t *data, size_t dp)
{
	if (dp >= data->size) {
		size_t size = dp + 1 + DATA_GRANULARITY;
		data->data = (uint8_t *) realloc(data->data, size);
		if (data->data == NULL)
			return -1;
		
		memset(data->data + data->size, 0, size - data->size);
		data->size = size;
	}
	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorl %ebp, %ebp
cmpq %rsi, 0x8(%rdi)
ja 0x156e
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8001, %rbx           # imm = 0x8001
movq (%rdi), %rdi
movq %rbx, %rsi
callq 0x10b0
movq %rax, (%r14)
testq %rax, %rax
je 0x156b
movq 0x8(%r14), %rcx
addq %rcx, %rax
movq %rbx, %rdx
subq %rcx, %rdx
xorl %ebp, %ebp
movq %rax, %rdi
xorl %esi, %esi
callq 0x1050
movq %rbx, 0x8(%r14)
jmp 0x156e
pushq $-0x1
popq %rbp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/vi[P]simple_cbor_stream_parse/simple_example.c
// Function: main
int main() {
    
    struct scsp_callbacks cb;
    memset(&cb, 0, sizeof(cb));
    
    cb.array_opened = &array_opened;
    cb.array_closed = &array_closed;
    cb.integer = &integer;
    cb.string_chunk = &string_chunk;
    
    const char *cbor_data = 
        "\x9F"                        // [
            "\x1A" "\x00\x12\xD6\x87" //     1234567,
            "\x63" "ABC"              //     "ABC",
            "\x84"                    //     [
                "\x05"                //         5,
                "\x05"                //         5,
                "\x29"                //         -10,
                "\x29"                //         -10,
                                      //     ]
        "\xFF"                        // ]
    ;
    size_t cbor_data_len = 2+5+4+1+4;
    
    assert(scsp_parse_from_memory(cbor_data, cbor_data_len, &cb, (void*)0x5645) == 0);
    
    return 0;
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
leaq 0x8(%rsp), %rbx
movl $0x88, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1060
leaq -0x10a(%rip), %rax      # 0x11ac
movq %rax, 0x30(%rbx)
leaq -0xe8(%rip), %rax       # 0x11d9
movq %rax, 0x40(%rbx)
leaq -0xc9(%rip), %rax       # 0x1203
movq %rax, -0x8(%rbx)
leaq -0x9e(%rip), %rax       # 0x1239
movq %rax, 0x20(%rbx)
leaq 0xeb4(%rip), %rdi       # 0x2196
pushq $0x10
popq %rsi
movq %rsp, %rdx
movl $0x5645, %ecx           # imm = 0x5645
callq 0x1d95
testq %rax, %rax
jne 0x1302
xorl %eax, %eax
addq $0x90, %rsp
popq %rbx
retq
leaq 0xe38(%rip), %rdi       # 0x2141
leaq 0xd0e(%rip), %rsi       # 0x201e
leaq 0xe74(%rip), %rcx       # 0x218b
pushq $0x33
popq %rdx
callq 0x1050
nop
// File: /workspace/github_c_makefile_star2_O2/seojangho[P]clee/sandbox.c
// Function: onSeccomp
void onSeccomp() {
    printf("[Detected] %s(%d)\n", clee_syscall_name(), clee_syscall_num());
    if (option_enforcing) {
        printf("No mercy!...\n");
        clee_behave(terminate, 0);
    } else {
        getchar();
    }
}

// Assembly:
pushq %rbx
xorl %eax, %eax
callq 0x3987
movq %rax, %rbx
xorl %eax, %eax
callq 0x3977
leaq 0x1e1d(%rip), %rdi      # 0x716b
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x3090
cmpb $0x1, 0x5f8e(%rip)      # 0xb2f0
jne 0x537a
leaq 0x1e3f(%rip), %rdi      # 0x71aa
callq 0x3060
xorl %edi, %edi
xorl %esi, %esi
popq %rbx
jmp 0x3b3a
popq %rbx
jmp 0x3120
// File: /workspace/github_c_makefile_star2_O2/seojangho[P]clee/sandbox.c
// Function: showpolicy
void showpolicy() {
    printf("List of forbidden system calls:\n");
    int i;
    for (i = 0;; i++)
    {
        if (forbidden[i] == -1) {
            break;
        }
        printf("%s(%d)\n", clee_syscall_num2name(forbidden[i]), forbidden[i]);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x1d74(%rip), %rdi      # 0x729c
callq 0x3060
leaq 0x18bc(%rip), %r14      # 0x6df0
leaq 0x1c3b(%rip), %rbx      # 0x7176
xorl %r15d, %r15d
cmpq $0x344, %r15            # imm = 0x344
je 0x5567
movl (%r15,%r14), %ebp
movl %ebp, %edi
callq 0x3c5a
movq %rbx, %rdi
movq %rax, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x3090
addq $0x4, %r15
jmp 0x553e
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rouming[P]io/io-test.c
// Function: on_signal
static int on_signal(struct io_req *req, int err)
{
	int rc;
	struct signalfd_siginfo *siginfo;
	struct loop_ctx *ctx = req->data;

	if (err < 0)
		return err;
	assert(err == sizeof(struct signalfd_siginfo));
	siginfo = req->buf.iov[0].iov_base;
	if (siginfo->ssi_signo == SIGINT) {
		/* Graceful exit */
		ctx->shutdown = true;
		return err;
	}

	/* Repeat signal REQ_RD request */
	req->buf.pos.iov_off = 0;
	req->buf.pos.iov_ind = 0;
	rc = io_queue_submit(req);
	assert(rc == 0);

	actions[action_ind++](ctx);
	action_ind %= ARRAY_SIZE(actions);

	return err;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
testl %esi, %esi
js 0x16e3
cmpl $0x80, %ebx
jne 0x16ed
movq 0x18(%rdi), %r14
movq 0x28(%rdi), %rax
cmpl $0x2, (%rax)
jne 0x169e
movb $0x1, 0x2f0(%r14)
jmp 0x16e3
xorps %xmm0, %xmm0
movups %xmm0, 0x128(%rdi)
callq 0x39b9
testl %eax, %eax
jne 0x170c
movslq 0x7ad8(%rip), %rax      # 0x9190
leal 0x1(%rax), %ecx
movl %ecx, 0x7acf(%rip)      # 0x9190
leaq 0x7418(%rip), %rcx      # 0x8ae0
movq %r14, %rdi
callq *(%rcx,%rax,8)
movslq 0x7abb(%rip), %rax      # 0x9190
pushq $0x3
popq %rcx
xorl %edx, %edx
divq %rcx
movl %edx, 0x7aad(%rip)      # 0x9190
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x3976(%rip), %rdi      # 0x506a
leaq 0x3912(%rip), %rsi      # 0x500d
leaq 0x398f(%rip), %rcx      # 0x5091
movl $0x181, %edx            # imm = 0x181
callq 0x10a0
leaq 0x39a2(%rip), %rdi      # 0x50b5
leaq 0x38f3(%rip), %rsi      # 0x500d
leaq 0x3970(%rip), %rcx      # 0x5091
movl $0x18d, %edx            # imm = 0x18D
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O2/rouming[P]io/io-test.c
// Function: do_vari_len_req1
static void do_vari_len_req1(struct loop_ctx *ctx)
{
	int rc;
	struct io_req *m_s_req1, *s_m_req1;

	/* Write master->slave, part1 */
	m_s_req1 = io_req_create(&ctx->master, REQ_WR, ctx,
				 on_write_vari_len_req1_1__master_to_slave);
	assert(m_s_req1);
	m_s_req1->buf = (struct io_buf){
		.iov[0] = {
			.iov_base = "<msg>",
			.iov_len  = strlen("<msg>")
		},
		.iov[1] = {
			.iov_base = "1 vari length 1",
			.iov_len  = strlen("1 vari length 1")
		},
		.iov_num  = 2,
		.is_vari_len = false
	};
	rc = io_queue_submit(m_s_req1);
	assert(rc == 0);

	/* Read slave<-master, part1 */
	s_m_req1 = io_req_create(&ctx->slave, REQ_RD, ctx,
				 on_read_vari_len_req1_1__slave_from_master);
	s_m_req1->buf = (struct io_buf){
		.iov[0] = {
			.iov_base = NULL,
			.iov_len  = 0
		},
		.iov_num  = 1,
		.is_vari_len = true
	};
	rc = io_queue_submit(s_m_req1);
	assert(rc == 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdi, %rbx
leaq 0x2b1(%rip), %rcx       # 0x1c28
pushq $0x1
popq %rsi
movq %rdi, %rdx
callq 0x3c44
testq %rax, %rax
je 0x1a6a
movq %rax, %r14
movq %rax, %r15
addq $0x28, %r15
xorps %xmm0, %xmm0
leaq 0x8(%rsp), %r12
movups %xmm0, 0x110(%r12)
movups %xmm0, 0x100(%r12)
leaq 0x7142(%rip), %rsi      # 0x8af8
movl $0x100, %edx            # imm = 0x100
movq %r12, %rdi
callq 0x1140
movl $0x120, %edx            # imm = 0x120
movq %r15, %rdi
movq %r12, %rsi
callq 0x1140
movq $0x2, 0x148(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x150(%r14)
movups %xmm0, 0x160(%r14)
movq %r14, %rdi
callq 0x39b9
testl %eax, %eax
jne 0x1a89
leaq 0x178(%rbx), %rdi
leaq 0x338(%rip), %rcx       # 0x1d47
xorl %esi, %esi
movq %rbx, %rdx
callq 0x3c44
movq %rax, %rbx
leaq 0x28(%rax), %rdi
movl $0x120, %edx            # imm = 0x120
xorl %esi, %esi
callq 0x10b0
movq $0x1, 0x148(%rbx)
movb $0x1, 0x150(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x151(%rbx)
movups %xmm0, 0x160(%rbx)
movq %rbx, %rdi
callq 0x39b9
testl %eax, %eax
jne 0x1aa8
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x364c(%rip), %rdi      # 0x50bd
leaq 0x3595(%rip), %rsi      # 0x500d
leaq 0x3763(%rip), %rcx      # 0x51e2
movl $0x11f, %edx            # imm = 0x11F
callq 0x10a0
leaq 0x3625(%rip), %rdi      # 0x50b5
leaq 0x3576(%rip), %rsi      # 0x500d
leaq 0x3744(%rip), %rcx      # 0x51e2
movl $0x12d, %edx            # imm = 0x12D
callq 0x10a0
leaq 0x3606(%rip), %rdi      # 0x50b5
leaq 0x3557(%rip), %rsi      # 0x500d
leaq 0x3725(%rip), %rcx      # 0x51e2
movl $0x13b, %edx            # imm = 0x13B
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O2/rouming[P]io/io-test.c
// Function: do_vari_len_req2
static void do_vari_len_req2(struct loop_ctx *ctx)
{
	int rc;
	struct io_req *s_m_req;

	/*
	 * Here we test, that on the previous action
	 * something was stashed and here we submit
	 * new read request out of the IO loop, i.e.
	 * prewait actions should be called.
	 */

	/* Read slave<-master, reuse callback from do_vari_len_req1 */
	s_m_req = io_req_create(&ctx->slave, REQ_RD, ctx,
				on_read_vari_len_req2__slave_from_master);
	s_m_req->buf = (struct io_buf){
		.iov[0] = {
			.iov_base = NULL,
			.iov_len  = 0
		},
		.iov_num  = 1,
		.is_vari_len = true
	};
	rc = io_queue_submit(s_m_req);
	assert(rc == 0);
}

// Assembly:
pushq %rbx
movq %rdi, %rdx
addq $0x178, %rdi            # imm = 0x178
leaq 0x5c8(%rip), %rcx       # 0x20a1
xorl %esi, %esi
callq 0x3c44
movq %rax, %rbx
leaq 0x28(%rax), %rdi
movl $0x120, %edx            # imm = 0x120
xorl %esi, %esi
callq 0x10b0
movq $0x1, 0x148(%rbx)
movb $0x1, 0x150(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x151(%rbx)
movups %xmm0, 0x160(%rbx)
movq %rbx, %rdi
callq 0x39b9
testl %eax, %eax
jne 0x1b24
popq %rbx
retq
leaq 0x358a(%rip), %rdi      # 0x50b5
leaq 0x34db(%rip), %rsi      # 0x500d
leaq 0x38e2(%rip), %rcx      # 0x541b
movl $0x170, %edx            # imm = 0x170
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O2/rouming[P]io/io-test.c
// Function: on_read_fixed_len_req__slave_from_master
static int on_read_fixed_len_req__slave_from_master(struct io_req *req, int err)
{
	int len = buf_len(&req->buf);
	char msg[len];
	int nb;

	assert(strlen("fixed msg") == err);
	nb = buf_memcpy_to(&req->buf, 0, msg, len);
	assert(nb == len);

	printf("  FIXED LEN MSG: len=%d, msg='%.*s'\n", len, len, msg);
	io_req_put(req);

	return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r13d
movq %rdi, %rbx
leaq 0x28(%rdi), %r12
movq %r12, %rdi
callq 0x2d83
movl %eax, %r14d
movl %eax, %eax
movq %rsp, %r15
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
cmpl $0x9, %r13d
jne 0x1bf2
movslq %r14d, %rcx
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x2dca
cmpl %r14d, %eax
jne 0x1c0b
leaq 0x35f5(%rip), %rdi      # 0x51bd
movl %r14d, %esi
movl %r14d, %edx
movq %r15, %rcx
xorl %eax, %eax
callq 0x1090
movq %rbx, %rdi
callq 0x3cd7
pushq $0x9
popq %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x355c(%rip), %rdi      # 0x5155
leaq 0x340d(%rip), %rsi      # 0x500d
leaq 0x3569(%rip), %rcx      # 0x5170
pushq $0x4b
jmp 0x1c22
leaq 0x35a1(%rip), %rdi      # 0x51b3
leaq 0x33f4(%rip), %rsi      # 0x500d
leaq 0x3550(%rip), %rcx      # 0x5170
pushq $0x4d
popq %rdx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O2/rouming[P]io/io-test.c
// Function: on_write_vari_len_req1_1__master_to_slave
static int on_write_vari_len_req1_1__master_to_slave(struct io_req *req, int len)
{
	int rc;
	struct io_req *m_s_req2;
	struct loop_ctx *ctx = req->data;

	assert(len > 0);
	io_req_put(req);

	/* Write master->slave, part2 */
	m_s_req2 = io_req_create(&ctx->master, REQ_WR, ctx,
				 on_write_vari_len_req1_2__master_to_slave);
	assert(m_s_req2);
	m_s_req2->buf = (struct io_buf){
		.iov[0] = {
			.iov_base = "</msg>",
			.iov_len  = strlen("</msg>")
		},
		.iov[1] = {
			.iov_base = "<msg>",
			.iov_len  = strlen("<msg>")
		},
		.iov_num  = 2,
		.is_vari_len = false
	};
	rc = io_queue_submit(m_s_req2);
	assert(rc == 0);

	return len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
testl %esi, %esi
jle 0x1cea
movl %esi, %ebx
movq 0x18(%rdi), %r14
callq 0x3cd7
leaq 0x241(%rip), %rcx       # 0x1e91
pushq $0x1
popq %rsi
movq %r14, %rdi
movq %r14, %rdx
callq 0x3c44
testq %rax, %rax
je 0x1d09
movq %rax, %r14
movq %rax, %r15
addq $0x28, %r15
xorps %xmm0, %xmm0
leaq 0x8(%rsp), %r12
movups %xmm0, 0x110(%r12)
movups %xmm0, 0x100(%r12)
leaq 0x6f66(%rip), %rsi      # 0x8bf8
movl $0x100, %edx            # imm = 0x100
movq %r12, %rdi
callq 0x1140
movl $0x120, %edx            # imm = 0x120
movq %r15, %rdi
movq %r12, %rsi
callq 0x1140
movq $0x2, 0x148(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x150(%r14)
movups %xmm0, 0x160(%r14)
movq %r14, %rdi
callq 0x39b9
testl %eax, %eax
jne 0x1d28
movl %ebx, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x341a(%rip), %rdi      # 0x510b
leaq 0x3315(%rip), %rsi      # 0x500d
leaq 0x3522(%rip), %rcx      # 0x5221
movl $0xc2, %edx
callq 0x10a0
leaq 0x33e6(%rip), %rdi      # 0x50f6
leaq 0x32f6(%rip), %rsi      # 0x500d
leaq 0x3503(%rip), %rcx      # 0x5221
movl $0xc8, %edx
callq 0x10a0
leaq 0x3386(%rip), %rdi      # 0x50b5
leaq 0x32d7(%rip), %rsi      # 0x500d
leaq 0x34e4(%rip), %rcx      # 0x5221
movl $0xd6, %edx
callq 0x10a0