// File: /workspace/github_c_makefile_star2_O3/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 0x91c4
movq 0x5e25(%rip), %rax      # 0xefd0
movq (%rax), %rdi
callq 0x94a3
movq %rax, %rbx
testq %rax, %rax
jne 0x9417
jmp 0x942c
callq 0x9048
testl %eax, %eax
je 0x9210
movq 0x5e04(%rip), %r14      # 0xefd8
leaq 0x2826(%rip), %rbx      # 0xba01
movq 0x5dee(%rip), %r15      # 0xefd0
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x2350
movq (%r15), %rdi
callq 0x2510
movl %eax, %edi
callq 0x24b0
cmpl $0x6e, %eax
je 0x9210
cmpl $0x79, %eax
jne 0x91e2
callq 0x90a5
movq %rax, %rbx
jmp 0x9212
xorl %ebx, %ebx
movq 0x5dbf(%rip), %r14      # 0xefd8
leaq 0x2812(%rip), %r12      # 0xba32
movq 0x5da9(%rip), %rbp      # 0xefd0
testq %rbx, %rbx
jne 0x924b
leaq 0x614d(%rip), %rbx      # 0xf380
movq %rbx, %rdi
callq 0x2100
cmpl $-0x1, %eax
je 0x9482
movl %eax, %edi
callq 0x25c0
leaq 0x61ae(%rip), %rax      # 0xf400
movq 0x20(%rax), %r13
testq %r13, %r13
je 0x9262
cmpb $0x0, (%r13)
jne 0x928e
leaq 0x27fe(%rip), %rdi      # 0xba67
callq 0x23f0
movq %rax, %r13
testq %rax, %rax
jne 0x928e
leaq 0x27f1(%rip), %rdi      # 0xba6e
leaq 0x281c(%rip), %r13      # 0xbaa0
movq %r13, %rsi
xorl %eax, %eax
callq 0x22d0
movq %r13, %rdi
callq 0x2150
movq %rax, %r15
movq %rbx, %rdi
callq 0x2150
leaq (%r15,%rax), %rdi
addq $0x4, %rdi
callq 0x2420
testq %rax, %rax
je 0x9435
movq %rax, %r15
movq %rax, %rdi
leaq 0x27e8(%rip), %rsi      # 0xbaac
movq %r13, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x20c0
movq %r15, %rdi
callq 0x2220
cmpl $0x7f, %eax
je 0x943e
cmpl $-0x1, %eax
je 0x9451
movq %r15, %rdi
callq 0x23c0
callq 0x90a5
testq %rax, %rax
je 0x93ae
movq %rax, %r15
movq %rbx, %rdi
leaq 0x90(%rsp), %rsi
callq 0x2260
cmpl $-0x1, %eax
je 0x9388
movq %r15, %rdi
movq %rsp, %rsi
callq 0x2260
cmpl $-0x1, %eax
jne 0x9333
callq 0x2060
cmpl $0x2, (%rax)
jne 0x9391
movq 0x98(%rsp), %rax
cmpq 0x8(%rsp), %rax
je 0x93ae
movq %rbx, %rdi
leaq 0x1172(%rip), %rsi      # 0xa4be
callq 0x23a0
testq %rax, %rax
je 0x939d
movq %rax, %r13
movq %r15, %rdi
leaq 0x2192(%rip), %rsi      # 0xb4f5
callq 0x23a0
testq %rax, %rax
jne 0x93d9
leaq 0x2770(%rip), %rdi      # 0xbae4
movq %r15, %rsi
xorl %eax, %eax
callq 0x2110
movq %r13, %rdi
callq 0x2280
jmp 0x93ae
leaq 0x26cf(%rip), %rdi      # 0xba5e
jmp 0x93a4
leaq 0x26c6(%rip), %rdi      # 0xba5e
movq %r15, %rsi
jmp 0x93a7
leaq 0x20f7(%rip), %rdi      # 0xb49b
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2110
movq (%r14), %rsi
movq %r12, %rdi
callq 0x2350
movq (%rbp), %rdi
callq 0x2510
movl %eax, %edi
callq 0x24b0
cmpl $0x6e, %eax
je 0x9227
cmpl $0x79, %eax
jne 0x93ae
jmp 0x93ee
leaq 0x120(%rsp), %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x25f0
jmp 0x93ae
leaq 0x10c9(%rip), %rsi      # 0xa4be
movq %rbx, %rdi
callq 0x23a0
testq %rax, %rax
je 0x946c
movq %rax, %rdi
callq 0x94a3
testq %rax, %rax
je 0x942c
movq %rax, %rbx
callq 0x9150
movq %rbx, %rax
addq $0x2128, %rsp           # imm = 0x2128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x25ba(%rip), %rsi      # 0xb9ed
jmp 0x9497
leaq 0x124a(%rip), %rdi      # 0xa686
jmp 0x9489
leaq 0x2678(%rip), %rdi      # 0xbabd
movq %r15, %rsi
xorl %eax, %eax
callq 0x22d0
jmp 0x9462
leaq 0x265a(%rip), %rdi      # 0xbab2
movq %r15, %rsi
xorl %eax, %eax
callq 0x2110
movq %r15, %rdi
callq 0x23c0
jmp 0x9490
leaq 0x2028(%rip), %rsi      # 0xb49b
movl $0x1, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2250
leaq 0x206f(%rip), %rdi      # 0xb4f8
xorl %eax, %eax
callq 0x2110
leaq 0x2587(%rip), %rsi      # 0xba1e
movl $0x1, %edi
xorl %eax, %eax
callq 0x2590