// File: /workspace/github_c_makefile_star2_O2/containers[P]conmon/src/ctrl.c
// Function: process_terminal_ctrl_line
static gboolean process_terminal_ctrl_line(char *line)
{
	/* while the height and width won't be used in this function,
	 * we want to remove them from the buffer anyway
	 */
	int ctl_msg_type, height, width, ret = -1;
	ret = sscanf(line, "%d %d %d\n", &ctl_msg_type, &height, &width);
	if (ret != 3) {
		nwarn("Failed to sscanf message");
		return FALSE;
	}

	ndebugf("Message type: %d", ctl_msg_type);
	switch (ctl_msg_type) {
	case WIN_RESIZE_EVENT: {
		_cleanup_free_ char *hw_str = g_strdup_printf("%d %d\n", height, width);
		if (write(winsz_fd_w, hw_str, strlen(hw_str)) < 0) {
			nwarn("Failed to write to window resizing fd. A resize event may have been dropped");
			return FALSE;
		}
		break;
	}
	case REOPEN_LOGS_EVENT:
		reopen_log_files();
		break;
	default:
		nwarnf("Unknown message type: %d", ctl_msg_type);
		break;
	}
	return TRUE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x5954(%rip), %rsi      # 0x100c0
xorl %ebx, %ebx
leaq 0x4(%rsp), %rdx
leaq 0xc(%rsp), %rcx
leaq 0x8(%rsp), %r8
xorl %eax, %eax
callq 0x41d0
leaq 0x9d19(%rip), %r14      # 0x144a4
movl (%r14), %ecx
cmpl $0x3, %eax
jne 0xa7fc
cmpl $0x3, %ecx
jae 0xa8ce
movl 0x4(%rsp), %edx
cmpl $0x2, %edx
je 0xa85b
cmpl $0x1, %edx
jne 0xa865
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edx
leaq 0x5902(%rip), %rdi      # 0x100c3
xorl %eax, %eax
callq 0x4380
movq %rax, %rbx
leaq 0xa596(%rip), %rax      # 0x14d68
movl (%rax), %ebp
movq %rbx, %rdi
callq 0x4360
movl %ebp, %edi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x4840
testq %rax, %rax
js 0xa8b3
movq %rbx, %rdi
callq 0x48f8
jmp 0xa860
testl %ecx, %ecx
je 0xa8c3
movq 0x97e5(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x2982(%rip), %rsi      # 0xd197
leaq 0x580e(%rip), %rdx      # 0x1002a
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4830
leaq 0x1e6ac(%rip), %rax     # 0x28ed8
cmpl $0x0, (%rax)
je 0xa8c3
leaq 0x1e694(%rip), %rax     # 0x28ed0
movq (%rax), %rdx
leaq 0x298c(%rip), %rsi      # 0xd1d2
leaq 0x57dd(%rip), %rcx      # 0x1002a
xorl %ebx, %ebx
pushq $0x6
popq %rdi
xorl %eax, %eax
callq 0x4120
jmp 0xa8c3
callq 0x7300
pushq $0x1
popq %rbx
jmp 0xa8c3
pushq $0x1
popq %rbx
cmpl $0x0, (%r14)
je 0xa8c3
movq 0x977b(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x58df(%rip), %rsi      # 0x1015e
xorl %eax, %eax
callq 0x4830
leaq 0x1e64b(%rip), %rax     # 0x28ed8
cmpl $0x0, (%rax)
je 0xa8c3
leaq 0x1e637(%rip), %rax     # 0x28ed0
movq (%rax), %rdx
movl 0x4(%rsp), %ecx
leaq 0x58dd(%rip), %rsi      # 0x10184
pushq $0x6
popq %rdi
xorl %eax, %eax
callq 0x4120
jmp 0xa8c3
cmpl $0x0, (%r14)
jne 0xa91e
movq %rbx, %rdi
callq 0x48f8
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x971b(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
movl 0x4(%rsp), %edx
leaq 0x57e7(%rip), %rsi      # 0x100ca
xorl %eax, %eax
callq 0x4830
leaq 0x1e5e7(%rip), %rax     # 0x28ed8
cmpl $0x0, (%rax)
je 0xa79c
leaq 0x1e5cf(%rip), %rax     # 0x28ed0
movq (%rax), %rdx
movl 0x4(%rsp), %ecx
leaq 0x57d9(%rip), %rsi      # 0x100e8
pushq $0x6
popq %rdi
xorl %eax, %eax
callq 0x4120
jmp 0xa79c
movq 0x96cb(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x2868(%rip), %rsi      # 0xd197
leaq 0x57dc(%rip), %rdx      # 0x10112
xorl %eax, %eax
callq 0x4830
leaq 0x1e594(%rip), %rax     # 0x28ed8
cmpl $0x0, (%rax)
je 0xa8b9
leaq 0x1e57c(%rip), %rax     # 0x28ed0
movq (%rax), %rdx
leaq 0x2874(%rip), %rsi      # 0xd1d2
leaq 0x57ad(%rip), %rcx      # 0x10112
pushq $0x6
popq %rdi
xorl %eax, %eax
callq 0x4120
jmp 0xa8b9