#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 CharsetISO_8859_1ToMac(int);
int CharsetMacToISO_8859_1(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void CharsetCheck() {
  int i;
  for (i = 0x00; i <= 0xff; i++) {
    if (i != CharsetISO_8859_1ToMac(CharsetMacToISO_8859_1(i))) {
      fprintf(stderr, "MacToISO_8859_1 0x%x not unique\n", i);
    }
  }
  for (i = 0x00; i <= 0xff; i++) {
    if (i != CharsetMacToISO_8859_1(CharsetISO_8859_1ToMac(i))) {
      fprintf(stderr, "ISO_8859_1ToMac 0x%x not unique\n", i);
    }
  }
}


x86 assembly (clang, -O0):
<CharsetCheck>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xff,-0x4(%rbp)
jg     1199 <CharsetCheck+0x69>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <CharsetMacToISO_8859_1@plt>
mov    %eax,%edi
call   1030 <CharsetISO_8859_1ToMac@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
je     1186 <CharsetCheck+0x56>
mov    0x2e6b(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xe7f(%rip),%rsi
call   1040 <fprintf@plt>
jmp    118b <CharsetCheck+0x5b>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113f <CharsetCheck+0xf>
movl   $0x0,-0x4(%rbp)
cmpl   $0xff,-0x4(%rbp)
jg     11fa <CharsetCheck+0xca>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <CharsetISO_8859_1ToMac@plt>
mov    %eax,%edi
call   1050 <CharsetMacToISO_8859_1@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cmp    %ecx,%eax
je     11e7 <CharsetCheck+0xb7>
mov    0x2e0a(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xe3f(%rip),%rsi
call   1040 <fprintf@plt>
jmp    11ec <CharsetCheck+0xbc>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11a0 <CharsetCheck+0x70>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CharsetCheck>:
push   %r15
push   %r14
push   %rbx
xor    %ebx,%ebx
mov    0x2ea2(%rip),%r15
lea    0xebb(%rip),%r14
jmp    115b <CharsetCheck+0x2b>
nopw   0x0(%rax,%rax,1)
add    $0x1,%ebx
cmp    $0x100,%ebx
je     117c <CharsetCheck+0x4c>
mov    %ebx,%edi
call   1050 <CharsetMacToISO_8859_1@plt>
mov    %eax,%edi
call   1030 <CharsetISO_8859_1ToMac@plt>
cmp    %eax,%ebx
je     1150 <CharsetCheck+0x20>
mov    (%r15),%edi
mov    %r14,%rsi
mov    %ebx,%edx
call   1040 <fprintf@plt>
jmp    1150 <CharsetCheck+0x20>
xor    %ebx,%ebx
lea    0xe9c(%rip),%r14
jmp    119b <CharsetCheck+0x6b>
nopw   0x0(%rax,%rax,1)
add    $0x1,%ebx
cmp    $0x100,%ebx
je     11bc <CharsetCheck+0x8c>
mov    %ebx,%edi
call   1030 <CharsetISO_8859_1ToMac@plt>
mov    %eax,%edi
call   1050 <CharsetMacToISO_8859_1@plt>
cmp    %eax,%ebx
je     1190 <CharsetCheck+0x60>
mov    (%r15),%edi
mov    %r14,%rsi
mov    %ebx,%edx
call   1040 <fprintf@plt>
jmp    1190 <CharsetCheck+0x60>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"MacToISO_8859_1 0x%x not unique\0A\00"
@.str.1 = [33 x i8] c"ISO_8859_1ToMac 0x%x not unique\0A\00"
define void @CharsetCheck() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %16, %0
%3 = load i32, i32* %1
%4 = icmp sle i32 %3, 255
br i1 %4, label %5, label %19
5: ; preds = %2
%6 = load i32, i32* %1
%7 = load i32, i32* %1
%8 = call i32 @CharsetMacToISO_8859_1(i32 %7)
%9 = call i32 @CharsetISO_8859_1ToMac(i32 %8)
%10 = icmp ne i32 %6, %9
br i1 %10, label %11, label %15
11: ; preds = %5
%12 = load i32, i32* @stderr
%13 = load i32, i32* %1
%14 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %13)
br label %15
15: ; preds = %11, %5
br label %16
16: ; preds = %15
%17 = load i32, i32* %1
%18 = add nsw i32 %17, 1
store i32 %18, i32* %1
br label %2
19: ; preds = %2
store i32 0, i32* %1
br label %20
20: ; preds = %34, %19
%21 = load i32, i32* %1
%22 = icmp sle i32 %21, 255
br i1 %22, label %23, label %37
23: ; preds = %20
%24 = load i32, i32* %1
%25 = load i32, i32* %1
%26 = call i32 @CharsetISO_8859_1ToMac(i32 %25)
%27 = call i32 @CharsetMacToISO_8859_1(i32 %26)
%28 = icmp ne i32 %24, %27
br i1 %28, label %29, label %33
29: ; preds = %23
%30 = load i32, i32* @stderr
%31 = load i32, i32* %1
%32 = call i32 @fprintf(i32 %30, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %31)
br label %33
33: ; preds = %29, %23
br label %34
34: ; preds = %33
%35 = load i32, i32* %1
%36 = add nsw i32 %35, 1
store i32 %36, i32* %1
br label %20
37: ; preds = %20
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"MacToISO_8859_1 0x%x not unique\0A\00"
@.str.1 = [33 x i8] c"ISO_8859_1ToMac 0x%x not unique\0A\00"
define void @CharsetCheck() {
br label %1
1: ; preds = %0, %9
%2 = phi i32 [ 0, %0 ], [ %10, %9 ]
%3 = tail call i32 @CharsetMacToISO_8859_1(i32 %2)
%4 = tail call i32 @CharsetISO_8859_1ToMac(i32 %3)
%5 = icmp eq i32 %2, %4
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %9
9: ; preds = %1, %6
%10 = add nuw nsw i32 %2, 1
%11 = icmp eq i32 %10, 256
br i1 %11, label %12, label %1
12: ; preds = %9, %20
%13 = phi i32 [ %21, %20 ], [ 0, %9 ]
%14 = tail call i32 @CharsetISO_8859_1ToMac(i32 %13)
%15 = tail call i32 @CharsetMacToISO_8859_1(i32 %14)
%16 = icmp eq i32 %13, %15
br i1 %16, label %20, label %17
17: ; preds = %12
%18 = load i32, i32* @stderr
%19 = tail call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %13)
br label %20
20: ; preds = %12, %17
%21 = add nuw nsw i32 %13, 1
%22 = icmp eq i32 %21, 256
br i1 %22, label %23, label %12
23: ; preds = %20
ret void
}