#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*/ addstr(char *);
int /*<<< orphan*/ color_set(int, int /*<<< orphan*/);
int /*<<< orphan*/ move(int, int);
int /*<<< orphan*/ refresh();
int make_square(int color, int x, int y) {
  color_set(color, 0);
  move(x, y);
  addstr("#");
  move(x + 1, y);
  addstr("#");
  move(x + 2, y);
  addstr("#");
  move(x + 3, y);
  addstr("#");
  move(x, y + 6);
  addstr("#");
  move(x + 1, y + 6);
  addstr("#");
  move(x + 2, y + 6);
  addstr("#");
  move(x + 3, y + 6);
  addstr("#");
  move(x, y + 1);
  addstr("#");
  move(x + 3, y + 1);
  addstr("#");
  move(x, y + 2);
  addstr("#");
  move(x + 3, y + 2);
  addstr("#");
  move(x, y + 3);
  addstr("#");
  move(x + 3, y + 3);
  addstr("#");
  move(x, y + 4);
  addstr("#");
  move(x + 3, y + 4);
  addstr("#");
  move(x, y + 5);
  addstr("#");
  move(x + 3, y + 5);
  addstr("#");
  refresh();
}


x86 assembly (clang, -O0):
<make_square>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%edi
xor    %esi,%esi
call   1050 <color_set@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1060 <move@plt>
lea    0xe93(%rip),%rdi
call   1040 <addstr@plt>
mov    -0xc(%rbp),%edi
add    $0x1,%edi
mov    -0x10(%rbp),%esi
call   1060 <move@plt>
lea    0xe79(%rip),%rdi
call   1040 <addstr@plt>
mov    -0xc(%rbp),%edi
add    $0x2,%edi
mov    -0x10(%rbp),%esi
call   1060 <move@plt>
lea    0xe5f(%rip),%rdi
call   1040 <addstr@plt>
mov    -0xc(%rbp),%edi
add    $0x3,%edi
mov    -0x10(%rbp),%esi
call   1060 <move@plt>
lea    0xe45(%rip),%rdi
call   1040 <addstr@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
add    $0x6,%esi
call   1060 <move@plt>
lea    0xe2b(%rip),%rdi
call   1040 <addstr@plt>
mov    -0xc(%rbp),%edi
add    $0x1,%edi
mov    -0x10(%rbp),%esi
add    $0x6,%esi
call   1060 <move@plt>
lea    0xe0e(%rip),%rdi
call   1040 <addstr@plt>
mov    -0xc(%rbp),%edi
add    $0x2,%edi
mov    -0x10(%rbp),%esi
add    $0x6,%esi
call   1060 <move@plt>
lea    0xdf1(%rip),%rdi
call   1040 <addstr@plt>
mov    -0xc(%rbp),%edi
add    $0x3,%edi
mov    -0x10(%rbp),%esi
add    $0x6,%esi
call   1060 <move@plt>
lea    0xdd4(%rip),%rdi
call   1040 <addstr@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
add    $0x1,%esi
call   1060 <move@plt>
lea    0xdba(%rip),%rdi
call   1040 <addstr@plt>
mov    -0xc(%rbp),%edi
add    $0x3,%edi
mov    -0x10(%rbp),%esi
add    $0x1,%esi
call   1060 <move@plt>
lea    0xd9d(%rip),%rdi
call   1040 <addstr@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
add    $0x2,%esi
call   1060 <move@plt>
lea    0xd83(%rip),%rdi
call   1040 <addstr@plt>
mov    -0xc(%rbp),%edi
add    $0x3,%edi
mov    -0x10(%rbp),%esi
add    $0x2,%esi
call   1060 <move@plt>
lea    0xd66(%rip),%rdi
call   1040 <addstr@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
add    $0x3,%esi
call   1060 <move@plt>
lea    0xd4c(%rip),%rdi
call   1040 <addstr@plt>
mov    -0xc(%rbp),%edi
add    $0x3,%edi
mov    -0x10(%rbp),%esi
add    $0x3,%esi
call   1060 <move@plt>
lea    0xd2f(%rip),%rdi
call   1040 <addstr@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
add    $0x4,%esi
call   1060 <move@plt>
lea    0xd15(%rip),%rdi
call   1040 <addstr@plt>
mov    -0xc(%rbp),%edi
add    $0x3,%edi
mov    -0x10(%rbp),%esi
add    $0x4,%esi
call   1060 <move@plt>
lea    0xcf8(%rip),%rdi
call   1040 <addstr@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
add    $0x5,%esi
call   1060 <move@plt>
lea    0xcde(%rip),%rdi
call   1040 <addstr@plt>
mov    -0xc(%rbp),%edi
add    $0x3,%edi
mov    -0x10(%rbp),%esi
add    $0x5,%esi
call   1060 <move@plt>
lea    0xcc1(%rip),%rdi
call   1040 <addstr@plt>
mov    $0x0,%al
call   1030 <refresh@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_square>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%r15d
xor    %esi,%esi
call   1050 <color_set@plt>
mov    %r15d,%edi
mov    %ebx,%esi
call   1060 <move@plt>
lea    0xe98(%rip),%r14
mov    %r14,%rdi
call   1040 <addstr@plt>
lea    0x1(%r15),%edi
mov    %edi,0x4(%rsp)
mov    %ebx,%esi
call   1060 <move@plt>
mov    %r14,%rdi
call   1040 <addstr@plt>
lea    0x2(%r15),%ebp
mov    %ebp,%edi
mov    %ebx,%esi
call   1060 <move@plt>
mov    %r14,%rdi
call   1040 <addstr@plt>
lea    0x3(%r15),%r13d
mov    %r13d,%edi
mov    %ebx,%esi
call   1060 <move@plt>
mov    %r14,%rdi
call   1040 <addstr@plt>
lea    0x6(%rbx),%r12d
mov    %r15d,%edi
mov    %r12d,%esi
call   1060 <move@plt>
mov    %r14,%rdi
call   1040 <addstr@plt>
mov    0x4(%rsp),%edi
mov    %r12d,%esi
call   1060 <move@plt>
mov    %r14,%rdi
call   1040 <addstr@plt>
mov    %ebp,%edi
mov    %r12d,%esi
call   1060 <move@plt>
mov    %r14,%rdi
call   1040 <addstr@plt>
mov    %r13d,%edi
mov    %r12d,%esi
call   1060 <move@plt>
mov    %r14,%rdi
call   1040 <addstr@plt>
lea    0x1(%rbx),%ebp
mov    %r15d,%edi
mov    %ebp,%esi
call   1060 <move@plt>
mov    %r14,%rdi
call   1040 <addstr@plt>
mov    %r13d,%edi
mov    %ebp,%esi
call   1060 <move@plt>
mov    %r14,%rdi
call   1040 <addstr@plt>
lea    0x2(%rbx),%ebp
mov    %r15d,%edi
mov    %ebp,%esi
call   1060 <move@plt>
mov    %r14,%rdi
call   1040 <addstr@plt>
mov    %r13d,%edi
mov    %ebp,%esi
call   1060 <move@plt>
mov    %r14,%rdi
call   1040 <addstr@plt>
lea    0x3(%rbx),%ebp
mov    %r15d,%edi
mov    %ebp,%esi
call   1060 <move@plt>
mov    %r14,%rdi
call   1040 <addstr@plt>
mov    %r13d,%edi
mov    %ebp,%esi
call   1060 <move@plt>
mov    %r14,%rdi
call   1040 <addstr@plt>
lea    0x4(%rbx),%ebp
mov    %r15d,%edi
mov    %ebp,%esi
call   1060 <move@plt>
mov    %r14,%rdi
call   1040 <addstr@plt>
mov    %r13d,%edi
mov    %ebp,%esi
call   1060 <move@plt>
mov    %r14,%rdi
call   1040 <addstr@plt>
add    $0x5,%ebx
mov    %r15d,%edi
mov    %ebx,%esi
call   1060 <move@plt>
mov    %r14,%rdi
call   1040 <addstr@plt>
mov    %r13d,%edi
mov    %ebx,%esi
call   1060 <move@plt>
mov    %r14,%rdi
call   1040 <addstr@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <refresh@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"#\00"
define i32 @make_square(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
%9 = call i32 @color_set(i32 %8, i32 0)
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = call i32 @move(i32 %10, i32 %11)
%13 = call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%14 = load i32, i32* %6
%15 = add nsw i32 %14, 1
%16 = load i32, i32* %7
%17 = call i32 @move(i32 %15, i32 %16)
%18 = call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 2
%21 = load i32, i32* %7
%22 = call i32 @move(i32 %20, i32 %21)
%23 = call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 3
%26 = load i32, i32* %7
%27 = call i32 @move(i32 %25, i32 %26)
%28 = call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%29 = load i32, i32* %6
%30 = load i32, i32* %7
%31 = add nsw i32 %30, 6
%32 = call i32 @move(i32 %29, i32 %31)
%33 = call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%34 = load i32, i32* %6
%35 = add nsw i32 %34, 1
%36 = load i32, i32* %7
%37 = add nsw i32 %36, 6
%38 = call i32 @move(i32 %35, i32 %37)
%39 = call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%40 = load i32, i32* %6
%41 = add nsw i32 %40, 2
%42 = load i32, i32* %7
%43 = add nsw i32 %42, 6
%44 = call i32 @move(i32 %41, i32 %43)
%45 = call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%46 = load i32, i32* %6
%47 = add nsw i32 %46, 3
%48 = load i32, i32* %7
%49 = add nsw i32 %48, 6
%50 = call i32 @move(i32 %47, i32 %49)
%51 = call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%52 = load i32, i32* %6
%53 = load i32, i32* %7
%54 = add nsw i32 %53, 1
%55 = call i32 @move(i32 %52, i32 %54)
%56 = call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%57 = load i32, i32* %6
%58 = add nsw i32 %57, 3
%59 = load i32, i32* %7
%60 = add nsw i32 %59, 1
%61 = call i32 @move(i32 %58, i32 %60)
%62 = call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%63 = load i32, i32* %6
%64 = load i32, i32* %7
%65 = add nsw i32 %64, 2
%66 = call i32 @move(i32 %63, i32 %65)
%67 = call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%68 = load i32, i32* %6
%69 = add nsw i32 %68, 3
%70 = load i32, i32* %7
%71 = add nsw i32 %70, 2
%72 = call i32 @move(i32 %69, i32 %71)
%73 = call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%74 = load i32, i32* %6
%75 = load i32, i32* %7
%76 = add nsw i32 %75, 3
%77 = call i32 @move(i32 %74, i32 %76)
%78 = call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%79 = load i32, i32* %6
%80 = add nsw i32 %79, 3
%81 = load i32, i32* %7
%82 = add nsw i32 %81, 3
%83 = call i32 @move(i32 %80, i32 %82)
%84 = call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%85 = load i32, i32* %6
%86 = load i32, i32* %7
%87 = add nsw i32 %86, 4
%88 = call i32 @move(i32 %85, i32 %87)
%89 = call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%90 = load i32, i32* %6
%91 = add nsw i32 %90, 3
%92 = load i32, i32* %7
%93 = add nsw i32 %92, 4
%94 = call i32 @move(i32 %91, i32 %93)
%95 = call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%96 = load i32, i32* %6
%97 = load i32, i32* %7
%98 = add nsw i32 %97, 5
%99 = call i32 @move(i32 %96, i32 %98)
%100 = call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%101 = load i32, i32* %6
%102 = add nsw i32 %101, 3
%103 = load i32, i32* %7
%104 = add nsw i32 %103, 5
%105 = call i32 @move(i32 %102, i32 %104)
%106 = call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%107 = call i32 (...) @refresh()
%108 = load i32, i32* %4
ret i32 %108
}

LLVM IR (-O2):
@.str = [2 x i8] c"#\00"
define i32 @make_square(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @color_set(i32 %0, i32 0)
%5 = tail call i32 @move(i32 %1, i32 %2)
%6 = tail call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = add nsw i32 %1, 1
%8 = tail call i32 @move(i32 %7, i32 %2)
%9 = tail call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = add nsw i32 %1, 2
%11 = tail call i32 @move(i32 %10, i32 %2)
%12 = tail call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%13 = add nsw i32 %1, 3
%14 = tail call i32 @move(i32 %13, i32 %2)
%15 = tail call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%16 = add nsw i32 %2, 6
%17 = tail call i32 @move(i32 %1, i32 %16)
%18 = tail call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%19 = tail call i32 @move(i32 %7, i32 %16)
%20 = tail call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%21 = tail call i32 @move(i32 %10, i32 %16)
%22 = tail call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%23 = tail call i32 @move(i32 %13, i32 %16)
%24 = tail call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%25 = add nsw i32 %2, 1
%26 = tail call i32 @move(i32 %1, i32 %25)
%27 = tail call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%28 = tail call i32 @move(i32 %13, i32 %25)
%29 = tail call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%30 = add nsw i32 %2, 2
%31 = tail call i32 @move(i32 %1, i32 %30)
%32 = tail call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%33 = tail call i32 @move(i32 %13, i32 %30)
%34 = tail call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%35 = add nsw i32 %2, 3
%36 = tail call i32 @move(i32 %1, i32 %35)
%37 = tail call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%38 = tail call i32 @move(i32 %13, i32 %35)
%39 = tail call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%40 = add nsw i32 %2, 4
%41 = tail call i32 @move(i32 %1, i32 %40)
%42 = tail call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%43 = tail call i32 @move(i32 %13, i32 %40)
%44 = tail call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%45 = add nsw i32 %2, 5
%46 = tail call i32 @move(i32 %1, i32 %45)
%47 = tail call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%48 = tail call i32 @move(i32 %13, i32 %45)
%49 = tail call i32 @addstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%50 = tail call i32 (...) @refresh()
ret i32 undef
}