// File: /workspace/github_c_makefile_star2_O0/containers[P]conmon/src/runtime_args.c
// Function: configure_runtime_args
GPtrArray *configure_runtime_args(const char *const csname)
{
	GPtrArray *runtime_argv = g_ptr_array_new();
	add_argv(runtime_argv, opt_runtime_path, NULL);

	/* Generate the cmdline. */
	if (!opt_exec && opt_systemd_cgroup)
		add_argv(runtime_argv, "--systemd-cgroup", NULL);

	if (opt_runtime_args) {
		size_t n_runtime_args = 0;
		while (opt_runtime_args[n_runtime_args])
			add_argv(runtime_argv, opt_runtime_args[n_runtime_args++], NULL);
	}

	/* Set the exec arguments. */
	if (opt_exec) {
		add_argv(runtime_argv, "exec", "--pid-file", opt_container_pid_file, "--process", opt_exec_process_spec, "--detach", NULL);
	} else {
		char *command;
		if (opt_restore_path)
			command = "restore";
		else
			command = "create";

		add_argv(runtime_argv, command, "--bundle", opt_bundle_path, "--pid-file", opt_container_pid_file, NULL);
		if (opt_no_pivot)
			add_argv(runtime_argv, "--no-pivot", NULL);
		if (opt_no_new_keyring)
			add_argv(runtime_argv, "--no-new-keyring", NULL);

		if (opt_restore_path) {
			/*
			 * 'runc restore' is different from 'runc create'
			 * as the container is immediately running after
			 * a restore. Therefore the '--detach is needed'
			 * so that runc returns once the container is running.
			 *
			 * '--image-path' is the path to the checkpoint
			 * which will be become important when using pre-copy
			 * migration where multiple checkpoints can be created
			 * to reduce the container downtime during migration.
			 *
			 * '--work-path' is the directory CRIU will run in and
			 * also place its log files.
			 */
			add_argv(runtime_argv, "--detach", "--image-path", opt_restore_path, "--work-path", opt_bundle_path, NULL);
		}
	}
	/*
	 *  opt_runtime_opts can contain 'runc restore' or 'runc exec' options like
	 *  '--tcp-established' or '--preserve-fds'. Instead of listing each option as
	 *  a special conmon option, this (--runtime-opt) provides
	 *  a generic interface to pass all those options to conmon
	 *  without requiring a code change for each new option.
	 */
	if (opt_runtime_opts) {
		size_t n_runtime_opts = 0;
		while (opt_runtime_opts[n_runtime_opts])
			add_argv(runtime_argv, opt_runtime_opts[n_runtime_opts++], NULL);
	}


	if (csname != NULL) {
		add_argv(runtime_argv, "--console-socket", csname, NULL);
	}

	/* Container name comes last. */
	add_argv(runtime_argv, opt_cid, NULL);
	end_argv(runtime_argv);

	print_argv(runtime_argv);

	return runtime_argv;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
callq 0x47d0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x1c968(%rip), %rax     # 0x2af88
movq (%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0xe8c0
leaq 0x1c993(%rip), %rax     # 0x2afc8
cmpl $0x0, (%rax)
jne 0xe65c
leaq 0x1c96f(%rip), %rax     # 0x2afb0
cmpl $0x0, (%rax)
je 0xe65c
movq -0x10(%rbp), %rdi
leaq 0x45c2(%rip), %rsi      # 0x12c13
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0xe8c0
leaq 0x1c97d(%rip), %rax     # 0x2afe0
cmpq $0x0, (%rax)
je 0xe6b6
movq $0x0, -0x18(%rbp)
leaq 0x1c968(%rip), %rax     # 0x2afe0
movq (%rax), %rax
movq -0x18(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0xe6b4
movq -0x10(%rbp), %rdi
leaq 0x1c94f(%rip), %rax     # 0x2afe0
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movq (%rax,%rcx,8), %rsi
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0xe8c0
jmp 0xe671
jmp 0xe6b6
leaq 0x1c90b(%rip), %rax     # 0x2afc8
cmpl $0x0, (%rax)
je 0xe712
movq -0x10(%rbp), %rdi
leaq 0x1c8d3(%rip), %rax     # 0x2afa0
movq (%rax), %rcx
leaq 0x1c8e9(%rip), %rax     # 0x2afc0
movq (%rax), %r9
leaq 0x2678(%rip), %rsi      # 0x10d59
leaq 0x453c(%rip), %rdx      # 0x12c24
leaq 0x4540(%rip), %r8       # 0x12c2f
leaq 0x4543(%rip), %rax      # 0x12c39
xorl %r10d, %r10d
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, %al
callq 0xe8c0
jmp 0xe803
leaq 0x1c8b7(%rip), %rax     # 0x2afd0
cmpq $0x0, (%rax)
je 0xe72c
leaq 0x20c1(%rip), %rax      # 0x107e7
movq %rax, -0x20(%rbp)
jmp 0xe737
leaq 0xde6(%rip), %rax       # 0xf519
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq 0x1c84a(%rip), %rax     # 0x2af90
movq (%rax), %rcx
leaq 0x1c850(%rip), %rax     # 0x2afa0
movq (%rax), %r9
leaq 0x44e8(%rip), %rdx      # 0x12c42
leaq 0x44c3(%rip), %r8       # 0x12c24
xorl %eax, %eax
movq $0x0, (%rsp)
movb $0x0, %al
callq 0xe8c0
leaq 0x1c83b(%rip), %rax     # 0x2afb4
cmpl $0x0, (%rax)
je 0xe794
movq -0x10(%rbp), %rdi
leaq 0x44c2(%rip), %rsi      # 0x12c4b
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0xe8c0
leaq 0x1c861(%rip), %rax     # 0x2affc
cmpl $0x0, (%rax)
je 0xe7b6
movq -0x10(%rbp), %rdi
leaq 0x44ab(%rip), %rsi      # 0x12c56
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0xe8c0
leaq 0x1c813(%rip), %rax     # 0x2afd0
cmpq $0x0, (%rax)
je 0xe801
movq -0x10(%rbp), %rdi
leaq 0x1c802(%rip), %rax     # 0x2afd0
movq (%rax), %rcx
leaq 0x1c7b8(%rip), %rax     # 0x2af90
movq (%rax), %r9
leaq 0x4457(%rip), %rsi      # 0x12c39
leaq 0x447e(%rip), %rdx      # 0x12c67
leaq 0x4484(%rip), %r8       # 0x12c74
xorl %eax, %eax
movq $0x0, (%rsp)
movb $0x0, %al
callq 0xe8c0
jmp 0xe803
leaq 0x1c7ce(%rip), %rax     # 0x2afd8
cmpq $0x0, (%rax)
je 0xe85d
movq $0x0, -0x28(%rbp)
leaq 0x1c7b9(%rip), %rax     # 0x2afd8
movq (%rax), %rax
movq -0x28(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0xe85b
movq -0x10(%rbp), %rdi
leaq 0x1c7a0(%rip), %rax     # 0x2afd8
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movq (%rax,%rcx,8), %rsi
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0xe8c0
jmp 0xe818
jmp 0xe85d
cmpq $0x0, -0x8(%rbp)
je 0xe87e
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rdx
leaq 0x440d(%rip), %rsi      # 0x12c80
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0xe8c0
movq -0x10(%rbp), %rdi
leaq 0x1c6e7(%rip), %rax     # 0x2af70
movq (%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0xe8c0
movq -0x10(%rbp), %rdi
callq 0xe9d0
movq -0x10(%rbp), %rdi
callq 0xe9f0
movq -0x10(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)