#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_displayed(int, int, char *);
int /*<<< orphan*/ refresh();
void draw_neco(int x, int y, char neco[][11]) {
  int i;
  for (i = 0; i < 4; ++i) {
    mvaddstr_displayed(y + i, x, neco[i]);
  }
  refresh();
}


x86 assembly (clang, -O0):
<draw_neco>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jge    116e <draw_neco+0x4e>
mov    -0x8(%rbp),%edi
add    -0x14(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
movslq -0x14(%rbp),%rax
imul   $0xb,%rax,%rax
add    %rax,%rdx
call   1040 <mvaddstr_displayed@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1139 <draw_neco+0x19>
mov    $0x0,%al
call   1030 <refresh@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_neco>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %esi,%ebp
mov    %edi,%r14d
mov    %esi,%edi
mov    %r14d,%esi
call   1040 <mvaddstr_displayed@plt>
lea    0x1(%rbp),%edi
lea    0xb(%rbx),%rdx
mov    %r14d,%esi
call   1040 <mvaddstr_displayed@plt>
lea    0x2(%rbp),%edi
lea    0x16(%rbx),%rdx
mov    %r14d,%esi
call   1040 <mvaddstr_displayed@plt>
add    $0x3,%ebp
add    $0x21,%rbx
mov    %ebp,%edi
mov    %r14d,%esi
mov    %rbx,%rdx
call   1040 <mvaddstr_displayed@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <refresh@plt>

LLVM IR (-O0):
define void @draw_neco(i32 %0, i32 %1, [11 x i8]* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca [11 x i8]*
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store [11 x i8]* %2, [11 x i8]** %6
store i32 0, i32* %7
br label %8
8: ; preds = %22, %3
%9 = load i32, i32* %7
%10 = icmp slt i32 %9, 4
br i1 %10, label %11, label %25
11: ; preds = %8
%12 = load i32, i32* %5
%13 = load i32, i32* %7
%14 = add nsw i32 %12, %13
%15 = load i32, i32* %4
%16 = load [11 x i8]*, [11 x i8]** %6
%17 = load i32, i32* %7
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [11 x i8], [11 x i8]* %16, i64 %18
%20 = getelementptr inbounds [11 x i8], [11 x i8]* %19, i64 0, i64 0
%21 = call i32 @mvaddstr_displayed(i32 %14, i32 %15, i8* %20)
br label %22
22: ; preds = %11
%23 = load i32, i32* %7
%24 = add nsw i32 %23, 1
store i32 %24, i32* %7
br label %8
25: ; preds = %8
%26 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
define void @draw_neco(i32 %0, i32 %1, [11 x i8]* %2) {
%4 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
%5 = tail call i32 @mvaddstr_displayed(i32 %1, i32 %0, i8* %4)
%6 = add i32 %1, 1
%7 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 1, i64 0
%8 = tail call i32 @mvaddstr_displayed(i32 %6, i32 %0, i8* %7)
%9 = add i32 %1, 2
%10 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 2, i64 0
%11 = tail call i32 @mvaddstr_displayed(i32 %9, i32 %0, i8* %10)
%12 = add i32 %1, 3
%13 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 3, i64 0
%14 = tail call i32 @mvaddstr_displayed(i32 %12, i32 %0, i8* %13)
%15 = tail call i32 (...) @refresh()
ret void
}