#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 */

/* Variables and functions */
int /*<<< orphan*/ mvaddstr(int, int, char *);
int /*<<< orphan*/ mvprintw(int, int, char *, int);
int /*<<< orphan*/ mvscanw(int, int, char *, int *);
int /*<<< orphan*/ refresh();
void dealinput() {
  int a, b;
  while (1) {
    mvaddstr(2, 3, "   ");
    mvscanw(2, 3, "%d", &a);
    mvaddstr(2, 11, "   ");
    mvscanw(2, 11, "%d", &b);
    mvaddstr(2, 18, "    ");
    mvprintw(2, 18, "%d", (a + b));
    refresh();
  }
}


x86 assembly (clang, -O0):
<dealinput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2,%edi
mov    $0x3,%esi
lea    0xeab(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    $0x2,%edi
mov    $0x3,%esi
lea    0xe91(%rip),%rdx
lea    -0x4(%rbp),%rcx
call   1030 <mvscanw@plt>
mov    $0x2,%edi
mov    $0xb,%esi
lea    0xe7b(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    $0x2,%edi
mov    $0xb,%esi
lea    0xe61(%rip),%rdx
lea    -0x8(%rbp),%rcx
call   1030 <mvscanw@plt>
mov    $0x2,%edi
mov    $0x12,%esi
lea    0xe4a(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    -0x4(%rbp),%ecx
add    -0x8(%rbp),%ecx
mov    %ecx,-0xc(%rbp)
mov    $0x2,%edi
mov    $0x12,%esi
lea    0xe28(%rip),%rdx
call   1060 <mvprintw@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
jmp    1148 <dealinput+0x8>

x86 assembly (clang, -O2):
<dealinput>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xeb0(%rip),%r14
lea    0xea5(%rip),%rbx
lea    0xc(%rsp),%r15
lea    0x8(%rsp),%r12
lea    0xe97(%rip),%r13
nopl   0x0(%rax)
mov    $0x2,%edi
mov    $0x3,%esi
mov    %r14,%rdx
call   1050 <mvaddstr@plt>
mov    $0x2,%edi
mov    $0x3,%esi
mov    %rbx,%rdx
mov    %r15,%rcx
call   1030 <mvscanw@plt>
mov    $0x2,%edi
mov    $0xb,%esi
mov    %r14,%rdx
call   1050 <mvaddstr@plt>
mov    $0x2,%edi
mov    $0xb,%esi
mov    %rbx,%rdx
mov    %r12,%rcx
call   1030 <mvscanw@plt>
mov    $0x2,%edi
mov    $0x12,%esi
mov    %r13,%rdx
call   1050 <mvaddstr@plt>
mov    0x8(%rsp),%ecx
add    0xc(%rsp),%ecx
mov    $0x2,%edi
mov    $0x12,%esi
mov    %rbx,%rdx
call   1060 <mvprintw@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
jmp    1170 <dealinput+0x30>

LLVM IR (-O0):
@.str = [4 x i8] c" \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [5 x i8] c" \00"
define void @dealinput() {
%1 = alloca i32
%2 = alloca i32
br label %3
3: ; preds = %0, %3
%4 = call i32 @mvaddstr(i32 2, i32 3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @mvscanw(i32 2, i32 3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = call i32 @mvaddstr(i32 2, i32 11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @mvscanw(i32 2, i32 11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%8 = call i32 @mvaddstr(i32 2, i32 18, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = add nsw i32 %9, %10
%12 = call i32 @mvprintw(i32 2, i32 18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = call i32 (...) @refresh()
br label %3
}

LLVM IR (-O2):
@.str = [4 x i8] c" \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [5 x i8] c" \00"
define void @dealinput() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
br label %5
5: ; preds = %5, %0
%6 = call i32 @mvaddstr(i32 2, i32 3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @mvscanw(i32 2, i32 3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%8 = call i32 @mvaddstr(i32 2, i32 11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @mvscanw(i32 2, i32 11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%10 = call i32 @mvaddstr(i32 2, i32 18, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%11 = load i32, i32* %1
%12 = load i32, i32* %2
%13 = add nsw i32 %12, %11
%14 = call i32 @mvprintw(i32 2, i32 18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %13)
%15 = call i32 (...) @refresh()
br label %5
}