// File: /workspace/github_c_makefile_star2_O1/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 0x1ffb4(%rip), %rdi     # 0x29f98
movq 0x1ff05(%rip), %rsi     # 0x29ef0
movl 0x1feef(%rip), %edx     # 0x29ee0
movq 0x1ffa8(%rip), %rcx     # 0x29fa0
callq 0x9c3c
xorl %edi, %edi
xorl %esi, %esi
callq 0x4340
leaq 0x1ffd3(%rip), %rcx     # 0x29fe0
movq %rax, (%rcx)
cmpq $0x0, 0x1ff38(%rip)     # 0x29f50
setne %cl
movl 0x1ff27(%rip), %eax     # 0x29f48
testl %eax, %eax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
je 0xa18f
testl %eax, %eax
sete %dl
movl 0x1fefc(%rip), %ecx     # 0x29f38
testl %ecx, %ecx
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
je 0xa194
testl %ecx, %ecx
setne %dl
movl 0x1fef2(%rip), %ecx     # 0x29f4c
testl %ecx, %ecx
setle %sil
andb %dl, %sil
cmpb $0x1, %sil
je 0xa199
testl %eax, %eax
setne %al
testl %ecx, %ecx
setle %cl
testb %cl, %al
jne 0xa089
cmpq $0x0, 0x1fe75(%rip)     # 0x29ef8
je 0xa19e
cmpq $0x0, 0x1ff3f(%rip)     # 0x29fd0
jne 0xa0a6
leaq 0x49e8(%rip), %rdi      # 0xea82
callq 0x4590
movq %rax, 0x1ff2a(%rip)     # 0x29fd0
movq 0x1fe5b(%rip), %rdi     # 0x29f08
testq %rdi, %rdi
je 0xa1a3
movl $0x1, %esi
callq 0x4750
testl %eax, %eax
js 0xa1a8
cmpl $0x0, 0x1fe79(%rip)     # 0x29f48
je 0xa0df
cmpq $0x0, 0x1fe67(%rip)     # 0x29f40
je 0xa1ad
leaq 0x10(%rsp), %rbx
movl $0x1000, %esi           # imm = 0x1000
movq %rbx, %rdi
callq 0x4620
testq %rax, %rax
je 0xa1b2
cmpq $0x0, 0x1fe0e(%rip)     # 0x29f10
jne 0xa114
cmpl $0x0, 0x1fe3d(%rip)     # 0x29f48
jne 0xa114
movq %rbx, 0x1fdfc(%rip)     # 0x29f10
cmpl $0x0, 0x1fe75(%rip)     # 0x29f90
js 0xa1b7
cmpq $0x0, 0x1fdf7(%rip)     # 0x29f20
jne 0xa14c
movq 0x1fdbe(%rip), %rdx     # 0x29ef0
leaq 0x4a98(%rip), %rdi      # 0xebd1
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x4380
movq %rax, 0x1fdd4(%rip)     # 0x29f20
movq 0x1fe15(%rip), %rdi     # 0x29f68
movq 0xb346(%rip), %rsi      # 0x154a0
movq 0xb347(%rip), %rdx      # 0x154a8
movq 0x1fd88(%rip), %rcx     # 0x29ef0
movq 0x1fd91(%rip), %r8      # 0x29f00
movq 0x1fe2a(%rip), %r9      # 0x29fa0
movq 0x1fe2b(%rip), %rax     # 0x29fa8
movq %rax, (%rsp)
callq 0x91b8
addq $0x1010, %rsp           # imm = 0x1010
popq %rbx
retq
callq 0x61da
callq 0x6184
callq 0x612e
callq 0x60d8
callq 0x6082
callq 0x602c
callq 0x5fd6
callq 0x5f80
callq 0x5f2a