#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;
typedef int /*<<< orphan*/ FORM;
typedef int /*<<< orphan*/ FIELD;

/* Variables and functions */
int /*<<< orphan*/ ACS_HLINE;
int /*<<< orphan*/ ACS_VLINE;
int KEY_ENTER;
int KEY_F(int);
int /*<<< orphan*/ O_ACTIVE;
int /*<<< orphan*/ O_EDIT;
int REQ_FIRST_FIELD;
int REQ_VALIDATION;
int /*<<< orphan*/ box(int /*<<< orphan*/ *, int /*<<< orphan*/,
                       int /*<<< orphan*/);
int /*<<< orphan*/ delwin(int /*<<< orphan*/ *);
int /*<<< orphan*/ doupdate();
char *field_buffer(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ field_opts_off(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ form_driver(int /*<<< orphan*/ *, int);
int getch();
scalar_t__ isascii(int);
int /*<<< orphan*/ *new_field(int, int, int, int /*<<< orphan*/,
                              int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ *new_form(int /*<<< orphan*/ **);
int /*<<< orphan*/ *newwin(int, int, int, int);
int /*<<< orphan*/ post_form(int /*<<< orphan*/ *);
int /*<<< orphan*/ set_current_field(int /*<<< orphan*/ *,
                                     int /*<<< orphan*/ *);
int /*<<< orphan*/ set_field_buffer(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                    char *);
int /*<<< orphan*/ set_form_sub(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ set_form_win(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ sscanf(char *, char *, int *);
int /*<<< orphan*/ wclear(int /*<<< orphan*/ *);
int /*<<< orphan*/ wnoutrefresh(int /*<<< orphan*/ *);
int /*<<< orphan*/ wrefresh(int /*<<< orphan*/ *);
int display_input(int field_start_row, int *userptr) {
  FIELD *input_fields[3];
  FORM *form;
  WINDOW *box1_win, *field_win;
  int field_rows = 2;
  int field_cols = 16;
  char *input;
  int ch;
  int rc = 0;
  input_fields[0] = new_field(1, 16, 0, 0, 0, 0);
  input_fields[1] = new_field(1, 3, 1, 0, 0, 0);
  input_fields[2] = NULL;
  set_field_buffer(input_fields[0], 0, "Enter new value");
  field_opts_off(input_fields[0], O_ACTIVE);
  field_opts_off(input_fields[0], O_EDIT);
  box1_win = newwin(field_rows + 2, field_cols + 2, field_start_row - 1, 54);
  field_win = newwin(field_rows, field_cols, field_start_row, 55);
  box(box1_win, ACS_VLINE, ACS_HLINE);
  form = new_form(input_fields);
  set_current_field(form, input_fields[1]);
  set_form_win(form, field_win);
  set_form_sub(form, field_win);
  post_form(form);
  form_driver(form, REQ_FIRST_FIELD);
  wnoutrefresh(box1_win);
  while (1) {
    wnoutrefresh(field_win);
    doupdate();
    ch = getch();
    if (((ch == KEY_ENTER) || (ch == '\n'))) {
      form_driver(form, REQ_VALIDATION);
      input = field_buffer(input_fields[1], 0);
      sscanf(input, "%d", userptr);
      break;
    } else if (((ch == KEY_F(3)) || (ch == 'e') || (ch == 'E'))) {
      rc = 0x8000;
      break;
    } else if (((ch == KEY_F(12)) || (ch == 'q') || (ch == 'Q'))) {
      rc = 0x4000;
      break;
    } else if (isascii(ch))
      form_driver(form, ch);
  }
  wclear(field_win);
  wrefresh(field_win);
  delwin(field_win);
  wclear(box1_win);
  wrefresh(box1_win);
  delwin(box1_win);
  return rc;
}


x86 assembly (clang, -O0):
<display_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2,-0x4c(%rbp)
movl   $0x10,-0x50(%rbp)
movl   $0x0,-0x60(%rbp)
mov    $0x1,%edi
mov    $0x10,%esi
xor    %r9d,%r9d
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1030 <new_field@plt>
mov    %rax,-0x30(%rbp)
mov    $0x1,%edx
mov    $0x3,%esi
xor    %r9d,%r9d
mov    %edx,%edi
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1030 <new_field@plt>
mov    %rax,-0x28(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x30(%rbp),%rdi
xor    %esi,%esi
lea    0xd3a(%rip),%rdx
call   1090 <set_field_buffer@plt>
mov    -0x30(%rbp),%rdi
mov    0x2cfa(%rip),%rax
mov    (%rax),%esi
call   1170 <field_opts_off@plt>
mov    -0x30(%rbp),%rdi
mov    0x2cf8(%rip),%rax
mov    (%rax),%esi
call   1170 <field_opts_off@plt>
mov    -0x4c(%rbp),%edi
add    $0x2,%edi
mov    -0x50(%rbp),%esi
add    $0x2,%esi
mov    -0x4(%rbp),%edx
sub    $0x1,%edx
mov    $0x36,%ecx
call   1060 <newwin@plt>
mov    %rax,-0x40(%rbp)
mov    -0x4c(%rbp),%edi
mov    -0x50(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    $0x37,%ecx
call   1060 <newwin@plt>
mov    %rax,-0x48(%rbp)
mov    -0x40(%rbp),%rdi
mov    0x2c87(%rip),%rax
mov    (%rax),%esi
mov    0x2c8e(%rip),%rax
mov    (%rax),%edx
call   10a0 <box@plt>
lea    -0x30(%rbp),%rdi
call   1140 <new_form@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   10c0 <set_current_field@plt>
mov    -0x38(%rbp),%rdi
mov    -0x48(%rbp),%rsi
call   10d0 <set_form_win@plt>
mov    -0x38(%rbp),%rdi
mov    -0x48(%rbp),%rsi
call   1160 <set_form_sub@plt>
mov    -0x38(%rbp),%rdi
call   1050 <post_form@plt>
mov    -0x38(%rbp),%rdi
mov    0x2c37(%rip),%rax
mov    (%rax),%esi
call   1080 <form_driver@plt>
mov    -0x40(%rbp),%rdi
call   10e0 <wnoutrefresh@plt>
mov    -0x48(%rbp),%rdi
call   10e0 <wnoutrefresh@plt>
mov    $0x0,%al
call   1130 <doupdate@plt>
mov    $0x0,%al
call   1110 <getch@plt>
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
mov    0x2beb(%rip),%rcx
cmp    (%rcx),%eax
je     13cf <display_input+0x17f>
cmpl   $0xa,-0x5c(%rbp)
jne    1409 <display_input+0x1b9>
mov    -0x38(%rbp),%rdi
mov    0x2c0e(%rip),%rax
mov    (%rax),%esi
call   1080 <form_driver@plt>
mov    -0x28(%rbp),%rdi
xor    %esi,%esi
call   10f0 <field_buffer@plt>
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xc11(%rip),%rsi
call   1100 <sscanf@plt>
jmp    14b5 <display_input+0x265>
mov    -0x5c(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    $0x3,%edi
call   1070 <KEY_F@plt>
mov    %eax,%ecx
mov    -0x64(%rbp),%eax
cmp    %ecx,%eax
je     143a <display_input+0x1ea>
cmpl   $0x65,-0x5c(%rbp)
je     143a <display_input+0x1ea>
cmpl   $0x45,-0x5c(%rbp)
jne    1446 <display_input+0x1f6>
movl   $0x8000,-0x60(%rbp)
jmp    14b5 <display_input+0x265>
mov    -0x5c(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    $0xc,%edi
call   1070 <KEY_F@plt>
mov    %eax,%ecx
mov    -0x68(%rbp),%eax
cmp    %ecx,%eax
je     1477 <display_input+0x227>
cmpl   $0x71,-0x5c(%rbp)
je     1477 <display_input+0x227>
cmpl   $0x51,-0x5c(%rbp)
jne    1483 <display_input+0x233>
movl   $0x4000,-0x60(%rbp)
jmp    14b5 <display_input+0x265>
mov    -0x5c(%rbp),%edi
call   1150 <isascii@plt>
cmp    $0x0,%rax
je     14a1 <display_input+0x251>
mov    -0x38(%rbp),%rdi
mov    -0x5c(%rbp),%esi
call   1080 <form_driver@plt>
jmp    14a6 <display_input+0x256>
jmp    14ab <display_input+0x25b>
jmp    14b0 <display_input+0x260>
jmp    1399 <display_input+0x149>
mov    -0x48(%rbp),%rdi
call   1120 <wclear@plt>
mov    -0x48(%rbp),%rdi
call   1040 <wrefresh@plt>
mov    -0x48(%rbp),%rdi
call   10b0 <delwin@plt>
mov    -0x40(%rbp),%rdi
call   1120 <wclear@plt>
mov    -0x40(%rbp),%rdi
call   1040 <wrefresh@plt>
mov    -0x40(%rbp),%rdi
call   10b0 <delwin@plt>
mov    -0x60(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_input>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rsi,0x18(%rsp)
mov    %edi,%ebx
mov    $0x1,%edi
mov    $0x10,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <new_field@plt>
mov    %rax,%rbp
mov    %rax,(%rsp)
mov    $0x1,%edi
mov    $0x3,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <new_field@plt>
mov    %rax,0x8(%rsp)
movq   $0x0,0x10(%rsp)
lea    0xd4a(%rip),%rdx
mov    %rbp,%rdi
xor    %esi,%esi
call   1090 <set_field_buffer@plt>
mov    0x2d09(%rip),%rax
mov    (%rax),%esi
mov    %rbp,%rdi
call   1170 <field_opts_off@plt>
mov    0x2d08(%rip),%rax
mov    (%rax),%esi
mov    %rbp,%rdi
call   1170 <field_opts_off@plt>
lea    -0x1(%rbx),%edx
mov    $0x4,%edi
mov    $0x12,%esi
mov    $0x36,%ecx
call   1060 <newwin@plt>
mov    %rax,%rbp
mov    $0x2,%edi
mov    $0x10,%esi
mov    %ebx,%edx
mov    $0x37,%ecx
call   1060 <newwin@plt>
mov    %rax,%r12
mov    0x2c9c(%rip),%rax
mov    (%rax),%esi
mov    0x2ca3(%rip),%rax
mov    (%rax),%edx
mov    %rbp,%rdi
call   10a0 <box@plt>
mov    %rsp,%rdi
call   1140 <new_form@plt>
mov    %rax,%r13
mov    0x8(%rsp),%rsi
mov    %rax,%rdi
call   10c0 <set_current_field@plt>
mov    %r13,%rdi
mov    %r12,%rsi
call   10d0 <set_form_win@plt>
mov    %r13,%rdi
mov    %r12,%rsi
call   1160 <set_form_sub@plt>
mov    %r13,%rdi
call   1050 <post_form@plt>
mov    0x2c54(%rip),%rax
mov    (%rax),%esi
mov    %r13,%rdi
call   1080 <form_driver@plt>
mov    %rbp,0x20(%rsp)
mov    %rbp,%rdi
call   10e0 <wnoutrefresh@plt>
mov    %r12,%rdi
call   10e0 <wnoutrefresh@plt>
xor    %eax,%eax
call   1130 <doupdate@plt>
xor    %eax,%eax
call   1110 <getch@plt>
cmp    $0xa,%eax
je     143b <display_input+0x1eb>
mov    %eax,%r15d
mov    0x2bfc(%rip),%r14
cmp    (%r14),%r15d
je     143b <display_input+0x1eb>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x3,%edi
call   1070 <KEY_F@plt>
mov    %r15d,%ebp
and    $0xffffffdf,%ebp
mov    $0x8000,%ebx
cmp    $0x45,%ebp
je     146e <display_input+0x21e>
cmp    %eax,%r15d
je     146e <display_input+0x21e>
mov    $0xc,%edi
call   1070 <KEY_F@plt>
mov    $0x4000,%ebx
cmp    $0x51,%ebp
je     146e <display_input+0x21e>
cmp    %eax,%r15d
je     146e <display_input+0x21e>
mov    %r15d,%edi
call   1150 <isascii@plt>
test   %rax,%rax
je     1418 <display_input+0x1c8>
mov    %r13,%rdi
mov    %r15d,%esi
call   1080 <form_driver@plt>
mov    %r12,%rdi
call   10e0 <wnoutrefresh@plt>
xor    %eax,%eax
call   1130 <doupdate@plt>
xor    %eax,%eax
call   1110 <getch@plt>
cmp    $0xa,%eax
je     143b <display_input+0x1eb>
mov    %eax,%r15d
cmp    (%r14),%r15d
jne    13c0 <display_input+0x170>
mov    0x2ba6(%rip),%rax
mov    (%rax),%esi
mov    %r13,%rdi
call   1080 <form_driver@plt>
mov    0x8(%rsp),%rdi
xor    %esi,%esi
call   10f0 <field_buffer@plt>
lea    0xbb1(%rip),%rsi
mov    %rax,%rdi
mov    0x18(%rsp),%rdx
call   1100 <sscanf@plt>
xor    %ebx,%ebx
mov    %r12,%rdi
call   1120 <wclear@plt>
mov    %r12,%rdi
call   1040 <wrefresh@plt>
mov    %r12,%rdi
call   10b0 <delwin@plt>
mov    0x20(%rsp),%rbp
mov    %rbp,%rdi
call   1120 <wclear@plt>
mov    %rbp,%rdi
call   1040 <wrefresh@plt>
mov    %rbp,%rdi
call   10b0 <delwin@plt>
mov    %ebx,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Enter new value\00"
@O_ACTIVE = global i32 0
@O_EDIT = global i32 0
@ACS_VLINE = global i32 0
@ACS_HLINE = global i32 0
@REQ_FIRST_FIELD = global i32 0
@KEY_ENTER = global i32 0
@REQ_VALIDATION = global i32 0
@.str.1 = [3 x i8] c"%d\00"
define i32 @display_input(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca [3 x i32*]
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
store i32 2, i32* %9
store i32 16, i32* %10
store i32 0, i32* %13
%14 = call i32* @new_field(i32 1, i32 16, i32 0, i32 0, i32 0, i32 0)
%15 = getelementptr inbounds [3 x i32*], [3 x i32*]* %5, i64 0, i64 0
store i32* %14, i32** %15
%16 = call i32* @new_field(i32 1, i32 3, i32 1, i32 0, i32 0, i32 0)
%17 = getelementptr inbounds [3 x i32*], [3 x i32*]* %5, i64 0, i64 1
store i32* %16, i32** %17
%18 = getelementptr inbounds [3 x i32*], [3 x i32*]* %5, i64 0, i64 2
store i32* null, i32** %18
%19 = getelementptr inbounds [3 x i32*], [3 x i32*]* %5, i64 0, i64 0
%20 = load i32*, i32** %19
%21 = call i32 @set_field_buffer(i32* %20, i32 0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%22 = getelementptr inbounds [3 x i32*], [3 x i32*]* %5, i64 0, i64 0
%23 = load i32*, i32** %22
%24 = load i32, i32* @O_ACTIVE
%25 = call i32 @field_opts_off(i32* %23, i32 %24)
%26 = getelementptr inbounds [3 x i32*], [3 x i32*]* %5, i64 0, i64 0
%27 = load i32*, i32** %26
%28 = load i32, i32* @O_EDIT
%29 = call i32 @field_opts_off(i32* %27, i32 %28)
%30 = load i32, i32* %9
%31 = add nsw i32 %30, 2
%32 = load i32, i32* %10
%33 = add nsw i32 %32, 2
%34 = load i32, i32* %3
%35 = sub nsw i32 %34, 1
%36 = call i32* @newwin(i32 %31, i32 %33, i32 %35, i32 54)
store i32* %36, i32** %7
%37 = load i32, i32* %9
%38 = load i32, i32* %10
%39 = load i32, i32* %3
%40 = call i32* @newwin(i32 %37, i32 %38, i32 %39, i32 55)
store i32* %40, i32** %8
%41 = load i32*, i32** %7
%42 = load i32, i32* @ACS_VLINE
%43 = load i32, i32* @ACS_HLINE
%44 = call i32 @box(i32* %41, i32 %42, i32 %43)
%45 = getelementptr inbounds [3 x i32*], [3 x i32*]* %5, i64 0, i64 0
%46 = call i32* @new_form(i32** %45)
store i32* %46, i32** %6
%47 = load i32*, i32** %6
%48 = getelementptr inbounds [3 x i32*], [3 x i32*]* %5, i64 0, i64 1
%49 = load i32*, i32** %48
%50 = call i32 @set_current_field(i32* %47, i32* %49)
%51 = load i32*, i32** %6
%52 = load i32*, i32** %8
%53 = call i32 @set_form_win(i32* %51, i32* %52)
%54 = load i32*, i32** %6
%55 = load i32*, i32** %8
%56 = call i32 @set_form_sub(i32* %54, i32* %55)
%57 = load i32*, i32** %6
%58 = call i32 @post_form(i32* %57)
%59 = load i32*, i32** %6
%60 = load i32, i32* @REQ_FIRST_FIELD
%61 = call i32 @form_driver(i32* %59, i32 %60)
%62 = load i32*, i32** %7
%63 = call i32 @wnoutrefresh(i32* %62)
br label %64
64: ; preds = %2, %118
%65 = load i32*, i32** %8
%66 = call i32 @wnoutrefresh(i32* %65)
%67 = call i32 (...) @doupdate()
%68 = call i32 (...) @getch()
store i32 %68, i32* %12
%69 = load i32, i32* %12
%70 = load i32, i32* @KEY_ENTER
%71 = icmp eq i32 %69, %70
br i1 %71, label %75, label %72
72: ; preds = %64
%73 = load i32, i32* %12
%74 = icmp eq i32 %73, 10
br i1 %74, label %75, label %85
75: ; preds = %72, %64
%76 = load i32*, i32** %6
%77 = load i32, i32* @REQ_VALIDATION
%78 = call i32 @form_driver(i32* %76, i32 %77)
%79 = getelementptr inbounds [3 x i32*], [3 x i32*]* %5, i64 0, i64 1
%80 = load i32*, i32** %79
%81 = call i8* @field_buffer(i32* %80, i32 0)
store i8* %81, i8** %11
%82 = load i8*, i8** %11
%83 = load i32*, i32** %4
%84 = call i32 @sscanf(i8* %82, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %83)
br label %119
85: ; preds = %72
%86 = load i32, i32* %12
%87 = call i32 @KEY_F(i32 3)
%88 = icmp eq i32 %86, %87
br i1 %88, label %95, label %89
89: ; preds = %85
%90 = load i32, i32* %12
%91 = icmp eq i32 %90, 101
br i1 %91, label %95, label %92
92: ; preds = %89
%93 = load i32, i32* %12
%94 = icmp eq i32 %93, 69
br i1 %94, label %95, label %96
95: ; preds = %92, %89, %85
store i32 32768, i32* %13
br label %119
96: ; preds = %92
%97 = load i32, i32* %12
%98 = call i32 @KEY_F(i32 12)
%99 = icmp eq i32 %97, %98
br i1 %99, label %106, label %100
100: ; preds = %96
%101 = load i32, i32* %12
%102 = icmp eq i32 %101, 113
br i1 %102, label %106, label %103
103: ; preds = %100
%104 = load i32, i32* %12
%105 = icmp eq i32 %104, 81
br i1 %105, label %106, label %107
106: ; preds = %103, %100, %96
store i32 16384, i32* %13
br label %119
107: ; preds = %103
%108 = load i32, i32* %12
%109 = call i64 @isascii(i32 %108)
%110 = icmp ne i64 %109, 0
br i1 %110, label %111, label %115
111: ; preds = %107
%112 = load i32*, i32** %6
%113 = load i32, i32* %12
%114 = call i32 @form_driver(i32* %112, i32 %113)
br label %115
115: ; preds = %111, %107
br label %116
116: ; preds = %115
br label %117
117: ; preds = %116
br label %118
118: ; preds = %117
br label %64
119: ; preds = %106, %95, %75
%120 = load i32*, i32** %8
%121 = call i32 @wclear(i32* %120)
%122 = load i32*, i32** %8
%123 = call i32 @wrefresh(i32* %122)
%124 = load i32*, i32** %8
%125 = call i32 @delwin(i32* %124)
%126 = load i32*, i32** %7
%127 = call i32 @wclear(i32* %126)
%128 = load i32*, i32** %7
%129 = call i32 @wrefresh(i32* %128)
%130 = load i32*, i32** %7
%131 = call i32 @delwin(i32* %130)
%132 = load i32, i32* %13
ret i32 %132
}

LLVM IR (-O2):
@.str = [16 x i8] c"Enter new value\00"
@O_ACTIVE = global i32 0
@O_EDIT = global i32 0
@ACS_VLINE = global i32 0
@ACS_HLINE = global i32 0
@REQ_FIRST_FIELD = global i32 0
@KEY_ENTER = global i32 0
@REQ_VALIDATION = global i32 0
@.str.1 = [3 x i8] c"%d\00"
define i32 @display_input(i32 %0, i32* %1) {
%3 = alloca [3 x i32*]
%4 = bitcast [3 x i32*]* %3 to i8*
%5 = tail call i32* @new_field(i32 1, i32 16, i32 0, i32 0, i32 0, i32 0)
%6 = getelementptr inbounds [3 x i32*], [3 x i32*]* %3, i64 0, i64 0
store i32* %5, i32** %6
%7 = tail call i32* @new_field(i32 1, i32 3, i32 1, i32 0, i32 0, i32 0)
%8 = getelementptr inbounds [3 x i32*], [3 x i32*]* %3, i64 0, i64 1
store i32* %7, i32** %8
%9 = getelementptr inbounds [3 x i32*], [3 x i32*]* %3, i64 0, i64 2
store i32* null, i32** %9
%10 = tail call i32 @set_field_buffer(i32* %5, i32 0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @O_ACTIVE
%12 = tail call i32 @field_opts_off(i32* %5, i32 %11)
%13 = load i32, i32* @O_EDIT
%14 = tail call i32 @field_opts_off(i32* %5, i32 %13)
%15 = add nsw i32 %0, -1
%16 = tail call i32* @newwin(i32 4, i32 18, i32 %15, i32 54)
%17 = tail call i32* @newwin(i32 2, i32 16, i32 %0, i32 55)
%18 = load i32, i32* @ACS_VLINE
%19 = load i32, i32* @ACS_HLINE
%20 = tail call i32 @box(i32* %16, i32 %18, i32 %19)
%21 = call i32* @new_form(i32** %6)
%22 = load i32*, i32** %8
%23 = call i32 @set_current_field(i32* %21, i32* %22)
%24 = call i32 @set_form_win(i32* %21, i32* %17)
%25 = call i32 @set_form_sub(i32* %21, i32* %17)
%26 = call i32 @post_form(i32* %21)
%27 = load i32, i32* @REQ_FIRST_FIELD
%28 = call i32 @form_driver(i32* %21, i32 %27)
%29 = call i32 @wnoutrefresh(i32* %16)
%30 = call i32 @wnoutrefresh(i32* %17)
%31 = call i32 (...) @doupdate()
%32 = call i32 (...) @getch()
%33 = load i32, i32* @KEY_ENTER
%34 = icmp eq i32 %32, %33
%35 = icmp eq i32 %32, 10
%36 = or i1 %35, %34
br i1 %36, label %37, label %43
37: ; preds = %60, %2
%38 = load i32, i32* @REQ_VALIDATION
%39 = call i32 @form_driver(i32* %21, i32 %38)
%40 = load i32*, i32** %8
%41 = call i8* @field_buffer(i32* %40, i32 0)
%42 = call i32 @sscanf(i8* %41, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
br label %68
43: ; preds = %2, %60
%44 = phi i32 [ %63, %60 ], [ %32, %2 ]
%45 = call i32 @KEY_F(i32 3)
%46 = icmp eq i32 %44, %45
%47 = and i32 %44, -33
%48 = icmp eq i32 %47, 69
%49 = or i1 %48, %46
br i1 %49, label %68, label %50
50: ; preds = %43
%51 = call i32 @KEY_F(i32 12)
%52 = icmp eq i32 %44, %51
%53 = icmp eq i32 %47, 81
%54 = or i1 %53, %52
br i1 %54, label %68, label %55
55: ; preds = %50
%56 = call i64 @isascii(i32 %44)
%57 = icmp eq i64 %56, 0
br i1 %57, label %60, label %58
58: ; preds = %55
%59 = call i32 @form_driver(i32* %21, i32 %44)
br label %60
60: ; preds = %55, %58
%61 = call i32 @wnoutrefresh(i32* %17)
%62 = call i32 (...) @doupdate()
%63 = call i32 (...) @getch()
%64 = load i32, i32* @KEY_ENTER
%65 = icmp eq i32 %63, %64
%66 = icmp eq i32 %63, 10
%67 = or i1 %66, %65
br i1 %67, label %37, label %43
68: ; preds = %50, %43, %37
%69 = phi i32 [ 0, %37 ], [ 16384, %50 ], [ 32768, %43 ]
%70 = call i32 @wclear(i32* %17)
%71 = call i32 @wrefresh(i32* %17)
%72 = call i32 @delwin(i32* %17)
%73 = call i32 @wclear(i32* %16)
%74 = call i32 @wrefresh(i32* %16)
%75 = call i32 @delwin(i32* %16)
ret i32 %69
}