LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/rroa[P]PUCMM_2D_Asteroids/Asteroids/SDLEvent.cpp
// Function: Engine::SDLEvent::HandleMouseButtonUpEvents(SDL_Event*)
void SDLEvent::HandleMouseButtonUpEvents(SDL_Event* event)
	{
		switch (event->button.button)
		{
		case SDL_BUTTON_LEFT:
			OnLButtonUp(event->button.x, event->button.y);
			break;
		case SDL_BUTTON_RIGHT:
			OnRButtonUp(event->button.x, event->button.y);
			break;
		case SDL_BUTTON_MIDDLE:
			OnMButtonUp(event->button.x, event->button.y);
			break;
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x10(%rax), %eax
movl %eax, -0x14(%rbp)
subl $0x1, %eax
je 0x9ade
jmp 0x9aca
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0x9b12
jmp 0x9ad4
movl -0x14(%rbp), %eax
subl $0x3, %eax
je 0x9af8
jmp 0x9b2d
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x14(%rax), %esi
movq -0x10(%rbp), %rax
movl 0x18(%rax), %edx
movq (%rdi), %rax
callq *0x60(%rax)
jmp 0x9b2d
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x14(%rax), %esi
movq -0x10(%rbp), %rax
movl 0x18(%rax), %edx
movq (%rdi), %rax
callq *0x70(%rax)
jmp 0x9b2d
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x14(%rax), %esi
movq -0x10(%rbp), %rax
movl 0x18(%rax), %edx
movq (%rdi), %rax
callq *0x80(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/rroa[P]PUCMM_2D_Asteroids/Asteroids/Vector2.cpp
// Function: Engine::Vector2::operator=(Engine::Vector2 const&)
Vector2& Vector2::operator=(const Vector2& rhs)
	{
		// Prevent self assignment. Two objects
		// are equal if their memory address are equal.
		if (this == &rhs)
		{
			return *this;
		}

		this->x = rhs.x;
		this->y = rhs.y;

		return *this;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq -0x18(%rbp), %rax
jne 0x9bf4
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x9c16
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movss (%rcx), %xmm0
movss %xmm0, (%rax)
movq -0x18(%rbp), %rcx
movss 0x4(%rcx), %xmm0
movss %xmm0, 0x4(%rax)
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/rroa[P]PUCMM_2D_Asteroids/Asteroids/Vector2.cpp
// Function: Engine::Vector2::operator+(Engine::Vector2 const&)
Vector2 Vector2::operator+(const Vector2& rhs)
	{
		Vector2 sum;

		sum.x = x + rhs.x;
		sum.y = y + rhs.y;

		return sum;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x9b80
movq -0x20(%rbp), %rax
movss (%rax), %xmm0
movq -0x18(%rbp), %rcx
movss (%rcx), %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x8(%rbp)
movss 0x4(%rax), %xmm0
movq -0x18(%rbp), %rax
movss 0x4(%rax), %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x4(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/rroa[P]PUCMM_2D_Asteroids/Asteroids/Vector2.cpp
// Function: Engine::operator*(float, Engine::Vector2 const&)
Vector2 operator*(float scaleUnit, const Vector2& rhs)
	{
		Vector2 scaled;
		scaled.x = scaleUnit * rhs.x;
		scaled.y = scaleUnit * rhs.y;

		return scaled;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movss %xmm0, -0xc(%rbp)
movq %rdi, -0x18(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x9b80
movss -0xc(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss (%rax), %xmm1
mulss %xmm1, %xmm0
movss %xmm0, -0x8(%rbp)
movss -0xc(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss 0x4(%rax), %xmm1
mulss %xmm1, %xmm0
movss %xmm0, -0x4(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/rroa[P]PUCMM_2D_Asteroids/Asteroids/Vector2.cpp
// Function: Engine::operator*(Engine::Vector2 const&, float)
Vector2 operator*(const Vector2& lhs, float scaleUnit)
	{
		Vector2 scaled;
		scaled.x = scaleUnit * lhs.x;
		scaled.y = scaleUnit * lhs.y;

		return scaled;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movss %xmm0, -0x14(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x9b80
movss -0x14(%rbp), %xmm0
movq -0x10(%rbp), %rax
movss (%rax), %xmm1
mulss %xmm1, %xmm0
movss %xmm0, -0x8(%rbp)
movss -0x14(%rbp), %xmm0
movq -0x10(%rbp), %rax
movss 0x4(%rax), %xmm1
mulss %xmm1, %xmm0
movss %xmm0, -0x4(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/rroa[P]PUCMM_2D_Asteroids/Asteroids/Bullet.cpp
// Function: Asteroids::Bullet::Update(float, int, int)
void Bullet::Update(float deltaTime, int worldWidth, int worldHeight)
	{
		if (m_currentLifespan < m_lifespan)
		{
			m_currentLifespan++;
		}
		else
		{ 
			m_state = EntityState::State::DELETED;
		}

		Entity::Update(deltaTime, worldWidth, worldHeight);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movss %xmm0, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movss 0x28(%rax), %xmm1
movss 0x24(%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0xa136
movq -0x20(%rbp), %rax
movss 0xee2(%rip), %xmm0      # 0xb00c
addss 0x28(%rax), %xmm0
movss %xmm0, 0x28(%rax)
jmp 0xa141
movq -0x20(%rbp), %rax
movl $0x2, 0x1c(%rax)
movq -0x20(%rbp), %rdi
movss -0xc(%rbp), %xmm0
movl -0x10(%rbp), %esi
movl -0x14(%rbp), %edx
callq 0x6f90
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/rroa[P]PUCMM_2D_Asteroids/Asteroids/Bullet.cpp
// Function: Asteroids::Bullet::Render()
void Bullet::Render()
	{
		glLoadIdentity();

		glPointSize(2.0f);

		glEnable(GL_POINT_SMOOTH);

		glBegin(GL_POINTS);

			glVertex2f(m_position.x, m_position.y);

		glEnd();
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
callq 0x3120
movss 0xfdf(%rip), %xmm0      # 0xb160
callq 0x3190
movl $0xb10, %edi            # imm = 0xB10
callq 0x3220
xorl %edi, %edi
callq 0x33b0
movq -0x10(%rbp), %rax
movss 0x8(%rax), %xmm0
movss 0xc(%rax), %xmm1
callq 0x3200
callq 0x3320
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/rroa[P]PUCMM_2D_Asteroids/Asteroids/TimeManager.cpp
// Function: Engine::TimeManager::TimeManager()
TimeManager::TimeManager()
	{
#ifdef WIN32
		::QueryPerformanceFrequency(&m_frequency);
		m_startCount.QuadPart = 0;
		m_endCount.QuadPart = 0;
#else
		m_startCount.tv_sec = m_startCount.tv_usec = 0;
		m_endCount.tv_sec = m_endCount.tv_usec = 0;
#endif
		m_stopped = 0;
		m_startTimeInMicroSeconds = 0;
		m_endTimeInMicroSeconds = 0;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, 0x20(%rax)
movq $0x0, 0x18(%rax)
movq $0x0, 0x30(%rax)
movq $0x0, 0x28(%rax)
movl $0x0, 0x10(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/rroa[P]PUCMM_2D_Asteroids/Asteroids/TimeManager.cpp
// Function: Engine::TimeManager::GetElapsedTimeInMicroseconds()
double TimeManager::GetElapsedTimeInMicroseconds()
	{
#ifdef WIN32
		if (!m_stopped)
		{
			::QueryPerformanceCounter(&m_endCount);
		}

		m_startTimeInMicroSeconds = m_startCount.QuadPart * (1000000.0 / m_frequency.QuadPart);
		m_endTimeInMicroSeconds = m_endCount.QuadPart * (1000000.0 / m_frequency.QuadPart);
#else
		if (!m_stopped)
		{
			gettimeofday(&m_endCount, NULL);
		}

		m_startTimeInMicroSeconds = (m_startCount.tv_sec * 1000000.0) + m_startCount.tv_usec;
		m_endTimeInMicroSeconds = (m_endCount.tv_sec * 1000000.0) + m_endCount.tv_usec;
#endif

		return m_endTimeInMicroSeconds - m_startTimeInMicroSeconds;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpl $0x0, 0x10(%rax)
jne 0xa6ab
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x31f0
movq -0x10(%rbp), %rax
cvtsi2sdq 0x18(%rax), %xmm0
cvtsi2sdq 0x20(%rax), %xmm1
movsd 0xc35(%rip), %xmm2      # 0xb2f8
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
cvtsi2sdq 0x28(%rax), %xmm0
cvtsi2sdq 0x30(%rax), %xmm1
movsd 0xc15(%rip), %xmm2      # 0xb2f8
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rax)
movsd 0x8(%rax), %xmm0
subsd (%rax), %xmm0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/rroa[P]PUCMM_2D_Asteroids/Asteroids/main.cpp
// Function: main
int main(int argc, char* argv[])
{
#if _MSC_VER && _DEBUG
	// https://msdn.microsoft.com/en-us/library/x98tx3cf.aspx
	// This will help you detect leaks when using Visual C++
	// Uncomment this line to start getting reports!
	assert(_CrtCheckMemory());
	_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
#endif

	// Create Game Object
	//
	Engine::Game* game = new Engine::Game("Asteroids!", WIDTH, HEIGHT);

	// Initialize game
	//
	if(!game->OnInit())
	{
		std::cout << "Game Init error!\n";
		return -1;
	}

	// Execute game
	//
	game->OnExecute();

	// Delete game object
	//
	delete game;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0xb0, %edi
callq 0x30f0
movq %rax, -0x60(%rbp)
movb $0x1, -0x4d(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x3370
movq -0x58(%rbp), %rdx
leaq 0xb50(%rip), %rsi       # 0xb310
leaq -0x38(%rbp), %rdi
callq 0xa8b0
jmp 0xa7cb
movq -0x60(%rbp), %rdi
leaq -0x38(%rbp), %rsi
movl $0x470, %edx            # imm = 0x470
movl $0x280, %ecx            # imm = 0x280
callq 0x35e0
jmp 0xa7e4
movb $0x0, -0x4d(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x32c0
leaq -0x39(%rbp), %rdi
callq 0x3450
movq -0x60(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3e70
testb $0x1, %al
jne 0xa86f
movq 0x67ba(%rip), %rdi      # 0x10fd0
leaq 0xafe(%rip), %rsi       # 0xb31b
callq 0x3240
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa897
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xa84e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x32c0
leaq -0x39(%rbp), %rdi
callq 0x3450
testb $0x1, -0x4d(%rbp)
jne 0xa85f
jmp 0xa86d
movq -0x60(%rbp), %rdi
movl $0xb0, %esi
callq 0x30c0
jmp 0xa8a0
movq -0x18(%rbp), %rdi
callq 0x38e0
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, %rax
je 0xa890
movq -0x68(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x3270
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/janmojzis[P]mcencrypt/_randreplace.c
// Function: main
int main(int argc, char **argv) {

    unsigned long long a;
    unsigned long long b;

    limits();

    input = memreadall(&inputlen, 0);
    if (!input) die_temp(NAME, "read message failed");

    randombytes(&a, sizeof a);
    randombytes(&b, sizeof b);

    input[a % inputlen] += 1 + (b % 255);

    if (writeall(1, input, inputlen) == -1) die_temp(NAME, "write message failed");
    if (fsyncfd(1) == -1) die_temp(NAME, "write message failed");

    die(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0xb910
leaq 0xfe4e(%rip), %rdi      # 0x110b0
xorl %esi, %esi
callq 0xb960
movq %rax, 0xfe38(%rip)      # 0x110a8
cmpq $0x0, 0xfe30(%rip)      # 0x110a8
jne 0x128d
leaq 0xcd83(%rip), %rdi      # 0xe004
leaq 0xcd89(%rip), %rsi      # 0xe011
callq 0xa0e0
leaq -0x18(%rbp), %rdi
movl $0x8, %esi
callq 0xd140
leaq -0x20(%rbp), %rdi
movl $0x8, %esi
callq 0xd140
movq -0x20(%rbp), %rax
movl $0xff, %ecx
xorl %edx, %edx
divq %rcx
movq %rdx, %rsi
addq $0x1, %rsi
movq 0xfde3(%rip), %rax      # 0x110a8
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0xfdd8(%rip)            # 0x110b0
movq -0x28(%rbp), %rax
movzbl (%rax,%rdx), %ecx
addq %rsi, %rcx
movb %cl, (%rax,%rdx)
movq 0xfdbb(%rip), %rsi      # 0x110a8
movq 0xfdbc(%rip), %rdx      # 0x110b0
movl $0x1, %edi
callq 0xdd80
cmpl $-0x1, %eax
jne 0x1316
leaq 0xccfa(%rip), %rdi      # 0xe004
leaq 0xcd14(%rip), %rsi      # 0xe025
callq 0xa0e0
movl $0x1, %edi
callq 0xaf10
cmpl $-0x1, %eax
jne 0x1338
leaq 0xccd8(%rip), %rdi      # 0xe004
leaq 0xccf2(%rip), %rsi      # 0xe025
callq 0xa0e0
xorl %edi, %edi
callq 0xa1b0
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/motet-a[P]libforks/tests/stop_server_only.c
// Function: main
int main() {
  libforks_ServerConn conn;
  check(libforks_start(&conn) == libforks_OK);

  int socket_fd;
  int child_pid;

  check(libforks_fork(
    conn,
    &child_pid, // pid_ptr
    &socket_fd, // socket_fd_ptr
    NULL, // exit_fd_ptr
    child_main
  ) == libforks_OK);

  check(libforks_stop_server_only(conn) == libforks_OK);

  // The child process is now daemonized and still running.
  // Try to communicate with it.

  check(write(socket_fd, "a", 1) == 1);
  char c;
  check(read(socket_fd, &c, 1) == 1);
  check(c == 'b');

  while (true) {
    if (kill(child_pid, 0) == -1) {
      check(errno == ESRCH);
      break;
    }
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x1b80
cmpl $0x0, %eax
jne 0x131f
jmp 0x1337
leaq 0x2cde(%rip), %rdi      # 0x4004
leaq 0x2cfc(%rip), %rsi      # 0x4029
movl $0xd, %edx
callq 0x1470
movq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
leaq -0x14(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
leaq 0x162(%rip), %r8        # 0x14b0
callq 0x2350
cmpl $0x0, %eax
jne 0x135a
jmp 0x1372
leaq 0x2ce1(%rip), %rdi      # 0x4042
leaq 0x2cc1(%rip), %rsi      # 0x4029
movl $0x18, %edx
callq 0x1470
movq -0x10(%rbp), %rdi
callq 0x24e0
cmpl $0x0, %eax
jne 0x1382
jmp 0x139a
leaq 0x2d08(%rip), %rdi      # 0x4091
leaq 0x2c99(%rip), %rsi      # 0x4029
movl $0x1a, %edx
callq 0x1470
movl -0x14(%rbp), %edi
leaq 0x2d1c(%rip), %rsi      # 0x40c0
movl $0x1, %edx
callq 0x1080
cmpq $0x1, %rax
jne 0x13b6
jmp 0x13ce
leaq 0x2d05(%rip), %rdi      # 0x40c2
leaq 0x2c65(%rip), %rsi      # 0x4029
movl $0x1f, %edx
callq 0x1470
movl -0x14(%rbp), %edi
leaq -0x19(%rbp), %rsi
movl $0x1, %edx
callq 0x1100
cmpq $0x1, %rax
jne 0x13e7
jmp 0x13ff
leaq 0x2cf2(%rip), %rdi      # 0x40e0
leaq 0x2c34(%rip), %rsi      # 0x4029
movl $0x21, %edx
callq 0x1470
movsbl -0x19(%rbp), %eax
cmpl $0x62, %eax
jne 0x140a
jmp 0x1422
leaq 0x2ceb(%rip), %rdi      # 0x40fc
leaq 0x2c11(%rip), %rsi      # 0x4029
movl $0x22, %edx
callq 0x1470
jmp 0x1424
movl -0x18(%rbp), %edi
xorl %esi, %esi
callq 0x1160
cmpl $-0x1, %eax
jne 0x1459
callq 0x1050
cmpl $0x3, (%rax)
jne 0x143f
jmp 0x1457
leaq 0x2cbf(%rip), %rdi      # 0x4105
leaq 0x2bdc(%rip), %rsi      # 0x4029
movl $0x26, %edx
callq 0x1470
jmp 0x145b
jmp 0x1424
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/motet-a[P]libforks/tests/stop_server_only.c
// Function: child_main
static void child_main(libforks_ServerConn conn, int socket_fd) {
  check(libforks_free_conn(conn) == libforks_OK);
  char c;
  check(read(socket_fd, &c, 1) == 1);
  check(c == 'a');
  check(write(socket_fd, "b", 1) == 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2650
cmpl $0x0, %eax
jne 0x14cf
jmp 0x14e7
leaq 0x2c5a(%rip), %rdi      # 0x4130
leaq 0x2b4c(%rip), %rsi      # 0x4029
movl $0x4, %edx
callq 0x1470
movl -0xc(%rbp), %edi
leaq -0xd(%rbp), %rsi
movl $0x1, %edx
callq 0x1100
cmpq $0x1, %rax
jne 0x1500
jmp 0x1518
leaq 0x2bd9(%rip), %rdi      # 0x40e0
leaq 0x2b1b(%rip), %rsi      # 0x4029
movl $0x6, %edx
callq 0x1470
movsbl -0xd(%rbp), %eax
cmpl $0x61, %eax
jne 0x1523
jmp 0x153b
leaq 0x2c2e(%rip), %rdi      # 0x4158
leaq 0x2af8(%rip), %rsi      # 0x4029
movl $0x7, %edx
callq 0x1470
movl -0xc(%rbp), %edi
leaq 0x2c1c(%rip), %rsi      # 0x4161
movl $0x1, %edx
callq 0x1080
cmpq $0x1, %rax
jne 0x1557
jmp 0x156f
leaq 0x2c05(%rip), %rdi      # 0x4163
leaq 0x2ac4(%rip), %rsi      # 0x4029
movl $0x8, %edx
callq 0x1470
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/ninewise[P]st/st.c
// Function: newterm
void
newterm(const Arg* a)
{
	switch (fork()) {
	case -1:
		die("fork failed: %s\n", strerror(errno));
		break;
	case 0:
		chdir(getcwd_by_pid(pid));
		execlp("st", "./st", NULL);
		break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
callq 0x5800
movl %eax, %ecx
movl %ecx, -0xc(%rbp)
subl $-0x1, %eax
je 0x7bf6
jmp 0x7bed
movl -0xc(%rbp), %eax
testl %eax, %eax
je 0x7c15
jmp 0x7c41
callq 0x55a0
movl (%rax), %edi
callq 0x5460
movq %rax, %rsi
leaq 0xac5e(%rip), %rdi      # 0x1286a
movb $0x0, %al
callq 0x5aa0
jmp 0x7c41
movl 0x12259(%rip), %edi     # 0x19e74
callq 0x7c50
movq %rax, %rdi
callq 0x5060
leaq 0xaca9(%rip), %rdi      # 0x128d8
leaq 0xaca0(%rip), %rsi      # 0x128d6
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0x5220
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/packet_implem.c
// Function: pkt_compute_crc1
uint32_t pkt_compute_crc1(const pkt_t *pkt) {
	// Copy the packet and set the TR of that copy
	pkt_t p = *pkt;
	p.tr = 0;
	return crc32(0, (unsigned char *) &p, HEADER_SIZE - sizeof (pkt->crc1));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x220, %rsp            # imm = 0x220
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
leaq -0x218(%rbp), %rdi
movl $0x210, %edx            # imm = 0x210
callq 0x1110
movb -0x218(%rbp), %al
andb $-0x21, %al
orb $0x0, %al
movb %al, -0x218(%rbp)
xorl %eax, %eax
movl %eax, %edi
leaq -0x218(%rbp), %rsi
movl $0x8, %edx
callq 0x1070
addq $0x220, %rsp            # imm = 0x220
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/packet_implem.c
// Function: pkt_get_total_size
size_t pkt_get_total_size(const pkt_t *pkt) {
	size_t payload_size = pkt_get_length(pkt) * sizeof (*pkt->payload);
	size_t total_size = HEADER_SIZE + payload_size;
	if (payload_size > 0) {
		total_size += sizeof (pkt->crc2);
	}
	return total_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1460
movzwl %ax, %eax
shlq $0x0, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0xc, %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jbe 0x144f
movq -0x18(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/packet_implem.c
// Function: pkt_encode
pkt_status_code pkt_encode(const pkt_t *pkt, char *buf, size_t *len) {
	pkt_t p = *pkt;

	if (pkt_get_type(&p) == 0) {
		return E_TYPE;
	} else if (pkt_get_total_size(&p) > *len) {
		*len = 0;
		return E_NOMEM;
	}

	size_t payload_size = pkt_get_length(&p) * sizeof (*p.payload);
	pkt_set_crc1(&p, pkt_compute_crc1(&p));
	pkt_set_crc2(&p, pkt_compute_crc2(&p, payload_size));

	size_t written = 0;
	memcpy(buf + written, &p, HEADER_SIZE + payload_size);
	written += HEADER_SIZE + payload_size;

	if (payload_size > 0) {
		memcpy(buf + written, &p.crc2, sizeof (p.crc2));
		written += sizeof (p.crc2);
	}

	*len = written;
	return PKT_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp            # imm = 0x240
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x230(%rbp), %rdi
movl $0x210, %edx            # imm = 0x210
callq 0x1110
leaq -0x230(%rbp), %rdi
callq 0x1660
cmpl $0x0, %eax
jne 0x1759
movl $0x1, -0x4(%rbp)
jmp 0x1864
leaq -0x230(%rbp), %rdi
callq 0x1410
movq -0x20(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0x1785
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movl $0x7, -0x4(%rbp)
jmp 0x1864
jmp 0x1787
leaq -0x230(%rbp), %rdi
callq 0x1460
movzwl %ax, %eax
shlq $0x0, %rax
movq %rax, -0x238(%rbp)
leaq -0x230(%rbp), %rdi
callq 0x1380
movl %eax, %esi
leaq -0x230(%rbp), %rdi
callq 0x1870
movq -0x238(%rbp), %rsi
leaq -0x230(%rbp), %rdi
callq 0x13e0
movl %eax, %esi
leaq -0x230(%rbp), %rdi
callq 0x18a0
movq $0x0, -0x240(%rbp)
movq -0x18(%rbp), %rdi
addq -0x240(%rbp), %rdi
movq -0x238(%rbp), %rdx
addq $0xc, %rdx
leaq -0x230(%rbp), %rsi
callq 0x1110
movq -0x238(%rbp), %rax
addq $0xc, %rax
addq -0x240(%rbp), %rax
movq %rax, -0x240(%rbp)
cmpq $0x0, -0x238(%rbp)
jbe 0x184f
movq -0x18(%rbp), %rax
movq -0x240(%rbp), %rcx
movl -0x24(%rbp), %edx
movl %edx, (%rax,%rcx)
movq -0x240(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x240(%rbp)
movq -0x240(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/packet_implem.c
// Function: pkt_code_to_str
char *pkt_code_to_str(pkt_status_code code) {
	switch (code) {
		case PKT_OK:         return "PKT_OK";
		case E_TYPE:         return "E_TYPE";
		case E_TR:           return "E_TR";
		case E_LENGTH:       return "E_LENGTH";
		case E_CRC:          return "E_CRC";
		case E_WINDOW:       return "E_WINDOW";
		case E_SEQNUM:       return "E_SEQNUM";
		case E_NOMEM:        return "E_NOMEM";
		case E_NOHEADER:     return "E_NOHEADER";
		case E_UNCONSISTENT: return "E_UNCONSISTENT";
		default:             return "UNKNOWN";
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x9, %rax
ja 0x1981
movq -0x18(%rbp), %rax
leaq 0x2711(%rip), %rcx      # 0x4004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2729(%rip), %rax      # 0x402c
movq %rax, -0x8(%rbp)
jmp 0x198c
leaq 0x2720(%rip), %rax      # 0x4033
movq %rax, -0x8(%rbp)
jmp 0x198c
leaq 0x271a(%rip), %rax      # 0x403a
movq %rax, -0x8(%rbp)
jmp 0x198c
leaq 0x2712(%rip), %rax      # 0x403f
movq %rax, -0x8(%rbp)
jmp 0x198c
leaq 0x270e(%rip), %rax      # 0x4048
movq %rax, -0x8(%rbp)
jmp 0x198c
leaq 0x2707(%rip), %rax      # 0x404e
movq %rax, -0x8(%rbp)
jmp 0x198c
leaq 0x2703(%rip), %rax      # 0x4057
movq %rax, -0x8(%rbp)
jmp 0x198c
leaq 0x26ff(%rip), %rax      # 0x4060
movq %rax, -0x8(%rbp)
jmp 0x198c
leaq 0x26fa(%rip), %rax      # 0x4068
movq %rax, -0x8(%rbp)
jmp 0x198c
leaq 0x26f8(%rip), %rax      # 0x4073
movq %rax, -0x8(%rbp)
jmp 0x198c
leaq 0x26fa(%rip), %rax      # 0x4082
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/packet_implem.c
// Function: pkt_set_type
pkt_status_code pkt_set_type(pkt_t *pkt, const ptypes_t type) {
	if (type == 0 || type >> 2) {
		return E_TYPE;
	}
	pkt->type = type;
	return PKT_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x1a3c
movl -0x14(%rbp), %eax
shrl $0x2, %eax
cmpl $0x0, %eax
je 0x1a45
movl $0x1, -0x4(%rbp)
jmp 0x1a64
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb (%rax), %cl
andb $0x3, %dl
shlb $0x6, %dl
andb $0x3f, %cl
orb %dl, %cl
movb %cl, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/packet_implem.c
// Function: pkt_set_tr
pkt_status_code pkt_set_tr(pkt_t *pkt, const uint8_t tr) {
	if (tr >> 1) {
		return E_TR;
	}
	pkt->tr = tr;
	return PKT_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
sarl %eax
cmpl $0x0, %eax
je 0x1a92
movl $0x2, -0x4(%rbp)
jmp 0x1ab2
movzbl -0x11(%rbp), %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb (%rax), %cl
andb $0x1, %dl
shlb $0x5, %dl
andb $-0x21, %cl
orb %dl, %cl
movb %cl, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/packet_implem.c
// Function: pkt_set_window
pkt_status_code pkt_set_window(pkt_t *pkt, const uint8_t window) {
	if (window > MAX_WINDOW_SIZE) {
		return E_WINDOW;
	}
	pkt->window = window;
	return PKT_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x1f, %eax
jle 0x1ae0
movl $0x5, -0x4(%rbp)
jmp 0x1afd
movzbl -0x11(%rbp), %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb (%rax), %cl
andb $0x1f, %dl
andb $-0x20, %cl
orb %dl, %cl
movb %cl, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/packet_implem.c
// Function: pkt_set_length
pkt_status_code pkt_set_length(pkt_t *pkt, const uint16_t length) {
	if (length > MAX_PAYLOAD_SIZE) {
		return E_LENGTH;
	}

	// Maintain the invariant that unused slots are zeroed out
	uint16_t unused = (MAX_PAYLOAD_SIZE - length) * sizeof (*pkt->payload);
	memset(pkt->payload + length, 0, unused);

	pkt->length = htons(length);
	return PKT_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movzwl -0x12(%rbp), %eax
cmpl $0x200, %eax            # imm = 0x200
jle 0x1b57
movl $0x3, -0x4(%rbp)
jmp 0x1ba5
movzwl -0x12(%rbp), %ecx
movl $0x200, %eax            # imm = 0x200
subl %ecx, %eax
cltq
shlq $0x0, %rax
movw %ax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
addq $0xc, %rdi
movzwl -0x12(%rbp), %eax
cltq
addq %rax, %rdi
movzwl -0x14(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x10e0
movzwl -0x12(%rbp), %edi
callq 0x1090
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x2(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/packet_implem.c
// Function: pkt_set_payload
pkt_status_code pkt_set_payload(pkt_t *pkt, const char *data, const uint16_t length) {
	uint16_t actual = length;
	if (data == NULL) {
		actual = 0;
	}

	pkt_status_code code = pkt_set_length(pkt, actual);
	if (code != PKT_OK) {
		return code;
	}

	memcpy(pkt->payload, data, actual);
	return PKT_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %dx, %ax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movw %ax, -0x1a(%rbp)
movw -0x1a(%rbp), %ax
movw %ax, -0x1c(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x1c0c
movw $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x1c(%rbp), %esi
callq 0x1b30
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x1c2a
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1c48
movq -0x10(%rbp), %rdi
addq $0xc, %rdi
movq -0x18(%rbp), %rsi
movzwl -0x1c(%rbp), %eax
movl %eax, %edx
callq 0x1110
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/util.c
// Function: print_time
void print_time(void) {
	struct timespec tp;
	if (clock_gettime(CLOCK_MONOTONIC, &tp) == -1) {
		abort();
	}
	double secs = tp.tv_sec + ((double) tp.tv_nsec) / 1000000000;
	fprintf(stderr, "[%7.3f] ", secs);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x1, %edi
leaq -0x10(%rbp), %rsi
callq 0x1080
cmpl $-0x1, %eax
jne 0x1c80
callq 0x1050
cvtsi2sdq -0x10(%rbp), %xmm0
cvtsi2sdq -0x8(%rbp), %xmm1
movsd 0x23fc(%rip), %xmm2     # 0x4090
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movq 0x5350(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
movsd -0x18(%rbp), %xmm0
leaq 0x23e1(%rip), %rsi      # 0x4098
movb $0x1, %al
callq 0x1100
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/util.c
// Function: log_msg
void log_msg(const char *fmt, ...) {
	print_time();
	va_list args;
	va_start(args, fmt);
	vfprintf(stderr, fmt, args);
	va_end(args);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
testb %al, %al
je 0x1d05
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)
callq 0x1c60
leaq -0xd0(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x30, -0x1c(%rbp)
movl $0x8, -0x20(%rbp)
movq 0x529f(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x1190
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/util.c
// Function: exit_msg
void exit_msg(const char *fmt, ...) {
	print_time();
	va_list args;
	va_start(args, fmt);
	vfprintf(stderr, fmt, args);
	va_end(args);
	exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
testb %al, %al
je 0x1dd5
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)
callq 0x1c60
leaq -0x20(%rbp), %rax
leaq -0xd0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq 0x51cc(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x1190
leaq -0x20(%rbp), %rax
movl $0x1, %edi
callq 0x11c0
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/util.c
// Function: pkt_repr
char *pkt_repr(pkt_t *pkt) {
	if (pkt == NULL) {
		return "(nil)";
	}

	char *type;
	switch (pkt_get_type(pkt)) {
		case PTYPE_ACK:  type = "ACK";     break;
		case PTYPE_DATA: type = "DATA";    break;
		case PTYPE_NACK: type = "NACK";    break;
		default:         type = "UNKNOWN";
	}

	int len = sprintf(pkt_fmt_buf, "{Type=%s, TR=%d, Win=%d, Seq=%d, Time=%d, Len=%d}",
		type, pkt_get_tr(pkt), pkt_get_window(pkt), pkt_get_seqnum(pkt),
		pkt_get_timestamp(pkt), pkt_get_length(pkt));
	if (len < 0) {
		abort();
	}

	return pkt_fmt_buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1f13
leaq 0x21c6(%rip), %rax      # 0x40d0
movq %rax, -0x8(%rbp)
jmp 0x2004
movq -0x10(%rbp), %rdi
callq 0x1660
movl %eax, %ecx
movl %ecx, -0x20(%rbp)
subl $0x1, %eax
je 0x1f49
jmp 0x1f28
movl -0x20(%rbp), %eax
subl $0x2, %eax
je 0x1f3c
jmp 0x1f32
movl -0x20(%rbp), %eax
subl $0x3, %eax
je 0x1f56
jmp 0x1f63
leaq 0x2199(%rip), %rax      # 0x40dc
movq %rax, -0x18(%rbp)
jmp 0x1f6e
leaq 0x2186(%rip), %rax      # 0x40d6
movq %rax, -0x18(%rbp)
jmp 0x1f6e
leaq 0x217e(%rip), %rax      # 0x40db
movq %rax, -0x18(%rbp)
jmp 0x1f6e
leaq 0x2118(%rip), %rax      # 0x4082
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1680
movzbl %al, %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x16a0
movzbl %al, %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x19a0
movzbl %al, %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x19c0
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1460
movq -0x38(%rbp), %rdx
movl -0x30(%rbp), %ecx
movl -0x2c(%rbp), %r8d
movl -0x28(%rbp), %r9d
movl -0x24(%rbp), %r10d
movzwl %ax, %eax
leaq 0x517b(%rip), %rdi      # 0x7150
leaq 0x2104(%rip), %rsi      # 0x40e0
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x11b0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x1ff9
callq 0x1050
leaq 0x5150(%rip), %rax      # 0x7150
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/util.c
// Function: parse_args
void parse_args(int argc, char **argv,
                char **hostname, uint16_t *port, char **filename) {
	int c;
	while ((c = getopt(argc, argv, "f:h")) != -1) {
		switch (c) {
		case 'f':
			*filename = optarg;
			break;
		case 'h':
		case '?':
			exit_usage(argv);
			break;
		default:
			abort(); // unreachable
		}
	}

	if (optind + 2 != argc) {
		fprintf(stderr, "%s: wrong number of arguments\n", argv[0]);
		exit_usage(argv);
	}

	*hostname = argv[optind++];
	*port = atoi(argv[optind]);

	if (*port == 0 || *port >> 16) {
		fprintf(stderr, "%s: port must be an integer between 1 and 65535\n", argv[0]);
		exit_usage(argv);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x20d9(%rip), %rdx      # 0x4112
callq 0x1180
movl %eax, -0x2c(%rbp)
cmpl $-0x1, %eax
je 0x208c
movl -0x2c(%rbp), %eax
movl %eax, -0x30(%rbp)
subl $0x3f, %eax
je 0x207a
jmp 0x2053
movl -0x30(%rbp), %eax
subl $0x66, %eax
je 0x2067
jmp 0x205d
movl -0x30(%rbp), %eax
subl $0x68, %eax
je 0x207a
jmp 0x2085
movq 0x4f6a(%rip), %rax      # 0x6fd8
movq (%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
jmp 0x208a
movq -0x10(%rbp), %rdi
callq 0x1eb0
jmp 0x208a
callq 0x1050
jmp 0x202b
movq 0x4f3d(%rip), %rax      # 0x6fd0
movl (%rax), %eax
addl $0x2, %eax
cmpl -0x4(%rbp), %eax
je 0x20c5
movq 0x4f54(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x2061(%rip), %rsi      # 0x4116
movb $0x0, %al
callq 0x1100
movq -0x10(%rbp), %rdi
callq 0x1eb0
movq -0x10(%rbp), %rax
movq 0x4f00(%rip), %rcx      # 0x6fd0
movl (%rcx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movq 0x4ef2(%rip), %rdx      # 0x6fd0
movl %esi, (%rdx)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x4ed7(%rip), %rcx      # 0x6fd0
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x11a0
movw %ax, %cx
movq -0x20(%rbp), %rax
movw %cx, (%rax)
movq -0x20(%rbp), %rax
movzwl (%rax), %eax
cmpl $0x0, %eax
je 0x212a
movq -0x20(%rbp), %rax
movzwl (%rax), %eax
sarl $0x10, %eax
cmpl $0x0, %eax
je 0x2152
movq 0x4ec7(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x1ff3(%rip), %rsi      # 0x4135
movb $0x0, %al
callq 0x1100
movq -0x10(%rbp), %rdi
callq 0x1eb0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/util.c
// Function: real_address
const char *real_address(const char *address, struct sockaddr_in6 *rval) {
	struct addrinfo hint = {0};
	hint.ai_family = AF_INET6;
	hint.ai_socktype = SOCK_DGRAM;
	hint.ai_protocol = IPPROTO_UDP;

	struct addrinfo info;
	struct addrinfo *infoptr = &info;
	int err = getaddrinfo(address, NULL, &hint, &infoptr);
	if (err != 0) {
		return gai_strerror(err);
	}

	struct sockaddr_in6 *addr = (struct sockaddr_in6 *) infoptr->ai_addr;
	*rval = *addr;

	freeaddrinfo(infoptr);
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x10e0
movl $0xa, -0x44(%rbp)
movl $0x2, -0x40(%rbp)
movl $0x11, -0x3c(%rbp)
leaq -0x78(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq -0x48(%rbp), %rdx
leaq -0x80(%rbp), %rcx
callq 0x11f0
movl %eax, -0x84(%rbp)
cmpl $0x0, -0x84(%rbp)
je 0x21d5
movl -0x84(%rbp), %edi
callq 0x10b0
movq %rax, -0x8(%rbp)
jmp 0x221c
movq -0x80(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x18(%rbp), %rax
movq -0x90(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movl 0x18(%rcx), %ecx
movl %ecx, 0x18(%rax)
movq -0x80(%rbp), %rdi
callq 0x1220
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/util.c
// Function: create_socket
int create_socket(struct sockaddr_in6 *source_addr, int src_port,
                  struct sockaddr_in6 *dest_addr, int dst_port) {
	int sockfd = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP);
	if (sockfd == -1) {
		log_perror("socket");
		return -1;
	}

	if (source_addr != NULL && src_port > 0) {
		source_addr->sin6_port = htons(src_port);
		if (bind(sockfd, (struct sockaddr *) source_addr, sizeof (*source_addr)) != 0) {
			log_perror("bind");
			return -1;
		}
	}

	if (dest_addr != NULL && dst_port > 0) {
		dest_addr->sin6_port = htons(dst_port);
		if (connect(sockfd, (struct sockaddr *) dest_addr, sizeof (*dest_addr)) != 0) {
			log_perror("connect");
			return -1;
		}
	}

	return sockfd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl $0xa, %edi
movl $0x2, %esi
movl $0x11, %edx
callq 0x1230
movl %eax, -0x28(%rbp)
cmpl $-0x1, -0x28(%rbp)
jne 0x227b
leaq 0x1efc(%rip), %rdi      # 0x4166
callq 0x1d80
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2321
cmpq $0x0, -0x10(%rbp)
je 0x22cb
cmpl $0x0, -0x14(%rbp)
jle 0x22cb
movl -0x14(%rbp), %eax
movzwl %ax, %edi
callq 0x1090
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x2(%rax)
movl -0x28(%rbp), %edi
movq -0x10(%rbp), %rsi
movl $0x1c, %edx
callq 0x1150
cmpl $0x0, %eax
je 0x22c9
leaq 0x1eb2(%rip), %rdi      # 0x416d
callq 0x1d80
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2321
jmp 0x22cb
cmpq $0x0, -0x20(%rbp)
je 0x231b
cmpl $0x0, -0x24(%rbp)
jle 0x231b
movl -0x24(%rbp), %eax
movzwl %ax, %edi
callq 0x1090
movw %ax, %cx
movq -0x20(%rbp), %rax
movw %cx, 0x2(%rax)
movl -0x28(%rbp), %edi
movq -0x20(%rbp), %rsi
movl $0x1c, %edx
callq 0x11d0
cmpl $0x0, %eax
je 0x2319
leaq 0x1e67(%rip), %rdi      # 0x4172
callq 0x1d80
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2321
jmp 0x231b
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/util.c
// Function: send_packet
int send_packet(int sockfd, pkt_t *pkt) {
	char buf[MAX_PACKET_SIZE];
	size_t len = MAX_PACKET_SIZE;
	if (pkt_encode(pkt, buf, &len) != PKT_OK) {
		exit_msg("Error encoding packet: %d\n");
	}
	return send(sockfd, buf, len, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x210, -0x228(%rbp) # imm = 0x210
movq -0x10(%rbp), %rdi
leaq -0x220(%rbp), %rsi
leaq -0x228(%rbp), %rdx
callq 0x1710
cmpl $0x0, %eax
je 0x2377
leaq 0x1e0a(%rip), %rdi      # 0x417a
movb $0x0, %al
callq 0x1da0
movl -0x4(%rbp), %edi
leaq -0x220(%rbp), %rsi
movq -0x228(%rbp), %rdx
xorl %ecx, %ecx
callq 0x10a0
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/util.c
// Function: micro_to_timeval
struct timeval micro_to_timeval(uint32_t us) {
	struct timeval tv;
	tv.tv_sec = us / 1000000;
	tv.tv_usec = us % 1000000;
	return tv;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x14(%rbp)
movl -0x14(%rbp), %eax
imulq $0x431bde83, %rax, %rax # imm = 0x431BDE83
shrq $0x32, %rax
movq %rax, -0x10(%rbp)
movl -0x14(%rbp), %eax
movl %eax, %ecx
movl %ecx, %eax
imulq $0x431bde83, %rcx, %rcx # imm = 0x431BDE83
shrq $0x32, %rcx
imull $0xf4240, %ecx, %ecx    # imm = 0xF4240
subl %ecx, %eax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/window.c
// Function: window_create
window_t *window_create(size_t size, size_t max_size, size_t max_seqnum) {
	if (size > max_size) {
		return NULL;
	}
	window_t *w = calloc(1, sizeof (window_t));
	if (w == NULL) {
		return NULL;
	}
	w->size = size;
	w->capacity = max_size;
	w->max_seqnum = max_seqnum; /* TODO: check valid */
	return w;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jbe 0x25b8
movq $0x0, -0x8(%rbp)
jmp 0x2607
movl $0x1, %edi
movl $0x30, %esi
callq 0x10f0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x25dc
movq $0x0, -0x8(%rbp)
jmp 0x2607
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/window.c
// Function: window_free
void window_free(window_t *w) {
	struct node *cur = w->front;
	while (cur != NULL) {
		struct node *next = cur->next;
		free(cur);
		cur = next;
	}
	free(w);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x265e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1030
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x2638
movq -0x8(%rbp), %rdi
callq 0x1030
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/window.c
// Function: window_has
bool window_has(window_t *w, size_t seqnum) {
	if (w->size == 0) {
		return false;
	}
	if (window_start(w) > window_end(w)) { /* Example: 3 [4 5 0 1] 2 */
		return window_start(w) <= seqnum || seqnum <= window_end(w);
	}
	return window_start(w) <= seqnum && seqnum <= window_end(w);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x2774
movb $0x0, -0x1(%rbp)
jmp 0x2818
movq -0x10(%rbp), %rdi
callq 0x2670
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2690
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
jbe 0x27d8
movq -0x10(%rbp), %rdi
callq 0x2670
movq %rax, %rcx
movb $0x1, %al
cmpq -0x18(%rbp), %rcx
movb %al, -0x21(%rbp)
jbe 0x27ce
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2690
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
setbe %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x2818
movq -0x10(%rbp), %rdi
callq 0x2670
movq %rax, %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x31(%rbp)
ja 0x2810
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2690
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
setbe %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/window.c
// Function: window_resize
int window_resize(window_t *w, size_t new_size) {
	if (new_size > w->capacity) {
		return -1;
	}
	w->size = new_size;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x2853
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2866
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/window.c
// Function: window_push
int window_push(window_t *w, pkt_t *pkt) {
	if (window_full(w)) {
		return -1;
	}

	struct node *front = calloc(1, sizeof (struct node));
	if (front == NULL) {
		return -1;
	}

	front->pkt = pkt;
	front->next = w->front;
	w->front = front;

	w->bufsize++;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2950
testb $0x1, %al
jne 0x28cf
jmp 0x28d8
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2939
movl $0x1, %edi
movl $0x10, %esi
callq 0x10f0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x28fb
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2939
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/window.c
// Function: window_available
size_t window_available(window_t *w) {
	/* We may have shrunk the window below the buffer size */
	if (w->size < w->bufsize) {
		return 0;
	}
	return w->size - w->bufsize;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jae 0x29b4
movq $0x0, -0x8(%rbp)
jmp 0x29c8
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x20(%rcx), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/window.c
// Function: window_find_seqnum
pkt_t *window_find_seqnum(window_t *w, size_t seqnum) {
	struct node *cur = w->front;
	while (cur != NULL) {
		if (pkt_get_seqnum(cur->pkt) == seqnum) {
			return cur->pkt;
		}
		cur = cur->next;
	}
	/* Reached only if there's no match */
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x2a63
movq -0x20(%rbp), %rax
movq (%rax), %rdi
callq 0x19a0
movzbl %al, %eax
cmpq -0x18(%rbp), %rax
jne 0x2a55
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x2a6b
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x2a2c
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/window.c
// Function: window_update_timestamp
int window_update_timestamp(window_t *w, uint32_t old_time, uint32_t new_time) {
	struct node *cur = w->front;
	while (cur != NULL) {
		if (pkt_get_timestamp(cur->pkt) == old_time) {
			pkt_set_timestamp(cur->pkt, new_time);
			return 0;
		}
		cur = cur->next;
	}
	/* Reached only if there's no match */
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x2adc
movq -0x20(%rbp), %rax
movq (%rax), %rdi
callq 0x19c0
cmpl -0x14(%rbp), %eax
jne 0x2ace
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movl -0x18(%rbp), %esi
callq 0x1bb0
movl $0x0, -0x4(%rbp)
jmp 0x2ae3
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x2a9e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sprt[P]lossless-transport/src/window.c
// Function: window_pop_node
pkt_t *window_pop_node(window_t *w, struct node **node) {
	if (*node == NULL) {
		return NULL;
	}

	pkt_t *pkt = (*node)->pkt;

	struct node *tmp = *node;
	*node = (*node)->next;
	free(tmp);

	w->bufsize--;
	return pkt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x2b14
movq $0x0, -0x8(%rbp)
jmp 0x2b60
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rdi
callq 0x1030
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)