#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 xbyte(int, int);
int main(int argc, char *argv[]) {
  assert(xbyte(0x00112233, 0) == 0x33);
  assert(xbyte(0x00112233, 1) == 0x22);
  assert(xbyte(0x00112233, 2) == 0x11);
  assert(xbyte(0x00112233, 3) == 0x00);
  assert(xbyte(0xAABBCCDD, 0) == 0xFFFFFFDD);
  assert(xbyte(0xAABBCCDD, 1) == 0xFFFFFFCC);
  assert(xbyte(0xAABBCCDD, 2) == 0xFFFFFFBB);
  assert(xbyte(0xAABBCCDD, 3) == 0xFFFFFFAA);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x112233,%edi
xor    %esi,%esi
call   1040 <xbyte@plt>
cmp    $0x33,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x112233,%edi
mov    $0x1,%esi
call   1040 <xbyte@plt>
cmp    $0x22,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x112233,%edi
mov    $0x2,%esi
call   1040 <xbyte@plt>
cmp    $0x11,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x112233,%edi
mov    $0x3,%esi
call   1040 <xbyte@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0xaabbccdd,%edi
xor    %esi,%esi
call   1040 <xbyte@plt>
cmp    $0xffffffdd,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0xaabbccdd,%edi
mov    $0x1,%esi
call   1040 <xbyte@plt>
cmp    $0xffffffcc,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0xaabbccdd,%edi
mov    $0x2,%esi
call   1040 <xbyte@plt>
cmp    $0xffffffbb,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0xaabbccdd,%edi
mov    $0x3,%esi
call   1040 <xbyte@plt>
cmp    $0xffffffaa,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x112233,%edi
xor    %esi,%esi
call   1040 <xbyte@plt>
xor    %edi,%edi
cmp    $0x33,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x112233,%edi
mov    $0x1,%esi
call   1040 <xbyte@plt>
xor    %edi,%edi
cmp    $0x22,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x112233,%edi
mov    $0x2,%esi
call   1040 <xbyte@plt>
xor    %edi,%edi
cmp    $0x11,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x112233,%edi
mov    $0x3,%esi
call   1040 <xbyte@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0xaabbccdd,%edi
xor    %esi,%esi
call   1040 <xbyte@plt>
xor    %edi,%edi
cmp    $0xffffffdd,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0xaabbccdd,%edi
mov    $0x1,%esi
call   1040 <xbyte@plt>
xor    %edi,%edi
cmp    $0xffffffcc,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0xaabbccdd,%edi
mov    $0x2,%esi
call   1040 <xbyte@plt>
xor    %edi,%edi
cmp    $0xffffffbb,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0xaabbccdd,%edi
mov    $0x3,%esi
call   1040 <xbyte@plt>
xor    %edi,%edi
cmp    $0xffffffaa,%eax
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @xbyte(i32 1122867, i32 0)
%7 = icmp eq i32 %6, 51
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = call i32 @xbyte(i32 1122867, i32 1)
%11 = icmp eq i32 %10, 34
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = call i32 @xbyte(i32 1122867, i32 2)
%15 = icmp eq i32 %14, 17
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = call i32 @xbyte(i32 1122867, i32 3)
%19 = icmp eq i32 %18, 0
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
%22 = call i32 @xbyte(i32 -1430532899, i32 0)
%23 = icmp eq i32 %22, -35
%24 = zext i1 %23 to i32
%25 = call i32 @assert(i32 %24)
%26 = call i32 @xbyte(i32 -1430532899, i32 1)
%27 = icmp eq i32 %26, -52
%28 = zext i1 %27 to i32
%29 = call i32 @assert(i32 %28)
%30 = call i32 @xbyte(i32 -1430532899, i32 2)
%31 = icmp eq i32 %30, -69
%32 = zext i1 %31 to i32
%33 = call i32 @assert(i32 %32)
%34 = call i32 @xbyte(i32 -1430532899, i32 3)
%35 = icmp eq i32 %34, -86
%36 = zext i1 %35 to i32
%37 = call i32 @assert(i32 %36)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @xbyte(i32 1122867, i32 0)
%4 = icmp eq i32 %3, 51
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i32 @xbyte(i32 1122867, i32 1)
%8 = icmp eq i32 %7, 34
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = tail call i32 @xbyte(i32 1122867, i32 2)
%12 = icmp eq i32 %11, 17
%13 = zext i1 %12 to i32
%14 = tail call i32 @assert(i32 %13)
%15 = tail call i32 @xbyte(i32 1122867, i32 3)
%16 = icmp eq i32 %15, 0
%17 = zext i1 %16 to i32
%18 = tail call i32 @assert(i32 %17)
%19 = tail call i32 @xbyte(i32 -1430532899, i32 0)
%20 = icmp eq i32 %19, -35
%21 = zext i1 %20 to i32
%22 = tail call i32 @assert(i32 %21)
%23 = tail call i32 @xbyte(i32 -1430532899, i32 1)
%24 = icmp eq i32 %23, -52
%25 = zext i1 %24 to i32
%26 = tail call i32 @assert(i32 %25)
%27 = tail call i32 @xbyte(i32 -1430532899, i32 2)
%28 = icmp eq i32 %27, -69
%29 = zext i1 %28 to i32
%30 = tail call i32 @assert(i32 %29)
%31 = tail call i32 @xbyte(i32 -1430532899, i32 3)
%32 = icmp eq i32 %31, -86
%33 = zext i1 %32 to i32
%34 = tail call i32 @assert(i32 %33)
ret i32 0
}