#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 */
typedef scalar_t__ uint8_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t biop_uint32(uint8_t byte_order, uint32_t raw) {
  uint8_t *p = (uint8_t *)&raw;
  uint32_t val;
  if (byte_order == 0)
    val = (p[0] << 24) + (p[1] << 16) + (p[2] << 8) + p[3];
  else
    val = (p[3] << 24) + (p[2] << 16) + (p[1] << 8) + p[0];
  return val;
}


x86 assembly (clang, -O0):
<biop_uint32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1159 <biop_uint32+0x59>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
shl    $0x18,%rax
mov    -0x18(%rbp),%rcx
mov    0x8(%rcx),%rcx
shl    $0x10,%rcx
add    %rcx,%rax
mov    -0x18(%rbp),%rcx
mov    0x10(%rcx),%rcx
shl    $0x8,%rcx
add    %rcx,%rax
mov    -0x18(%rbp),%rcx
add    0x18(%rcx),%rax
mov    %rax,-0x20(%rbp)
jmp    118e <biop_uint32+0x8e>
mov    -0x18(%rbp),%rax
mov    0x18(%rax),%rax
shl    $0x18,%rax
mov    -0x18(%rbp),%rcx
mov    0x10(%rcx),%rcx
shl    $0x10,%rcx
add    %rcx,%rax
mov    -0x18(%rbp),%rcx
mov    0x8(%rcx),%rcx
shl    $0x8,%rcx
add    %rcx,%rax
mov    -0x18(%rbp),%rcx
add    (%rcx),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<biop_uint32>:
ret

LLVM IR (-O0):
define i64 @biop_uint32(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64*
%6 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
store i64* %4, i64** %5
%7 = load i64, i64* %3
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %28
9: ; preds = %2
%10 = load i64*, i64** %5
%11 = getelementptr inbounds i64, i64* %10, i64 0
%12 = load i64, i64* %11
%13 = shl i64 %12, 24
%14 = load i64*, i64** %5
%15 = getelementptr inbounds i64, i64* %14, i64 1
%16 = load i64, i64* %15
%17 = shl i64 %16, 16
%18 = add nsw i64 %13, %17
%19 = load i64*, i64** %5
%20 = getelementptr inbounds i64, i64* %19, i64 2
%21 = load i64, i64* %20
%22 = shl i64 %21, 8
%23 = add nsw i64 %18, %22
%24 = load i64*, i64** %5
%25 = getelementptr inbounds i64, i64* %24, i64 3
%26 = load i64, i64* %25
%27 = add nsw i64 %23, %26
store i64 %27, i64* %6
br label %47
28: ; preds = %2
%29 = load i64*, i64** %5
%30 = getelementptr inbounds i64, i64* %29, i64 3
%31 = load i64, i64* %30
%32 = shl i64 %31, 24
%33 = load i64*, i64** %5
%34 = getelementptr inbounds i64, i64* %33, i64 2
%35 = load i64, i64* %34
%36 = shl i64 %35, 16
%37 = add nsw i64 %32, %36
%38 = load i64*, i64** %5
%39 = getelementptr inbounds i64, i64* %38, i64 1
%40 = load i64, i64* %39
%41 = shl i64 %40, 8
%42 = add nsw i64 %37, %41
%43 = load i64*, i64** %5
%44 = getelementptr inbounds i64, i64* %43, i64 0
%45 = load i64, i64* %44
%46 = add nsw i64 %42, %45
store i64 %46, i64* %6
br label %47
47: ; preds = %28, %9
%48 = load i64, i64* %6
ret i64 %48
}

LLVM IR (-O2):
define i64 @biop_uint32(i64 %0, i64 %1) {
ret i64 undef
}