#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*/ A_BLINK;
int /*<<< orphan*/ A_REVERSE;
int /*<<< orphan*/ COLOR_PAIR(int);
int /*<<< orphan*/ attroff(int /*<<< orphan*/);
void turn_off_attributes() {
  int i;
  for (i = 31; i <= 38; i++)
    attroff(COLOR_PAIR(i));
  attroff(A_BLINK);
  attroff(A_REVERSE);
}


x86 assembly (clang, -O0):
<turn_off_attributes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1f,-0x4(%rbp)
cmpl   $0x26,-0x4(%rbp)
jg     1156 <turn_off_attributes+0x36>
mov    -0x4(%rbp),%edi
call   1040 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <turn_off_attributes+0xf>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
call   1030 <attroff@plt>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
call   1030 <attroff@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<turn_off_attributes>:
push   %rax
mov    $0x1f,%edi
call   1040 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
mov    $0x20,%edi
call   1040 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
mov    $0x21,%edi
call   1040 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
mov    $0x22,%edi
call   1040 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
mov    $0x23,%edi
call   1040 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
mov    $0x24,%edi
call   1040 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
mov    $0x25,%edi
call   1040 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
mov    $0x26,%edi
call   1040 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
mov    0x2e38(%rip),%rax
mov    (%rax),%edi
call   1030 <attroff@plt>
mov    0x2e1a(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1030 <attroff@plt>

LLVM IR (-O0):
@A_BLINK = global i32 0
@A_REVERSE = global i32 0
define void @turn_off_attributes() {
%1 = alloca i32
store i32 31, i32* %1
br label %2
2: ; preds = %9, %0
%3 = load i32, i32* %1
%4 = icmp sle i32 %3, 38
br i1 %4, label %5, label %12
5: ; preds = %2
%6 = load i32, i32* %1
%7 = call i32 @COLOR_PAIR(i32 %6)
%8 = call i32 @attroff(i32 %7)
br label %9
9: ; preds = %5
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 1
store i32 %11, i32* %1
br label %2
12: ; preds = %2
%13 = load i32, i32* @A_BLINK
%14 = call i32 @attroff(i32 %13)
%15 = load i32, i32* @A_REVERSE
%16 = call i32 @attroff(i32 %15)
ret void
}

LLVM IR (-O2):
@A_BLINK = global i32 0
@A_REVERSE = global i32 0
define void @turn_off_attributes() {
%1 = tail call i32 @COLOR_PAIR(i32 31)
%2 = tail call i32 @attroff(i32 %1)
%3 = tail call i32 @COLOR_PAIR(i32 32)
%4 = tail call i32 @attroff(i32 %3)
%5 = tail call i32 @COLOR_PAIR(i32 33)
%6 = tail call i32 @attroff(i32 %5)
%7 = tail call i32 @COLOR_PAIR(i32 34)
%8 = tail call i32 @attroff(i32 %7)
%9 = tail call i32 @COLOR_PAIR(i32 35)
%10 = tail call i32 @attroff(i32 %9)
%11 = tail call i32 @COLOR_PAIR(i32 36)
%12 = tail call i32 @attroff(i32 %11)
%13 = tail call i32 @COLOR_PAIR(i32 37)
%14 = tail call i32 @attroff(i32 %13)
%15 = tail call i32 @COLOR_PAIR(i32 38)
%16 = tail call i32 @attroff(i32 %15)
%17 = load i32, i32* @A_BLINK
%18 = tail call i32 @attroff(i32 %17)
%19 = load i32, i32* @A_REVERSE
%20 = tail call i32 @attroff(i32 %19)
ret void
}