// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x1010, %rsp           # imm = 0x1010
movq 0x22046(%rip), %rdi     # 0x2b018
movq 0x21f97(%rip), %rsi     # 0x2af70
movl 0x21f81(%rip), %edx     # 0x2af60
movq 0x2203a(%rip), %rcx     # 0x2b020
callq 0x8a60
xorl %eax, %eax
movl %eax, %edi
xorl %esi, %esi
callq 0x4340
movq %rax, %rcx
leaq 0x22060(%rip), %rax     # 0x2b060
movq %rcx, (%rax)
cmpq $0x0, 0x21fc5(%rip)     # 0x2afd0
je 0x9071
cmpl $0x0, 0x21fb4(%rip)     # 0x2afc8
je 0x9071
jmp 0x9018
movq 0xcfd1(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
leaq 0x65f8(%rip), %rsi      # 0xf621
leaq 0x7cd6(%rip), %rdx      # 0x10d06
movb $0x0, %al
callq 0x4830
leaq 0x21f0a(%rip), %rax     # 0x2af48
cmpl $0x0, (%rax)
je 0x9067
leaq 0x21ef6(%rip), %rax     # 0x2af40
movq (%rax), %rdx
movl $0x3, %edi
leaq 0x65f7(%rip), %rsi      # 0xf650
leaq 0x7ca6(%rip), %rcx      # 0x10d06
movb $0x0, %al
callq 0x4120
movl $0x1, %edi
callq 0x41e0
cmpl $0x0, 0x21f50(%rip)     # 0x2afc8
jne 0x90de
cmpl $0x0, 0x21f37(%rip)     # 0x2afb8
je 0x90de
jmp 0x9085
movq 0xcf64(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
leaq 0x658b(%rip), %rsi      # 0xf621
leaq 0x7c9a(%rip), %rdx      # 0x10d37
movb $0x0, %al
callq 0x4830
leaq 0x21e9d(%rip), %rax     # 0x2af48
cmpl $0x0, (%rax)
je 0x90d4
leaq 0x21e89(%rip), %rax     # 0x2af40
movq (%rax), %rdx
movl $0x3, %edi
leaq 0x658a(%rip), %rsi      # 0xf650
leaq 0x7c6a(%rip), %rcx      # 0x10d37
movb $0x0, %al
callq 0x4120
movl $0x1, %edi
callq 0x41e0
cmpl $0x1, 0x21ee7(%rip)     # 0x2afcc
jge 0x914b
cmpl $0x0, 0x21eca(%rip)     # 0x2afb8
je 0x914b
jmp 0x90f2
movq 0xcef7(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
leaq 0x651e(%rip), %rsi      # 0xf621
leaq 0x7c54(%rip), %rdx      # 0x10d5e
movb $0x0, %al
callq 0x4830
leaq 0x21e30(%rip), %rax     # 0x2af48
cmpl $0x0, (%rax)
je 0x9141
leaq 0x21e1c(%rip), %rax     # 0x2af40
movq (%rax), %rdx
movl $0x3, %edi
leaq 0x651d(%rip), %rsi      # 0xf650
leaq 0x7c24(%rip), %rcx      # 0x10d5e
movb $0x0, %al
callq 0x4120
movl $0x1, %edi
callq 0x41e0
cmpq $0x0, 0x21e25(%rip)     # 0x2af78
jne 0x91c2
cmpl $0x0, 0x21e6c(%rip)     # 0x2afc8
je 0x9167
cmpl $0x1, 0x21e67(%rip)     # 0x2afcc
jl 0x91c2
jmp 0x9169
movq 0xce80(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
leaq 0x64a7(%rip), %rsi      # 0xf621
leaq 0x7c18(%rip), %rdx      # 0x10d99
movb $0x0, %al
callq 0x4830
leaq 0x21db9(%rip), %rax     # 0x2af48
cmpl $0x0, (%rax)
je 0x91b8
leaq 0x21da5(%rip), %rax     # 0x2af40
movq (%rax), %rdx
movl $0x3, %edi
leaq 0x64a6(%rip), %rsi      # 0xf650
leaq 0x7be8(%rip), %rcx      # 0x10d99
movb $0x0, %al
callq 0x4120
movl $0x1, %edi
callq 0x41e0
cmpq $0x0, 0x21e86(%rip)     # 0x2b050
jne 0x91df
leaq 0x7bef(%rip), %rdi      # 0x10dc2
callq 0x45a0
movq %rax, 0x21e71(%rip)     # 0x2b050
cmpq $0x0, 0x21da1(%rip)     # 0x2af88
jne 0x9244
jmp 0x91eb
movq 0xcdfe(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
leaq 0x6425(%rip), %rsi      # 0xf621
leaq 0x7bdd(%rip), %rdx      # 0x10de0
movb $0x0, %al
callq 0x4830
leaq 0x21d37(%rip), %rax     # 0x2af48
cmpl $0x0, (%rax)
je 0x923a
leaq 0x21d23(%rip), %rax     # 0x2af40
movq (%rax), %rdx
movl $0x3, %edi
leaq 0x6424(%rip), %rsi      # 0xf650
leaq 0x7bad(%rip), %rcx      # 0x10de0
movb $0x0, %al
callq 0x4120
movl $0x1, %edi
callq 0x41e0
movq 0x21d3d(%rip), %rdi     # 0x2af88
movl $0x1, %esi
callq 0x4770
cmpl $0x0, %eax
jge 0x92b5
jmp 0x925c
movq 0xcd8d(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
movq 0x21d1b(%rip), %rdx     # 0x2af88
leaq 0x7b95(%rip), %rsi      # 0x10e09
movb $0x0, %al
callq 0x4830
leaq 0x21cc6(%rip), %rax     # 0x2af48
cmpl $0x0, (%rax)
je 0x92ab
leaq 0x21cb2(%rip), %rax     # 0x2af40
movq (%rax), %rdx
movq 0x21cf0(%rip), %rcx     # 0x2af88
movl $0x3, %edi
leaq 0x7b92(%rip), %rsi      # 0x10e36
movb $0x0, %al
callq 0x4120
movl $0x1, %edi
callq 0x41e0
cmpl $0x0, 0x21d0c(%rip)     # 0x2afc8
je 0x9323
cmpq $0x0, 0x21cfa(%rip)     # 0x2afc0
jne 0x9323
jmp 0x92ca
movq 0xcd1f(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
leaq 0x6346(%rip), %rsi      # 0xf621
leaq 0x7b8c(%rip), %rdx      # 0x10e6e
movb $0x0, %al
callq 0x4830
leaq 0x21c58(%rip), %rax     # 0x2af48
cmpl $0x0, (%rax)
je 0x9319
leaq 0x21c44(%rip), %rax     # 0x2af40
movq (%rax), %rdx
movl $0x3, %edi
leaq 0x6345(%rip), %rsi      # 0xf650
leaq 0x7b5c(%rip), %rcx      # 0x10e6e
movb $0x0, %al
callq 0x4120
movl $0x1, %edi
callq 0x41e0
leaq -0x1000(%rbp), %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0x4630
cmpq $0x0, %rax
jne 0x9395
jmp 0x933c
movq 0xccad(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
leaq 0x62d4(%rip), %rsi      # 0xf621
leaq 0x7b57(%rip), %rdx      # 0x10eab
movb $0x0, %al
callq 0x4830
leaq 0x21be6(%rip), %rax     # 0x2af48
cmpl $0x0, (%rax)
je 0x938b
leaq 0x21bd2(%rip), %rax     # 0x2af40
movq (%rax), %rdx
movl $0x3, %edi
leaq 0x62d3(%rip), %rsi      # 0xf650
leaq 0x7b27(%rip), %rcx      # 0x10eab
movb $0x0, %al
callq 0x4120
movl $0x1, %edi
callq 0x41e0
cmpq $0x0, 0x21bf3(%rip)     # 0x2af90
jne 0x93b6
cmpl $0x0, 0x21c22(%rip)     # 0x2afc8
jne 0x93b6
leaq -0x1000(%rbp), %rax
movq %rax, 0x21bda(%rip)     # 0x2af90
cmpl $0x0, 0x21c53(%rip)     # 0x2b010
jge 0x941a
jmp 0x93c1
movq 0xcc28(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
leaq 0x624f(%rip), %rsi      # 0xf621
leaq 0x7af2(%rip), %rdx      # 0x10ecb
movb $0x0, %al
callq 0x4830
leaq 0x21b61(%rip), %rax     # 0x2af48
cmpl $0x0, (%rax)
je 0x9410
leaq 0x21b4d(%rip), %rax     # 0x2af40
movq (%rax), %rdx
movl $0x3, %edi
leaq 0x624e(%rip), %rsi      # 0xf650
leaq 0x7ac2(%rip), %rcx      # 0x10ecb
movb $0x0, %al
callq 0x4120
movl $0x1, %edi
callq 0x41e0
cmpq $0x0, 0x21b7e(%rip)     # 0x2afa0
jne 0x9447
leaq -0x1000(%rbp), %rsi
movq 0x21b3e(%rip), %rdx     # 0x2af70
leaq 0x7ad8(%rip), %rdi      # 0x10f11
movb $0x0, %al
callq 0x4380
movq %rax, 0x21b59(%rip)     # 0x2afa0
movq 0x21b9a(%rip), %rdi     # 0x2afe8
movq 0xd05b(%rip), %rsi      # 0x164b0
movq 0xd05c(%rip), %rdx      # 0x164b8
movq 0x21b0d(%rip), %rcx     # 0x2af70
movq 0x21b16(%rip), %r8      # 0x2af80
movq 0x21baf(%rip), %r9      # 0x2b020
movq 0x21bb0(%rip), %rax     # 0x2b028
movq %rax, (%rsp)
callq 0x7090
addq $0x1010, %rsp           # imm = 0x1010
popq %rbp
retq
nop
nopl (%rax)