#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;

/* Variables and functions */
int /*<<< orphan*/ A_BOLD;
int /*<<< orphan*/ mvwprintw(int /*<<< orphan*/ *, int, int, char const *);
int /*<<< orphan*/ wattroff(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ wattron(int /*<<< orphan*/ *, int /*<<< orphan*/);
void yatzy_ui_print_first_letter_bold(WINDOW *win, int y, int x,
                                      const char *text) {
  char first[2] = {text[0], 0};
  wattron(win, A_BOLD);
  mvwprintw(win, y, x, first);
  wattroff(win, A_BOLD);
  mvwprintw(win, y, x + 1, &(text[1]));
}


x86 assembly (clang, -O0):
<yatzy_ui_print_first_letter_bold>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x1a(%rbp)
movb   $0x0,-0x19(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e82(%rip),%rax
mov    (%rax),%esi
call   1050 <wattron@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    -0x1a(%rbp),%rcx
call   1030 <mvwprintw@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e5d(%rip),%rax
mov    (%rax),%esi
call   1040 <wattroff@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
add    $0x1,%edx
mov    -0x18(%rbp),%rcx
add    $0x1,%rcx
call   1030 <mvwprintw@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yatzy_ui_print_first_letter_bold>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %rcx,%r15
mov    %edx,%ebp
mov    %esi,%r14d
mov    %rdi,%rbx
mov    (%rcx),%al
mov    %al,0xe(%rsp)
movb   $0x0,0xf(%rsp)
mov    0x2e87(%rip),%r12
mov    (%r12),%esi
call   1050 <wattron@plt>
lea    0xe(%rsp),%rcx
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %ebp,%edx
call   1030 <mvwprintw@plt>
mov    (%r12),%esi
mov    %rbx,%rdi
call   1040 <wattroff@plt>
add    $0x1,%ebp
add    $0x1,%r15
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %ebp,%edx
mov    %r15,%rcx
call   1030 <mvwprintw@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@A_BOLD = global i32 0
define void @yatzy_ui_print_first_letter_bold(i32* %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca [2 x i8]
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%10 = getelementptr inbounds [2 x i8], [2 x i8]* %9, i64 0, i64 0
%11 = load i8*, i8** %8
%12 = getelementptr inbounds i8, i8* %11, i64 0
%13 = load i8, i8* %12
store i8 %13, i8* %10
%14 = getelementptr inbounds i8, i8* %10, i64 1
store i8 0, i8* %14
%15 = load i32*, i32** %5
%16 = load i32, i32* @A_BOLD
%17 = call i32 @wattron(i32* %15, i32 %16)
%18 = load i32*, i32** %5
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = getelementptr inbounds [2 x i8], [2 x i8]* %9, i64 0, i64 0
%22 = call i32 @mvwprintw(i32* %18, i32 %19, i32 %20, i8* %21)
%23 = load i32*, i32** %5
%24 = load i32, i32* @A_BOLD
%25 = call i32 @wattroff(i32* %23, i32 %24)
%26 = load i32*, i32** %5
%27 = load i32, i32* %6
%28 = load i32, i32* %7
%29 = add nsw i32 %28, 1
%30 = load i8*, i8** %8
%31 = getelementptr inbounds i8, i8* %30, i64 1
%32 = call i32 @mvwprintw(i32* %26, i32 %27, i32 %29, i8* %31)
ret void
}

LLVM IR (-O2):
@A_BOLD = global i32 0
define void @yatzy_ui_print_first_letter_bold(i32* %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca [2 x i8]
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%7 = load i8, i8* %3
store i8 %7, i8* %6
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 1
store i8 0, i8* %8
%9 = load i32, i32* @A_BOLD
%10 = tail call i32 @wattron(i32* %0, i32 %9)
%11 = call i32 @mvwprintw(i32* %0, i32 %1, i32 %2, i8* %6)
%12 = load i32, i32* @A_BOLD
%13 = call i32 @wattroff(i32* %0, i32 %12)
%14 = add nsw i32 %2, 1
%15 = getelementptr inbounds i8, i8* %3, i64 1
%16 = call i32 @mvwprintw(i32* %0, i32 %1, i32 %14, i8* %15)
ret void
}