LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/mmcco[P]sljit/regex_src/regexJIT.c
// Function: stack_push
static int stack_push(struct stack *stack, int type, int value)
{
	if (stack->last) {
		stack->index++;
		if (stack->index >= STACK_FRAGMENT_SIZE) {
			stack->index = 0;
			if (!stack->last->data.next) {
				stack->last->data.next = malloc(sizeof(struct stack_fragment));
				if (!stack->last->data.next)
					return 1;
				stack->last->data.next->data.next = NULL;
				stack->last->data.next->data.prev = stack->last;
			}
			stack->last = stack->last->data.next;
		}
	}
	else if (!stack->first) {
		stack->last = malloc(sizeof(struct stack_fragment));
		if (!stack->last)
			return 1;
		stack->last->data.prev = NULL;
		stack->last->data.next = NULL;
		stack->first = stack->last;
		stack->index = 0;
	}
	else {
		stack->last = stack->first;
		stack->index = 0;
	}
	stack->last->items[stack->index].type = type;
	stack->last->items[stack->index].value = value;
	stack->count++;
#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
	stack_check(stack);
#endif
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movq 0x8(%rdi), %r15
testq %r15, %r15
je 0x6c1a
movl 0x10(%rbx), %ecx
incl %ecx
movl %ecx, 0x10(%rbx)
cmpl $0x3e, %ecx
jb 0x6c50
movl $0x0, 0x10(%rbx)
movq (%r15), %rax
testq %rax, %rax
jne 0x6c0f
movl $0x200, %edi            # imm = 0x200
callq 0x20d0
movq %rax, (%r15)
testq %rax, %rax
je 0x6c74
movq $0x0, (%rax)
movq %r15, 0x8(%rax)
movq %rax, 0x8(%rbx)
xorl %ecx, %ecx
movq %rax, %r15
jmp 0x6c50
movq (%rbx), %r15
testq %r15, %r15
je 0x6c28
movq %r15, 0x8(%rbx)
jmp 0x6c47
movl $0x200, %edi            # imm = 0x200
callq 0x20d0
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x6c74
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %rax, (%rbx)
movl $0x0, 0x10(%rbx)
xorl %ecx, %ecx
movl %ecx, %eax
movl %r14d, 0x10(%r15,%rax,8)
movl %ebp, 0x14(%r15,%rax,8)
incl 0x14(%rbx)
movq %rbx, %rdi
callq 0x6c7b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %eax
jmp 0x6c69
// File: /workspace/github_c_makefile_star2_O3/mmcco[P]sljit/regex_src/regexJIT.c
// Function: stack_check
static void stack_check(struct stack *stack)
{
	struct stack_fragment *curr;
	int found;

	if (!stack)
		return;

	SLJIT_ASSERT(stack->index >= 0 && stack->index < STACK_FRAGMENT_SIZE);

	if (stack->first == NULL) {
		SLJIT_ASSERT(stack->first == NULL && stack->last == NULL);
		SLJIT_ASSERT(stack->index == STACK_FRAGMENT_SIZE - 1 && stack->count == 0);
		return;
	}

	found = 0;
	if (stack->last == NULL) {
		SLJIT_ASSERT(stack->index == STACK_FRAGMENT_SIZE - 1 && stack->count == 0);
		found = 1;
	}
	else
		SLJIT_ASSERT(stack->index >= 0 && stack->count >= 0);

	SLJIT_ASSERT(stack->first->data.prev == NULL);
	curr = stack->first;
	while (curr) {
		if (curr == stack->last)
			found = 1;
		if (curr->data.next)
			SLJIT_ASSERT(curr->data.next->data.prev == curr);
		curr = curr->data.next;
	}
	SLJIT_ASSERT(found);
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x6d29
movl 0x10(%rdi), %edx
cmpl $0x3e, %edx
jae 0x6d2b
movq (%rdi), %rcx
movq 0x8(%rdi), %rax
testq %rcx, %rcx
je 0x6cb8
testq %rax, %rax
je 0x6cda
xorl %edx, %edx
cmpl $0x0, 0x14(%rdi)
jns 0x6cea
leaq 0xca47(%rip), %rdi      # 0x136f8
movl $0xb9, %esi
jmp 0x6d19
testq %rax, %rax
jne 0x6d63
cmpl $0x3d, %edx
jne 0x6ccc
cmpl $0x0, 0x14(%rdi)
je 0x6d29
leaq 0xca25(%rip), %rdi      # 0x136f8
movl $0xaf, %esi
jmp 0x6d19
cmpl $0x3d, %edx
jne 0x6d55
movl $0x1, %edx
cmpl $0x0, 0x14(%rdi)
jne 0x6d55
cmpq $0x0, 0x8(%rcx)
jne 0x6d39
movl $0x1, %esi
cmpq %rax, %rcx
cmovel %esi, %edx
movq (%rcx), %rdi
testq %rdi, %rdi
je 0x6d25
cmpq %rcx, 0x8(%rdi)
movq %rdi, %rcx
je 0x6cf6
leaq 0xc9e4(%rip), %rdi      # 0x136f8
movl $0xc1, %esi
xorl %eax, %eax
callq 0x2080
callq 0x2050
testl %edx, %edx
je 0x6d47
popq %rax
retq
leaq 0xc9c6(%rip), %rdi      # 0x136f8
movl $0xab, %esi
jmp 0x6d19
leaq 0xc9b8(%rip), %rdi      # 0x136f8
movl $0xbb, %esi
jmp 0x6d19
leaq 0xc9aa(%rip), %rdi      # 0x136f8
movl $0xc4, %esi
jmp 0x6d19
leaq 0xc99c(%rip), %rdi      # 0x136f8
movl $0xb5, %esi
jmp 0x6d19
leaq 0xc98e(%rip), %rdi      # 0x136f8
movl $0xae, %esi
jmp 0x6d19
// File: /workspace/github_c_makefile_star2_O3/mmcco[P]sljit/regex_src/regexJIT.c
// Function: decode_number
static const regex_char_t* decode_number(const regex_char_t *regex_string, int length, int *result)
{
	int value = 0;

	SLJIT_ASSERT(length > 0);
	if (*regex_string < '0' || *regex_string > '9') {
		*result = -1;
		return regex_string;
	}

	while (length > 0 && *regex_string >= '0' && *regex_string <= '9') {
		value = value * 10 + (*regex_string - '0');
		length--;
		regex_string++;
	}

	*result = value;
	return regex_string;
}

// Assembly:
pushq %rax
testl %esi, %esi
jle 0x6dba
movb (%rdi), %cl
addb $-0x3a, %cl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $-0xa, %cl
jb 0x6db3
movl %esi, %ecx
addq %rdi, %rcx
incl %esi
xorl %eax, %eax
movb (%rdi), %r8b
addb $-0x30, %r8b
cmpb $0x9, %r8b
ja 0x6db3
leal (%rax,%rax,4), %eax
movzbl %r8b, %r8d
leal (%r8,%rax,2), %eax
incq %rdi
decl %esi
cmpl $0x1, %esi
jg 0x6d8e
movq %rcx, %rdi
movl %eax, (%rdx)
movq %rdi, %rax
popq %rcx
retq
leaq 0xc937(%rip), %rdi      # 0x136f8
movl $0x199, %esi            # imm = 0x199
xorl %eax, %eax
callq 0x2080
callq 0x2050
// File: /workspace/github_c_makefile_star2_O3/mmcco[P]sljit/regex_src/regexJIT.c
// Function: stack_push_copy
static int stack_push_copy(struct stack *stack, int items, int length)
{
	struct stack_fragment *frag1;
	int ind1;
	struct stack_fragment *frag2;
	int ind2;
	int counter;

	SLJIT_ASSERT(stack->count >= length && items <= length && items > 0);

	/* Allocate the necessary elements. */
	counter = items;
	frag1 = stack->last;
	ind1 = stack->index;
	while (counter > 0) {
		if (stack->index + counter >= STACK_FRAGMENT_SIZE) {
			counter -= STACK_FRAGMENT_SIZE - stack->index - 1 + 1;
			stack->index = 0;
			if (!stack->last->data.next) {
				stack->last->data.next = malloc(sizeof(struct stack_fragment));
				if (!stack->last->data.next)
					return 1;
				stack->last->data.next->data.next = NULL;
				stack->last->data.next->data.prev = stack->last;
			}
			stack->last = stack->last->data.next;
		}
		else {
			stack->index += counter;
			counter = 0;
		}
	}

	frag2 = stack->last;
	ind2 = stack->index;
	while (length > 0) {
		frag2->items[ind2--] = frag1->items[ind1--];
		if (ind1 < 0) {
			ind1 = STACK_FRAGMENT_SIZE - 1;
			frag1 = frag1->data.prev;
		}
		if (ind2 < 0) {
			ind2 = STACK_FRAGMENT_SIZE - 1;
			frag2 = frag2->data.prev;
		}
		length--;
	}

#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
	stack_check(stack);
#endif
	stack->count += items;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl %edx, 0x14(%rdi)
jl 0x717e
testl %esi, %esi
jle 0x717e
movl %edx, %ebp
cmpl %edx, %esi
jg 0x717e
movq %rdi, %r14
movq 0x8(%rdi), %r15
movl 0x10(%rdi), %r12d
movq %r15, 0x10(%rsp)
movl %r12d, %r13d
movl %esi, 0xc(%rsp)
movl %esi, %ebx
leal (%rbx,%r13), %eax
cmpl $0x3e, %eax
jb 0x7106
movl $0x0, 0x10(%r14)
movq (%r15), %rax
testq %rax, %rax
jne 0x70f0
movl $0x200, %edi            # imm = 0x200
callq 0x20d0
movq %rax, (%r15)
testq %rax, %rax
je 0x7177
movq $0x0, (%rax)
movq (%r15), %rax
movq %r15, 0x8(%rax)
addl %r13d, %ebx
addl $-0x3e, %ebx
movq %rax, 0x8(%r14)
xorl %r13d, %r13d
movq %rax, %r15
testl %ebx, %ebx
jg 0x70b3
jmp 0x7110
movl %eax, 0x10(%r14)
movl %eax, %r13d
movq %r15, %rax
incl %ebp
movq 0x10(%rsp), %rsi
movl %r13d, %ecx
movslq %r12d, %rdx
movq 0x10(%rsi,%rdx,8), %rdx
movq %rdx, 0x10(%rax,%rcx,8)
testl %r12d, %r12d
jle 0x7131
decl %r12d
jmp 0x713b
movq 0x8(%rsi), %rsi
movl $0x3d, %r12d
testl %r13d, %r13d
je 0x7145
decl %r13d
jmp 0x714f
movq 0x8(%rax), %rax
movl $0x3d, %r13d
decl %ebp
cmpl $0x1, %ebp
jg 0x7117
movq %r14, %rdi
callq 0x6c7b
movl 0xc(%rsp), %eax
addl %eax, 0x14(%r14)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %eax
jmp 0x7168
leaq 0xc573(%rip), %rdi      # 0x136f8
movl $0x12c, %esi            # imm = 0x12C
xorl %eax, %eax
callq 0x2080
callq 0x2050
// File: /workspace/github_c_makefile_star2_O3/mmcco[P]sljit/regex_src/regexJIT.c
// Function: handle_iteratives
static struct stack_item* handle_iteratives(struct stack_item *transitions_ptr, struct stack_item *transitions, struct stack *depth)
{
	struct stack_item *item;

	while (1) {
		item = stack_top(depth);

		switch (item->type) {
		case type_asterisk:
			SLJIT_ASSERT(transitions[item->value].type == type_branch);
			transitions[item->value].value = transitions_ptr - transitions;
			PUT_TRANSITION(type_branch, item->value + 1);
			break;

		case type_plus_sign:
			SLJIT_ASSERT(transitions[item->value].type == type_branch);
			transitions[item->value].value = transitions_ptr - transitions;
			break;

		case type_qestion_mark:
			PUT_TRANSITION(type_branch, item->value);
			break;

		default:
			return transitions_ptr;
		}
		stack_pop(depth);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x8(%rdx), %rax
testq %rax, %rax
je 0x7239
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movslq 0x10(%rbx), %rcx
movl 0x10(%rax,%rcx,8), %edx
cmpl $0x11, %edx
je 0x7210
cmpl $0x10, %edx
je 0x71f3
cmpl $0xf, %edx
jne 0x7247
movslq 0x14(%rax,%rcx,8), %rdx
cmpl $0xa, (%r14,%rdx,8)
jne 0x7250
movq %r15, %rsi
subq %r14, %rsi
shrq $0x3, %rsi
movl %esi, 0x4(%r14,%rdx,8)
movl $0xa, -0x8(%r15)
movl 0x14(%rax,%rcx,8), %eax
incl %eax
jmp 0x721c
movslq 0x14(%rax,%rcx,8), %rax
cmpl $0xa, (%r14,%rax,8)
jne 0x725e
movq %r15, %rcx
subq %r14, %rcx
shrq $0x3, %rcx
movl %ecx, 0x4(%r14,%rax,8)
jmp 0x7224
movl $0xa, -0x8(%r15)
movl 0x14(%rax,%rcx,8), %eax
movl %eax, -0x4(%r15)
addq $-0x8, %r15
movq %rbx, %rdi
callq 0x4ee0
movq 0x8(%rbx), %rax
testq %rax, %rax
jne 0x71b1
leaq 0xc4b8(%rip), %rdi      # 0x136f8
movl $0xe3, %esi
jmp 0x726a
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0xc4a1(%rip), %rdi      # 0x136f8
movl $0x3bb, %esi            # imm = 0x3BB
jmp 0x726a
leaq 0xc493(%rip), %rdi      # 0x136f8
movl $0x3c1, %esi            # imm = 0x3C1
xorl %eax, %eax
callq 0x2080
callq 0x2050
nop
// File: /workspace/github_c_makefile_star2_O3/PARKINHYO[P]BlackjackGame/mqueue/mqueue_client.c
// Function: send_msg
void* send_msg() {
	msg buf;
	buf.type = pid;

	char buffer[BUFFER_SIZE];
	int choice;

	while (1) {
		if(finalcheck) {break;}
		if(check2 == 1){
			printf("\n");
			printf("1. Hit\n");
			printf("2. Stand\n");
			printf("Please choose 1 or 2: ");
			fflush(stdout);
			scanf("%d", &choice);

			if (choice == 1)
			{
				strcpy(buffer, HIT);
				printf("Sending: %s\n", buffer);

				strncpy(buf.data, buffer, BUFFER_SIZE);
				msgsnd(msgid_Send_Main, (void*)&buf, sizeof(msg), 0);
				buffer[0]='\0';
				check2 =2;

			}
			else if (choice == 2)
			{
				strcpy(buffer, STAND);
				printf("Sending: %s\n", buffer);
				strncpy(buf.data, buffer, BUFFER_SIZE);
				msgsnd(msgid_Send_Main, (void*)&buf, sizeof(msg), 0);
				buffer[0]='\0';	
				check2 = 0;
				check = 0;
				finalcheck = 1;
				break;
			}
			else
				printf("Unrecognized choice. Choose again.\n");
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movslq 0x2d47(%rip), %rax      # 0x4174
movq %rax, -0x78(%rbp)
cmpl $0x0, 0x2d30(%rip)      # 0x4168
jne 0x1590
movl 0x2d20(%rip), %eax      # 0x4164
leaq 0xc1e(%rip), %r12       # 0x2069
movq 0x2b7e(%rip), %r15      # 0x3fd0
leaq 0xc04(%rip), %r13       # 0x205d
leaq -0x2c(%rbp), %rbx
leaq -0x50(%rbp), %r14
cmpl $0x1, %eax
jne 0x151e
movl $0xa, %edi
callq 0x1040
leaq 0xcc8(%rip), %rdi       # 0x2143
callq 0x1060
leaq 0xcc3(%rip), %rdi       # 0x214a
callq 0x1060
movq %r12, %rdi
xorl %eax, %eax
callq 0x1090
movq (%r15), %rdi
callq 0x10e0
movq %r13, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1110
movl -0x2c(%rbp), %eax
cmpl $0x1, %eax
je 0x14cc
cmpl $0x2, %eax
je 0x152d
leaq 0xc94(%rip), %rdi       # 0x2153
callq 0x1060
movl 0x2c9a(%rip), %eax      # 0x4164
jmp 0x151e
movl $0x544948, -0x50(%rbp)  # imm = 0x544948
leaq 0xba6(%rip), %rdi       # 0x2080
movq %r14, %rsi
xorl %eax, %eax
callq 0x1090
movl $0x20, %edx
leaq -0x70(%rbp), %rdi
movq %r14, %rsi
callq 0x1050
movl 0x2c71(%rip), %edi      # 0x416c
movl $0x28, %edx
leaq -0x78(%rbp), %rsi
xorl %ecx, %ecx
callq 0x10b0
movb $0x0, -0x50(%rbp)
movl $0x2, 0x2c4b(%rip)      # 0x4164
movl $0x2, %eax
cmpl $0x0, 0x2c43(%rip)      # 0x4168
je 0x1461
jmp 0x1590
leaq -0x50(%rbp), %rbx
movw $0x44, 0x4(%rbx)
movl $0x4e415453, (%rbx)     # imm = 0x4E415453
leaq 0xb3c(%rip), %rdi       # 0x2080
xorl %r14d, %r14d
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1090
movl $0x20, %edx
leaq -0x70(%rbp), %rdi
movq %rbx, %rsi
callq 0x1050
movl 0x2c04(%rip), %edi      # 0x416c
leaq -0x78(%rbp), %rsi
movl $0x28, %edx
xorl %ecx, %ecx
callq 0x10b0
movl %r14d, 0x2be5(%rip)     # 0x4164
movl %r14d, 0x2bda(%rip)     # 0x4160
movl $0x1, 0x2bd8(%rip)      # 0x4168
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/PARKINHYO[P]BlackjackGame/mqueue/mqueue_client.c
// Function: play_game
void* play_game() {

	// recv_msg, send_msg 스레드 생성...
	pthread_create(&threads[1], NULL, recv_msg, NULL);
	pthread_create(&threads[2], NULL, send_msg, NULL);
	int tid;
	// 스레드들 끝날때까지 대기후 삭제...
	for (tid = 1; tid < 2; ++tid)
		pthread_join(threads[tid], NULL);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x26c0(%rip), %rdi      # 0x4188
leaq -0x530(%rip), %rdx      # 0x159f
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x1100
leaq 0x26b1(%rip), %rdi      # 0x4190
leaq -0x6d1(%rip), %rdx      # 0x1415
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x1100
movq 0x2692(%rip), %rdi      # 0x4188
xorl %esi, %esi
popq %rbp
jmp 0x1130
// File: /workspace/github_c_makefile_star2_O3/PARKINHYO[P]BlackjackGame/mqueue/mqueue_client.c
// Function: main
int main() {

	char buffer[BUFFER_SIZE];
	int count = 0;
	pid = getpid();
	msg buf;

	msgid_Send_Main = msgget(KEY_VALUE_MAIN, IPC_CREAT | PERM);
	msgid_Recv_Main = msgget(KEY_VALUE_MAIN2, IPC_CREAT | PERM);

	// Signal 등록 ...
	(void)signal(SIGINT, (void(*)()) set_shutdown);

	printf("input data ==> ");
	fgets(buffer, BUFFER_SIZE, stdin);

	buf.type = 200;
	memset(buf.data, 0, sizeof(buf.data));
	strncpy(buf.data, buffer, BUFFER_SIZE);
	msgsnd(msgid_Send_Main, (void*)&buf, sizeof(msg), 0);

	// 쓴 데이터가 ‘quit’이면 while 문 벗어남...
	if (!strncmp(buf.data, "quit", 4)) {
		return 0;
	}

	// play_game 스레드 진입...
	pthread_create(&threads[0], NULL, play_game, NULL);
	// 스레드 종료 대기후 삭제...
	pthread_join(threads[0], NULL);
	printf("game end!\n");
	return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
callq 0x1070
movl %eax, 0x2662(%rip)      # 0x4174
movl $0xeb8c, %edi           # imm = 0xEB8C
movl $0x3b6, %esi            # imm = 0x3B6
callq 0x1030
movl %eax, 0x2645(%rip)      # 0x416c
movl $0xeb8d, %edi           # imm = 0xEB8D
movl $0x3b6, %esi            # imm = 0x3B6
callq 0x1030
movl %eax, 0x2634(%rip)      # 0x4170
leaq -0x77f(%rip), %rsi      # 0x13c4
movl $0x2, %edi
callq 0x10c0
leaq 0x58b(%rip), %rdi       # 0x20df
xorl %eax, %eax
callq 0x1090
movq 0x2476(%rip), %rax      # 0x3fd8
movq (%rax), %rdx
leaq -0x50(%rbp), %rbx
movq %rbx, %rdi
movl $0x20, %esi
callq 0x10a0
leaq -0x28(%rbp), %rdi
movq $0xc8, -0x8(%rdi)
movl $0x20, %edx
movq %rbx, %rsi
callq 0x1050
movl 0x25d7(%rip), %edi      # 0x416c
leaq -0x30(%rbp), %rbx
movl $0x28, %edx
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x10b0
cmpl $0x74697571, 0x8(%rbx)  # imm = 0x74697571
je 0x1be2
leaq 0x25c8(%rip), %rdi      # 0x4180
leaq -0x102(%rip), %rdx      # 0x1abd
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x1100
movq 0x25b1(%rip), %rdi      # 0x4180
xorl %esi, %esi
callq 0x1130
leaq 0x63d(%rip), %rdi       # 0x221a
callq 0x1060
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/bitfield.c
// Function: moongl_bitfieldCheck
GLbitfield bitfieldCheck(lua_State *L, int arg, int mandatory, bitfield_t *b)
/* Assuming all args from arg to end are bitfield strings */
/* returns the OR of the corresponding codes */
        {
        int first = arg;
        GLbitfield val = 0;
        while(!lua_isnoneornil(L, arg))
            val |= b->codes[checkoption(L, arg++, NULL, b->strings)];
        if(mandatory && (arg==first))
            return luaL_argerror(L, first, "string expected");
        return val;
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movl %edx, 0x4(%rsp)
movl %esi, %ebx
movq %rdi, %r14
callq 0x11850
xorl %r15d, %r15d
testl %eax, %eax
jle 0x11cb3
movl %ebx, %esi
movq (%r12), %rcx
movq 0x8(%r12), %rbp
leal 0x1(%rsi), %r13d
movq %r14, %rdi
xorl %edx, %edx
callq 0x11a60
cltq
orl (%rbp,%rax,4), %r15d
movq %r14, %rdi
movl %r13d, %esi
callq 0x11850
movl %r13d, %esi
testl %eax, %eax
jg 0x11c81
jmp 0x11cb6
movl %ebx, %r13d
cmpl $0x0, 0x4(%rsp)
sete %al
cmpl %ebx, %r13d
setne %cl
orb %al, %cl
jne 0x11ce7
leaq 0x2d331(%rip), %rdx     # 0x3f000
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11930
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/bitfield.c
// Function: moongl_bitfieldPush
int bitfieldPush(lua_State *L, GLbitfield code, bitfield_t *b)
/* Pushes all the strings corresponding to bits contained in code */
    {
    size_t i;
    int nret = 0;
    for(i = 0; i < b->n; i++)
        {
        if((b->codes[i] & code) == b->codes[i])
            { lua_pushstring(L, b->strings[i]); nret++; }
        }
    return nret;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x10(%rdx), %rax
testq %rax, %rax
je 0x11d44
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
xorl %r15d, %r15d
notl %ebp
xorl %r12d, %r12d
movq 0x8(%rbx), %rcx
testl %ebp, (%rcx,%r12,4)
jne 0x11d3a
movq (%rbx), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
callq 0x110c0
incl %r15d
movq 0x10(%rbx), %rax
incq %r12
cmpq %rax, %r12
jb 0x11d1a
jmp 0x11d47
xorl %r15d, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/buffer.c
// Function: BindBufferBase
static int BindBufferBase(lua_State *L)
    {
    GLenum target = checkbufferrangetarget(L, 1);
    GLuint index = luaL_checkinteger(L, 2);
    GLuint buffer = luaL_checkinteger(L, 3); 
    glBindBufferBase(target, index, buffer);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x37, %esi
movl $0x1, %edx
callq 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq 0x444e2(%rip), %rcx     # 0x565e8
movl %ebp, %edi
movl %r14d, %esi
movl %eax, %edx
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/buffer.c
// Function: BufferStorage
static int BufferStorage(lua_State *L)
/* size = buffer_storage(target|buffer, data, flag1, flag2, ... ) */
    {
    size_t len;
    const char *data;
    GLsizeiptr size;
    GLbitfield flags;
    GLenum target;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);
    if(lua_isnoneornil(L, 2))
        {
        data = NULL;
        size = 0;
        }
    else if(lua_isstring(L, 2))
        {
        data = lua_tolstring(L, 2, &len);
        size = len;
        }
    else if(lua_istable(L, 2))
        {
        data = checkdataptr(L, 2, &len);
        size = len;
        }
    else
        return luaL_argerror(L, 2, "invalid type");
    flags = CheckStorageFlags(L, 3, 0);

    if(buffer==0)
        glBufferStorage(target, size, data, flags);
    else
        glNamedBufferStorage(buffer, size, data, flags);
    CheckError(L);
    lua_pushinteger(L, size);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rdx
movl $0x1, %esi
movl $0x36, %ecx
callq 0x11420
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11850
testl %eax, %eax
jle 0x12188
movq %rbx, %rdi
movl $0x2, %esi
callq 0x110b0
testl %eax, %eax
je 0x12190
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movl $0x2, %esi
movq %r14, %rdx
callq 0x11940
jmp 0x121b7
xorl %r14d, %r14d
xorl %r15d, %r15d
jmp 0x121bd
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11850
cmpl $0x5, %eax
jne 0x1221b
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movl $0x2, %esi
movq %r14, %rdx
callq 0x11b20
movq %rax, %r15
movq (%r14), %r14
leaq 0x4541c(%rip), %rcx     # 0x575e0
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x11b50
testl %ebp, %ebp
je 0x121e2
movq 0x44aa2(%rip), %r8      # 0x56c80
movl %ebp, %edi
jmp 0x121ed
movq 0x4420f(%rip), %r8      # 0x563f8
movl 0xc(%rsp), %edi
movq %r14, %rsi
movq %r15, %rdx
movl %eax, %ecx
callq *(%r8)
movq %rbx, %rdi
callq 0x11870
movq %rbx, %rdi
movq %r14, %rsi
callq 0x113b0
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2cfd6(%rip), %rdx     # 0x3f1f8
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11930
jmp 0x12210
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/buffer.c
// Function: BufferData
static int BufferData(lua_State *L)
/* size = buffer_data(target|buffer, data, usage) data = binary string (see string.pack())
 * size = buffer_data(target|buffer, size, usage) allocates memory only, without storing
 *                                              any data in it
 */
    {
    size_t len;
    const char *data;
    GLsizeiptr size;
    GLenum target, usage;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);

    if(lua_type(L, 2)==LUA_TNUMBER)
        {
        data = NULL;
        size = luaL_checkinteger(L, 2);
        }
    else if(lua_isstring(L, 2))
        {
        data = lua_tolstring(L, 2, &len);
        size = len;
        }
    else if(lua_istable(L, 2))
        {
        data = checkdataptr(L, 2, &len);
        size = len;
        }
    else
        return luaL_argerror(L, 2, "invalid type");
    usage = checkbufferusage(L, 3);
    
    if(buffer == 0)
        glBufferData(target, size, data, usage);
    else
        glNamedBufferData(buffer, size, data, usage);
    CheckError(L);
    lua_pushinteger(L, size);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rdx
movl $0x1, %esi
movl $0x36, %ecx
callq 0x11420
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11850
movq %rbx, %rdi
movl $0x2, %esi
cmpl $0x3, %eax
jne 0x1227b
callq 0x11af0
movq %rax, %r14
xorl %r15d, %r15d
jmp 0x122c8
callq 0x110b0
testl %eax, %eax
je 0x1229b
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movl $0x2, %esi
movq %r14, %rdx
callq 0x11940
jmp 0x122c2
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11850
cmpl $0x5, %eax
jne 0x12322
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movl $0x2, %esi
movq %r14, %rdx
callq 0x11b20
movq %rax, %r15
movq (%r14), %r14
movq %rbx, %rdi
movl $0x38, %esi
movl $0x3, %edx
callq 0x11150
testl %ebp, %ebp
je 0x122e9
movq 0x44c23(%rip), %r8      # 0x56f08
movl %ebp, %edi
jmp 0x122f4
movq 0x44ae8(%rip), %r8      # 0x56dd8
movl 0xc(%rsp), %edi
movq %r14, %rsi
movq %r15, %rdx
movl %eax, %ecx
callq *(%r8)
movq %rbx, %rdi
callq 0x11870
movq %rbx, %rdi
movq %r14, %rsi
callq 0x113b0
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2cecf(%rip), %rdx     # 0x3f1f8
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11930
jmp 0x12317
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/buffer.c
// Function: BufferSubData
static int BufferSubData(lua_State *L)
/* size = buffer_sub_data(target|buffer, offset, data) 
 * data = binary string (see string.pack())
 */
    {
    size_t len;
    const char *data;
    GLsizeiptr size;
    GLenum target;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);
    GLintptr offset = lua_tointeger(L, 2);
    if(lua_isstring(L, 3))
        {
        data = lua_tolstring(L, 3, &len);
        size = len;
        }
    else if(lua_istable(L, 3))
        {
        data = checkdataptr(L, 3, &len);
        size = len;
        }
    else
        return luaL_argerror(L, 3, "invalid type");
    
    if(buffer == 0)
        glBufferSubData(target, offset, size, data);
    else
        glNamedBufferSubData(buffer, offset, size, data);

    CheckError(L);
    lua_pushinteger(L, size);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rdx
movl $0x1, %esi
movl $0x36, %ecx
callq 0x11420
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x11040
movq %rax, %r14
movq %rbx, %rdi
movl $0x3, %esi
callq 0x110b0
testl %eax, %eax
je 0x12392
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11940
jmp 0x123b6
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11850
cmpl $0x5, %eax
jne 0x12404
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11b20
movq 0x10(%rsp), %r15
testl %ebp, %ebp
je 0x123ca
movq 0x4441a(%rip), %r8      # 0x567e0
movl %ebp, %edi
jmp 0x123d5
movq 0x445b7(%rip), %r8      # 0x56988
movl 0xc(%rsp), %edi
movq %r14, %rsi
movq %r15, %rdx
movq %rax, %rcx
callq *(%r8)
movq %rbx, %rdi
callq 0x11870
movq %rbx, %rdi
movq %r15, %rsi
callq 0x113b0
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2cded(%rip), %rdx     # 0x3f1f8
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11930
jmp 0x123f9
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/buffer.c
// Function: ClearBufferData
static int ClearBufferData(lua_State *L)
    {
    size_t len;
    const void* data;
    int arg = 1;
    GLenum target;
    GLuint buffer = checktargetorname(L, arg++, &target, DOMAIN_BUFFER_TARGET);
    GLenum internalformat = checkinternalformat(L, arg++);
    GLenum format = checkformat(L, arg++);
    GLenum type = checktype(L, arg++);
    if(lua_isnoneornil(L, arg))
        data = NULL;
    else if(lua_isstring(L, arg))
        data = lua_tolstring(L, arg, &len);
    else if(lua_istable(L, arg))
        data = checkdataptr(L, arg, &len);
    else
        return luaL_argerror(L, arg, "invalid type");
    if(buffer == 0)
        glClearBufferData(target, internalformat, format, type, (void*)data);
    else
        glClearNamedBufferData(buffer, internalformat, format, type, (void*)data);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r12
leaq 0x4(%rsp), %rdx
movl $0x1, %esi
movl $0x36, %ecx
callq 0x11420
movl %eax, %ebx
movq %r12, %rdi
movl $0x11, %esi
movl $0x2, %edx
callq 0x11150
movl %eax, %ebp
movq %r12, %rdi
movl $0x12, %esi
movl $0x3, %edx
callq 0x11150
movl %eax, %r14d
movq %r12, %rdi
movl $0x7, %esi
movl $0x4, %edx
callq 0x11150
movl %eax, %r15d
movq %r12, %rdi
movl $0x5, %esi
callq 0x11850
testl %eax, %eax
jle 0x124b3
movq %r12, %rdi
movl $0x5, %esi
callq 0x110b0
testl %eax, %eax
je 0x124b8
leaq 0x8(%rsp), %rdx
movq %r12, %rdi
movl $0x5, %esi
callq 0x11940
jmp 0x124dc
xorl %r8d, %r8d
jmp 0x124df
movq %r12, %rdi
movl $0x5, %esi
callq 0x11850
cmpl $0x5, %eax
jne 0x12512
leaq 0x8(%rsp), %rdx
movq %r12, %rdi
movl $0x5, %esi
callq 0x11b20
movq %rax, %r8
testl %ebx, %ebx
je 0x124ee
movq 0x44436(%rip), %rax     # 0x56920
movl %ebx, %edi
jmp 0x124f9
movq 0x441fb(%rip), %rax     # 0x566f0
movl 0x4(%rsp), %edi
movl %ebp, %esi
movl %r14d, %edx
movl %r15d, %ecx
callq *(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2ccdf(%rip), %rdx     # 0x3f1f8
movq %r12, %rdi
movl $0x5, %esi
callq 0x11930
jmp 0x12505
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/buffer.c
// Function: ClearBufferSubData
static int ClearBufferSubData(lua_State *L)
    {
    int arg = 1;
    size_t len;
    const void* data;
    GLenum target;
    GLuint buffer = checktargetorname(L, arg++, &target, DOMAIN_BUFFER_TARGET);
    GLenum internalformat = checkinternalformat(L, arg++);
    GLintptr offset = luaL_checkinteger(L, arg++);
    GLsizei size = luaL_checkinteger(L, arg++);
    GLenum format = checkformat(L, arg++);
    GLenum type = checktype(L, arg++);
    if(lua_isnoneornil(L, arg))
        data = NULL;
    else if(lua_isstring(L, arg))
        data = lua_tolstring(L, arg, &len);
    else if(lua_istable(L, arg))
        data = checkdataptr(L, arg, &len);
    else
        return luaL_argerror(L, arg, "invalid type");
    if(buffer == 0)
        glClearBufferSubData(target, internalformat, offset, size, format, type, (void*)data);
    else
        glClearNamedBufferSubData(buffer,internalformat, offset, size, format, type, (void*)data);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rdx
movl $0x1, %esi
movl $0x36, %ecx
callq 0x11420
movl %eax, %ebp
movq %rbx, %rdi
movl $0x11, %esi
movl $0x2, %edx
callq 0x11150
movl %eax, 0x8(%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq %rax, %r13
movq %rbx, %rdi
movl $0x12, %esi
movl $0x5, %edx
callq 0x11150
movl %eax, %r15d
movq %rbx, %rdi
movl $0x7, %esi
movl $0x6, %edx
callq 0x11150
movl %eax, %r12d
movq %rbx, %rdi
movl $0x7, %esi
callq 0x11850
testl %eax, %eax
jle 0x125e5
movq %rbx, %rdi
movl $0x7, %esi
callq 0x110b0
testl %eax, %eax
je 0x125e9
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x7, %esi
callq 0x11940
jmp 0x1260d
xorl %eax, %eax
jmp 0x1260d
movq %rbx, %rdi
movl $0x7, %esi
callq 0x11850
cmpl $0x5, %eax
jne 0x12656
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x7, %esi
callq 0x11b20
testl %ebp, %ebp
je 0x12623
movq 0x44300(%rip), %r10     # 0x56918
movslq %r13d, %rcx
movq %rax, (%rsp)
movl %ebp, %edi
jmp 0x12635
movq 0x441ee(%rip), %r10     # 0x56818
movl 0xc(%rsp), %edi
movslq %r13d, %rcx
movq %rax, (%rsp)
movl 0x8(%rsp), %esi
movq %r14, %rdx
movl %r15d, %r8d
movl %r12d, %r9d
callq *(%r10)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2cb9b(%rip), %rdx     # 0x3f1f8
movq %rbx, %rdi
movl $0x7, %esi
callq 0x11930
jmp 0x12647
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/buffer.c
// Function: GetBufferSubData
static int GetBufferSubData(lua_State *L)
/* data = get_buffer_sub_data(target|buffer, offset, size) */
    {
    char *data;
    GLenum target;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);
    GLintptr offset = lua_tointeger(L, 2);
    GLsizeiptr size = lua_tointeger(L, 3);
    data = (char*)Malloc(L, size*sizeof(char));
    
    if(buffer == 0)
        glGetBufferSubData(target, offset, size, data);
    else
        glGetNamedBufferSubData(buffer, offset, size, data);
    CheckErrorFree(L, data);
    lua_pushlstring(L, data, size);
    Free(L, data);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rdx
movl $0x1, %esi
movl $0x36, %ecx
callq 0x11420
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x11040
movq %rax, %r12
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x11040
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x111f0
movq %rax, %r15
testl %ebp, %ebp
je 0x126d2
movq 0x444ba(%rip), %rax     # 0x56b88
movl %ebp, %edi
jmp 0x126dd
movq 0x4489f(%rip), %rax     # 0x56f78
movl 0xc(%rsp), %edi
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq *(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11540
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x11ab0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11360
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/buffer.c
// Function: CopyBufferSubData
static int CopyBufferSubData(lua_State *L)
/* data = copy_buffer_sub_data(src, dst, src_offset, dst_offset, size) 
 * src,dst = target,target | buffer,buffer
 */
    {
    GLenum src_target, dst_target;
    GLuint src_buffer = checktargetorname(L, 1, &src_target, DOMAIN_BUFFER_TARGET);
    GLuint dst_buffer = checktargetorname(L, 2, &dst_target, DOMAIN_BUFFER_TARGET);
    GLintptr src_offset = lua_tointeger(L, 3);
    GLintptr dst_offset = lua_tointeger(L, 4);
    GLsizeiptr size = lua_tointeger(L, 5);
    if((src_buffer==0) &&(dst_buffer != 0))
        glCopyBufferSubData(src_target, dst_target, src_offset, dst_offset, size);
    else if((dst_buffer!=0) && (dst_buffer != 0))
        glCopyNamedBufferSubData(src_buffer, dst_buffer, src_offset, dst_offset, size); 
    else
        return luaL_error(L, "invalid arguments (can not mix names and targets)");
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rdx
movl $0x1, %esi
movl $0x36, %ecx
callq 0x11420
movl %eax, %ebp
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x2, %esi
movl $0x36, %ecx
callq 0x11420
movl %eax, %r14d
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x11040
movq %rax, %r15
movq %rbx, %rdi
movl $0x4, %esi
xorl %edx, %edx
callq 0x11040
movq %rax, %r12
movq %rbx, %rdi
movl $0x5, %esi
xorl %edx, %edx
callq 0x11040
testl %ebp, %ebp
sete %cl
testl %r14d, %r14d
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x127b3
movq 0x443d7(%rip), %r9      # 0x56b80
movl 0xc(%rsp), %edi
movl 0x8(%rsp), %esi
jmp 0x127c4
testl %r14d, %r14d
je 0x127e7
movq 0x44389(%rip), %r9      # 0x56b48
movl %ebp, %edi
movl %r14d, %esi
movq %r15, %rdx
movq %r12, %rcx
movq %rax, %r8
callq *(%r9)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2ca65(%rip), %rsi     # 0x3f253
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11ae0
jmp 0x127da
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/buffer.c
// Function: InvalidateBufferData
static int InvalidateBufferData(lua_State *L)
    {
    GLuint buffer = luaL_checkinteger(L, 1);
    glInvalidateBufferData(buffer);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq 0x44619(%rip), %rcx     # 0x56e28
movl %eax, %edi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/buffer.c
// Function: InvalidateBufferSubData
static int InvalidateBufferSubData(lua_State *L)
    {
    GLuint buffer = luaL_checkinteger(L, 1);
    GLintptr offset = luaL_checkinteger(L, 2);
    GLsizeiptr length = luaL_checkinteger(L, 3);
    glInvalidateBufferSubData(buffer, offset, length);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq 0x43c40(%rip), %rcx     # 0x56498
movl %r14d, %edi
movq %r15, %rsi
movq %rax, %rdx
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/buffer.c
// Function: MapBuffer
static int MapBuffer(lua_State *L)
/* map_buffer(target|buffer, access) */
    {
    void *ptr;
    GLenum target;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);
    GLenum access = checkbufferaccess(L, 2);
    if(buffer == 0)
        ptr = glMapBuffer(target, access);
    else
        ptr = glMapNamedBuffer(buffer, access);
    CheckError(L);
    if(ptr==NULL)
        return luaL_error(L, "cannot bind buffer");
    lua_pushlightuserdata(L, ptr);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rdx
movl $0x1, %esi
movl $0x36, %ecx
callq 0x11420
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3a, %esi
movl $0x2, %edx
callq 0x11150
testl %ebp, %ebp
je 0x12a42
movq 0x441b2(%rip), %rcx     # 0x56bf0
movl %ebp, %edi
jmp 0x12a4d
movq 0x43e17(%rip), %rcx     # 0x56860
movl 0xc(%rsp), %edi
movl %eax, %esi
callq *(%rcx)
movq %rax, %r14
movq %rbx, %rdi
callq 0x11870
testq %r14, %r14
je 0x12a73
movq %rbx, %rdi
movq %r14, %rsi
callq 0x114a0
movl $0x1, %eax
jmp 0x12a84
leaq 0x2c866(%rip), %rsi     # 0x3f2e0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11ae0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/buffer.c
// Function: MapBufferRange
static int MapBufferRange(lua_State *L)
/* map_buffer_range(target|buffer, offset, length, accessbit1, ...) */
    {
    void *ptr;
    GLenum target;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);
    GLintptr offset = luaL_checkinteger(L, 2);
    GLsizei length = luaL_checkinteger(L, 3);
    GLbitfield access = CheckAccessFlags(L, 4, 0);
    if(buffer == 0)
        ptr = glMapBufferRange(target, offset, length, access);
    else
        ptr = glMapNamedBufferRange(buffer, offset, length, access);
    CheckError(L);
    if(ptr==NULL)
        return luaL_error(L, "cannot bind buffer");
    lua_pushlightuserdata(L, ptr);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4(%rsp), %rdx
movl $0x1, %esi
movl $0x36, %ecx
callq 0x11420
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r15
leaq 0x44b84(%rip), %rcx     # 0x57658
movq %rbx, %rdi
movl $0x4, %esi
xorl %edx, %edx
callq 0x11b50
testl %ebp, %ebp
je 0x12af5
movq 0x43a8a(%rip), %r8      # 0x56578
movslq %r15d, %rdx
movl %ebp, %edi
jmp 0x12b03
movq 0x43dfc(%rip), %r8      # 0x568f8
movl 0x4(%rsp), %edi
movslq %r15d, %rdx
movq %r14, %rsi
movl %eax, %ecx
callq *(%r8)
movq %rax, %r14
movq %rbx, %rdi
callq 0x11870
testq %r14, %r14
je 0x12b2d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x114a0
movl $0x1, %eax
jmp 0x12b3e
leaq 0x2c7ac(%rip), %rsi     # 0x3f2e0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11ae0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/buffer.c
// Function: FlushMappedBufferRange
static int FlushMappedBufferRange(lua_State *L)
    {
    GLenum target;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);
    GLintptr offset = luaL_checkinteger(L, 2);
    GLsizei length = luaL_checkinteger(L, 3);
    if(buffer == 0)
        glFlushMappedBufferRange(target, offset, length);
    else
        glFlushMappedNamedBufferRange(buffer, offset, length);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rdx
movl $0x1, %esi
movl $0x36, %ecx
callq 0x11420
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
testl %ebp, %ebp
je 0x12b99
movq 0x4443e(%rip), %rcx     # 0x56fd0
movslq %eax, %rdx
movl %ebp, %edi
jmp 0x12ba7
movq 0x44278(%rip), %rcx     # 0x56e18
movl 0xc(%rsp), %edi
movslq %eax, %rdx
movq %r14, %rsi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/buffer.c
// Function: UnmapBuffer
static int UnmapBuffer(lua_State *L)
/* unmap_buffer(targe|buffer)
 * -> boolean
 */
    {
    GLboolean res;
    GLenum target;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);
    if(buffer == 0)
        res = glUnmapBuffer(target);
    else
        res = glUnmapNamedBuffer(buffer);
    CheckError(L);
    lua_pushboolean(L, res);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4(%rsp), %rdx
movl $0x1, %esi
movl $0x36, %ecx
callq 0x11420
testl %eax, %eax
je 0x12bea
movq 0x4381c(%rip), %rcx     # 0x56400
movl %eax, %edi
callq *(%rcx)
jmp 0x12bf7
movq 0x443e7(%rip), %rax     # 0x56fd8
movl 0x4(%rsp), %edi
callq *(%rax)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11870
movzbl %bpl, %esi
movq %rbx, %rdi
callq 0x117e0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/buffer.c
// Function: MapWrite
static int MapWrite(lua_State *L) /* nongl */
/* mapped_buffer_write(target|buffer, offset, bstring) */
    {
    size_t length, buflen;
    const char *data;
    GLenum target;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);
    char *ptr = (char*)GetPointer(L, target, buffer);
    GLintptr offset = luaL_checkinteger(L, 2);
    if(lua_isstring(L, 3))
        data = luaL_checklstring(L, 3, &length);
    else if(lua_istable(L, 3))
        data = checkdataptr(L, 3, &length);
    else
        return luaL_argerror(L, 3, "invalid data");
    /* access and boundary checks */
    GLbitfield flags = GetAccessFlags(L, target, buffer);
    if(!(flags & GL_MAP_WRITE_BIT))
        return luaL_error(L, "no write access");
    buflen = GetMapLength(L, target, buffer);
    if(length > (buflen - offset))
        return luaL_error(L, "length is too large");
    memcpy(ptr + offset, data, length);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x4(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdx
movl $0x36, %ecx
callq 0x11420
movl %eax, %ebp
movl (%r14), %esi
movq %rbx, %rdi
movl %eax, %edx
callq 0x1321d
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
callq 0x110b0
testl %eax, %eax
je 0x12c88
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11440
jmp 0x12cb0
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11850
cmpl $0x5, %eax
jne 0x12d57
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11b20
movq %rax, %r12
testl %ebp, %ebp
movl 0x4(%rsp), %edi
cmovnel %ebp, %edi
movq 0x43e2d(%rip), %rax     # 0x56af0
cmoveq 0x4425d(%rip), %rax     # 0x56f28
leaq 0x10(%rsp), %r13
movl $0x911f, %esi           # imm = 0x911F
movq %r13, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
testb $0x2, (%r13)
jne 0x12cf2
leaq 0x2c610(%rip), %rsi     # 0x3f300
jmp 0x12d39
testl %ebp, %ebp
movl 0x4(%rsp), %edi
cmovnel %ebp, %edi
movq 0x43d06(%rip), %rax     # 0x56a08
cmoveq 0x4400e(%rip), %rax     # 0x56d18
leaq 0x10(%rsp), %r13
movl $0x9120, %esi           # imm = 0x9120
movq %r13, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movslq (%r13), %rax
movq 0x8(%rsp), %rdx
subq %r15, %rax
cmpq %rax, %rdx
jbe 0x12d45
leaq 0x2c5d7(%rip), %rsi     # 0x3f310
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11ae0
jmp 0x12d6b
addq %r15, %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x11b10
xorl %eax, %eax
jmp 0x12d6b
leaq 0x2c595(%rip), %rdx     # 0x3f2f3
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11930
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/buffer.c
// Function: MapRead
static int MapRead(lua_State *L) /* nongl */
/* bstring = mapped_buffer_read(target|buffer, offset, length) */
    {
    size_t buflen;
    GLenum target;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);
    char *ptr = (char*)GetPointer(L, target, buffer);
    GLintptr offset = luaL_checkinteger(L, 2);
    size_t length =  luaL_checkinteger(L, 3);
    /* access and boundary checks */
    GLbitfield flags = GetAccessFlags(L, target, buffer);
    if(!(flags & GL_MAP_READ_BIT))
        return luaL_error(L, "no read access");
    buflen = GetMapLength(L, target, buffer);
    if(length > (buflen - offset))
        return luaL_error(L, "length is too large");
    lua_pushlstring(L, ptr+offset, length);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %r13
movl $0x1, %esi
movq %r13, %rdx
movl $0x36, %ecx
callq 0x11420
movl %eax, %ebp
movl (%r13), %esi
movq %rbx, %rdi
movl %eax, %edx
callq 0x1321d
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r12
testl %ebp, %ebp
movl (%r13), %edi
cmovnel %ebp, %edi
movq 0x43d0b(%rip), %rax     # 0x56af0
cmoveq 0x4413b(%rip), %rax     # 0x56f28
leaq 0x10(%rsp), %r13
movl $0x911f, %esi           # imm = 0x911F
movq %r13, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
testb $0x1, (%r13)
jne 0x12e14
leaq 0x2c531(%rip), %rsi     # 0x3f343
jmp 0x12e56
testl %ebp, %ebp
movl 0xc(%rsp), %edi
cmovnel %ebp, %edi
movq 0x43be4(%rip), %rax     # 0x56a08
cmoveq 0x43eec(%rip), %rax     # 0x56d18
leaq 0x10(%rsp), %r13
movl $0x9120, %esi           # imm = 0x9120
movq %r13, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movslq (%r13), %rax
subq %r15, %rax
cmpq %rax, %r12
jbe 0x12e62
leaq 0x2c4ba(%rip), %rsi     # 0x3f310
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11ae0
jmp 0x12e78
addq %r15, %r14
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x11ab0
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/buffer.c
// Function: MapCopyFrom
static int MapCopyFrom(lua_State *L) /* nongl */
/* mapped_buffer_copy_from(target|buffer, offset, length, srcptr, [srcoffset]) */
    {
    size_t buflen;
    GLenum target;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);
    char *ptr = (char*)GetPointer(L, target, buffer);
    GLintptr offset = luaL_checkinteger(L, 2);
    size_t length = luaL_checkinteger(L, 3);
    char *srcptr = (char*)checklightuserdata(L, 4);
    size_t srcoffset = luaL_optinteger(L, 5, 0);
    /* access and boundary checks */
    GLbitfield flags = GetAccessFlags(L, target, buffer);
    if(!(flags & GL_MAP_WRITE_BIT))
        return luaL_error(L, "no write access");
    buflen = GetMapLength(L, target, buffer);
    if(length > (buflen - offset))
        return luaL_error(L, "length is too large");
    memcpy(ptr + offset, srcptr + srcoffset, length);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdx
movl $0x36, %ecx
callq 0x11420
movl %eax, %ebp
movl (%r14), %esi
movq %rbx, %rdi
movl %eax, %edx
callq 0x1321d
movq %rax, 0x18(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11770
movq %rax, %r13
movq %rbx, %rdi
movl $0x5, %esi
xorl %edx, %edx
callq 0x11b30
movq %rax, 0x10(%rsp)
testl %ebp, %ebp
movl (%r14), %edi
cmovnel %ebp, %edi
movq 0x43bda(%rip), %rax     # 0x56af0
cmoveq 0x4400a(%rip), %rax     # 0x56f28
leaq 0x20(%rsp), %r14
movl $0x911f, %esi           # imm = 0x911F
movq %r14, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
testb $0x2, (%r14)
jne 0x12f44
leaq 0x2c3be(%rip), %rsi     # 0x3f300
jmp 0x12f85
testl %ebp, %ebp
movl 0xc(%rsp), %edi
cmovnel %ebp, %edi
movq 0x43ab4(%rip), %rax     # 0x56a08
cmoveq 0x43dbc(%rip), %rax     # 0x56d18
leaq 0x20(%rsp), %r14
movl $0x9120, %esi           # imm = 0x9120
movq %r14, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movslq (%r14), %rax
subq %r15, %rax
cmpq %rax, %r12
jbe 0x12f91
leaq 0x2c38b(%rip), %rsi     # 0x3f310
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11ae0
jmp 0x12fab
movq 0x18(%rsp), %rdi
addq %r15, %rdi
addq 0x10(%rsp), %r13
movq %r13, %rsi
movq %r12, %rdx
callq 0x11b10
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq