// File: /workspace/github_c_makefile_star2_O2/containers[P]conmon/src/cli.c
// Function: process_cli
void process_cli()
{
	/* Command line parameters */
	set_conmon_logs(opt_log_level, opt_cid, opt_syslog, opt_log_tag);


	main_loop = g_main_loop_new(NULL, FALSE);

	if (opt_restore_path && opt_exec)
		nexit("Cannot use 'exec' and 'restore' at the same time");

	if (!opt_exec && opt_attach)
		nexit("Attach can only be specified with exec");

	if (opt_api_version < 1 && opt_attach)
		nexit("Attach can only be specified for a non-legacy exec session");

	/* The old exec API did not require opt_cuuid */
	if (opt_cuuid == NULL && (!opt_exec || opt_api_version >= 1))
		nexit("Container UUID not provided. Use --cuuid");

	if (opt_seccomp_notify_plugins == NULL)
		opt_seccomp_notify_plugins = getenv("CONMON_SECCOMP_NOTIFY_PLUGINS");

	if (opt_runtime_path == NULL)
		nexit("Runtime path not provided. Use --runtime");
	if (access(opt_runtime_path, X_OK) < 0)
		pexitf("Runtime path %s is not valid", opt_runtime_path);

	if (opt_exec && opt_exec_process_spec == NULL) {
		nexit("Exec process spec path not provided. Use --exec-process-spec");
	}

	char cwd[PATH_MAX];
	if (getcwd(cwd, sizeof(cwd)) == NULL) {
		nexit("Failed to get working directory");
	}

	// opt_bundle_path in exec means we will set up the attach socket
	// for the exec session. the legacy version of exec does not need this
	// and thus we only override an empty opt_bundle_path when we're not exec
	if (opt_bundle_path == NULL && !opt_exec) {
		opt_bundle_path = cwd;
	}

	if (opt_exit_delay < 0) {
		nexit("Delay before invoking exit command must be greater than or equal to 0");
	}

	// we should always override the container pid file if it's empty
	// TODO FIXME I removed default_pid_file here. shouldn't opt_container_pid_file be cleaned up?
	if (opt_container_pid_file == NULL)
		opt_container_pid_file = g_strdup_printf("%s/pidfile-%s", cwd, opt_cid);

	configure_log_drivers(opt_log_path, opt_log_size_max, opt_log_global_size_max, opt_cid, opt_name, opt_log_tag, opt_log_labels);
}

// Assembly:
pushq %rbx
subq $0x1010, %rsp           # imm = 0x1010
movq 0x2167e(%rip), %rdi     # 0x28fa8
movq 0x215cf(%rip), %rsi     # 0x28f00
movl 0x215b9(%rip), %edx     # 0x28ef0
movq 0x21672(%rip), %rcx     # 0x28fb0
callq 0x758c
xorl %edi, %edi
xorl %esi, %esi
callq 0x4340
leaq 0x2169d(%rip), %rcx     # 0x28ff0
movq %rax, (%rcx)
cmpq $0x0, 0x21602(%rip)     # 0x28f60
setne %cl
movl 0x215f1(%rip), %eax     # 0x28f58
testl %eax, %eax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
je 0x7ad3
testl %eax, %eax
sete %dl
movl 0x215c6(%rip), %ecx     # 0x28f48
testl %ecx, %ecx
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
je 0x7b1f
testl %ecx, %ecx
setne %dl
movl 0x215bc(%rip), %ecx     # 0x28f5c
testl %ecx, %ecx
setle %sil
andb %dl, %sil
cmpb $0x1, %sil
je 0x7b6b
testl %eax, %eax
setne %al
testl %ecx, %ecx
setle %cl
testb %cl, %al
jne 0x79cf
cmpq $0x0, 0x2153f(%rip)     # 0x28f08
je 0x7bb7
cmpq $0x0, 0x21609(%rip)     # 0x28fe0
jne 0x79ec
leaq 0x7082(%rip), %rdi      # 0xea62
callq 0x45a0
movq %rax, 0x215f4(%rip)     # 0x28fe0
movq 0x21525(%rip), %rdi     # 0x28f18
testq %rdi, %rdi
je 0x7c03
pushq $0x1
popq %rsi
callq 0x4760
testl %eax, %eax
js 0x7c4f
cmpl $0x0, 0x21545(%rip)     # 0x28f58
je 0x7a23
cmpq $0x0, 0x21533(%rip)     # 0x28f50
je 0x7c9b
leaq 0x10(%rsp), %rbx
movl $0x1000, %esi           # imm = 0x1000
movq %rbx, %rdi
callq 0x4630
testq %rax, %rax
je 0x7ce7
cmpq $0x0, 0x214da(%rip)     # 0x28f20
jne 0x7a58
cmpl $0x0, 0x21509(%rip)     # 0x28f58
jne 0x7a58
movq %rbx, 0x214c8(%rip)     # 0x28f20
cmpl $0x0, 0x21541(%rip)     # 0x28fa0
js 0x7d2c
cmpq $0x0, 0x214c3(%rip)     # 0x28f30
jne 0x7a90
movq 0x2148a(%rip), %rdx     # 0x28f00
leaq 0x7134(%rip), %rdi      # 0xebb1
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x4380
movq %rax, 0x214a0(%rip)     # 0x28f30
movq 0x214e1(%rip), %rdi     # 0x28f78
movq 0xca12(%rip), %rsi      # 0x144b0
movq 0xca13(%rip), %rdx      # 0x144b8
movq 0x21454(%rip), %rcx     # 0x28f00
movq 0x2145d(%rip), %r8      # 0x28f10
movq 0x214f6(%rip), %r9      # 0x28fb0
movq 0x214f7(%rip), %rax     # 0x28fb8
movq %rax, (%rsp)
callq 0x66d0
addq $0x1010, %rsp           # imm = 0x1010
popq %rbx
retq
movq 0xc516(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x5b3d(%rip), %rsi      # 0xd621
leaq 0x6ebb(%rip), %rdx      # 0xe9a6
xorl %eax, %eax
callq 0x4830
leaq 0x213df(%rip), %rax     # 0x28ed8
cmpl $0x0, (%rax)
je 0x7d79
leaq 0x213c7(%rip), %rax     # 0x28ed0
movq (%rax), %rdx
leaq 0x5b3d(%rip), %rsi      # 0xd650
leaq 0x6e8c(%rip), %rcx      # 0xe9a6
jmp 0x7d6f
movq 0xc4ca(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x5af1(%rip), %rsi      # 0xd621
leaq 0x6ea0(%rip), %rdx      # 0xe9d7
xorl %eax, %eax
callq 0x4830
leaq 0x21393(%rip), %rax     # 0x28ed8
cmpl $0x0, (%rax)
je 0x7d79
leaq 0x2137b(%rip), %rax     # 0x28ed0
movq (%rax), %rdx
leaq 0x5af1(%rip), %rsi      # 0xd650
leaq 0x6e71(%rip), %rcx      # 0xe9d7
jmp 0x7d6f
movq 0xc47e(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x5aa5(%rip), %rsi      # 0xd621
leaq 0x6e7b(%rip), %rdx      # 0xe9fe
xorl %eax, %eax
callq 0x4830
leaq 0x21347(%rip), %rax     # 0x28ed8
cmpl $0x0, (%rax)
je 0x7d79
leaq 0x2132f(%rip), %rax     # 0x28ed0
movq (%rax), %rdx
leaq 0x5aa5(%rip), %rsi      # 0xd650
leaq 0x6e4c(%rip), %rcx      # 0xe9fe
jmp 0x7d6f
movq 0xc432(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x5a59(%rip), %rsi      # 0xd621
leaq 0x6e6a(%rip), %rdx      # 0xea39
xorl %eax, %eax
callq 0x4830
leaq 0x212fb(%rip), %rax     # 0x28ed8
cmpl $0x0, (%rax)
je 0x7d79
leaq 0x212e3(%rip), %rax     # 0x28ed0
movq (%rax), %rdx
leaq 0x5a59(%rip), %rsi      # 0xd650
leaq 0x6e3b(%rip), %rcx      # 0xea39
jmp 0x7d6f
movq 0xc3e6(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x5a0d(%rip), %rsi      # 0xd621
leaq 0x6e65(%rip), %rdx      # 0xea80
xorl %eax, %eax
callq 0x4830
leaq 0x212af(%rip), %rax     # 0x28ed8
cmpl $0x0, (%rax)
je 0x7d79
leaq 0x21297(%rip), %rax     # 0x28ed0
movq (%rax), %rdx
leaq 0x5a0d(%rip), %rsi      # 0xd650
leaq 0x6e36(%rip), %rcx      # 0xea80
jmp 0x7d6f
movq 0xc39a(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
movq 0x212b8(%rip), %rdx     # 0x28f18
leaq 0x6e42(%rip), %rsi      # 0xeaa9
xorl %eax, %eax
callq 0x4830
leaq 0x21263(%rip), %rax     # 0x28ed8
cmpl $0x0, (%rax)
je 0x7d79
leaq 0x2124b(%rip), %rax     # 0x28ed0
movq (%rax), %rdx
movq 0x21289(%rip), %rcx     # 0x28f18
leaq 0x6e40(%rip), %rsi      # 0xead6
jmp 0x7d6f
movq 0xc34e(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x5975(%rip), %rsi      # 0xd621
leaq 0x6e5b(%rip), %rdx      # 0xeb0e
xorl %eax, %eax
callq 0x4830
leaq 0x21217(%rip), %rax     # 0x28ed8
cmpl $0x0, (%rax)
je 0x7d79
leaq 0x211ff(%rip), %rax     # 0x28ed0
movq (%rax), %rdx
leaq 0x5975(%rip), %rsi      # 0xd650
leaq 0x6e2c(%rip), %rcx      # 0xeb0e
jmp 0x7d6f
movq 0xc302(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x5929(%rip), %rsi      # 0xd621
leaq 0x6e4c(%rip), %rdx      # 0xeb4b
xorl %eax, %eax
callq 0x4830
leaq 0x211cb(%rip), %rax     # 0x28ed8
cmpl $0x0, (%rax)
je 0x7d79
leaq 0x211b7(%rip), %rax     # 0x28ed0
movq (%rax), %rdx
leaq 0x592d(%rip), %rsi      # 0xd650
leaq 0x6e21(%rip), %rcx      # 0xeb4b
jmp 0x7d6f
movq 0xc2bd(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x58e4(%rip), %rsi      # 0xd621
leaq 0x6e27(%rip), %rdx      # 0xeb6b
xorl %eax, %eax
callq 0x4830
leaq 0x21186(%rip), %rax     # 0x28ed8
cmpl $0x0, (%rax)
je 0x7d79
leaq 0x21172(%rip), %rax     # 0x28ed0
movq (%rax), %rdx
leaq 0x58e8(%rip), %rsi      # 0xd650
leaq 0x6dfc(%rip), %rcx      # 0xeb6b
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x4120
pushq $0x1
popq %rdi
callq 0x41e0
nopl (%rax)