#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*/ assert(int);
int find_num_bits_flipped_to_convert_first_num_into_second_num(unsigned int,
                                                               unsigned int);
int main() {
  int a0 = 110;
  int b0 = 110;
  assert(0 ==
         find_num_bits_flipped_to_convert_first_num_into_second_num(a0, b0));
  int a1 = 0;
  int b1 = 0;
  assert(0 ==
         find_num_bits_flipped_to_convert_first_num_into_second_num(a1, b1));
  int a2 = 9;
  int b2 = 4;
  assert(3 ==
         find_num_bits_flipped_to_convert_first_num_into_second_num(a2, b2));
  unsigned int a3 = 0xffff0000;
  unsigned int b3 = 0x0000ffff;
  assert((sizeof(unsigned int) * 8) ==
         find_num_bits_flipped_to_convert_first_num_into_second_num(a3, b3));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x6e,-0x8(%rbp)
movl   $0x6e,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <find_num_bits_flipped_to_convert_first_num_into_second_num@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1040 <find_num_bits_flipped_to_convert_first_num_into_second_num@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x9,-0x18(%rbp)
movl   $0x4,-0x1c(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1040 <find_num_bits_flipped_to_convert_first_num_into_second_num@plt>
mov    %eax,%ecx
mov    $0x3,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0xffff0000,-0x20(%rbp)
movl   $0xffff,-0x24(%rbp)
mov    -0x20(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1040 <find_num_bits_flipped_to_convert_first_num_into_second_num@plt>
movslq %eax,%rcx
mov    $0x20,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x6e,%edi
mov    $0x6e,%esi
call   1040 <find_num_bits_flipped_to_convert_first_num_into_second_num@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1040 <find_num_bits_flipped_to_convert_first_num_into_second_num@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x9,%edi
mov    $0x4,%esi
call   1040 <find_num_bits_flipped_to_convert_first_num_into_second_num@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0xffff0000,%edi
mov    $0xffff,%esi
call   1040 <find_num_bits_flipped_to_convert_first_num_into_second_num@plt>
xor    %edi,%edi
cmp    $0x20,%eax
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %1
store i32 110, i32* %2
store i32 110, i32* %3
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = call i32 @find_num_bits_flipped_to_convert_first_num_into_second_num(i32 %10, i32 %11)
%13 = icmp eq i32 0, %12
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
store i32 0, i32* %4
store i32 0, i32* %5
%16 = load i32, i32* %4
%17 = load i32, i32* %5
%18 = call i32 @find_num_bits_flipped_to_convert_first_num_into_second_num(i32 %16, i32 %17)
%19 = icmp eq i32 0, %18
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
store i32 9, i32* %6
store i32 4, i32* %7
%22 = load i32, i32* %6
%23 = load i32, i32* %7
%24 = call i32 @find_num_bits_flipped_to_convert_first_num_into_second_num(i32 %22, i32 %23)
%25 = icmp eq i32 3, %24
%26 = zext i1 %25 to i32
%27 = call i32 @assert(i32 %26)
store i32 -65536, i32* %8
store i32 65535, i32* %9
%28 = load i32, i32* %8
%29 = load i32, i32* %9
%30 = call i32 @find_num_bits_flipped_to_convert_first_num_into_second_num(i32 %28, i32 %29)
%31 = sext i32 %30 to i64
%32 = icmp eq i64 32, %31
%33 = zext i1 %32 to i32
%34 = call i32 @assert(i32 %33)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @find_num_bits_flipped_to_convert_first_num_into_second_num(i32 110, i32 110)
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @find_num_bits_flipped_to_convert_first_num_into_second_num(i32 0, i32 0)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 @find_num_bits_flipped_to_convert_first_num_into_second_num(i32 9, i32 4)
%10 = icmp eq i32 %9, 3
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = tail call i32 @find_num_bits_flipped_to_convert_first_num_into_second_num(i32 -65536, i32 65535)
%14 = icmp eq i32 %13, 32
%15 = zext i1 %14 to i32
%16 = tail call i32 @assert(i32 %15)
ret i32 0
}