// File: /workspace/github_c_makefile_star2_O0/containers[P]conmon/src/ctrl.c
// Function: setup_fifo
static void setup_fifo(int *fifo_r, int *fifo_w, char *filename, char *error_var_name)
{
	_cleanup_free_ char *fifo_path = g_build_filename(opt_bundle_path, filename, NULL);

	if (!fifo_r || !fifo_w)
		pexitf("setup fifo was passed a NULL pointer");

	if (mkfifo(fifo_path, 0660) == -1) {
		if (errno == EEXIST) {
			unlink(fifo_path);
			if (mkfifo(fifo_path, 0660) == -1)
				pexitf("Failed to mkfifo at %s", fifo_path);
		}
	}

	if ((*fifo_r = open(fifo_path, O_RDONLY | O_NONBLOCK | O_CLOEXEC)) == -1)
		pexitf("Failed to open %s read half", error_var_name);

	if ((*fifo_w = open(fifo_path, O_WRONLY | O_CLOEXEC)) == -1)
		pexitf("Failed to open %s write half", error_var_name);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq 0x1dfd1(%rip), %rax     # 0x2af90
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0x46a0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xcfe3
cmpq $0x0, -0x10(%rbp)
jne 0xd030
jmp 0xcfe5
movq 0x9004(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
leaq 0x55db(%rip), %rsi      # 0x125d1
movb $0x0, %al
callq 0x4830
leaq 0x1df44(%rip), %rax     # 0x2af48
cmpl $0x0, (%rax)
je 0xd026
leaq 0x1df30(%rip), %rax     # 0x2af40
movq (%rax), %rdx
movl $0x3, %edi
leaq 0x55e7(%rip), %rsi      # 0x12606
movb $0x0, %al
callq 0x4120
movl $0x1, %edi
callq 0x41e0
movq -0x28(%rbp), %rdi
movl $0x1b0, %esi            # imm = 0x1B0
callq 0x4750
cmpl $-0x1, %eax
jne 0xd0c2
callq 0x45c0
cmpl $0x11, (%rax)
jne 0xd0c0
movq -0x28(%rbp), %rdi
callq 0x4290
movq -0x28(%rbp), %rdi
movl $0x1b0, %esi            # imm = 0x1B0
callq 0x4750
cmpl $-0x1, %eax
jne 0xd0be
jmp 0xd06b
movq 0x8f7e(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
movq -0x28(%rbp), %rdx
leaq 0x55c6(%rip), %rsi      # 0x12646
movb $0x0, %al
callq 0x4830
leaq 0x1deba(%rip), %rax     # 0x2af48
cmpl $0x0, (%rax)
je 0xd0b4
leaq 0x1dea6(%rip), %rax     # 0x2af40
movq (%rax), %rdx
movq -0x28(%rbp), %rcx
movl $0x3, %edi
leaq 0x55c0(%rip), %rsi      # 0x1266d
movb $0x0, %al
callq 0x4120
movl $0x1, %edi
callq 0x41e0
jmp 0xd0c0
jmp 0xd0c2
movq -0x28(%rbp), %rdi
movl $0x80800, %esi          # imm = 0x80800
movb $0x0, %al
callq 0x48d0
movq -0x8(%rbp), %rcx
movl %eax, (%rcx)
cmpl $-0x1, %eax
jne 0xd132
jmp 0xd0df
movq 0x8f0a(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
movq -0x20(%rbp), %rdx
leaq 0x55ab(%rip), %rsi      # 0x1269f
movb $0x0, %al
callq 0x4830
leaq 0x1de46(%rip), %rax     # 0x2af48
cmpl $0x0, (%rax)
je 0xd128
leaq 0x1de32(%rip), %rax     # 0x2af40
movq (%rax), %rdx
movq -0x20(%rbp), %rcx
movl $0x3, %edi
leaq 0x55aa(%rip), %rsi      # 0x126cb
movb $0x0, %al
callq 0x4120
movl $0x1, %edi
callq 0x41e0
movq -0x28(%rbp), %rdi
movl $0x80001, %esi          # imm = 0x80001
movb $0x0, %al
callq 0x48d0
movq -0x10(%rbp), %rcx
movl %eax, (%rcx)
cmpl $-0x1, %eax
jne 0xd1a2
jmp 0xd14f
movq 0x8e9a(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
movq -0x20(%rbp), %rdx
leaq 0x559e(%rip), %rsi      # 0x12702
movb $0x0, %al
callq 0x4830
leaq 0x1ddd6(%rip), %rax     # 0x2af48
cmpl $0x0, (%rax)
je 0xd198
leaq 0x1ddc2(%rip), %rax     # 0x2af40
movq (%rax), %rdx
movq -0x20(%rbp), %rcx
movl $0x3, %edi
leaq 0x559e(%rip), %rsi      # 0x1272f
movb $0x0, %al
callq 0x4120
movl $0x1, %edi
callq 0x41e0
leaq -0x28(%rbp), %rdi
callq 0xd320
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)