#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*/ drawstr(char *, int /*<<< orphan*/, int, int);
int /*<<< orphan*/ put_ch(int);
int /*<<< orphan*/ setcurs(int, int);
void draw_2p_menu_decor(int pl, int x, int y) {
  x++;
  drawstr("\\l\\x", 0, x, y - 1);
  y += 2;
  setcurs(x - 1, y);
  put_ch(pl + '0');
  drawstr("P\\x\\2m", 0, x, y);
}


x86 assembly (clang, -O0):
<draw_2p_menu_decor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
lea    0xea6(%rip),%rdi
xor    %esi,%esi
call   1030 <drawstr@plt>
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
call   1040 <setcurs@plt>
mov    -0x4(%rbp),%edi
add    $0x30,%edi
call   1050 <put_ch@plt>
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xe75(%rip),%rdi
xor    %esi,%esi
call   1030 <drawstr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_2p_menu_decor>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%ebp
lea    0x1(%r14),%r15d
lea    -0x1(%rbx),%ecx
lea    0xeb4(%rip),%rdi
xor    %esi,%esi
mov    %r15d,%edx
call   1030 <drawstr@plt>
add    $0x2,%ebx
mov    %r14d,%edi
mov    %ebx,%esi
call   1040 <setcurs@plt>
add    $0x30,%ebp
mov    %ebp,%edi
call   1050 <put_ch@plt>
lea    0xe91(%rip),%rdi
xor    %esi,%esi
mov    %r15d,%edx
mov    %ebx,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <drawstr@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\\l\\x\00"
@.str.1 = [7 x i8] c"P\\x\\2m\00"
define void @draw_2p_menu_decor(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = add nsw i32 %7, 1
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = sub nsw i32 %10, 1
%12 = call i32 @drawstr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0, i32 %9, i32 %11)
%13 = load i32, i32* %6
%14 = add nsw i32 %13, 2
store i32 %14, i32* %6
%15 = load i32, i32* %5
%16 = sub nsw i32 %15, 1
%17 = load i32, i32* %6
%18 = call i32 @setcurs(i32 %16, i32 %17)
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 48
%21 = call i32 @put_ch(i32 %20)
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = call i32 @drawstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 %22, i32 %23)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\\l\\x\00"
@.str.1 = [7 x i8] c"P\\x\\2m\00"
define void @draw_2p_menu_decor(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, 1
%5 = add nsw i32 %2, -1
%6 = tail call i32 @drawstr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0, i32 %4, i32 %5)
%7 = add nsw i32 %2, 2
%8 = tail call i32 @setcurs(i32 %1, i32 %7)
%9 = add nsw i32 %0, 48
%10 = tail call i32 @put_ch(i32 %9)
%11 = tail call i32 @drawstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 %4, i32 %7)
ret void
}