// File: /workspace/github_c_makefile_star2_O1/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 0x9354
movq 0x5c95(%rip), %rax      # 0xefd0
movq (%rax), %rdi
callq 0x96d4
movq %rax, %rbx
testq %rax, %rax
jne 0x968d
jmp 0x96a2
callq 0x91d8
testl %eax, %eax
je 0x93a0
movq 0x5c74(%rip), %r14      # 0xefd8
leaq 0x2686(%rip), %rbx      # 0xb9f1
movq 0x5c5e(%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 0x93a0
cmpl $0x79, %eax
jne 0x9372
callq 0x9235
movq %rax, %rbx
jmp 0x93a2
xorl %ebx, %ebx
leaq 0x2679(%rip), %r15      # 0xba22
leaq 0x120(%rsp), %r14
testq %rbx, %rbx
jne 0x93d5
leaq 0x5fc3(%rip), %rbx      # 0xf380
movq %rbx, %rdi
callq 0x2100
cmpl $-0x1, %eax
je 0x94aa
movl %eax, %edi
callq 0x25c0
leaq 0x6024(%rip), %rax      # 0xf400
movq 0x20(%rax), %r13
testq %r13, %r13
je 0x93ec
cmpb $0x0, (%r13)
jne 0x9418
leaq 0x2664(%rip), %rdi      # 0xba57
callq 0x23f0
movq %rax, %r13
testq %rax, %rax
jne 0x9418
leaq 0x2657(%rip), %rdi      # 0xba5e
leaq 0x2682(%rip), %r13      # 0xba90
movq %r13, %rsi
xorl %eax, %eax
callq 0x22d0
movq %r13, %rdi
callq 0x2150
movq %rax, %r12
movq %rbx, %rdi
callq 0x2150
leaq (%r12,%rax), %rdi
addq $0x4, %rdi
callq 0x2420
testq %rax, %rax
je 0x947c
movq %rax, %r12
movq %rax, %rdi
leaq 0x2652(%rip), %rsi      # 0xba9c
movq %r13, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x20c0
movq %r12, %rdi
callq 0x2220
cmpl $0x7f, %eax
je 0x9485
cmpl $-0x1, %eax
jne 0x94a0
leaq 0x2632(%rip), %rdi      # 0xbaa2
movq %r12, %rsi
xorl %eax, %eax
callq 0x2110
jmp 0x9496
leaq 0x121f(%rip), %rdi      # 0xa6a2
jmp 0x94b1
leaq 0x2621(%rip), %rdi      # 0xbaad
movq %r12, %rsi
xorl %eax, %eax
callq 0x22d0
movq %r12, %rdi
callq 0x23c0
jmp 0x94b8
movq %r12, %rdi
callq 0x23c0
jmp 0x94ba
leaq 0x2067(%rip), %rdi      # 0xb518
xorl %eax, %eax
callq 0x2110
xorl %ebx, %ebx
testq %rbx, %rbx
je 0x96ab
callq 0x9235
testq %rax, %rax
je 0x95e8
movq %rax, %r12
movq %rbx, %rdi
leaq 0x90(%rsp), %rsi
callq 0x2260
cmpl $-0x1, %eax
je 0x9587
movq %r12, %rdi
movq %rsp, %rsi
callq 0x2260
cmpl $-0x1, %eax
jne 0x950b
callq 0x2060
cmpl $0x2, (%rax)
jne 0x9590
movq 0x98(%rsp), %rax
cmpq 0x8(%rsp), %rax
je 0x95e8
movq %rbx, %rdi
leaq 0xfb2(%rip), %rsi       # 0xa4da
callq 0x23a0
testq %rax, %rax
je 0x95b8
movq %rax, %r13
movq %r12, %rdi
leaq 0x1fd2(%rip), %rsi      # 0xb515
callq 0x23a0
testq %rax, %rax
je 0x9622
movq %rax, %rbp
movl $0x1, %esi
movl $0x2000, %edx           # imm = 0x2000
movq %r14, %rdi
movq %r13, %rcx
callq 0x24d0
testl %eax, %eax
jle 0x959c
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl $0x1, %esi
movq %r14, %rdi
movq %rax, %rdx
movq %rbp, %rcx
callq 0x25b0
jmp 0x9554
leaq 0x24c0(%rip), %rdi      # 0xba4e
jmp 0x95bf
leaq 0x24b7(%rip), %rdi      # 0xba4e
movq %r12, %rsi
jmp 0x95c2
movq %r13, %rdi
callq 0x2580
testl %eax, %eax
je 0x9635
leaq 0x2519(%rip), %rdi      # 0xbacc
jmp 0x9648
leaq 0x1efc(%rip), %rdi      # 0xb4bb
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2110
xorl %r13d, %r13d
xorl %ebp, %ebp
testq %r13, %r13
je 0x95db
movq %r13, %rdi
callq 0x2280
testq %rbp, %rbp
je 0x95e8
movq %rbp, %rdi
callq 0x2280
movq 0x59e9(%rip), %r12      # 0xefd8
movq 0x59da(%rip), %r13      # 0xefd0
movq (%r12), %rsi
movq %r15, %rdi
callq 0x2350
movq (%r13), %rdi
callq 0x2510
movl %eax, %edi
callq 0x24b0
cmpl $0x6e, %eax
je 0x93b1
cmpl $0x79, %eax
jne 0x95f6
jmp 0x9664
leaq 0x24ab(%rip), %rdi      # 0xbad4
movq %r12, %rsi
xorl %eax, %eax
callq 0x2110
jmp 0x95cc
movq %rbp, %rdi
callq 0x2580
testl %eax, %eax
je 0x9654
leaq 0x24a1(%rip), %rdi      # 0xbae9
xorl %eax, %eax
callq 0x2110
jmp 0x95ce
movq %rbp, %rdi
callq 0x2280
movq %r13, %rbp
jmp 0x95e0
leaq 0xe6f(%rip), %rsi       # 0xa4da
movq %rbx, %rdi
callq 0x23a0
testq %rax, %rax
je 0x96be
movq %rax, %rdi
callq 0x96d4
testq %rax, %rax
je 0x96a2
movq %rax, %rbx
callq 0x92e0
movq %rbx, %rax
addq $0x2128, %rsp           # imm = 0x2128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2334(%rip), %rsi      # 0xb9dd
jmp 0x96b2
leaq 0x235c(%rip), %rsi      # 0xba0e
movl $0x1, %edi
xorl %eax, %eax
callq 0x2590
leaq 0x1df6(%rip), %rsi      # 0xb4bb
movl $0x1, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2250