#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 main() {
  int a = 1024;
  int b = 345875;
  unsigned int c = 0;
  printf("%d\n", a - 3587);
  printf("%d\n", 234587 - 3553);
  printf("%d\n", 11212 - b);
  printf("%d\n", a - b);
  printf("%u\n", c - a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x400,-0x8(%rbp)
movl   $0x54713,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%esi
sub    $0xe03,%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb0(%rip),%rdi
mov    $0x3867a,%esi
call   1030 <printf@plt>
mov    $0x2bcc,%esi
sub    -0xc(%rbp),%esi
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
sub    -0xc(%rbp),%esi
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
sub    -0x8(%rbp),%esi
lea    0xe77(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0xfffff5fd,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3867a,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffae4b9,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffabced,%esi
call   1030 <printf@plt>
lea    0xeb1(%rip),%rdi
mov    $0xfffffc00,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 -2563)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 231034)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 -334663)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 -344851)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 -1024)
ret i32 0
}