LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/rongarret[P]clmm/verify.c
// Function: main
int main(int argc, char** argv) {

  c_string filename;

  if (argc == 2) {
    filename = argv[1];
  } else {
    printf("Usage: %s filename\n", argv[0]);
    exit(1);
  }

  // Read the file to verify

  c_string signature_string = (c_string)file_contents(filename, 0)->data;

  // Parse the public key

  p_vector pk = b64decode(signature_string + strlen("CLMM signed by: "), 0);

  // Parse the signature

  u64 smlen = crypto_sign_BYTES + crypto_hash_BYTES;
  u8* buffer1 = malloc(smlen);
  u8* p1 = buffer1;
  c_string p2 = strstr(signature_string, "\n") + 1;

  for (int i=0; i<4; i++) {
    for (int j=0; j<32; j++) {
      int k;
      sscanf(p2, "%02x", &k);
      *p1++ = (u8)k;
      p2+=2;
    }
    p2+=1;
  }

  // Verify the signature

  u64 mlen;
  u8* buffer2 = malloc(smlen);
  int status = crypto_sign_open(buffer2, &mlen, buffer1, smlen, pk->data);
  printf(status ? "NOT valid\n" : "valid\n");
  return status;
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
jne 0x126a
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x1289
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0x4d8c(%rip), %rdi      # 0x6004
movb $0x0, %al
callq 0x1060
movl $0x1, %edi
callq 0x1110
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1570
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
addq $0x10, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16f0
movq %rax, -0x28(%rbp)
movq $0x80, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x10b0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x4d4b(%rip), %rsi      # 0x6026
callq 0x1130
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
cmpl $0x4, -0x4c(%rbp)
jge 0x135c
movl $0x0, -0x50(%rbp)
cmpl $0x20, -0x50(%rbp)
jge 0x1345
movq -0x48(%rbp), %rdi
leaq 0x4d0b(%rip), %rsi      # 0x6018
leaq -0x54(%rbp), %rdx
movb $0x0, %al
callq 0x10c0
movl -0x54(%rbp), %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
movq -0x48(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x48(%rbp)
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x12fc
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x12ef
movq -0x30(%rbp), %rdi
callq 0x10b0
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq 0x10(%rax), %r8
leaq -0x60(%rbp), %rsi
callq 0x4b80
movl %eax, -0x6c(%rbp)
movl -0x6c(%rbp), %ecx
leaq 0x4c8e(%rip), %rdi      # 0x6021
leaq 0x4c83(%rip), %rax      # 0x601d
cmpl $0x0, %ecx
cmovneq %rax, %rdi
movb $0x0, %al
callq 0x1060
movl -0x6c(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/maandree[P]libkeccak/./libkeccak.h
// Function: libkeccak_state_destroy
inline void
libkeccak_state_destroy(volatile struct libkeccak_state *state)
{
	if (state) {
		libkeccak_state_wipe(state);
		free(state->M);
		state->M = NULL;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x7e6b
movq -0x8(%rbp), %rdi
callq 0x2170
movq -0x8(%rbp), %rax
movq 0x118(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
movq $0x0, 0x118(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/maandree[P]libkeccak/extra/../libkeccak/extra.h
// Function: libkeccak_state_fast_free
inline void
libkeccak_state_fast_free(struct libkeccak_state *state)
{
	if (state) {
		free(state->M);
		state->M = NULL;
		free(state);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x82cb
movq -0x8(%rbp), %rax
movq 0x118(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
movq $0x0, 0x118(%rax)
movq -0x8(%rbp), %rdi
callq 0x2040
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/maandree[P]libkeccak/hmac/libkeccak_hmac_copy.c
// Function: libkeccak_hmac_copy
int
libkeccak_hmac_copy(struct libkeccak_hmac_state *restrict dest, const struct libkeccak_hmac_state *restrict src)
{
	size_t size;

	dest->key_opad = NULL;
	dest->key_ipad = NULL;

	if (libkeccak_state_copy(&dest->sponge, &src->sponge) < 0)
		return -1;

	dest->key_length = src->key_length;
	dest->leftover = src->leftover;

	size = (src->key_length + 7) >> 3;
	dest->key_opad = malloc(2 * size);
	if (!dest->key_opad) {
		libkeccak_state_destroy(&dest->sponge);
		return -1;
	}
	dest->key_ipad = dest->key_opad + size;

	memcpy(dest->key_opad, src->key_opad, size);
	memcpy(dest->key_ipad, src->key_ipad, size);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
addq $0x18, %rsi
callq 0x20d0
cmpl $0x0, %eax
jge 0x88fd
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x89b5
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movb 0x148(%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x148(%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
addq $0x7, %rax
shrq $0x3, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
shlq %rdi
callq 0x21c0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x896b
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0x2130
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x89b5
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rdx
callq 0x2180
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rdx
callq 0x2180
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/maandree[P]libkeccak/hmac/../libkeccak/hmac.h
// Function: libkeccak_hmac_create
inline struct libkeccak_hmac_state *
libkeccak_hmac_create(const struct libkeccak_spec *restrict spec, const void *restrict key, size_t key_length)
{
	struct libkeccak_hmac_state *state = malloc(sizeof(struct libkeccak_hmac_state));
	if (!state || libkeccak_hmac_initialise(state, spec, key, key_length)) {
		free(state);
		return NULL;
	}
	return state;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x150, %edi            # imm = 0x150
callq 0x21c0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x8a03
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x20b0
cmpl $0x0, %eax
je 0x8a16
movq -0x28(%rbp), %rdi
callq 0x2040
movq $0x0, -0x8(%rbp)
jmp 0x8a1e
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/maandree[P]libkeccak/hmac/../libkeccak/hmac.h
// Function: libkeccak_hmac_destroy
inline void
libkeccak_hmac_destroy(volatile struct libkeccak_hmac_state *state)
{
	if (!state)
		return;
	libkeccak_hmac_wipe(state);
	free(state->key_opad);
	state->key_opad = NULL;
	state->key_ipad = NULL;
	state->key_length = 0;
	state->leftover = 0;
	free(state->buffer);
	state->buffer = NULL;
	state->buffer_size = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x8a45
jmp 0x8ab6
movq -0x8(%rbp), %rdi
callq 0x20a0
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x148(%rax)
movq -0x8(%rbp), %rax
movq 0x138(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
movq $0x0, 0x138(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x140(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/maandree[P]libkeccak/hmac/../libkeccak/hmac.h
// Function: libkeccak_hmac_duplicate
inline struct libkeccak_hmac_state *
libkeccak_hmac_duplicate(const struct libkeccak_hmac_state *src)
{
	struct libkeccak_hmac_state *dest = malloc(sizeof(struct libkeccak_hmac_state));
	if (!dest || libkeccak_hmac_copy(dest, src)) {
		libkeccak_hmac_free(dest);
		return NULL;
	}
	return dest;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x150, %edi            # imm = 0x150
callq 0x21c0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x8e43
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2140
cmpl $0x0, %eax
je 0x8e56
movq -0x18(%rbp), %rdi
callq 0x2290
movq $0x0, -0x8(%rbp)
jmp 0x8e5e
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/maandree[P]libkeccak/hmac/../libkeccak/hmac.h
// Function: libkeccak_hmac_fast_destroy
inline void
libkeccak_hmac_fast_destroy(struct libkeccak_hmac_state *state)
{
	if (!state)
		return;
	free(state->key_opad);
	state->key_opad = NULL;
	state->key_ipad = NULL;
	state->key_length = 0;
	free(state->buffer);
	state->buffer = NULL;
	state->buffer_size = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x8e85
jmp 0x8ee2
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x138(%rax), %rdi
callq 0x2040
movq -0x8(%rbp), %rax
movq $0x0, 0x138(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x140(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/maandree[P]libkeccak/hmac/../libkeccak/hmac.h
// Function: libkeccak_hmac_initialise
inline int
libkeccak_hmac_initialise(struct libkeccak_hmac_state *restrict state, const struct libkeccak_spec *restrict spec,
                          const void *restrict key, size_t key_length)
{
	if (libkeccak_state_initialise(&state->sponge, spec) < 0)
		return -1;
	if (libkeccak_hmac_set_key(state, key, key_length) < 0) {
		libkeccak_state_destroy(&state->sponge);
		return -1;
	}
	state->leftover = 0;
	state->buffer = NULL;
	state->buffer_size = 0;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
callq 0x2110
cmpl $0x0, %eax
jge 0x94a7
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9503
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x2090
cmpl $0x0, %eax
jge 0x94d3
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0x2130
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9503
movq -0x10(%rbp), %rax
movb $0x0, 0x148(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x138(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x140(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/maandree[P]libkeccak/hmac/../libkeccak/hmac.h
// Function: libkeccak_hmac_marshal
inline size_t
libkeccak_hmac_marshal(const struct libkeccak_hmac_state *restrict state, void *restrict data_)
{
	unsigned char *restrict data = data_;
	size_t written = libkeccak_state_marshal(&state->sponge, data);
	if (data) {
		data += written;
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wcast-align"
#endif
		memcpy(data, &state->key_length, sizeof(state->key_length));
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
		data += sizeof(size_t);
		memcpy(data, state->key_opad, (state->key_length + 7) >> 3);
		data += (state->key_length + 7) >> 3;
		data[0] = (unsigned char)!!state->key_ipad;
		data[1] = state->leftover;
	}
	return written + sizeof(size_t) + ((state->key_length + 7) >> 3) + 2 * sizeof(char);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
callq 0x2080
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x95d5
movq -0x20(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdx
addq $0x7, %rdx
shrq $0x3, %rdx
callq 0x2180
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
addq $0x7, %rax
shrq $0x3, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movb 0x148(%rax), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
addq $0x7, %rcx
shrq $0x3, %rcx
addq %rcx, %rax
addq $0x2, %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/maandree[P]libkeccak/hmac/libkeccak_hmac_wipe.c
// Function: libkeccak_hmac_wipe
void
libkeccak_hmac_wipe(volatile struct libkeccak_hmac_state *state)
{
	volatile unsigned char *restrict key_pads;
	size_t i, size;

	key_pads = state->key_opad;
	size = 2 * ((state->key_length + 7) >> 3);

	libkeccak_state_wipe(&state->sponge);
	for (i = 0; i < size; i++)
		key_pads[i] = 0;
	state->leftover = 0;
	__builtin_memset(state->buffer, 0, state->buffer_size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
addq $0x7, %rax
shrq $0x3, %rax
shlq %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0x2170
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x9ce7
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x9cc3
movq -0x8(%rbp), %rax
movb $0x0, 0x148(%rax)
movq -0x8(%rbp), %rax
movq 0x138(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x140(%rax), %rdx
xorl %esi, %esi
callq 0x2120
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/maandree[P]libkeccak/spec/../libkeccak/keccak.h
// Function: libkeccak_spec_check
inline int
libkeccak_spec_check(const struct libkeccak_spec *spec)
{
	unsigned long int state_size = (unsigned long int)(spec->capacity + spec->bitrate);
	uint32_t word_size = (uint32_t)(state_size / 25U);

	if (spec->bitrate <= 0)  return LIBKECCAK_SPEC_ERROR_BITRATE_NONPOSITIVE;
	if (spec->bitrate % 8)   return LIBKECCAK_SPEC_ERROR_BITRATE_MOD_8;
	if (spec->capacity <= 0) return LIBKECCAK_SPEC_ERROR_CAPACITY_NONPOSITIVE;
	if (spec->capacity % 8)  return LIBKECCAK_SPEC_ERROR_CAPACITY_MOD_8;
	if (spec->output <= 0)   return LIBKECCAK_SPEC_ERROR_OUTPUT_NONPOSITIVE;
	if (state_size > 1600)   return LIBKECCAK_SPEC_ERROR_STATE_TOO_LARGE;
	if (state_size % 25)     return LIBKECCAK_SPEC_ERROR_STATE_MOD_25;
	if (word_size % 8)       return LIBKECCAK_SPEC_ERROR_WORD_MOD_8;

	if ((word_size & -word_size) != word_size)
		return LIBKECCAK_SPEC_ERROR_WORD_NON_2_POTENT;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
addq (%rcx), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x19, %ecx
xorl %edx, %edx
divq %rcx
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jg 0xa272
movl $0x1, -0x4(%rbp)
jmp 0xa344
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl $0x8, %ecx
cqto
idivq %rcx
cmpq $0x0, %rdx
je 0xa295
movl $0x2, -0x4(%rbp)
jmp 0xa344
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jg 0xa2ac
movl $0x3, -0x4(%rbp)
jmp 0xa344
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl $0x8, %ecx
cqto
idivq %rcx
cmpq $0x0, %rdx
je 0xa2cd
movl $0x4, -0x4(%rbp)
jmp 0xa344
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jg 0xa2e1
movl $0x5, -0x4(%rbp)
jmp 0xa344
cmpq $0x640, -0x18(%rbp)     # imm = 0x640
jbe 0xa2f4
movl $0x6, -0x4(%rbp)
jmp 0xa344
movq -0x18(%rbp), %rax
movl $0x19, %ecx
xorl %edx, %edx
divq %rcx
cmpq $0x0, %rdx
je 0xa311
movl $0x7, -0x4(%rbp)
jmp 0xa344
movl -0x1c(%rbp), %eax
andl $0x7, %eax
cmpl $0x0, %eax
je 0xa325
movl $0x9, -0x4(%rbp)
jmp 0xa344
movl -0x1c(%rbp), %eax
xorl %ecx, %ecx
subl -0x1c(%rbp), %ecx
andl %ecx, %eax
cmpl -0x1c(%rbp), %eax
je 0xa33d
movl $0x8, -0x4(%rbp)
jmp 0xa344
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ryuichiueda[P]glueutils/src_con12/con12.c
// Function: thread_read
void thread_read(void *arg)
{
	int *fd = (int *)arg;
	char buf[1024];
	int ret = 1;
	while (ret > 0){
		ret = read(*fd, &buf, 1024);
		for(int i=0;i<ret;i++){
			putchar(buf[i]);
		}
	}
	fflush(stdout);

	if(ret == -1){
		fputs("Error: reading error\n", stderr);
		exit(1);
	}
	try_close(*fd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x420, %rsp            # imm = 0x420
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0x1, -0x414(%rbp)
cmpl $0x0, -0x414(%rbp)
jle 0x1386
movq -0x10(%rbp), %rax
movl (%rax), %edi
leaq -0x410(%rbp), %rsi
movl $0x400, %edx            # imm = 0x400
callq 0x10a0
movl %eax, -0x414(%rbp)
movl $0x0, -0x418(%rbp)
movl -0x418(%rbp), %eax
cmpl -0x414(%rbp), %eax
jge 0x1384
movslq -0x418(%rbp), %rax
movsbl -0x410(%rbp,%rax), %edi
callq 0x1030
movl -0x418(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x418(%rbp)
jmp 0x1351
jmp 0x1321
movq 0x2c4b(%rip), %rax      # 0x3fd8
movq (%rax), %rdi
callq 0x10c0
cmpl $-0x1, -0x414(%rbp)
jne 0x13be
movq 0x2c53(%rip), %rax      # 0x3ff8
movq (%rax), %rsi
leaq 0xd1b(%rip), %rdi       # 0x20ca
callq 0x1070
movl $0x1, %edi
callq 0x1100
movq -0x10(%rbp), %rax
movl (%rax), %edi
callq 0x12b0
addq $0x420, %rsp            # imm = 0x420
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/teodorst[P]app-huffman/huffman_decodification_mpi.c
// Function: main
int main (int argc, char* argv[]) {
	
	MPI_Init (&argc, &argv);

	if (argc == 4) {
		huffman_decompress(argv[INPUT_FILE], argv[OUTPUT_FILE], argv[CODIFICATION]);
	}
	else {
		printf("Bad arguments\n");
		printf("Usage huffman_serial operation[compress/decompress] input_file ouput_file codification_file_name\n");
		MPI_Finalize();
		return 1;
	}
	MPI_Finalize();
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x8(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x10d0
cmpl $0x4, -0x8(%rbp)
jne 0x1928
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x1380
jmp 0x1952
leaq 0x172f(%rip), %rdi      # 0x305e
movb $0x0, %al
callq 0x1040
leaq 0x1730(%rip), %rdi      # 0x306d
movb $0x0, %al
callq 0x1040
callq 0x1170
movl $0x1, -0x4(%rbp)
jmp 0x195e
callq 0x1170
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ikbenlike[P]nngutils/src/tac.c
// Function: parse_arg
struct tac_args *parse_arg(struct tac_args *args, int argc, char **argv){
    args->files = calloc(1, sizeof(char*) * argc);
    args->nfiles = 0;
    for(int i = 1; i < argc; i++){
        if(argv[i][0] == '-'){
            if(!strcmp(argv[i], "-b")){
                args->before = true;
            }
            else if(!strcmp(argv[i], "-r")){
                args->regex = true;
            }
            else if(!strcmp(argv[i], "-s")){
                args->separator = true;
                if(i + 1 < argc){
                    args->sep = argv[++i];
                }
                else {
                    fprintf(stderr, "%s: missing operand after '-s'\n");
                    exit(1);
                }
           }
        }
        else {

        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movslq -0x14(%rbp), %rsi
shlq $0x3, %rsi
movl $0x1, %edi
callq 0x1030
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x18(%rax)
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x12b0
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x129e
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xe1b(%rip), %rsi       # 0x2004
callq 0x1040
cmpl $0x0, %eax
jne 0x11ff
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
jmp 0x129c
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xdf5(%rip), %rsi       # 0x2007
callq 0x1040
cmpl $0x0, %eax
jne 0x1226
movq -0x10(%rbp), %rax
movb $0x1, 0x1(%rax)
jmp 0x129a
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xdd1(%rip), %rsi       # 0x200a
callq 0x1040
cmpl $0x0, %eax
jne 0x1298
movq -0x10(%rbp), %rax
movb $0x1, 0x2(%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
cmpl -0x14(%rbp), %eax
jge 0x1274
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x24(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x1296
movq 0x2d7d(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xd88(%rip), %rsi       # 0x200d
movb $0x0, %al
callq 0x1050
movl $0x1, %edi
callq 0x1060
jmp 0x1298
jmp 0x129a
jmp 0x129c
jmp 0x12a0
jmp 0x12a0
jmp 0x12a2
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x11b2
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/arachsys[P]containers/contain.c
// Function: usage
static void usage(const char *progname) {
  fprintf(stderr, "\
Usage: %s [OPTIONS] DIR [CMD [ARG]...]\n\
Options:\n\
  -c        disable console emulation in the container\n\
  -g MAP    set the container-to-host GID map\n\
  -i CMD    run a helper child inside the new namespaces\n\
  -n        share the host network unprivileged in the container\n\
  -o CMD    run a helper child outside the new namespaces\n\
  -u MAP    set the container-to-host UID map\n\
GID and UID maps are specified as START:LOWER:COUNT[,START:LOWER:COUNT]...\n\
", progname);
  exit(EX_USAGE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq 0x5525(%rip), %rax      # 0x7ff8
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
leaq 0x26dd(%rip), %rsi      # 0x51be
movb $0x0, %al
callq 0x22a0
movl $0x40, %edi
callq 0x2450
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/arachsys[P]containers/console.c
// Function: getconsole
int getconsole(void) {
  int master, null;

  if ((null = open("/dev/null", O_RDWR)) < 0)
    errx(EXIT_FAILURE, "Failed to open /dev/null");

  if (fcntl(STDIN_FILENO, F_GETFD) < 0)
    dup2(null, STDIN_FILENO);
  if (fcntl(STDOUT_FILENO, F_GETFD) < 0)
    dup2(null, STDOUT_FILENO);
  if (fcntl(STDERR_FILENO, F_GETFD) < 0)
    dup2(null, STDERR_FILENO);

  if (null != STDIN_FILENO)
    if (null != STDOUT_FILENO)
      if (null != STDERR_FILENO)
        close(null);

  if ((master = posix_openpt(O_RDWR | O_NOCTTY)) < 0)
    errx(EXIT_FAILURE, "Failed to allocate a console pseudo-terminal");
  grantpt(master);
  unlockpt(master);
  return master;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x2881(%rip), %rdi      # 0x5390
movl $0x2, %esi
movb $0x0, %al
callq 0x23f0
movl %eax, -0x8(%rbp)
cmpl $0x0, %eax
jge 0x2b36
movl $0x1, %edi
leaq 0x2852(%rip), %rsi      # 0x5381
movb $0x0, %al
callq 0x21b0
xorl %edi, %edi
movl $0x1, %esi
movb $0x0, %al
callq 0x20e0
cmpl $0x0, %eax
jge 0x2b53
movl -0x8(%rbp), %edi
xorl %esi, %esi
callq 0x21c0
movl $0x1, %esi
movl %esi, %edi
movb $0x0, %al
callq 0x20e0
cmpl $0x0, %eax
jge 0x2b73
movl -0x8(%rbp), %edi
movl $0x1, %esi
callq 0x21c0
movl $0x2, %edi
movl $0x1, %esi
movb $0x0, %al
callq 0x20e0
cmpl $0x0, %eax
jge 0x2b96
movl -0x8(%rbp), %edi
movl $0x2, %esi
callq 0x21c0
cmpl $0x0, -0x8(%rbp)
je 0x2bb4
cmpl $0x1, -0x8(%rbp)
je 0x2bb2
cmpl $0x2, -0x8(%rbp)
je 0x2bb0
movl -0x8(%rbp), %edi
callq 0x2220
jmp 0x2bb2
jmp 0x2bb4
movl $0x102, %edi            # imm = 0x102
callq 0x24a0
movl %eax, -0x4(%rbp)
cmpl $0x0, %eax
jge 0x2bd9
movl $0x1, %edi
leaq 0x27c8(%rip), %rsi      # 0x539a
movb $0x0, %al
callq 0x21b0
movl -0x4(%rbp), %edi
callq 0x2440
movl -0x4(%rbp), %edi
callq 0x2280
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/arachsys[P]containers/console.c
// Function: setconsole
void setconsole(char *name) {
  int console;
  struct termios termios;

  setsid();

  if ((console = open(name, O_RDWR)) < 0)
    errx(EXIT_FAILURE, "Failed to open console in container");
  ioctl(console, TIOCSCTTY, NULL);

  if (tcgetattr(console, &termios) < 0)
    err(EXIT_FAILURE, "tcgetattr");
  termios.c_iflag |= IGNBRK | IUTF8;
  tcsetattr(console, TCSANOW, &termios);

  dup2(console, STDIN_FILENO);
  dup2(console, STDOUT_FILENO);
  dup2(console, STDERR_FILENO);
  if (console != STDIN_FILENO)
    if (console != STDOUT_FILENO)
      if (console != STDERR_FILENO)
        close(console);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
callq 0x2240
movq -0x8(%rbp), %rdi
movl $0x2, %esi
movb $0x0, %al
callq 0x23f0
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
jge 0x2c3c
movl $0x1, %edi
leaq 0x2792(%rip), %rsi      # 0x53c7
movb $0x0, %al
callq 0x21b0
movl -0xc(%rbp), %edi
movl $0x540e, %esi           # imm = 0x540E
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0x2210
movl -0xc(%rbp), %edi
leaq -0x48(%rbp), %rsi
callq 0x23d0
cmpl $0x0, %eax
jge 0x2c73
movl $0x1, %edi
leaq 0x277f(%rip), %rsi      # 0x53eb
movb $0x0, %al
callq 0x2320
movl -0x48(%rbp), %eax
orl $0x4001, %eax           # imm = 0x4001
movl %eax, -0x48(%rbp)
movl -0xc(%rbp), %edi
xorl %esi, %esi
leaq -0x48(%rbp), %rdx
callq 0x23e0
movl -0xc(%rbp), %edi
xorl %esi, %esi
callq 0x21c0
movl -0xc(%rbp), %edi
movl $0x1, %esi
callq 0x21c0
movl -0xc(%rbp), %edi
movl $0x2, %esi
callq 0x21c0
cmpl $0x0, -0xc(%rbp)
je 0x2cce
cmpl $0x1, -0xc(%rbp)
je 0x2ccc
cmpl $0x2, -0xc(%rbp)
je 0x2cca
movl -0xc(%rbp), %edi
callq 0x2220
jmp 0x2ccc
jmp 0x2cce
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/arachsys[P]containers/console.c
// Function: rawmode
static void rawmode(void) {
  struct termios termios;

  if (!isatty(STDIN_FILENO))
    return;
  if (tcgetattr(STDIN_FILENO, &termios) < 0)
    err(EXIT_FAILURE, "tcgetattr");
  cfmakeraw(&termios);
  tcsetattr(STDIN_FILENO, TCSANOW, &termios);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
xorl %edi, %edi
callq 0x20c0
cmpl $0x0, %eax
jne 0x3346
jmp 0x337f
xorl %edi, %edi
leaq -0x3c(%rbp), %rsi
callq 0x23d0
cmpl $0x0, %eax
jge 0x3369
movl $0x1, %edi
leaq 0x2089(%rip), %rsi      # 0x53eb
movb $0x0, %al
callq 0x2320
leaq -0x3c(%rbp), %rdi
callq 0x2370
xorl %esi, %esi
leaq -0x3c(%rbp), %rdx
movl %esi, %edi
callq 0x23e0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/arachsys[P]containers/mount.c
// Function: bindnode
static void bindnode(char *src, char *dst) {
  int fd;

  if ((fd = open(dst, O_WRONLY | O_CREAT, 0600)) >= 0)
    close(fd);
  if (mount(src, dst, NULL, MS_BIND, NULL) < 0)
    errx(EXIT_FAILURE, "Failed to bind %s into new /dev filesystem", src);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x41, %esi
movl $0x180, %edx            # imm = 0x180
movb $0x0, %al
callq 0x23f0
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jl 0x42a5
movl -0x14(%rbp), %edi
callq 0x2220
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %r8d
movl $0x1000, %ecx           # imm = 0x1000
movq %r8, %rdx
callq 0x2180
cmpl $0x0, %eax
jge 0x42db
movq -0x8(%rbp), %rdx
movl $0x1, %edi
leaq 0x1503(%rip), %rsi      # 0x57d7
movb $0x0, %al
callq 0x21b0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/arachsys[P]containers/mount.c
// Function: enterroot
void enterroot(void) {
  if (syscall(__NR_pivot_root, ".", "dev/tmp") < 0)
    errx(EXIT_FAILURE, "Failed to pivot into new root filesystem");

  if (chdir("/dev/tmp") >= 0) {
    while (*root == '/')
      root++;
    rmdir(root);
  }

  root = NULL;

  if (chdir("/") < 0 || umount2("/dev/tmp", MNT_DETACH) < 0)
    errx(EXIT_FAILURE, "Failed to detach old root filesystem");
  else
    rmdir("/dev/tmp");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x9b, %edi
leaq 0x13fe(%rip), %rsi      # 0x56fe
leaq 0x1423(%rip), %rdx      # 0x572a
movb $0x0, %al
callq 0x22b0
cmpq $0x0, %rax
jge 0x4327
movl $0x1, %edi
leaq 0x13e0(%rip), %rsi      # 0x5700
movb $0x0, %al
callq 0x21b0
leaq 0x13fb(%rip), %rdi      # 0x5729
callq 0x2190
cmpl $0x0, %eax
jl 0x4369
jmp 0x433a
movq 0x3f7f(%rip), %rax      # 0x82c0
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x435d
movq 0x3f70(%rip), %rax      # 0x82c0
addq $0x1, %rax
movq %rax, 0x3f65(%rip)      # 0x82c0
jmp 0x433a
movq 0x3f5c(%rip), %rdi      # 0x82c0
callq 0x2160
movq $0x0, 0x3f4c(%rip) # 0x82c0
leaq 0x13b7(%rip), %rdi      # 0x5732
callq 0x2190
cmpl $0x0, %eax
jl 0x439b
leaq 0x139d(%rip), %rdi      # 0x5729
movl $0x2, %esi
callq 0x2120
cmpl $0x0, %eax
jge 0x43ae
movl $0x1, %edi
leaq 0x138d(%rip), %rsi      # 0x5734
movb $0x0, %al
callq 0x21b0
leaq 0x1374(%rip), %rdi      # 0x5729
callq 0x2160
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/arachsys[P]containers/mount.c
// Function: mountproc
void mountproc(void) {
  mode_t mask;

  mask = umask(0);
  mkdir("proc" , 0755);
  umask(mask);

  if (mount("proc", "proc", "proc", 0, NULL) < 0)
    errx(EXIT_FAILURE, "Failed to mount /proc in new root filesystem");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorl %edi, %edi
callq 0x22d0
movl %eax, -0x4(%rbp)
leaq 0x1380(%rip), %rdi      # 0x5759
movl $0x1ed, %esi            # imm = 0x1ED
callq 0x20b0
movl -0x4(%rbp), %edi
callq 0x22d0
leaq 0x1367(%rip), %rdx      # 0x5759
xorl %eax, %eax
movl %eax, %r8d
movq %rdx, %rdi
movq %rdx, %rsi
movq %r8, %rcx
callq 0x2180
cmpl $0x0, %eax
jge 0x441d
movl $0x1, %edi
leaq 0x1348(%rip), %rsi      # 0x575e
movb $0x0, %al
callq 0x21b0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/arachsys[P]containers/mount.c
// Function: mountsys
void mountsys(void) {
  mode_t mask;

  mask = umask(0);
  mkdir("sys" , 0755);
  umask(mask);

  if (mount("sysfs", "sys", "sysfs", 0, NULL) < 0)
    errx(EXIT_FAILURE, "Failed to mount /sys in new root filesystem");
  mount("cgroup2", "sys/fs/cgroup", "cgroup2", 0, NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorl %edi, %edi
callq 0x22d0
movl %eax, -0x4(%rbp)
leaq 0x1342(%rip), %rdi      # 0x578b
movl $0x1ed, %esi            # imm = 0x1ED
callq 0x20b0
movl -0x4(%rbp), %edi
callq 0x22d0
leaq 0x132d(%rip), %rdx      # 0x578f
leaq 0x1322(%rip), %rsi      # 0x578b
xorl %eax, %eax
movl %eax, %r8d
movq %rdx, %rdi
movq %r8, %rcx
callq 0x2180
cmpl $0x0, %eax
jge 0x4491
movl $0x1, %edi
leaq 0x130b(%rip), %rsi      # 0x5795
movb $0x0, %al
callq 0x21b0
leaq 0x1329(%rip), %rdx      # 0x57c1
leaq 0x132a(%rip), %rsi      # 0x57c9
xorl %eax, %eax
movl %eax, %r8d
movq %rdx, %rdi
movq %r8, %rcx
callq 0x2180
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/mksimtape/mksimtape.c
// Function: main
INT main(INT argc, PCHAR argv[])
{	BOOL rc = TRUE;
	INT i, bs;
	PCHAR p;

	progname = strrchr(argv[0], '/');
	if(progname == (PCHAR) NULL) progname = argv[0]; else progname++;

	if(argc == 1) {
		error("at least one file must be specified", argv[0]);
		putusage();
		exit(EXIT_FAILURE);
	}

	for(i = 1; i < argc; i++) {
		bs = DEFBLKSIZE;
		p = strchr(argv[i], ':');
		if(p != (PCHAR) NULL) {
			*p = '\0';
			bs = strtol(++p, (CHAR **) NULL, 10);
			if(bs == 0) {
				error("block size for file '%s' is invalid",
					argv[i]);
				rc = FALSE;
				break;
			}
		}
		write_file(argv[i], bs);
		tape_mark();
	}

	tape_mark();

	return(rc == TRUE ? EXIT_SUCCESS : EXIT_FAILURE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0x2f, %esi
callq 0x1070
movq %rax, 0x2e53(%rip)      # 0x40a8
cmpq $0x0, 0x2e4b(%rip)      # 0x40a8
jne 0x126f
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, 0x2e3b(%rip)      # 0x40a8
jmp 0x1281
movq 0x2e32(%rip), %rax      # 0x40a8
addq $0x1, %rax
movq %rax, 0x2e27(%rip)      # 0x40a8
cmpl $0x1, -0x8(%rbp)
jne 0x12ab
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0xd6f(%rip), %rdi       # 0x2004
movb $0x0, %al
callq 0x1380
callq 0x1460
movl $0x1, %edi
callq 0x1100
movl $0x1, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x135c
movl $0x2800, -0x1c(%rbp)    # imm = 0x2800
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl $0x3a, %esi
callq 0x1060
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x1335
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rdi
addq $0x1, %rdi
movq %rdi, -0x28(%rbp)
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x10c0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x1333
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xd05(%rip), %rdi       # 0x2028
movb $0x0, %al
callq 0x1380
movl $0x0, -0x14(%rbp)
jmp 0x135c
jmp 0x1335
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x1c(%rbp), %esi
callq 0x1500
callq 0x1780
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x12b2
callq 0x1780
movl -0x14(%rbp), %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x1, %edx
cmovel %ecx, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/mksimtape/mksimtape.c
// Function: error
static VOID error(PCHAR mes, ...)
{	va_list ap;

	fprintf(stderr, "%s: ", progname);

	va_start(ap, mes);
	vfprintf(stderr, mes, ap);
	va_end(ap);

	fputc('\n', stderr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0x13b5
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
movq 0x2c0d(%rip), %rax      # 0x3ff0
movq %rax, -0xd8(%rbp)
movq (%rax), %rdi
movq 0x2cb4(%rip), %rdx      # 0x40a8
leaq 0xcf1(%rip), %rsi       # 0x20ec
xorl %eax, %eax
callq 0x10a0
movq -0xd8(%rbp), %rax
leaq -0xd0(%rbp), %rcx
movq %rcx, -0x10(%rbp)
leaq 0x10(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movl $0x30, -0x1c(%rbp)
movl $0x8, -0x20(%rbp)
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x10f0
movq -0xd8(%rbp), %rax
movq (%rax), %rsi
movl $0xa, %edi
callq 0x1090
addq $0xe0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/mksimtape/mksimtape.c
// Function: putusage
static VOID putusage(VOID)
{	PCHAR *p = (PCHAR *) helpinfo;
	PCHAR q;

	for(;;) {
		q = *p++;
		if(*q == '\0') break;

		fprintf(stderr, q, progname, DEFBLKSIZE);
		fputc('\n', stderr);
	}
	fprintf(stderr, "\nThis is version %d.%d\n", VERSION, EDIT);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x2921(%rip), %rax      # 0x3d90
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x8(%rbp)
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x1497
jmp 0x14ce
movq 0x2b52(%rip), %rax      # 0x3ff0
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movq 0x2bfc(%rip), %rdx      # 0x40a8
movl $0x2800, %ecx           # imm = 0x2800
movb $0x0, %al
callq 0x10a0
movq 0x2b31(%rip), %rax      # 0x3ff0
movq (%rax), %rsi
movl $0xa, %edi
callq 0x1090
jmp 0x1473
movq 0x2b1b(%rip), %rax      # 0x3ff0
movq (%rax), %rdi
leaq 0xc12(%rip), %rsi       # 0x20f1
movl $0x1, %edx
xorl %ecx, %ecx
movb $0x0, %al
callq 0x10a0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/mksimtape/mksimtape.c
// Function: tape_mark
static BOOL tape_mark(VOID)
{	INT n;
	UCHAR sbuf[4] = { 0,0,0,0 };

	n = fwrite(sbuf, 1, 4, stdout);
	if(n != 4) {
		error("Error writing to tape image");
		return(FALSE);
	}

	return(TRUE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq -0xc(%rbp), %rdi
xorl %esi, %esi
movl $0x4, %edx
callq 0x1080
leaq -0xc(%rbp), %rdi
movq 0x282d(%rip), %rax      # 0x3fd0
movq (%rax), %rcx
movl $0x1, %esi
movl $0x4, %edx
callq 0x1110
movl %eax, -0x8(%rbp)
cmpl $0x4, -0x8(%rbp)
je 0x17d5
leaq 0x90b(%rip), %rdi       # 0x20d0
movb $0x0, %al
callq 0x1380
movl $0x0, -0x4(%rbp)
jmp 0x17dc
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/converters/mksimtape/mksimtape.c
// Function: blksize
static INT blksize(INT mbs)
{	UINT result = 0;

	if(little_endian()) return(mbs);

	result |= (mbs & 0x000000ff) << 24;
	result |= (mbs & 0x0000ff00) << 8;
	result |= (mbs & 0x00ff0000) >> 8;
	result |= (mbs & 0xff000000) >> 24;
	return(result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
callq 0x1870
cmpl $0x0, %eax
je 0x1814
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x185e
movl -0x8(%rbp), %eax
andl $0xff, %eax
shll $0x18, %eax
orl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
shll $0x8, %eax
orl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
andl $0xff0000, %eax         # imm = 0xFF0000
sarl $0x8, %eax
orl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
andl $0xff000000, %eax       # imm = 0xFF000000
shrl $0x18, %eax
orl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/CheneyThinker[P]jbyte/src/jbyte_attribute.c
// Function: generator_attributes
void generator_attributes(FILE* pWriteFile) {
  PUT_U2(attributes_count, 0x0001)
  PUT_U2(attribute_name_index, 0x0011)
  PUT_U4(attribute_length, 0x00000002)
  PUT_U2(sourcefile_index, 0x0001)
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movw $0x1, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
shll $0x8, %eax
andl $0xff00, %eax           # imm = 0xFF00
movzwl -0xa(%rbp), %ecx
sarl $0x8, %ecx
andl $0xff, %ecx
orl %ecx, %eax
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rcx
leaq -0xa(%rbp), %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x1100
movw $0x11, -0xc(%rbp)
movzwl -0xc(%rbp), %eax
shll $0x8, %eax
andl $0xff00, %eax           # imm = 0xFF00
movzwl -0xc(%rbp), %ecx
sarl $0x8, %ecx
andl $0xff, %ecx
orl %ecx, %eax
movw %ax, -0xc(%rbp)
movq -0x8(%rbp), %rcx
leaq -0xc(%rbp), %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x1100
movl $0x2, -0x10(%rbp)
movl -0x10(%rbp), %eax
shll $0x18, %eax
andl $0xff000000, %eax       # imm = 0xFF000000
movl -0x10(%rbp), %ecx
shll $0x8, %ecx
andl $0xff0000, %ecx         # imm = 0xFF0000
orl %ecx, %eax
movl -0x10(%rbp), %ecx
shrl $0x18, %ecx
andl $0xff, %ecx
orl %ecx, %eax
movl -0x10(%rbp), %ecx
shrl $0x8, %ecx
andl $0xff00, %ecx           # imm = 0xFF00
orl %ecx, %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rcx
leaq -0x10(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x1100
movw $0x1, -0x12(%rbp)
movzwl -0x12(%rbp), %eax
shll $0x8, %eax
andl $0xff00, %eax           # imm = 0xFF00
movzwl -0x12(%rbp), %ecx
sarl $0x8, %ecx
andl $0xff, %ecx
orl %ecx, %eax
movw %ax, -0x12(%rbp)
movq -0x8(%rbp), %rcx
leaq -0x12(%rbp), %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x1100
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/CheneyThinker[P]jbyte/src/jbyte_attribute.c
// Function: InnerClasses_attribute
void InnerClasses_attribute(FILE* pReadFile) {
  PRINTF_U2(number_of_classes)
  if (number_of_classes > 0) {
    for (u2 number_of_classes_index = 0; number_of_classes_index < number_of_classes; number_of_classes_index++) {
      PRINTF_U2(inner_class_info_index)
      PRINTF_U2(outer_class_info_index)
      PRINTF_U2(inner_name_index)
      PRINTF_U2(inner_class_access_flags)
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
leaq -0xa(%rbp), %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x1050
movzwl -0xa(%rbp), %eax
shll $0x8, %eax
andl $0xff00, %eax           # imm = 0xFF00
movzwl -0xa(%rbp), %ecx
sarl $0x8, %ecx
andl $0xff, %ecx
orl %ecx, %eax
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %esi
leaq 0x738d(%rip), %rdi      # 0xcc3a
movb $0x0, %al
callq 0x1090
movzwl -0xa(%rbp), %eax
cmpl $0x0, %eax
jle 0x5a0a
movw $0x0, -0xc(%rbp)
movzwl -0xc(%rbp), %eax
movzwl -0xa(%rbp), %ecx
cmpl %ecx, %eax
jge 0x5a08
movq -0x8(%rbp), %rcx
leaq -0xe(%rbp), %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x1050
movzwl -0xe(%rbp), %eax
shll $0x8, %eax
andl $0xff00, %eax           # imm = 0xFF00
movzwl -0xe(%rbp), %ecx
sarl $0x8, %ecx
andl $0xff, %ecx
orl %ecx, %eax
movw %ax, -0xe(%rbp)
movzwl -0xe(%rbp), %esi
leaq 0x733b(%rip), %rdi      # 0xcc53
movb $0x0, %al
callq 0x1090
movq -0x8(%rbp), %rcx
leaq -0x10(%rbp), %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x1050
movzwl -0x10(%rbp), %eax
shll $0x8, %eax
andl $0xff00, %eax           # imm = 0xFF00
movzwl -0x10(%rbp), %ecx
sarl $0x8, %ecx
andl $0xff, %ecx
orl %ecx, %eax
movw %ax, -0x10(%rbp)
movzwl -0x10(%rbp), %esi
leaq 0x7311(%rip), %rdi      # 0xcc71
movb $0x0, %al
callq 0x1090
movq -0x8(%rbp), %rcx
leaq -0x12(%rbp), %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x1050
movzwl -0x12(%rbp), %eax
shll $0x8, %eax
andl $0xff00, %eax           # imm = 0xFF00
movzwl -0x12(%rbp), %ecx
sarl $0x8, %ecx
andl $0xff, %ecx
orl %ecx, %eax
movw %ax, -0x12(%rbp)
movzwl -0x12(%rbp), %esi
leaq 0x72e7(%rip), %rdi      # 0xcc8f
movb $0x0, %al
callq 0x1090
movq -0x8(%rbp), %rcx
leaq -0x14(%rbp), %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x1050
movzwl -0x14(%rbp), %eax
shll $0x8, %eax
andl $0xff00, %eax           # imm = 0xFF00
movzwl -0x14(%rbp), %ecx
sarl $0x8, %ecx
andl $0xff, %ecx
orl %ecx, %eax
movw %ax, -0x14(%rbp)
movzwl -0x14(%rbp), %esi
leaq 0x72b7(%rip), %rdi      # 0xcca7
movb $0x0, %al
callq 0x1090
movw -0xc(%rbp), %ax
addw $0x1, %ax
movw %ax, -0xc(%rbp)
jmp 0x58c7
jmp 0x5a0a
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/CheneyThinker[P]jbyte/src/jbyte_attribute.c
// Function: SourceDebugExtension_attribute
void SourceDebugExtension_attribute(FILE* pReadFile, u4 attribute_length) {
  u1 debug_extension[attribute_length];
  for (u4 attribute_length_index = 0; attribute_length_index < attribute_length; attribute_length_index++) {
    fread(&debug_extension[attribute_length_index], 1, sizeof(u1), pReadFile);
    printf("debug_extension[%04x]: %02x\n", attribute_length_index, debug_extension[attribute_length_index]);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rsp, %rcx
movq %rcx, -0x18(%rbp)
movq %rax, %rdx
addq $0xf, %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x30(%rbp)
movq %rcx, %rsp
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jae 0x5c16
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %eax
addq %rax, %rdi
movq -0x8(%rbp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x1050
movq -0x30(%rbp), %rax
movl -0x24(%rbp), %esi
movl -0x24(%rbp), %ecx
movzbl (%rax,%rcx), %edx
leaq 0x7106(%rip), %rdi      # 0xcd0a
movb $0x0, %al
callq 0x1090
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x5bcc
movq -0x18(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/CheneyThinker[P]jbyte/src/jbyte_attribute.c
// Function: LineNumberTable_attribute
void LineNumberTable_attribute(FILE* pReadFile) {
  PRINTF_U2(line_number_table_length)
  if (line_number_table_length > 0) {
    for (u2 line_number_table_length_index = 0; line_number_table_length_index < line_number_table_length; line_number_table_length_index++) {
      PRINTF_U2(start_pc)
      PRINTF_U2(line_number)
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
leaq -0xa(%rbp), %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x1050
movzwl -0xa(%rbp), %eax
shll $0x8, %eax
andl $0xff00, %eax           # imm = 0xFF00
movzwl -0xa(%rbp), %ecx
sarl $0x8, %ecx
andl $0xff, %ecx
orl %ecx, %eax
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %esi
leaq 0x70aa(%rip), %rdi      # 0xcd27
movb $0x0, %al
callq 0x1090
movzwl -0xa(%rbp), %eax
cmpl $0x0, %eax
jle 0x5d4a
movw $0x0, -0xc(%rbp)
movzwl -0xc(%rbp), %eax
movzwl -0xa(%rbp), %ecx
cmpl %ecx, %eax
jge 0x5d48
movq -0x8(%rbp), %rcx
leaq -0xe(%rbp), %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x1050
movzwl -0xe(%rbp), %eax
shll $0x8, %eax
andl $0xff00, %eax           # imm = 0xFF00
movzwl -0xe(%rbp), %ecx
sarl $0x8, %ecx
andl $0xff, %ecx
orl %ecx, %eax
movw %ax, -0xe(%rbp)
movzwl -0xe(%rbp), %esi
leaq 0x6e33(%rip), %rdi      # 0xcb1b
movb $0x0, %al
callq 0x1090
movq -0x8(%rbp), %rcx
leaq -0x10(%rbp), %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x1050
movzwl -0x10(%rbp), %eax
shll $0x8, %eax
andl $0xff00, %eax           # imm = 0xFF00
movzwl -0x10(%rbp), %ecx
sarl $0x8, %ecx
andl $0xff, %ecx
orl %ecx, %eax
movw %ax, -0x10(%rbp)
movzwl -0x10(%rbp), %esi
leaq 0x7017(%rip), %rdi      # 0xcd47
movb $0x0, %al
callq 0x1090
movw -0xc(%rbp), %ax
addw $0x1, %ax
movw %ax, -0xc(%rbp)
jmp 0x5c97
jmp 0x5d4a
addq $0x10, %rsp
popq %rbp
retq