#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ mvwprintw(int /*<<< orphan*/ *, int /*<<< orphan*/,
                             int /*<<< orphan*/, char *);
int /*<<< orphan*/ mvwscanw(int /*<<< orphan*/ *, int /*<<< orphan*/, int,
                            char *, char **);
int /*<<< orphan*/ wdeleteln(int /*<<< orphan*/ *);
int /*<<< orphan*/ wrefresh(int /*<<< orphan*/ *);
char *get_string(WINDOW *my_win) {
  static char input[26] = {0};
  mvwscanw(my_win, 0, 7, "%25c", &input);
  wdeleteln(my_win);
  mvwprintw(my_win, 0, 0, "Input: ");
  wrefresh(my_win);
  return input;
}


x86 assembly (clang, -O0):
<get_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x7,%edx
lea    0xea2(%rip),%rcx
lea    0x2eeb(%rip),%r8
call   1050 <mvwscanw@plt>
mov    -0x8(%rbp),%rdi
call   1030 <wdeleteln@plt>
mov    -0x8(%rbp),%rdi
xor    %edx,%edx
lea    0xe85(%rip),%rcx
mov    %edx,%esi
call   1060 <mvwprintw@plt>
mov    -0x8(%rbp),%rdi
call   1040 <wrefresh@plt>
lea    0x2eb9(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_string>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xeb2(%rip),%rcx
lea    0x2efb(%rip),%r14
xor    %esi,%esi
mov    $0x7,%edx
mov    %r14,%r8
call   1050 <mvwscanw@plt>
mov    %rbx,%rdi
call   1030 <wdeleteln@plt>
lea    0xe92(%rip),%rcx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1060 <mvwprintw@plt>
mov    %rbx,%rdi
call   1040 <wrefresh@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@get_string.input = internal global [26 x i8] zeroinitializer
@.str = [5 x i8] c"%25c\00"
@.str.1 = [8 x i8] c"Input: \00"
define i8* @get_string(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @mvwscanw(i32* %3, i32 0, i32 7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** bitcast ([26 x i8]* @get_string.input to i8**))
%5 = load i32*, i32** %2
%6 = call i32 @wdeleteln(i32* %5)
%7 = load i32*, i32** %2
%8 = call i32 @mvwprintw(i32* %7, i32 0, i32 0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%9 = load i32*, i32** %2
%10 = call i32 @wrefresh(i32* %9)
ret i8* getelementptr inbounds ([26 x i8], [26 x i8]* @get_string.input, i64 0, i64 0)
}

LLVM IR (-O2):
@get_string.input = internal global [26 x i8] zeroinitializer
@.str = [5 x i8] c"%25c\00"
@.str.1 = [8 x i8] c"Input: \00"
define i8* @get_string(i32* %0) {
%2 = tail call i32 @mvwscanw(i32* %0, i32 0, i32 7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** bitcast ([26 x i8]* @get_string.input to i8**))
%3 = tail call i32 @wdeleteln(i32* %0)
%4 = tail call i32 @mvwprintw(i32* %0, i32 0, i32 0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @wrefresh(i32* %0)
ret i8* getelementptr inbounds ([26 x i8], [26 x i8]* @get_string.input, i64 0, i64 0)
}