LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/j-hoppe[P]tu58fs/rt11.c
// Function: stream_destroy
static void stream_destroy(rt11_stream_t *stream) {
	if (stream) {
		if (stream->data)
			free(stream->data);
		free(stream);
	}
}

// Assembly:
testq %rdi, %rdi
je 0x107ce
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x107c5
callq 0x3050
movq %rbx, %rdi
popq %rbx
jmp 0x3050
retq
// File: /workspace/github_c_makefile_star2_O1/j-hoppe[P]tu58fs/rt11.c
// Function: rt11_filesystem_mark_filestream_as_changed
static void rt11_filesystem_mark_filestream_as_changed(rt11_filesystem_t *_this,
		rt11_stream_t *stream) {
	rt11_blocknr_t blknr, blkend;
	if (!stream)
		return;
	stream->changed = 0;
	if (_this->image_changed_blocks) {
		blkend = stream->blocknr + NEEDED_BLOCKS(RT11_BLOCKSIZE, stream->data_size);
		for (blknr = stream->blocknr; !stream->changed && blknr < blkend; blknr++)
			stream->changed |= BOOLARRAY_BIT_GET(_this->image_changed_blocks, blknr);
//		stream->changed |= boolarray_bit_get(_this->image_changed_blocks, blknr);
		// possible optimization: boolarray is tested sequentially
	}
}

// Assembly:
testq %rsi, %rsi
je 0x1085f
movb $0x0, 0x64(%rsi)
movq 0x10(%rdi), %rdx
testq %rdx, %rdx
je 0x1085f
cmpb $0x0, 0x64(%rsi)
jne 0x1085f
movl $0x1ff, %eax            # imm = 0x1FF
addl 0x10(%rsi), %eax
movzwl (%rsi), %ecx
shrl $0x9, %eax
addl %ecx, %eax
cmpw %ax, %cx
jae 0x1085f
movq (%rdx), %rdx
movl %ecx, %edi
shrl $0x5, %edi
movl (%rdx,%rdi,4), %edi
btl %ecx, %edi
setb %dil
jb 0x1085b
incl %ecx
cmpw %ax, %cx
jb 0x10843
movb %dil, 0x64(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/j-hoppe[P]tu58fs/rt11.c
// Function: rt11_image_set_word_at
static void rt11_image_set_word_at(rt11_filesystem_t *_this, rt11_blocknr_t blocknr,
		uint32_t byte_offset, uint16_t val) {
	uint32_t idx = RT11_BLOCKSIZE * blocknr + byte_offset;
	assert((idx + 1) < _this->image_size);

	_this->image_data[idx] = val & 0xff;
	_this->image_data[idx + 1] = (val >> 8) & 0xff;
	//fprintf(ferr, "set 0x%x to 0x%x\n", idx, val) ;
}

// Assembly:
shll $0x9, %esi
movl %edx, %eax
addq %rsi, %rax
leal 0x1(%rax), %edx
cmpl 0x8(%rdi), %edx
jae 0x1087e
movq (%rdi), %rdx
movb %cl, (%rdx,%rax)
movq (%rdi), %rdx
movb %ch, 0x1(%rdx,%rax)
retq
pushq %rax
leaq 0x59f7(%rip), %rdi      # 0x1627d
leaq 0x5e5b(%rip), %rsi      # 0x166e8
leaq 0x6296(%rip), %rcx      # 0x16b2a
movl $0x79, %edx
callq 0x3210
// File: /workspace/github_c_makefile_star2_O1/j-hoppe[P]tu58fs/monitor.c
// Function: monitor_getc
int monitor_getc(monitor_t *_this, int timeout_us) {
	char tmpbuff[2];
	int n;
	int timeout ;
	timeout_set(timeout_us);
	// "Busy waiting" loop, as delay() routines are unreliable under CygWin.
	do {
		// Fix for slow single thread CPUs (BBB):
		// test timeout BEFORE read()
		timeout = timeout_reached() ;
		fcntl(_this->serial->fd, F_SETFL, FNDELAY);
		tmpbuff[0] = 0; // clear
		n = read(_this->serial->fd, tmpbuff, 1);
//		if (n < 0)
//			return error_set(ERROR_MONITOR, "monitor_getc() failed with errno=%u", errno);
		if (n > 0) {
			// monitor_trace(tmpbuff, n, TRACE_IN, "monitor_getc") ;
			return tmpbuff[0];
		}
	} while (n <= 0 && !timeout);
	return EOF;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl %esi, %edi
callq 0xa47d
leaq 0xe(%rsp), %r14
callq 0xa4b5
movl %eax, %ebp
movq 0x10(%rbx), %rax
movl (%rax), %edi
movl $0x4, %esi
movl $0x800, %edx            # imm = 0x800
xorl %eax, %eax
callq 0x3130
movb $0x0, 0xe(%rsp)
movq 0x10(%rbx), %rax
movl (%rax), %edi
movl $0x1, %edx
movq %r14, %rsi
callq 0x32c0
testl %eax, %eax
jg 0x10bed
testl %ebp, %ebp
je 0x10ba8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x10bf2
movsbl 0xe(%rsp), %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/j-hoppe[P]tu58fs/monitor.c
// Function: monitor_puts
int monitor_puts(monitor_t *_this, char *s) {
	int n;
	n = strlen(s);
	n = write(_this->serial->fd, s, n);
	if (n < 0) {
		monitor_trace_dump(ferr);
		return error_set(ERROR_MONITOR, "serial_puts() failed");
	}
	monitor_trace(s, n, TRACE_OUT, "monitor_puts");
	return ERROR_OK;
	// do not echo output, PDP-11 should do this
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x31a0
movq 0x10(%r14), %rcx
movl (%rcx), %edi
movslq %eax, %rdx
movq %rbx, %rsi
callq 0x3150
testl %eax, %eax
js 0x10c65
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x6427(%rip), %rsi      # 0x17093
movl $0xfffffff6, %edi       # imm = 0xFFFFFFF6
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x9f8f
// File: /workspace/github_c_makefile_star2_O1/j-hoppe[P]tu58fs/monitor.c
// Function: monitor_wait_prompt
static int monitor_wait_prompt(monitor_t *_this, char *last_answer) {
	char buff[256];
	int rounds = 5;
	char *s;

	buff[0] = 0;
	if (last_answer)
		strcat(buff, last_answer);
monitor_trace(NULL, 0, TRACE_STATUS, "monitor_wait_prompt():responsetime_us=%u", _this->responsetime_us) ;
	do {
		s = monitor_gets(_this, _this->responsetime_us);
		if (s) {
			// append to buffer, clip off first chars
			int n = strlen(s);
			if (n + strlen(buff) + 1 >= sizeof(buff))
				memmove(buff, buff + n, sizeof(buff) - n);
			strcat(buff, s);
		}
		// find prompt in string
		if (strstr(buff, _this->prompt) != NULL)
			return ERROR_OK; // found
	} while (--rounds);

	monitor_trace_dump(ferr);
	return STATUS_MONITOR_NOPROMPT; // not found after timeout
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdi, %rbx
movb $0x0, (%rsp)
testq %rsi, %rsi
je 0x10ca2
movq %rsp, %rdi
callq 0x3520
movl $0xfffffffb, %ebp       # imm = 0xFFFFFFFB
leaq 0x39cd2(%rip), %r14     # 0x4a980
movq %rsp, %r15
movl 0x18(%rbx), %esi
movq %rbx, %rdi
callq 0x10d2d
movq %r14, %rdi
callq 0x31a0
movslq %eax, %r12
movq %r15, %rdi
callq 0x31a0
addq %r12, %rax
addq $-0xff, %rax
cmpq $-0x101, %rax           # imm = 0xFEFF
ja 0x10cf4
leaq (%rsp,%r12), %rsi
movl $0x100, %edx            # imm = 0x100
subq %r12, %rdx
movq %r15, %rdi
callq 0x3470
movq %r15, %rdi
movq %r14, %rsi
callq 0x3520
movq 0x8(%rbx), %rsi
movq %r15, %rdi
callq 0x35c0
testq %rax, %rax
jne 0x10d1b
incl %ebp
jne 0x10cb1
movl $0x1, %eax
jmp 0x10d1d
xorl %eax, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/j-hoppe[P]tu58fs/monitor.c
// Function: monitor_gets
char *monitor_gets(monitor_t *_this, int timeout_us) {
	static char buffer[10240];
	unsigned charcount;
	int c;

	charcount = 0;
	buffer[0] = 0; // clear
	// "Busy waiting" loop, as delay() routines are unreliable under CygWin.
	do {
		c = monitor_getc(_this, timeout_us);
		if (c != EOF) {
			// append char to string, new timeout
			buffer[charcount++] = (char) c;
			buffer[charcount] = 0;
			if (charcount + 1 >= sizeof(buffer))
				fatal("monitor_gets(): buffer overflow");
			if (_this->fecho)
				fputc(c, _this->fecho);
			timeout_us = 3 * _this->chartime_us; // next chars full RS232 speed
		}
	} while (c != EOF);
	monitor_trace(buffer, charcount, TRACE_IN, "monitor_gets");

	return buffer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
movb $0x0, 0x39c3b(%rip)     # 0x4a980
leaq 0x39c34(%rip), %r12     # 0x4a980
xorl %r13d, %r13d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x10b91
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x10da8
leal 0x1(%r13), %r14d
movl %r13d, %eax
movb %bpl, (%rax,%r12)
movb $0x0, (%r14,%r12)
addl $0xffffd802, %r13d      # imm = 0xFFFFD802
cmpl $0xffffd7ff, %r13d      # imm = 0xFFFFD7FF
ja 0x10d8f
leaq 0x62eb(%rip), %rdi      # 0x17073
xorl %eax, %eax
callq 0xa2ef
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0x10d9f
movl %ebp, %edi
callq 0x32a0
movl 0x1c(%rbx), %eax
leal (%rax,%rax,2), %r15d
jmp 0x10dab
movl %r13d, %r14d
movl %r14d, %r13d
cmpl $-0x1, %ebp
jne 0x10d4f
leaq 0x39bc6(%rip), %rax     # 0x4a980
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/j-hoppe[P]tu58fs/monitor.c
// Function: monitor_go
int monitor_go(monitor_t *_this, unsigned address, int no_go) {
	switch (_this->monitor_type) {
	case monitor_odt:
		return monitor_odt_go(_this, address, no_go);
	case monitor_m9312:
	case monitor_m9301: // only difference is the prompt
		return monitor_m9312_go(_this, address, no_go);
        case monitor_1144:
            return monitor_1144_go(_this, address, no_go);
	default:
		return error_set(ERROR_MONITOR, "monitor_go(): Illegal boot monitor %u selected",
				_this->monitor_type);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movl %edx, %r14d
movl %esi, %eax
movq %rdi, %rbx
movl (%rdi), %edx
leal -0x3(%rdx), %ecx
cmpl $0x2, %ecx
jb 0x1121b
cmpl $0x5, %edx
je 0x1126e
cmpl $0x2, %edx
jne 0x112a3
testl %r14d, %r14d
je 0x112c3
leaq 0x5fcf(%rip), %rsi      # 0x171c8
movq %rsp, %r14
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x3540
movl 0x18(%rbx), %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10dc9
jmp 0x112fb
movq %rbx, %rdi
movl %eax, %esi
callq 0x11337
testl %eax, %eax
jne 0x11298
movl 0x18(%rbx), %edx
leaq 0x4549(%rip), %rsi      # 0x1577c
movq %rbx, %rdi
callq 0x10dc9
xorl %ebp, %ebp
testl %r14d, %r14d
jne 0x112fd
leaq 0x5e24(%rip), %rsi      # 0x17071
movq %rbx, %rdi
callq 0x10c34
movl 0x18(%rbx), %esi
movq %rbx, %rdi
callq 0x10d2d
cmpb $0x0, 0x39719(%rip)     # 0x4a980
jne 0x11255
jmp 0x112fd
leaq 0x5fe5(%rip), %rsi      # 0x1725a
xorl %ebp, %ebp
movq %rsp, %r15
movq %r15, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x3540
movl 0x18(%rbx), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x10dc9
testl %eax, %eax
je 0x1130d
leaq 0xcfa9(%rip), %rax      # 0x1e248
movl (%rax), %ebp
jmp 0x112fd
leaq 0x5eb2(%rip), %rsi      # 0x1715c
movl $0xfffffff6, %edi       # imm = 0xFFFFFFF6
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x9f8f
leaq 0x5f8c(%rip), %rsi      # 0x17256
movq %rsp, %r14
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x3540
movl 0x18(%rbx), %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10dc9
movl 0x18(%rbx), %esi
movq %rbx, %rdi
callq 0x10d2d
cmpb $0x0, 0x39687(%rip)     # 0x4a980
jne 0x112e7
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testl %r14d, %r14d
jne 0x112fd
leaq 0x5d58(%rip), %rsi      # 0x17071
movq %rbx, %rdi
callq 0x10c34
movl 0x18(%rbx), %esi
movq %rbx, %rdi
callq 0x10d2d
cmpb $0x0, 0x3964d(%rip)     # 0x4a980
jne 0x11321
jmp 0x112fd
// File: /workspace/github_c_makefile_star2_O1/j-hoppe[P]tu58fs/monitor.c
// Function: monitor_m9312_load_addr
static int monitor_m9312_load_addr(monitor_t *_this, unsigned address) {
	char buffer[256];
	char *answer;
	_this->last_address = 0xffffffff; // invalidate
	sprintf(buffer, "L %o", address);
	if (monitor_puts_echocheck(_this, buffer, _this->responsetime_us)) // verify address
		return error_code;
	monitor_puts(_this, CR);
	answer = monitor_gets(_this, _this->responsetime_us); // read prompt
	if (monitor_wait_prompt(_this, answer))
		return error_set(ERROR_MONITOR, "M9312/M9301 address load: %s-prompt not found",
				_this->prompt);
	_this->last_address = address;
	return ERROR_OK;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movl %esi, %ebp
movq %rdi, %rbx
movl $0xffffffff, 0x28(%rdi) # imm = 0xFFFFFFFF
leaq 0x5e9f(%rip), %rsi      # 0x171f4
movq %rsp, %r14
movq %r14, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x3540
movl 0x18(%rbx), %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10dc9
testl %eax, %eax
je 0x11381
leaq 0xcecb(%rip), %rax      # 0x1e248
movl (%rax), %eax
jmp 0x113cc
leaq 0x5ce9(%rip), %rsi      # 0x17071
movq %rbx, %rdi
callq 0x10c34
movl 0x18(%rbx), %esi
movq %rbx, %rdi
callq 0x10d2d
leaq 0x395de(%rip), %rsi     # 0x4a980
movq %rbx, %rdi
callq 0x10c7f
testl %eax, %eax
je 0x113c7
movq 0x8(%rbx), %rdx
leaq 0x5e40(%rip), %rsi      # 0x171f9
movl $0xfffffff6, %edi       # imm = 0xFFFFFFF6
xorl %eax, %eax
callq 0x9f8f
jmp 0x113cc
movl %ebp, 0x28(%rbx)
xorl %eax, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/j-hoppe[P]tu58fs/bootloader.c
// Function: bootloader_show_code
void bootloader_show_code(FILE *fout, int opt_boot_address) {
	unsigned i;
	fprintf(fout, "# TU58 boot loader octal address/value dump\n");
	// dump out address/value pairs
	for (i = 0; i < obj_code_word_count; i++) {
		unsigned addr = opt_boot_address + 2 * i;
		unsigned value = obj_code[i];
		fprintf(fout, "%06o %06o\n", addr, value);
	}
	fprintf(fout, "\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x5e81(%rip), %rdi      # 0x17270
movl $0x2c, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3560
movl %ebp, %r15d
leaq 0x6075(%rip), %r12      # 0x17480
leaq 0x5e8b(%rip), %r14      # 0x1729d
xorl %r13d, %r13d
leal (%r15,%r13), %edx
movzwl (%r13,%r12), %ecx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x3320
addq $0x2, %r13
cmpq $0x56, %r13
jne 0x11415
movl $0xa, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x32a0
// File: /workspace/github_c_makefile_star2_O1/j-hoppe[P]tu58fs/bootloader.c
// Function: bootloader_download
int bootloader_download(serial_device_t *serialdevice, monitor_type_t monitor_type,
		int opt_boot_address) {
	monitor_t monitor;
	unsigned i;

	if (monitor_init(&monitor, serialdevice, monitor_type, stdout, opt_usbdelay))
		return error_set(ERROR_MONITOR, "monitor_init in bootloader_download");
	if (monitor_assert_prompt(&monitor))
		return error_set(ERROR_MONITOR,
				"Boot loader download: PDP-11 console prompt not found.");

	// dump out address/value pairs
	for (i = 0; i < obj_code_word_count; i++) {
		unsigned addr = opt_boot_address + 2 * i;
		unsigned value = obj_code[i];
		if (monitor_deposit(&monitor, addr, value))
			return error_set(ERROR_MONITOR, "bootloader_download");
	}
//monitor_trace_dump(stderr) ; //debug
	monitor_close(&monitor);
	return ERROR_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebx
movl %esi, %edx
movq %rdi, %rsi
movq 0xab63(%rip), %rax      # 0x1bfd0
movq (%rax), %rcx
leaq 0xb61d(%rip), %rax      # 0x1ca94
movl (%rax), %r8d
leaq 0x8(%rsp), %rdi
callq 0x10b28
testl %eax, %eax
je 0x11491
leaq 0x5e19(%rip), %rsi      # 0x172a8
jmp 0x114a6
leaq 0x8(%rsp), %rdi
callq 0x10bfb
testl %eax, %eax
je 0x114c5
leaq 0x5e26(%rip), %rsi      # 0x172cc
movl $0xfffffff6, %edi       # imm = 0xFFFFFFF6
xorl %eax, %eax
callq 0x9f8f
movl %eax, %ebx
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebx, %r12d
leaq 0x5fb1(%rip), %r13      # 0x17480
leaq 0x8(%rsp), %r14
xorl %r15d, %r15d
leal (%r12,%r15), %esi
movzwl (%r15,%r13), %edx
movq %r14, %rdi
callq 0x10f64
movl %eax, %ebp
testl %eax, %eax
je 0x11503
movl $0xfffffff6, %edi       # imm = 0xFFFFFFF6
leaq 0x5dbe(%rip), %rsi      # 0x172b8
xorl %eax, %eax
callq 0x9f8f
movl %eax, %ebx
testl %ebp, %ebp
jne 0x114b4
addq $0x2, %r15
cmpq $0x56, %r15
jne 0x114d7
leaq 0x8(%rsp), %rdi
callq 0x10b8e
xorl %ebx, %ebx
jmp 0x114b4
// File: /workspace/github_c_makefile_star2_O1/j-hoppe[P]tu58fs/bootloader.c
// Function: bootloader_go
int bootloader_go(serial_device_t *serialdevice, monitor_type_t monitor_type, int boot_address) {
	monitor_t monitor;
	if (monitor_init(&monitor, serialdevice, monitor_type, stdout, opt_usbdelay))
		return error_set(ERROR_MONITOR, "monitor_init in bootloader_go");
	if (monitor_assert_prompt(&monitor))
		return error_set(ERROR_MONITOR, "monitor_assert_prompt in bootloader_go");
	if (monitor_go(&monitor, boot_address, 0))
		return error_set(ERROR_MONITOR, "monitor_go in bootloader_go");
	return ERROR_OK;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebx
movl %esi, %edx
movq %rdi, %rsi
movq 0xaa9d(%rip), %rax      # 0x1bfd0
movq (%rax), %rcx
leaq 0xb557(%rip), %rax      # 0x1ca94
movl (%rax), %r8d
leaq 0x8(%rsp), %rdi
callq 0x10b28
testl %eax, %eax
je 0x11557
leaq 0x5dae(%rip), %rsi      # 0x17303
jmp 0x11589
leaq 0x8(%rsp), %rdi
callq 0x10bfb
testl %eax, %eax
je 0x1156e
leaq 0x5db5(%rip), %rsi      # 0x17321
jmp 0x11589
leaq 0x8(%rsp), %rdi
xorl %ebp, %ebp
movl %ebx, %esi
xorl %edx, %edx
callq 0x111b8
testl %eax, %eax
je 0x11597
leaq 0x5dbf(%rip), %rsi      # 0x17348
movl $0xfffffff6, %edi       # imm = 0xFFFFFFF6
xorl %eax, %eax
callq 0x9f8f
movl %eax, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/meaning-matters[P]Except/thread.c
// Function: main
int main(void)
{
    pthread_t   launchers[NUM_LAUNCHERS];

    int i;

    try
    {
        for (i = 0; i < NUM_LAUNCHERS; i++)
        {
            pthread_create(&launchers[i], NULL, launch, (void *)0);
        }
    
        for (i = 0; i < NUM_LAUNCHERS; i++)
        {
            pthread_join(launchers[i], NULL);
        }
    }
    catch(Throwable, e)
    {
        e->printTryTrace(0);
    }
    finally;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
leaq 0x5f7f(%rip), %r15      # 0x7230
movq (%r15), %rdi
leaq 0x2d49(%rip), %rsi      # 0x4004
movl $0x14, %edx
callq 0x18f6
leaq 0x5f58(%rip), %r14      # 0x7224
xorl %r13d, %r13d
movl %r13d, %eax
movq %rax, 0x8(%rsp)
leaq 0x1b8(%rip), %r12       # 0x1496
movq (%r15), %rdi
callq 0x16ae
movq %rax, %rbp
movq %rax, %rdi
movq %r14, %rsi
leaq 0x2d0e(%rip), %rdx      # 0x4004
movl $0x14, %ecx
callq 0x1f26
testl %eax, %eax
je 0x1323
movq (%rbp), %rdi
cmpl $0x0, 0x1b4(%rdi)
je 0x1323
addq $0x8, %rdi
movl $0x1, %esi
callq 0x1130
testl %eax, %eax
je 0x1397
movq %rbp, %rdi
movq %r14, %rsi
leaq 0x5d90(%rip), %rdx      # 0x70c0
leaq 0x2ccd(%rip), %rcx      # 0x4004
movl $0x20, %r8d
callq 0x1fba
testl %eax, %eax
je 0x13ed
movq (%rbp), %rax
cmpl $0x0, 0x1b4(%rax)
je 0x13ed
movq %rbp, %rdi
leaq 0x5d5b(%rip), %rsi      # 0x70c0
callq 0x1c85
testl %eax, %eax
je 0x13ed
movq 0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x2307
movq (%rbp), %rcx
movl $0x2, 0x1b8(%rcx)
movq 0x8(%rsp), %rdi
callq *0x1f0(%rax)
jmp 0x13ed
movq (%rbp), %rax
movl $0x1, 0x1b8(%rax)
movl %r13d, %eax
movq %rax, %rbx
leaq (%rsp,%rax), %rdi
addq $0x10, %rdi
movl %r13d, %ecx
movq %rcx, %rsi
movq %r12, %rdx
callq 0x10e0
addq $0x8, %rbx
movq %rbx, %rax
cmpq $0x50, %rbx
jne 0x13a8
movl %r13d, %eax
movq %rax, %rbx
movq 0x10(%rsp,%rax,8), %rdi
movl %r13d, %esi
callq 0x1120
incq %rbx
movq %rbx, %rax
cmpq $0xa, %rbx
jne 0x13d1
cmpl $0x0, 0x5e30(%rip)      # 0x7224
je 0x12de
movq (%rbp), %rdi
cmpl $0x0, 0x1b4(%rdi)
jne 0x142f
addq $0xd0, %rdi
movl $0x1, %esi
callq 0x1130
testl %eax, %eax
jne 0x142f
movq (%rbp), %rax
movl $0x1, 0x1b4(%rax)
jmp 0x12de
movq (%r15), %rdi
callq 0x16ae
movq (%rax), %rax
movl $0x3, 0x1b8(%rax)
movq (%r15), %rdi
callq 0x16ae
movq (%rax), %rax
cmpl $0x0, 0x1b4(%rax)
jg 0x1464
movq (%r15), %rdi
callq 0x1cd0
testl %eax, %eax
je 0x1485
movq (%r15), %rdi
callq 0x16ae
movq (%rax), %rax
movl 0x1b4(%rax), %ecx
movl %ecx, %edx
decl %edx
movl %edx, 0x1b4(%rax)
testl %ecx, %ecx
jg 0x1464
jmp 0x1444
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/meaning-matters[P]Except/thread.c
// Function: launch
void *launch(void *arg)
{
    pthread_t   threads[NUM_THREADS];
    int         i;

    for (i = 0; i < NUM_THREADS; i++)
    {
        pthread_create(&threads[i], NULL, thread, (void *)0);
    }

    for (i = 0; i < NUM_THREADS; i++)
    {
        pthread_join(threads[i], NULL);
    }   
    printf("launch: reporting that all %d threads have terminated\n", i);

    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
xorl %r14d, %r14d
leaq 0x4d(%rip), %rbx        # 0x14f4
leaq (%rsp,%r14), %rdi
xorl %esi, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x10e0
addq $0x8, %r14
cmpq $0x50, %r14
jne 0x14a7
xorl %ebx, %ebx
movq (%rsp,%rbx,8), %rdi
xorl %esi, %esi
callq 0x1120
incq %rbx
cmpq $0xa, %rbx
jne 0x14c3
leaq 0x2b2f(%rip), %rdi      # 0x400d
movl $0xa, %esi
xorl %eax, %eax
callq 0x1060
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/meaning-matters[P]Except/Except.c
// Function: ExceptGetScope
Scope ExceptGetScope(
    Context *   pC)             /* pointer to thread exception context */
{
    Scope       scope;

    if (pC == NULL)
        pC = ExceptGetContext(NULL);

    ExceptPrintDebug(pC, "ExceptGetScope");

    if (pC == NULL || pC->pEx == NULL)
        scope = OUTSIDE;
    else
        scope = ((Except *)LifoPeek(pC->exStack, 1))->scope;

    return scope;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
jne 0x1688
xorl %edi, %edi
callq 0x16ae
movq %rax, %rdi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x16ac
cmpq $0x0, (%rdi)
je 0x16ac
movq 0x8(%rdi), %rdi
movl $0x1, %esi
callq 0x2307
movl 0x1b8(%rax), %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/meaning-matters[P]Except/Except.c
// Function: ExceptGetContext
Context * ExceptGetContext(
    Context *   pC)             /* pointer to thread exception context */
{
#if     MULTI_THREADING
    EXCEPT_THREAD_MUTEX_FUNC(1);
    if (pC == NULL && pContextHash != NULL)
        pC = HashLookup(pContextHash, EXCEPT_THREAD_ID_FUNC());
    EXCEPT_THREAD_MUTEX_FUNC(0);
    
    return pC;
#else
    return &defaultContext;
#endif
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %edi
callq 0x16fd
testq %rbx, %rbx
sete %al
movq 0x5b6c(%rip), %r14      # 0x7238
testq %r14, %r14
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x16eb
callq 0x10f0
movq %r14, %rdi
movl %eax, %esi
callq 0x2717
movq %rax, %rbx
xorl %edi, %edi
callq 0x16fd
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/meaning-matters[P]Except/Except.c
// Function: ExceptMutex
static void ExceptMutex(
    int         mode)           /* 1: lock, 0 unlock */
{
    static volatile pthread_mutex_t mutex;
    static volatile sig_atomic_t    initialized;
    static volatile sig_atomic_t    ready;
    static volatile int             count;
    static volatile pthread_t       tid;

    if (!initialized && !initialized++)
    {
        pthread_mutex_init(&mutex, NULL);
        ready = 1;
    }
    else
    {
        while (!ready)
            ;
    }
    
    if (mode == 1)
    {
        if (tid == pthread_self())
        {
            count++;
        }
        else
        {
            pthread_mutex_lock(&mutex);
            tid = pthread_self();
            count = 1;
        }
    }
    else if (mode == 0)
    {
        if (tid == pthread_self())
        {
            if (--count == 0)
            {
                tid = 0;
                pthread_mutex_unlock(&mutex);
            }
        }
        else if (tid != 0 && tid != pthread_self())
        {
            fprintf(stderr, "Except internal error: thread attempts to unlock"
                            " without holding lock\n");
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
cmpl $0x0, 0x5b5d(%rip)      # 0x7268
jne 0x1724
movl 0x5b55(%rip), %eax      # 0x7268
leal 0x1(%rax), %ecx
movl %ecx, 0x5b4c(%rip)      # 0x7268
testl %eax, %eax
je 0x17b2
cmpl $0x0, 0x5b41(%rip)      # 0x726c
je 0x1724
movq 0x5b44(%rip), %r15      # 0x7278
callq 0x10f0
movq %rax, %r14
cmpl $0x1, %ebx
jne 0x174e
cmpq %r14, %r15
jne 0x1777
incl 0x5b24(%rip)            # 0x7270
jmp 0x17ac
cmpq %r14, %r15
jne 0x1796
decl 0x5b17(%rip)            # 0x7270
jne 0x17ac
movq $0x0, 0x5b12(%rip) # 0x7278
leaq 0x5ad3(%rip), %rdi      # 0x7240
popq %rbx
popq %r14
popq %r15
jmp 0x10b0
leaq 0x5ac2(%rip), %rdi      # 0x7240
callq 0x1150
movq %r14, 0x5aee(%rip)      # 0x7278
movl $0x1, 0x5adc(%rip)      # 0x7270
jmp 0x17ac
cmpq $0x0, 0x5ada(%rip)      # 0x7278
je 0x17ac
movq 0x5ad1(%rip), %rax      # 0x7278
cmpq %r14, %rax
jne 0x17cf
popq %rbx
popq %r14
popq %r15
retq
leaq 0x5a87(%rip), %rdi      # 0x7240
xorl %esi, %esi
callq 0x1140
movl $0x1, 0x5aa2(%rip)      # 0x726c
jmp 0x172d
callq 0x1170
jmp 0x17ac
// File: /workspace/github_c_makefile_star2_O1/meaning-matters[P]Except/Except.c
// Function: ExceptThreadCleanup
void ExceptThreadCleanup(
    int         threadId)       /* ID of ceased thread or -1 for self */
{
#if     MULTI_THREADING
    validate(threadId != EXCEPT_THREAD_ID_FUNC(), NOTHING);
    if (threadId == -1)
        threadId = EXCEPT_THREAD_ID_FUNC();

    EXCEPT_THREAD_MUTEX_FUNC(1);
    if (pContextHash != NULL)
    {
        Context * pC;
        
        pC = HashLookup(pContextHash, threadId);
        if (pC != NULL)
        {
            ExceptRestoreHandlers(pC);
            LifoDestroyData(pC->exStack);
            if (pC->pEx->checkList != NULL)
                ListDestroyData(pC->pEx->checkList);
            free(HashRemove(pContextHash, threadId));
        }
    }    
    EXCEPT_THREAD_MUTEX_FUNC(0);
#endif
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %ebp
callq 0x10f0
movq %rax, %rbx
cmpl %ebp, %ebx
jne 0x180e
movq 0x5a41(%rip), %rdi      # 0x7230
leaq 0x28e0(%rip), %rdx      # 0x40d6
leaq 0x28f9(%rip), %rcx      # 0x40f6
xorl %esi, %esi
movl $0x2c6, %r8d            # imm = 0x2C6
popq %rbx
popq %r14
popq %rbp
jmp 0x2468
cmpl $-0x1, %ebp
cmovnel %ebp, %ebx
movl $0x1, %edi
callq 0x16fd
movq 0x5a13(%rip), %rdi      # 0x7238
testq %rdi, %rdi
je 0x1871
movl %ebx, %esi
callq 0x2717
testq %rax, %rax
je 0x1871
movq %rax, %r14
callq 0x187c
movq 0x8(%r14), %rdi
callq 0x2163
movq (%r14), %rax
movq 0x1c0(%rax), %rdi
testq %rdi, %rdi
je 0x185b
callq 0x2998
movq 0x59d6(%rip), %rdi      # 0x7238
movl %ebx, %esi
callq 0x2826
movq %rax, %rdi
callq 0x1040
xorl %edi, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x16fd
// File: /workspace/github_c_makefile_star2_O1/meaning-matters[P]Except/Except.c
// Function: ExceptTry
void ExceptTry(
    Context *   pC,             /* pointer to thread exception context */
    char *      file,           /* source file name */
    int         line)           /* source line number */
{
    int first;
    
#if     MULTI_THREADING
    EXCEPT_THREAD_MUTEX_FUNC(1);
    if (pContextHash == NULL)
        pContextHash = HashCreate();
    EXCEPT_THREAD_MUTEX_FUNC(0);
#endif
  
    if (first = (pC == NULL))
        pC = ExceptGetContext(NULL);
    if (pC == NULL)                     /* not needed for single-threading */
        pC = ExceptCreateContext();
  
    ExceptInstallHandlers(pC);

    LifoPush(pC->exStack, pC->pEx = calloc(sizeof(Except), 1));
    pC->pEx->first = first; 
    pC->pEx->tryFile = file;
    pC->pEx->tryLine = line;
    
    ExceptPrintDebug(pC, "ExceptTry");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edi
callq 0x16fd
cmpq $0x0, 0x591d(%rip)      # 0x7238
jne 0x1929
callq 0x25e0
movq %rax, 0x590f(%rip)      # 0x7238
xorl %edi, %edi
callq 0x16fd
movq %r15, %r12
testq %r15, %r15
jne 0x1942
xorl %edi, %edi
callq 0x16ae
movq %rax, %r12
testq %r12, %r12
jne 0x198c
movl $0x1, %edi
movl $0x438, %esi            # imm = 0x438
callq 0x1080
movq %rax, %r12
testq %rax, %rax
je 0x1a83
movl $0x1, %edi
callq 0x16fd
movq 0x58c5(%rip), %r13      # 0x7238
callq 0x10f0
movq %r13, %rdi
movl %eax, %esi
movq %r12, %rdx
callq 0x278c
xorl %edi, %edi
callq 0x16fd
cmpq $0x0, 0x8(%r12)
jne 0x1a31
callq 0x20fc
movq %rax, 0x8(%r12)
movl $0x1, %edi
callq 0x16fd
movl 0x58ce(%rip), %eax      # 0x7280
leal 0x1(%rax), %ecx
movl %ecx, 0x58c5(%rip)      # 0x7280
testl %eax, %eax
jne 0x1a2a
leaq 0x6e3(%rip), %r13       # 0x20a9
movl $0x6, %edi
movq %r13, %rsi
callq 0x1090
movq %rax, 0x58ae(%rip)      # 0x7288
movl $0x8, %edi
movq %r13, %rsi
callq 0x1090
movq %rax, 0x58a2(%rip)      # 0x7290
movl $0x4, %edi
movq %r13, %rsi
callq 0x1090
movq %rax, 0x5896(%rip)      # 0x7298
movl $0xb, %edi
movq %r13, %rsi
callq 0x1090
movq %rax, 0x588a(%rip)      # 0x72a0
movl $0x7, %edi
movq %r13, %rsi
callq 0x1090
movq %rax, 0x587e(%rip)      # 0x72a8
xorl %edi, %edi
callq 0x16fd
xorl %ebp, %ebp
testq %r15, %r15
sete %bpl
movq 0x8(%r12), %r15
movl $0x1f8, %edi            # imm = 0x1F8
movl $0x1, %esi
callq 0x1080
movq %rax, (%r12)
movq %r15, %rdi
movq %rax, %rsi
callq 0x21bf
movq (%r12), %rax
movl %ebp, 0x1bc(%rax)
movq %r14, 0x1c8(%rax)
movl %ebx, 0x1d0(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x118c
jmp 0x1962
// File: /workspace/github_c_makefile_star2_O1/meaning-matters[P]Except/Except.c
// Function: ExceptThrow
void ExceptThrow(
    Context *   pC,             /* pointer to thread exception context */
    void *      pExceptOrClass, /* rethrown exception OR class to be catched */
    void *      pData,          /* pointer to associated data or NULL */
    char *      file,           /* name of source file where invoked */
    int         line)           /* source file line number */
{
    ExceptPrintDebug(pC, "ExceptThrow");

    if (pC == NULL)
        pC = ExceptGetContext(NULL);

    if (pC == NULL || pC->exStack == NULL || LifoCount(pC->exStack) == 0)
    {
        fprintf(stderr, "%s lost: file \"%s\", line %d.\n",
                ((ClassRef)pExceptOrClass)->name, file, line);
    
        return;
    }
    
    if (((ClassRef)pExceptOrClass)->notRethrown)
    {
        pC->pEx->class         = (ClassRef)pExceptOrClass;
        pC->pEx->pData         = pData;
        pC->pEx->file          = file;
        pC->pEx->line          = line;
        pC->pEx->getMessage    = ExceptGetMessage;
        pC->pEx->getData       = ExceptGetData;
        pC->pEx->printTryTrace = ExceptPrintTryTrace;
    }
    pC->pEx->state = PENDING;   /* in case of throw() inside 'catch' */

    switch (pC->pEx->scope)
    {
    case TRY:
        ExceptPrintDebug(pC, "longjmp(throwBuf)");
        LONGJMP(pC->pEx->throwBuf, 1);

    case CATCH:
        ExceptPrintDebug(pC, "longjmp(finalBuf)");
        LONGJMP(pC->pEx->finalBuf, 1);

    case FINALLY:
        ExceptPrintDebug(pC, "longjmp(finalBuf)");
        LONGJMP(pC->pEx->finalBuf, 1);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %r8d, %ebx
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r12
testq %rdi, %rdi
jne 0x1ab4
xorl %edi, %edi
callq 0x16ae
movq %rax, %r12
testq %r12, %r12
je 0x1b4d
movq 0x8(%r12), %rdi
testq %rdi, %rdi
je 0x1b4d
callq 0x2434
testl %eax, %eax
je 0x1b4d
cmpl $0x0, (%r15)
je 0x1b23
movq (%r12), %rax
movq %r15, 0x198(%rax)
movq %r13, 0x1a0(%rax)
movq %r14, 0x1a8(%rax)
movl %ebx, 0x1b0(%rax)
leaq 0x8f(%rip), %rcx        # 0x1b8f
movq %rcx, 0x1e0(%rax)
leaq 0xc2(%rip), %rcx        # 0x1bd0
movq %rcx, 0x1e8(%rax)
leaq 0xc8(%rip), %rcx        # 0x1be4
movq %rcx, 0x1f0(%rax)
movq (%r12), %rdi
movl $0x1, 0x4(%rdi)
movl 0x1b8(%rdi), %eax
cmpl $0x3, %eax
je 0x1b78
cmpl $0x2, %eax
je 0x1b78
cmpl $0x1, %eax
je 0x1b81
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x54a4(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
movq 0x10(%r15), %rdx
leaq 0x259d(%rip), %rsi      # 0x40ff
movq %r14, %rcx
movl %ebx, %r8d
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x10a0
addq $0xd0, %rdi
jmp 0x1b85
addq $0x8, %rdi
movl $0x1, %esi
callq 0x1070
// File: /workspace/github_c_makefile_star2_O1/meaning-matters[P]Except/Except.c
// Function: ExceptGetMessage
static char * ExceptGetMessage(void)
{
    Context *   pC = ExceptGetContext(NULL);

    ExceptPrintDebug(pC, "ExceptGetMessage");

    sprintf(pC->message, "%s: file \"%s\", line %d.",
            pC->pEx->class->name, pC->pEx->file, pC->pEx->line);

    return pC->message;
}

// Assembly:
pushq %rbx
xorl %edi, %edi
callq 0x16ae
movq %rax, %rbx
movq (%rax), %rax
addq $0x10, %rbx
movq 0x198(%rax), %rdx
movq 0x1a8(%rax), %rcx
movq 0x10(%rdx), %rdx
movl 0x1b0(%rax), %r8d
leaq 0x2690(%rip), %rsi      # 0x4251
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1100
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/meaning-matters[P]Except/Except.c
// Function: ExceptPrintTryTrace
static void ExceptPrintTryTrace(
   FILE *       pFile)          /* stream to which is printed or NULL */
{
    Context *   pC = ExceptGetContext(NULL);
    int         n;
    
    ExceptPrintDebug(pC, "ExceptGetData");

    if (pFile == NULL)
        pFile = stderr;

#if     MULTI_THREADING
    fprintf(pFile, "%s occurred in thread %d:\n", pC->pEx->class->name,
            EXCEPT_THREAD_ID_FUNC());
#else
    fprintf(pFile, "%s occurred:\n", pC->pEx->class->name);
#endif

    for (n = 1; n <= LifoCount(pC->exStack); n++)
    {
        Except *    pEx = LifoPeek(pC->exStack, n);
        
        fprintf(pFile, "        in 'try' at %s:%d\n", pEx->tryFile, pEx->tryLine);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %edi, %edi
callq 0x16ae
movq %rax, %r14
testq %rbx, %rbx
jne 0x1c07
movq 0x53f4(%rip), %rax      # 0x6ff8
movq (%rax), %rbx
movq (%r14), %rax
movq 0x198(%rax), %rax
movq 0x10(%rax), %r15
callq 0x10f0
leaq 0x2648(%rip), %rsi      # 0x4269
movq %rbx, %rdi
movq %r15, %rdx
movl %eax, %ecx
xorl %eax, %eax
callq 0x10a0
movq 0x8(%r14), %rdi
callq 0x2434
testl %eax, %eax
jle 0x1c7a
leaq 0x2640(%rip), %r15      # 0x4284
xorl %ebp, %ebp
incl %ebp
movq 0x8(%r14), %rdi
movl %ebp, %esi
callq 0x2307
movq 0x1c8(%rax), %rdx
movl 0x1d0(%rax), %ecx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x10a0
movq 0x8(%r14), %rdi
callq 0x2434
cmpl %eax, %ebp
jl 0x1c46
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/meaning-matters[P]Except/Except.c
// Function: ExceptCatch
int ExceptCatch(
    Context *   pC,             /* pointer to thread exception context */
    ClassRef    class)          /* pointer to occurred exception */
{
    ExceptPrintDebug(pC, "ExceptCatch");

    if (pC == NULL)
        pC = ExceptGetContext(NULL);

    if (pC->pEx->state == PENDING && ExceptIsDerived(pC->pEx->class, class))
        pC->pEx->state = CAUGHT;

    return pC->pEx->state == CAUGHT;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
testq %rdi, %rdi
jne 0x1c98
xorl %edi, %edi
callq 0x16ae
movq %rax, %rdi
movq (%rdi), %rcx
cmpl $0x1, 0x4(%rcx)
jne 0x1cc5
movq 0x198(%rcx), %rdx
movq %rdx, %rax
cmpq %rbx, %rdx
je 0x1cb9
movq 0x8(%rax), %rdx
testq %rdx, %rdx
jne 0x1ca8
cmpq %rbx, %rax
jne 0x1cc5
movl $0x2, 0x4(%rcx)
xorl %eax, %eax
cmpl $0x2, 0x4(%rcx)
sete %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/meaning-matters[P]Except/Except.c
// Function: ExceptReturn
void ExceptReturn(
    Context *   pC)             /* pointer to thread exception context */
{
    ExceptPrintDebug(pC, "ExceptReturn");

    if (pC == NULL)
        pC = ExceptGetContext(NULL);

    pC->pEx->class = ReturnEvent;       /* may overrule pending exception */
    pC->pEx->state = PENDING;           /* in case of return() inside 'catch' */
    ExceptPrintDebug(pC, "longjmp(finalBuf)");
        
    LONGJMP(pC->pEx->finalBuf, 1);
}

// Assembly:
pushq %rax
testq %rdi, %rdi
jne 0x1efd
xorl %edi, %edi
callq 0x16ae
movq %rax, %rdi
movq (%rdi), %rdi
leaq 0x52f9(%rip), %rax      # 0x7200
movq %rax, 0x198(%rdi)
movl $0x1, 0x4(%rdi)
addq $0xd0, %rdi
movl $0x1, %esi
callq 0x1070
// File: /workspace/github_c_makefile_star2_O1/meaning-matters[P]Except/Except.c
// Function: ExceptCheckBegin
int ExceptCheckBegin(
    Context *   pC,             /* pointer to thread exception context */
    int *       pChecked,       /* pointer to flag if finished checking */
    char *      file,           /* name of source file where invoked */
    int         line)           /* source file line number */
{
    ExceptPrintDebug(pC, "ExceptCheckBegin");

    if (pC->pEx->checkList == NULL && !*pChecked)
    {
        pC->pEx->checkList = ListCreate();
    }
    else
    {
        if (!*pChecked)
        {
            if (ListCount(pC->pEx->checkList) == 0)
            {
                fprintf(stderr,
                        "Warning: No catch clause(s): file \"%s\", line %d.\n",
                        file, line);
            }

            ListDestroyData(pC->pEx->checkList);
            pC->pEx->checkList = NULL;
            *pChecked = 1;
        }
    }

    return *pChecked;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movq 0x1c0(%rax), %rdi
testq %rdi, %rdi
jne 0x1f4c
cmpl $0x0, (%rbx)
je 0x1f7f
cmpl $0x0, (%rbx)
jne 0x1f8e
callq 0x3261
testl %eax, %eax
je 0x1f9b
movq (%r14), %rax
movq 0x1c0(%rax), %rdi
callq 0x2998
movq (%r14), %rax
movq $0x0, 0x1c0(%rax)
movl $0x1, (%rbx)
jmp 0x1f8e
callq 0x28fc
movq (%r14), %rcx
movq %rax, 0x1c0(%rcx)
movl (%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x5056(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq 0x2171(%rip), %rsi      # 0x411d
movq %r15, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x10a0
jmp 0x1f5a
// File: /workspace/github_c_makefile_star2_O1/meaning-matters[P]Except/Except.c
// Function: ExceptCheck
int ExceptCheck(
    Context *   pC,             /* pointer to thread exception context */
    int *       pChecked,       /* pointer to flag if finished checking */
    ClassRef    class,          /* next exception class to be checked */
    char *      file,           /* name of source file where invoked */
    int         line)           /* source file line number */
{
    typedef struct _Check
    {
        ClassRef        class;
        int             line;
    } Check;

    ExceptPrintDebug(pC, "ExceptCheck");

    if (!*pChecked)
    {
        Check * pCheck;

        pCheck = ListHead(pC->pEx->checkList);
        while (pCheck != NULL)                  /* breaked from */
        {
            if (class == pCheck->class)
            {
                fprintf(stderr, "Duplicate catch(%s): file \"%s\", line %d; "
                        "already caught at line %d.\n",
                        class->name, file, line, pCheck->line);
                break;
            }

            if (ExceptIsDerived(class, pCheck->class))
            {
                fprintf(stderr, "Superfluous catch(%s): file \"%s\", line %d; "
                        "already caught by %s at line %d.\n", class->name,
                        file, line, pCheck->class->name, pCheck->line);
                break;
            }

            pCheck = ListNext(pC->pEx->checkList);
        }

        if (pCheck == NULL)
        {
            pCheck = malloc(sizeof(Check));
            pCheck->class = class;
            pCheck->line  = line;
            ListAddTail(pC->pEx->checkList, pCheck);
        }
    }
    return *pChecked;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
cmpl $0x0, (%rsi)
jne 0x2044
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %r12
movq (%rdi), %rax
movq 0x1c0(%rax), %rdi
callq 0x2fd4
testq %rax, %rax
je 0x2021
movq (%rax), %rcx
movq %r15, %rsi
cmpq %r15, %rcx
je 0x2053
movq %rsi, %rdx
cmpq %rcx, %rsi
je 0x200a
movq 0x8(%rdx), %rsi
testq %rsi, %rsi
jne 0x1ff9
cmpq %rcx, %rdx
je 0x207b
movq (%r12), %rax
movq 0x1c0(%rax), %rdi
callq 0x30a6
jmp 0x1fe9
movl $0x10, %edi
callq 0x10c0
movq %r15, (%rax)
movl %ebp, 0x8(%rax)
movq (%r12), %rcx
movq 0x1c0(%rcx), %rdi
movq %rax, %rsi
callq 0x2a6b
movl (%rbx), %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x4f9e(%rip), %rcx      # 0x6ff8
movq (%rcx), %rdi
movq 0x10(%r15), %rdx
movl 0x8(%rax), %r9d
leaq 0x20e3(%rip), %rsi      # 0x414f
movq %r14, %rcx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x10a0
jmp 0x2044
movq 0x4f76(%rip), %rdx      # 0x6ff8
movq (%rdx), %rdi
movq 0x10(%r15), %rdx
movq 0x10(%rcx), %r9
movl 0x8(%rax), %eax
movl %eax, (%rsp)
leaq 0x20fa(%rip), %rsi      # 0x4194
movq %r14, %rcx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x10a0
jmp 0x2044
// File: /workspace/github_c_makefile_star2_O1/meaning-matters[P]Except/Except.c
// Function: ExceptThrowSignal
static void ExceptThrowSignal(
    int         number)         /* signal number */
{
    ClassRef    class;

    ExceptPrintDebug(pC, "ExceptThrowSignal");

    switch (number)
    {
    case SIGABRT: class = AbnormalTermination; break;
    case SIGFPE:  class = ArithmeticException; break;
    case SIGILL:  class = IllegalInstruction;  break;
    case SIGSEGV: class = SegmentationFault;   break;
#ifdef  SIGBUS
    case SIGBUS:  class = BusError;            break;
#endif
    }

    signal(number, ExceptThrowSignal);

    class->signalNumber = number;       /* redundant after first time */
        
    ExceptThrow(NULL, class, NULL, "?", 0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
leal -0x4(%rbx), %eax
cmpl $0x7, %eax
ja 0x20c6
movl %eax, %eax
leaq 0x4cf0(%rip), %rcx      # 0x6db0
movq (%rcx,%rax,8), %r14
jmp 0x20cd
leaq 0x5093(%rip), %r14      # 0x7160
leaq -0x2b(%rip), %rsi       # 0x20a9
movl %ebx, %edi
callq 0x1090
movl %ebx, 0x18(%r14)
leaq 0x2169(%rip), %rcx      # 0x424f
xorl %edi, %edi
movq %r14, %rsi
xorl %edx, %edx
xorl %r8d, %r8d
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1a8d
// File: /workspace/github_c_makefile_star2_O1/meaning-matters[P]Except/Lifo.c
// Function: LifoCreate
Lifo * LifoCreate(void)
{
    Lifo *      pLifo;

    pLifo = malloc(sizeof(Lifo));
    pLifo->pObjects = malloc(INIT_SIZE * sizeof(void *));
    pLifo->size = INIT_SIZE;
    pLifo->pointer = 0;
    return pLifo;
}

// Assembly:
pushq %rbx
movl $0x10, %edi
callq 0x10c0
movq %rax, %rbx
movl $0x100, %edi            # imm = 0x100
callq 0x10c0
movq %rax, (%rbx)
movq $0x20, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/meaning-matters[P]Except/Lifo.c
// Function: LifoDestroyData
void LifoDestroyData(
    Lifo *      pLifo)          /* pointer to LIFO buffer */
{
    assert(pLifo != NULL);

    while(pLifo->pointer > 0)
        free(pLifo->pObjects[pLifo->pointer--]);

    free(pLifo->pObjects);
    free(pLifo);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
jne 0x21a7
leaq 0x50bd(%rip), %rax      # 0x7230
movq (%rax), %rdi
leaq 0x212e(%rip), %rdx      # 0x42ab
leaq 0x2135(%rip), %rcx      # 0x42b9
xorl %esi, %esi
movl $0x67, %r8d
callq 0x2468
jmp 0x21a7
movq (%rbx), %rcx
leal -0x1(%rax), %edx
movl %edx, 0xc(%rbx)
movl %eax, %eax
movq (%rcx,%rax,8), %rdi
callq 0x1040
movl 0xc(%rbx), %eax
testl %eax, %eax
jg 0x2193
movq (%rbx), %rdi
callq 0x1040
movq %rbx, %rdi
popq %rbx
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O1/meaning-matters[P]Except/Lifo.c
// Function: LifoPush
void LifoPush(
    Lifo *      pLifo,          /* pointer to LIFO buffer */
    void *      pObject)        /* object being added */
{
    assert(pLifo != NULL && pObject != NULL);

    if (pLifo->pointer == pLifo->size) {
        pLifo->size += INCR_SIZE;
        pLifo->pObjects = realloc(pLifo->pObjects,
                                  pLifo->size * sizeof(void *));
    }
    pLifo->pObjects[pLifo->pointer++] = pObject;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rdi, %rdi
setne %al
testq %rsi, %rsi
setne %cl
testb %cl, %al
jne 0x21fe
leaq 0x5050(%rip), %rax      # 0x7230
movq (%rax), %rdi
leaq 0x20d6(%rip), %rdx      # 0x42c0
leaq 0x20c8(%rip), %rcx      # 0x42b9
xorl %esi, %esi
movl $0x83, %r8d
callq 0x2468
movslq 0x8(%r14), %rax
cmpl %eax, 0xc(%r14)
jne 0x2223
leaq 0x20(%rax), %rcx
movl %ecx, 0x8(%r14)
movq (%r14), %rdi
leaq 0x100(,%rax,8), %rsi
callq 0x10d0
movq %rax, (%r14)
movq (%r14), %rax
movslq 0xc(%r14), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0xc(%r14)
movq %rbx, (%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/meaning-matters[P]Except/Lifo.c
// Function: LifoPeek
void * LifoPeek(
    Lifo *      pLifo,          /* pointer to LIFO buffer */
    int         number)         /* object number to get (1: top) */
{
    assert(pLifo != NULL);
    validate(pLifo->pointer > 0, NULL);
    validate(number > 0 && number <= pLifo->pointer, NULL);

    return pLifo->pObjects[pLifo->pointer - number];
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
testq %rdi, %rdi
jne 0x233a
leaq 0x4f14(%rip), %rax      # 0x7230
movq (%rax), %rdi
leaq 0x1f85(%rip), %rdx      # 0x42ab
leaq 0x1f8c(%rip), %rcx      # 0x42b9
xorl %esi, %esi
movl $0xc1, %r8d
callq 0x2468
movl 0xc(%r14), %eax
testl %eax, %eax
jle 0x23a4
testl %ebx, %ebx
setg %dl
movl %eax, %ecx
subl %ebx, %ecx
setge %sil
testb %sil, %dl
jne 0x2412
cmpl %ebx, %eax
setge %al
testl %ebx, %ebx
setg %cl
testb %al, %cl
jne 0x238b
leaq 0x4ec3(%rip), %rax      # 0x7230
movq (%rax), %rdi
leaq 0x1f7d(%rip), %rdx      # 0x42f4
leaq 0x1f3b(%rip), %rcx      # 0x42b9
xorl %esi, %esi
movl $0xc3, %r8d
callq 0x2468
leaq 0x4e9e(%rip), %r14      # 0x7230
movq (%r14), %rdi
callq 0x1678
cmpl $-0x1, %eax
jne 0x23d8
jmp 0x2426
leaq 0x4e85(%rip), %r14      # 0x7230
movq (%r14), %rdi
leaq 0x1f2c(%rip), %rdx      # 0x42e1
leaq 0x1efd(%rip), %rcx      # 0x42b9
xorl %ebx, %ebx
movl %ebx, %esi
movl $0xc2, %r8d
callq 0x2468
movq (%r14), %rdi
callq 0x1678
cmpl $-0x1, %eax
je 0x242a
movl $0xc8, %edi
callq 0x10c0
movq %rax, %rbx
movq (%r14), %rdi
callq 0x16ae
movq (%rax), %rax
movq %rbx, 0x1a0(%rax)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x1130
testl %eax, %eax
je 0x241e
movq %rbx, %rdi
callq 0x1040
jmp 0x2426
movq (%r14), %rax
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
jmp 0x242c
movq (%r14), %rdi
callq 0x1eed
xorl %eax, %eax
jmp 0x242c
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/meaning-matters[P]Except/Assert.c
// Function: AssertAction
void AssertAction(
    Context *   pC,             /* pointer to thread exception context */
    int         doAbort,        /* flag if abort() must be invoked */
    char *      expr,           /* failed expression string */
    char *      file,           /* name of source file where failed */
    int         line)           /* source file line number */
{
    Scope       scope = ExceptGetScope(pC);

    if (scope == TRY || scope == CATCH || scope == FINALLY)
    {
        if (pC == NULL)
            pC = ExceptGetContext(NULL);        /* should never return NULL */

        ExceptThrow(pC, FailedAssertion, expr, file, line);
    }
    else
    {
        fprintf(stderr, "Assertion failed %s: %s, file \"%s\", line %d.\n",
                doAbort ? "" : "(no abort)", expr, file, line);

        if (doAbort)
            abort();
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r12
callq 0x1678
decl %eax
cmpl $0x2, %eax
ja 0x24b9
testq %r12, %r12
jne 0x2499
xorl %edi, %edi
callq 0x16ae
movq %rax, %r12
leaq 0x4c80(%rip), %rsi      # 0x7120
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
movl %ebx, %r8d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1a8d
movq 0x4b38(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
testl %ebp, %ebp
leaq 0x1e7d(%rip), %rax      # 0x4349
leaq 0x1e75(%rip), %rdx      # 0x4348
cmoveq %rax, %rdx
leaq 0x1e3d(%rip), %rsi      # 0x431b
movq %r15, %rcx
movq %r14, %r8
movl %ebx, %r9d
xorl %eax, %eax
callq 0x10a0
testl %ebp, %ebp
jne 0x24fb
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x1050
// File: /workspace/github_c_makefile_star2_O1/meaning-matters[P]Except/Alloc.c
// Function: AllocCalloc
void * AllocCalloc(
    Context *   pC,             /* pointer to thread exception context */
    int         number,         /* number of elements */
    int         size,           /* size of one element */
    char *      file,           /* name of source file where invoked */
    int         line)           /* source file line number */
{
    void *      pMem;

    pMem = calloc(number, size);
    if (pMem == NULL)
        ExceptThrow(pC, OutOfMemoryError, NULL, file, line);

    return pMem;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movq %rcx, %r14
movq %rdi, %r12
movslq %esi, %rdi
movslq %edx, %rsi
callq 0x1080
movq %rax, %r15
testq %rax, %rax
jne 0x253b
leaq 0x4bd5(%rip), %rsi      # 0x7100
movq %r12, %rdi
xorl %edx, %edx
movq %r14, %rcx
movl %ebx, %r8d
callq 0x1a8d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq