// File: /workspace/github_c_makefile_star2_O2/tomka[P]cliaspora/file.c
// Function: get_input
char *
get_input(bool fromstdin)
{
	int  c;
	FILE *fp;
	char *path, *buf;

	if (fromstdin) {
		if ((buf = read_file(stdin)) == NULL)
			errx(EXIT_FAILURE, "Failed to read file");
		return (buf);
	}
	if (have_postponed()) {
		do {
			(void)fputs("\nEdit postponed file? (y/n) ", stderr);
			c = tolower(fgetc(stdin));
		} while (c != 'y' && c != 'n');
		if (c == 'y')
			path = get_postponed_path();
		else
			path = NULL;
	} else
		path = NULL;
	do {
		path = edit_file(path);
		if (path == NULL)
			errx(EXIT_FAILURE, "Failed to edit file");
		else
			write_postponed(path);
		do {
			(void)fputs("\nReady to send? (y/n) ", stderr);
			c = tolower(fgetc(stdin));
		} while (c != 'y' && c != 'n');
	} while (c != 'y');
	if ((fp = fopen(path, "r")) == NULL)
		err(EXIT_FAILURE, "fopen(%s)", path);
	if ((buf = read_file(fp)) == NULL)
		errx(EXIT_FAILURE, "Failed to read file");
	delete_tmpfile();
	return (buf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2128, %rsp           # imm = 0x2128
testl %edi, %edi
je 0x8a70
movq 0x6579(%rip), %rax      # 0xefd0
movq (%rax), %rdi
callq 0x8dda
movq %rax, %rbx
testq %rax, %rax
jne 0x8d52
jmp 0x8d67
callq 0x890c
testl %eax, %eax
je 0x8abc
movq 0x6558(%rip), %r14      # 0xefd8
leaq 0x2f47(%rip), %rbx      # 0xb9ce
movq 0x6542(%rip), %r15      # 0xefd0
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x2360
movq (%r15), %rdi
callq 0x2520
movl %eax, %edi
callq 0x24c0
cmpl $0x6e, %eax
je 0x8abc
cmpl $0x79, %eax
jne 0x8a8e
callq 0x8966
movq %rax, %rbx
jmp 0x8abe
xorl %ebx, %ebx
testq %rbx, %rbx
jne 0x8ae2
leaq 0x68c6(%rip), %rbx      # 0xf390
movq %rbx, %rdi
callq 0x2100
cmpl $-0x1, %eax
je 0x8dbb
movl %eax, %edi
callq 0x25d0
leaq 0x6927(%rip), %rax      # 0xf410
movq 0x20(%rax), %r12
testq %r12, %r12
je 0x8af9
cmpb $0x0, (%r12)
jne 0x8b25
leaq 0x2f34(%rip), %rdi      # 0xba34
callq 0x2400
movq %rax, %r12
testq %rax, %rax
jne 0x8b25
leaq 0x2f27(%rip), %rdi      # 0xba3b
leaq 0x2f52(%rip), %r12      # 0xba6d
movq %r12, %rsi
xorl %eax, %eax
callq 0x22e0
movq %r12, %rdi
callq 0x2150
movq %rax, %r14
movq %rbx, %rdi
callq 0x2150
leaq (%r14,%rax), %rdi
addq $0x4, %rdi
callq 0x2430
testq %rax, %rax
je 0x8d70
movq %rax, %r14
movq %rbx, %rcx
movq %rax, %rdi
leaq 0x2f1b(%rip), %rsi      # 0xba79
movq %r12, %rdx
xorl %eax, %eax
callq 0x20c0
movq %r14, %rdi
callq 0x2220
cmpl $0x7f, %eax
je 0x8d79
cmpl $-0x1, %eax
je 0x8d8c
movq %r14, %rdi
callq 0x23d0
callq 0x8966
testq %rax, %rax
je 0x8cb0
movq %rax, %r12
movq %rbx, %r14
movq %rbx, %rdi
leaq 0x90(%rsp), %rsi
callq 0x2260
cmpl $-0x1, %eax
je 0x8c87
movq %r12, %rdi
movq %rsp, %rsi
callq 0x2260
cmpl $-0x1, %eax
jne 0x8bd5
callq 0x2060
cmpl $0x2, (%rax)
jne 0x8c93
movq 0x98(%rsp), %rax
cmpq 0x8(%rsp), %rax
je 0x8cb0
movq %rbx, %rbp
movq %rbx, %rdi
leaq 0x18c9(%rip), %rsi      # 0xa4be
callq 0x23b0
testq %rax, %rax
je 0x8c9f
movq %rax, %r14
movq %r12, %rdi
leaq 0x28e5(%rip), %rsi      # 0xb4f5
callq 0x23b0
movq %rax, %r15
testq %rax, %rax
leaq 0x120(%rsp), %r13
pushq $0x1
popq %rbp
jne 0x8c54
leaq 0x2e82(%rip), %rdi      # 0xbab1
movq %r12, %rsi
xorl %eax, %eax
callq 0x2110
jmp 0x8d05
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %r13, %rdi
movq %rbp, %rsi
movq %rax, %rdx
movq %r15, %rcx
callq 0x25c0
movl $0x2000, %edx           # imm = 0x2000
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rcx
callq 0x24e0
testl %eax, %eax
jg 0x8c3e
movq %r14, %rdi
callq 0x2590
testl %eax, %eax
leaq 0x2e4a(%rip), %r12      # 0xbac6
je 0x8cef
leaq 0x2e24(%rip), %rdi      # 0xbaa9
jmp 0x8cfe
leaq 0x2d9d(%rip), %rdi      # 0xba2b
movq %r14, %rsi
jmp 0x8ca9
leaq 0x2d91(%rip), %rdi      # 0xba2b
movq %r12, %rsi
jmp 0x8ca9
leaq 0x27f5(%rip), %rdi      # 0xb49b
movq %rbp, %rsi
xorl %eax, %eax
callq 0x2110
movq 0x6321(%rip), %r15      # 0xefd8
leaq 0x2d41(%rip), %r12      # 0xb9ff
movq 0x630b(%rip), %r14      # 0xefd0
movq (%r15), %rsi
movq %r12, %rdi
callq 0x2360
movq (%r14), %rdi
callq 0x2520
movl %eax, %edi
callq 0x24c0
cmpl $0x6e, %eax
je 0x8abe
cmpl $0x79, %eax
jne 0x8cc5
jmp 0x8d29
movq %r15, %rdi
callq 0x2590
testl %eax, %eax
je 0x8d1c
movq %r12, %rdi
xorl %eax, %eax
callq 0x2110
movq %r14, %rdi
callq 0x2280
testq %r15, %r15
je 0x8cb0
movq %r15, %rdi
callq 0x2280
jmp 0x8cb0
movq %r15, %rdi
callq 0x2280
movq %r14, %rdi
jmp 0x8d15
leaq 0x178e(%rip), %rsi      # 0xa4be
movq %rbx, %rdi
callq 0x23b0
testq %rax, %rax
je 0x8da7
movq %rax, %rdi
callq 0x8dda
testq %rax, %rax
je 0x8d67
movq %rax, %rbx
callq 0x8a11
movq %rbx, %rax
addq $0x2128, %rsp           # imm = 0x2128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2c4c(%rip), %rsi      # 0xb9ba
jmp 0x8dd0
leaq 0x190f(%rip), %rdi      # 0xa686
jmp 0x8dc2
leaq 0x2d0a(%rip), %rdi      # 0xba8a
movq %r14, %rsi
xorl %eax, %eax
callq 0x22e0
jmp 0x8d9d
leaq 0x2cec(%rip), %rdi      # 0xba7f
movq %r14, %rsi
xorl %eax, %eax
callq 0x2110
movq %r14, %rdi
callq 0x23d0
jmp 0x8dc9
leaq 0x26ed(%rip), %rsi      # 0xb49b
pushq $0x1
popq %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2250
leaq 0x2736(%rip), %rdi      # 0xb4f8
xorl %eax, %eax
callq 0x2110
leaq 0x2c1b(%rip), %rsi      # 0xb9eb
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x25a0