#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 *, int, ...);
int main() {
  printf("%d,%d\n", ~20, ~-20);
  unsigned int n = -1;
  printf("%u,%x,%d\n", n, n, n);
  int m = -1;
  printf("%x,%x\n", n >> 3, m >> 3);
  printf("%x,%x\n", n, m);
  printf("%x,%x\n", n << 3, m << 3);
  m = 0x3862517b;
  printf("---%x\n", (char)m);
  printf("===%x\n", (char)(m >> 16));
  int a = 0x12, b = 0x34, c = 0x56, d = 0x78;
  printf("~~~%x\n", (a << 24) | (b << 16) | (c << 8) | d);
  int f = 8;
  printf("%d,%d\n", f << 3, f);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0xffffffeb,%esi
mov    $0x13,%edx
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xffffffff,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xffffffff,-0xc(%rbp)
mov    -0x8(%rbp),%esi
shr    $0x3,%esi
mov    -0xc(%rbp),%edx
sar    $0x3,%edx
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
shl    $0x3,%esi
mov    -0xc(%rbp),%edx
shl    $0x3,%edx
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x3862517b,-0xc(%rbp)
mov    -0xc(%rbp),%eax
movsbl %al,%esi
lea    0xe60(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
movsbl %al,%esi
lea    0xe50(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x12,-0x10(%rbp)
movl   $0x34,-0x14(%rbp)
movl   $0x56,-0x18(%rbp)
movl   $0x78,-0x1c(%rbp)
mov    -0x10(%rbp),%esi
shl    $0x18,%esi
mov    -0x14(%rbp),%eax
shl    $0x10,%eax
or     %eax,%esi
mov    -0x18(%rbp),%eax
shl    $0x8,%eax
or     %eax,%esi
or     -0x1c(%rbp),%esi
lea    0xe14(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x8,-0x20(%rbp)
mov    -0x20(%rbp),%esi
shl    $0x3,%esi
mov    -0x20(%rbp),%edx
lea    0xdd0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xee5(%rip),%r14
mov    %r14,%rdi
mov    $0xffffffeb,%esi
mov    $0x13,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
mov    $0xffffffff,%esi
mov    $0xffffffff,%edx
mov    $0xffffffff,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xebe(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1fffffff,%esi
mov    $0xffffffff,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xffffffff,%esi
mov    $0xffffffff,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffff8,%esi
mov    $0xfffffff8,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe82(%rip),%rdi
mov    $0x7b,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe76(%rip),%rdi
mov    $0x62,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe6a(%rip),%rdi
mov    $0x12345678,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x40,%esi
mov    $0x8,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d,%d\0A\00"
@.str.1 = [10 x i8] c"%u,%x,%d\0A\00"
@.str.2 = [7 x i8] c"%x,%x\0A\00"
@.str.3 = [7 x i8] c"---%x\0A\00"
@.str.4 = [7 x i8] c"===%x\0A\00"
@.str.5 = [7 x i8] c"~~~%x\0A\00"
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
store i32 0, i32* %1
%9 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 -21, i32 19)
store i32 -1, i32* %2
%10 = load i32, i32* %2
%11 = load i32, i32* %2
%12 = load i32, i32* %2
%13 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %10, i32 %11, i32 %12)
store i32 -1, i32* %3
%14 = load i32, i32* %2
%15 = lshr i32 %14, 3
%16 = load i32, i32* %3
%17 = ashr i32 %16, 3
%18 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %15, i32 %17)
%19 = load i32, i32* %2
%20 = load i32, i32* %3
%21 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %19, i32 %20)
%22 = load i32, i32* %2
%23 = shl i32 %22, 3
%24 = load i32, i32* %3
%25 = shl i32 %24, 3
%26 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %23, i32 %25)
store i32 945967483, i32* %3
%27 = load i32, i32* %3
%28 = trunc i32 %27 to i8
%29 = sext i8 %28 to i32
%30 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %29)
%31 = load i32, i32* %3
%32 = ashr i32 %31, 16
%33 = trunc i32 %32 to i8
%34 = sext i8 %33 to i32
%35 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %34)
store i32 18, i32* %4
store i32 52, i32* %5
store i32 86, i32* %6
store i32 120, i32* %7
%36 = load i32, i32* %4
%37 = shl i32 %36, 24
%38 = load i32, i32* %5
%39 = shl i32 %38, 16
%40 = or i32 %37, %39
%41 = load i32, i32* %6
%42 = shl i32 %41, 8
%43 = or i32 %40, %42
%44 = load i32, i32* %7
%45 = or i32 %43, %44
%46 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i32 %45)
store i32 8, i32* %8
%47 = load i32, i32* %8
%48 = shl i32 %47, 3
%49 = load i32, i32* %8
%50 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %48, i32 %49)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d,%d\0A\00"
@.str.1 = [10 x i8] c"%u,%x,%d\0A\00"
@.str.2 = [7 x i8] c"%x,%x\0A\00"
@.str.3 = [7 x i8] c"---%x\0A\00"
@.str.4 = [7 x i8] c"===%x\0A\00"
@.str.5 = [7 x i8] c"~~~%x\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 -21, i32 19)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 -1, i32 -1, i32 -1)
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 536870911, i32 -1)
%4 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 -1, i32 -1)
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 -8, i32 -8)
%6 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 123)
%7 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 98)
%8 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i32 305419896)
%9 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 64, i32 8)
ret i32 0
}