#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, unsigned char, unsigned char);
int main(void) {
  unsigned int num1 = 0x20;
  unsigned int num2 = 0x30;
  unsigned int num3 = 32;
  unsigned char ch1 = 'a';
  unsigned char ch2 = 'b';
  unsigned char ch3 = 97;
  if (!(num1 ^ num2))
    printf("%#x and %#x are equals\n", num1, num2);
  else
    printf("%#x and %#x are not equals\n", num1, num2);
  if (!(num2 ^ num3))
    printf("%#x and %#x are equals\n", num2, num3);
  else
    printf("%#x and %#x are not equals\n", num2, num3);
  if (!(num1 ^ num3))
    printf("%#x and %#x are equals\n", num1, num3);
  else
    printf("%#x and %#x are not equals\n", num1, num3);
  if (!(ch1 ^ ch2))
    printf("%#x and %#x are equals\n", ch1, ch2);
  else
    printf("%#x and %#x are not equals\n", ch1, ch2);
  if (!(ch2 ^ ch3))
    printf("%#x and %#x are equals\n", ch2, ch3);
  else
    printf("%#x and %#x are not equals\n", ch2, ch3);
  if (!(ch1 ^ ch3))
    printf("%#x and %#x are equals\n", ch1, ch3);
  else
    printf("%#x and %#x are not equals\n", ch1, ch3);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x20,-0x8(%rbp)
movl   $0x30,-0xc(%rbp)
movl   $0x20,-0x10(%rbp)
movb   $0x61,-0x11(%rbp)
movb   $0x62,-0x12(%rbp)
movb   $0x61,-0x13(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
cmp    $0x0,%eax
jne    116e <main+0x5e>
mov    -0x8(%rbp),%eax
mov    %al,%cl
mov    -0xc(%rbp),%eax
lea    0xea2(%rip),%rdi
movzbl %cl,%esi
movzbl %al,%edx
call   1030 <printf@plt>
jmp    1188 <main+0x78>
mov    -0x8(%rbp),%eax
mov    %al,%cl
mov    -0xc(%rbp),%eax
lea    0xe9b(%rip),%rdi
movzbl %cl,%esi
movzbl %al,%edx
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
xor    -0x10(%rbp),%eax
cmp    $0x0,%eax
jne    11b6 <main+0xa6>
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x10(%rbp),%eax
lea    0xe5a(%rip),%rdi
movzbl %cl,%esi
movzbl %al,%edx
call   1030 <printf@plt>
jmp    11d0 <main+0xc0>
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x10(%rbp),%eax
lea    0xe53(%rip),%rdi
movzbl %cl,%esi
movzbl %al,%edx
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
xor    -0x10(%rbp),%eax
cmp    $0x0,%eax
jne    11fe <main+0xee>
mov    -0x8(%rbp),%eax
mov    %al,%cl
mov    -0x10(%rbp),%eax
lea    0xe12(%rip),%rdi
movzbl %cl,%esi
movzbl %al,%edx
call   1030 <printf@plt>
jmp    1218 <main+0x108>
mov    -0x8(%rbp),%eax
mov    %al,%cl
mov    -0x10(%rbp),%eax
lea    0xe0b(%rip),%rdi
movzbl %cl,%esi
movzbl %al,%edx
call   1030 <printf@plt>
movzbl -0x11(%rbp),%eax
movzbl -0x12(%rbp),%ecx
xor    %ecx,%eax
cmp    $0x0,%eax
jne    1246 <main+0x136>
mov    -0x11(%rbp),%al
lea    0xdcb(%rip),%rdi
movzbl %al,%esi
movzbl -0x12(%rbp),%edx
call   1030 <printf@plt>
jmp    125c <main+0x14c>
mov    -0x11(%rbp),%al
lea    0xdc8(%rip),%rdi
movzbl %al,%esi
movzbl -0x12(%rbp),%edx
call   1030 <printf@plt>
movzbl -0x12(%rbp),%eax
movzbl -0x13(%rbp),%ecx
xor    %ecx,%eax
cmp    $0x0,%eax
jne    128a <main+0x17a>
mov    -0x12(%rbp),%al
lea    0xd87(%rip),%rdi
movzbl %al,%esi
movzbl -0x13(%rbp),%edx
call   1030 <printf@plt>
jmp    12a0 <main+0x190>
mov    -0x12(%rbp),%al
lea    0xd84(%rip),%rdi
movzbl %al,%esi
movzbl -0x13(%rbp),%edx
call   1030 <printf@plt>
movzbl -0x11(%rbp),%eax
movzbl -0x13(%rbp),%ecx
xor    %ecx,%eax
cmp    $0x0,%eax
jne    12ce <main+0x1be>
mov    -0x11(%rbp),%al
lea    0xd43(%rip),%rdi
movzbl %al,%esi
movzbl -0x13(%rbp),%edx
call   1030 <printf@plt>
jmp    12e4 <main+0x1d4>
mov    -0x11(%rbp),%al
lea    0xd40(%rip),%rdi
movzbl %al,%esi
movzbl -0x13(%rbp),%edx
call   1030 <printf@plt>
mov    0x2cf5(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xefd(%rip),%rbx
mov    %rbx,%rdi
mov    $0x20,%esi
mov    $0x30,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x30,%esi
mov    $0x20,%edx
call   1030 <printf@plt>
lea    0xeba(%rip),%r14
mov    %r14,%rdi
mov    $0x20,%esi
mov    $0x20,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x61,%esi
mov    $0x62,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x62,%esi
mov    $0x61,%edx
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x61,%esi
mov    $0x61,%edx
call   1030 <printf@plt>
mov    0x2e4b(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [24 x i8] c"%#x and %#x are equals\0A\00"
@.str.1 = [28 x i8] c"%#x and %#x are not equals\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i32 0, i32* %1
store i32 32, i32* %2
store i32 48, i32* %3
store i32 32, i32* %4
store i8 97, i8* %5
store i8 98, i8* %6
store i8 97, i8* %7
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = xor i32 %8, %9
%11 = icmp ne i32 %10, 0
br i1 %11, label %18, label %12
12: ; preds = %0
%13 = load i32, i32* %2
%14 = trunc i32 %13 to i8
%15 = load i32, i32* %3
%16 = trunc i32 %15 to i8
%17 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8 zeroext %14, i8 zeroext %16)
br label %24
18: ; preds = %0
%19 = load i32, i32* %2
%20 = trunc i32 %19 to i8
%21 = load i32, i32* %3
%22 = trunc i32 %21 to i8
%23 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %20, i8 zeroext %22)
br label %24
24: ; preds = %18, %12
%25 = load i32, i32* %3
%26 = load i32, i32* %4
%27 = xor i32 %25, %26
%28 = icmp ne i32 %27, 0
br i1 %28, label %35, label %29
29: ; preds = %24
%30 = load i32, i32* %3
%31 = trunc i32 %30 to i8
%32 = load i32, i32* %4
%33 = trunc i32 %32 to i8
%34 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8 zeroext %31, i8 zeroext %33)
br label %41
35: ; preds = %24
%36 = load i32, i32* %3
%37 = trunc i32 %36 to i8
%38 = load i32, i32* %4
%39 = trunc i32 %38 to i8
%40 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %37, i8 zeroext %39)
br label %41
41: ; preds = %35, %29
%42 = load i32, i32* %2
%43 = load i32, i32* %4
%44 = xor i32 %42, %43
%45 = icmp ne i32 %44, 0
br i1 %45, label %52, label %46
46: ; preds = %41
%47 = load i32, i32* %2
%48 = trunc i32 %47 to i8
%49 = load i32, i32* %4
%50 = trunc i32 %49 to i8
%51 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8 zeroext %48, i8 zeroext %50)
br label %58
52: ; preds = %41
%53 = load i32, i32* %2
%54 = trunc i32 %53 to i8
%55 = load i32, i32* %4
%56 = trunc i32 %55 to i8
%57 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %54, i8 zeroext %56)
br label %58
58: ; preds = %52, %46
%59 = load i8, i8* %5
%60 = zext i8 %59 to i32
%61 = load i8, i8* %6
%62 = zext i8 %61 to i32
%63 = xor i32 %60, %62
%64 = icmp ne i32 %63, 0
br i1 %64, label %69, label %65
65: ; preds = %58
%66 = load i8, i8* %5
%67 = load i8, i8* %6
%68 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8 zeroext %66, i8 zeroext %67)
br label %73
69: ; preds = %58
%70 = load i8, i8* %5
%71 = load i8, i8* %6
%72 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %70, i8 zeroext %71)
br label %73
73: ; preds = %69, %65
%74 = load i8, i8* %6
%75 = zext i8 %74 to i32
%76 = load i8, i8* %7
%77 = zext i8 %76 to i32
%78 = xor i32 %75, %77
%79 = icmp ne i32 %78, 0
br i1 %79, label %84, label %80
80: ; preds = %73
%81 = load i8, i8* %6
%82 = load i8, i8* %7
%83 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8 zeroext %81, i8 zeroext %82)
br label %88
84: ; preds = %73
%85 = load i8, i8* %6
%86 = load i8, i8* %7
%87 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %85, i8 zeroext %86)
br label %88
88: ; preds = %84, %80
%89 = load i8, i8* %5
%90 = zext i8 %89 to i32
%91 = load i8, i8* %7
%92 = zext i8 %91 to i32
%93 = xor i32 %90, %92
%94 = icmp ne i32 %93, 0
br i1 %94, label %99, label %95
95: ; preds = %88
%96 = load i8, i8* %5
%97 = load i8, i8* %7
%98 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8 zeroext %96, i8 zeroext %97)
br label %103
99: ; preds = %88
%100 = load i8, i8* %5
%101 = load i8, i8* %7
%102 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %100, i8 zeroext %101)
br label %103
103: ; preds = %99, %95
%104 = load i32, i32* @EXIT_SUCCESS
ret i32 %104
}

LLVM IR (-O2):
@.str = [24 x i8] c"%#x and %#x are equals\0A\00"
@.str.1 = [28 x i8] c"%#x and %#x are not equals\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8 zeroext 32, i8 zeroext 48)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8 zeroext 48, i8 zeroext 32)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8 zeroext 32, i8 zeroext 32)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8 zeroext 97, i8 zeroext 98)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8 zeroext 98, i8 zeroext 97)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8 zeroext 97, i8 zeroext 97)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}