#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*/ printf(char *, unsigned int);
int /*<<< orphan*/ scanf(char *, unsigned int *, unsigned int *, unsigned int *,
                         unsigned int *);
int main() {
  unsigned int x = 0;
  unsigned int d = 0;
  unsigned int c = 0;
  unsigned int b = 0;
  unsigned int a = 0;
  scanf("%x %x %x %x", &a, &b, &c, &d);
  x = (a << 24) | (b << 16) | (c << 8) | d;
  printf("0x%x\n", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
lea    0xea7(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0xc(%rbp),%r8
call   1040 <scanf@plt>
mov    -0x18(%rbp),%eax
shl    $0x18,%eax
mov    -0x14(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe78(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x0,0x14(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0xeb5(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0x14(%rsp),%r8
call   1040 <scanf@plt>
mov    0x8(%rsp),%eax
shl    $0x18,%eax
mov    0xc(%rsp),%ecx
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x10(%rsp),%esi
shl    $0x8,%esi
or     %ecx,%esi
or     0x14(%rsp),%esi
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%x %x %x %x\00"
@.str.1 = [6 x i8] c"0x%x\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
%7 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %6, i32* %5, i32* %4, i32* %3)
%8 = load i32, i32* %6
%9 = shl i32 %8, 24
%10 = load i32, i32* %5
%11 = shl i32 %10, 16
%12 = or i32 %9, %11
%13 = load i32, i32* %4
%14 = shl i32 %13, 8
%15 = or i32 %12, %14
%16 = load i32, i32* %3
%17 = or i32 %15, %16
store i32 %17, i32* %2
%18 = load i32, i32* %2
%19 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%x %x %x %x\00"
@.str.1 = [6 x i8] c"0x%x\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%6 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%7 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%8 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%9 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %4, i32* %3, i32* %2, i32* %1)
%10 = load i32, i32* %4
%11 = shl i32 %10, 24
%12 = load i32, i32* %3
%13 = shl i32 %12, 16
%14 = or i32 %13, %11
%15 = load i32, i32* %2
%16 = shl i32 %15, 8
%17 = or i32 %14, %16
%18 = load i32, i32* %1
%19 = or i32 %17, %18
%20 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %19)
ret i32 0
}