#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 int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, ...);
int main(int argc, char **argv) {
  uint32_t s = 0x01020304;
  uint32_t t, u;
  t = (((s & 0xff) << 24) + (((s >> 8) & 0xff) << 16) +
       (((s >> 16) & 0xff) << 8) + ((s >> 24) & 0xff));
  u = (((t & 0xff) << 24) + (((t >> 8) & 0xff) << 16) +
       (((t >> 16) & 0xff) << 8) + ((t >> 24) & 0xff));
  printf("s = %x, t = %x, u = %x \n", s, t, u);
  uint32_t nb = 2781;
  uint32_t nb2 = (((nb & 0xff) << 24) + (((nb >> 8) & 0xff) << 16) +
                  (((nb >> 16) & 0xff) << 8) + ((nb >> 24) & 0xff));
  uint32_t nb3 = (((nb2 & 0xff) << 24) + (((nb2 >> 8) & 0xff) << 16) +
                  (((nb2 >> 16) & 0xff) << 8) + ((nb2 >> 24) & 0xff));
  printf("nb = %u => %u => %u\n", nb, nb2, nb3);
  printf("nb = %x => %x => %x\n", nb, nb2, nb3);
  uint32_t nbframes = 2573;
  uint32_t nbframes2 = 2781;
  printf(" 2573 = %x\n", nbframes);
  printf(" 2781 = %x\n", nbframes2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1020304,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    $0xff,%eax
shl    $0x18,%eax
mov    -0x14(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x14(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x14(%rbp),%ecx
sar    $0x18,%ecx
and    $0xff,%ecx
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
and    $0xff,%eax
shl    $0x18,%eax
mov    -0x18(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x18(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x18(%rbp),%ecx
sar    $0x18,%ecx
and    $0xff,%ecx
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
lea    0xe47(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xadd,-0x20(%rbp)
mov    -0x20(%rbp),%eax
and    $0xff,%eax
shl    $0x18,%eax
mov    -0x20(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x20(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x20(%rbp),%ecx
sar    $0x18,%ecx
and    $0xff,%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
and    $0xff,%eax
shl    $0x18,%eax
mov    -0x24(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x24(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x24(%rbp),%ecx
sar    $0x18,%ecx
and    $0xff,%ecx
add    %ecx,%eax
mov    %eax,-0x28(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x28(%rbp),%ecx
lea    0xdc6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x28(%rbp),%ecx
lea    0xdc4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xa0d,-0x2c(%rbp)
movl   $0xadd,-0x30(%rbp)
mov    -0x2c(%rbp),%esi
lea    0xdba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%esi
lea    0xdb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1020304,%esi
mov    $0x4030201,%edx
mov    $0x1020304,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
mov    $0xadd,%esi
mov    $0xdd0a0000,%edx
mov    $0xadd,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    $0xadd,%esi
mov    $0xdd0a0000,%edx
mov    $0xadd,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
mov    $0xa0d,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
mov    $0xadd,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"s = %x, t = %x, u = %x \0A\00"
@.str.1 = [21 x i8] c"nb = %u => %u => %u\0A\00"
@.str.2 = [21 x i8] c"nb = %x => %x => %x\0A\00"
@.str.3 = [12 x i8] c" 2573 = %x\0A\00"
@.str.4 = [12 x i8] c" 2781 = %x\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 16909060, i32* %6
%14 = load i32, i32* %6
%15 = and i32 %14, 255
%16 = shl i32 %15, 24
%17 = load i32, i32* %6
%18 = ashr i32 %17, 8
%19 = and i32 %18, 255
%20 = shl i32 %19, 16
%21 = add nsw i32 %16, %20
%22 = load i32, i32* %6
%23 = ashr i32 %22, 16
%24 = and i32 %23, 255
%25 = shl i32 %24, 8
%26 = add nsw i32 %21, %25
%27 = load i32, i32* %6
%28 = ashr i32 %27, 24
%29 = and i32 %28, 255
%30 = add nsw i32 %26, %29
store i32 %30, i32* %7
%31 = load i32, i32* %7
%32 = and i32 %31, 255
%33 = shl i32 %32, 24
%34 = load i32, i32* %7
%35 = ashr i32 %34, 8
%36 = and i32 %35, 255
%37 = shl i32 %36, 16
%38 = add nsw i32 %33, %37
%39 = load i32, i32* %7
%40 = ashr i32 %39, 16
%41 = and i32 %40, 255
%42 = shl i32 %41, 8
%43 = add nsw i32 %38, %42
%44 = load i32, i32* %7
%45 = ashr i32 %44, 24
%46 = and i32 %45, 255
%47 = add nsw i32 %43, %46
store i32 %47, i32* %8
%48 = load i32, i32* %6
%49 = load i32, i32* %7
%50 = load i32, i32* %8
%51 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %48, i32 %49, i32 %50)
store i32 2781, i32* %9
%52 = load i32, i32* %9
%53 = and i32 %52, 255
%54 = shl i32 %53, 24
%55 = load i32, i32* %9
%56 = ashr i32 %55, 8
%57 = and i32 %56, 255
%58 = shl i32 %57, 16
%59 = add nsw i32 %54, %58
%60 = load i32, i32* %9
%61 = ashr i32 %60, 16
%62 = and i32 %61, 255
%63 = shl i32 %62, 8
%64 = add nsw i32 %59, %63
%65 = load i32, i32* %9
%66 = ashr i32 %65, 24
%67 = and i32 %66, 255
%68 = add nsw i32 %64, %67
store i32 %68, i32* %10
%69 = load i32, i32* %10
%70 = and i32 %69, 255
%71 = shl i32 %70, 24
%72 = load i32, i32* %10
%73 = ashr i32 %72, 8
%74 = and i32 %73, 255
%75 = shl i32 %74, 16
%76 = add nsw i32 %71, %75
%77 = load i32, i32* %10
%78 = ashr i32 %77, 16
%79 = and i32 %78, 255
%80 = shl i32 %79, 8
%81 = add nsw i32 %76, %80
%82 = load i32, i32* %10
%83 = ashr i32 %82, 24
%84 = and i32 %83, 255
%85 = add nsw i32 %81, %84
store i32 %85, i32* %11
%86 = load i32, i32* %9
%87 = load i32, i32* %10
%88 = load i32, i32* %11
%89 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %86, i32 %87, i32 %88)
%90 = load i32, i32* %9
%91 = load i32, i32* %10
%92 = load i32, i32* %11
%93 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %90, i32 %91, i32 %92)
store i32 2573, i32* %12
store i32 2781, i32* %13
%94 = load i32, i32* %12
%95 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 %94)
%96 = load i32, i32* %13
%97 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %96)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"s = %x, t = %x, u = %x \0A\00"
@.str.1 = [21 x i8] c"nb = %u => %u => %u\0A\00"
@.str.2 = [21 x i8] c"nb = %x => %x => %x\0A\00"
@.str.3 = [12 x i8] c" 2573 = %x\0A\00"
@.str.4 = [12 x i8] c" 2781 = %x\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 16909060, i32 67305985, i32 16909060)
%4 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 2781, i32 -586547200, i32 2781)
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 2781, i32 -586547200, i32 2781)
%6 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 2573)
%7 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 2781)
ret i32 0
}