#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*/ test_fail_message(int /*<<< orphan*/ *, char const *, int,
                                     char *, char const *, char const *, char *,
                                     char *, unsigned char const,
                                     unsigned char const);
int test_uchar_eq(const char *file, int line, const char *s1, const char *s2,
                  const unsigned char t1, const unsigned char t2) {
  if (t1 == t2)
    return 1;
  test_fail_message(NULL, file, line, "unsigned char", s1, s2, "==",
                    "["
                    "%u"
                    "] compared to ["
                    "%u"
                    "]",
                    t1, t2);
  return 0;
}


x86 assembly (clang, -O0):
<test_uchar_eq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %r8d,-0x44(%rbp)
mov    %rcx,%rax
mov    -0x44(%rbp),%ecx
mov    %rax,-0x40(%rbp)
mov    %rdx,%rax
mov    -0x40(%rbp),%rdx
mov    %rax,-0x38(%rbp)
mov    %esi,%eax
mov    -0x38(%rbp),%rsi
mov    %eax,-0x30(%rbp)
mov    %rdi,%r8
mov    -0x30(%rbp),%edi
mov    %r9b,%al
mov    %r8,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %cl,-0x29(%rbp)
mov    %al,-0x2a(%rbp)
movzbl -0x29(%rbp),%eax
movzbl -0x2a(%rbp),%ecx
cmp    %ecx,%eax
jne    1174 <test_uchar_eq+0x64>
movl   $0x1,-0x4(%rbp)
jmp    11c3 <test_uchar_eq+0xb3>
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x29(%rbp),%al
xor    %ecx,%ecx
mov    %ecx,%edi
lea    0xe6f(%rip),%rcx
lea    0xe76(%rip),%r11
lea    0xe72(%rip),%r10
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
movzbl %al,%eax
mov    %eax,0x10(%rsp)
movzbl -0x2a(%rbp),%eax
mov    %eax,0x18(%rsp)
call   1030 <test_fail_message@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_uchar_eq>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    $0x1,%ebx
cmp    %r9b,%r8b
je     1165 <test_uchar_eq+0x55>
mov    %rcx,%r10
mov    %rdx,%rax
mov    %esi,%edx
mov    %rdi,%rsi
movzbl %r9b,%r11d
movzbl %r8b,%r14d
lea    0xed5(%rip),%r15
lea    0xecb(%rip),%r12
lea    0xeb6(%rip),%rcx
xor    %ebx,%ebx
xor    %edi,%edi
mov    %rax,%r8
mov    %r10,%r9
push   %r11
push   %r14
push   %r15
push   %r12
call   1030 <test_fail_message@plt>
add    $0x20,%rsp
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [14 x i8] c"unsigned char\00"
@.str.1 = [3 x i8] c"==\00"
@.str.2 = [22 x i8] c"[%u] compared to [%u]\00"
define i32 @test_uchar_eq(i8* %0, i32 %1, i8* %2, i8* %3, i8 zeroext %4, i8 zeroext %5) {
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8
%13 = alloca i8
store i8* %0, i8** %8
store i32 %1, i32* %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i8 %4, i8* %12
store i8 %5, i8* %13
%14 = load i8, i8* %12
%15 = zext i8 %14 to i32
%16 = load i8, i8* %13
%17 = zext i8 %16 to i32
%18 = icmp eq i32 %15, %17
br i1 %18, label %19, label %20
19: ; preds = %6
store i32 1, i32* %7
br label %28
20: ; preds = %6
%21 = load i8*, i8** %8
%22 = load i32, i32* %9
%23 = load i8*, i8** %10
%24 = load i8*, i8** %11
%25 = load i8, i8* %12
%26 = load i8, i8* %13
%27 = call i32 @test_fail_message(i32* null, i8* %21, i32 %22, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %23, i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8 zeroext %25, i8 zeroext %26)
store i32 0, i32* %7
br label %28
28: ; preds = %20, %19
%29 = load i32, i32* %7
ret i32 %29
}

LLVM IR (-O2):
@.str = [14 x i8] c"unsigned char\00"
@.str.1 = [3 x i8] c"==\00"
@.str.2 = [22 x i8] c"[%u] compared to [%u]\00"
define i32 @test_uchar_eq(i8* %0, i32 %1, i8* %2, i8* %3, i8 zeroext %4, i8 zeroext %5) {
%7 = icmp eq i8 %4, %5
br i1 %7, label %10, label %8
8: ; preds = %6
%9 = tail call i32 @test_fail_message(i32* null, i8* %0, i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8 zeroext %4, i8 zeroext %5)
br label %10
10: ; preds = %6, %8
%11 = phi i32 [ 0, %8 ], [ 1, %6 ]
ret i32 %11
}