#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 *, short, short, unsigned short, unsigned short,
                          short, short, unsigned short, unsigned short);
int main(int argc, char *argv[]) {
  short min = 0x8000;
  short max = 0x7FFF;
  unsigned short min_u = 0;
  unsigned short max_u = 0xFFFF;
  short xs = 0;
  short ys = 0xFFFF;
  unsigned short xu = 0x8000;
  unsigned short yu = 0x7FFF;
  printf("%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n", min, max, min_u, max_u, xs, ys, xu,
         yu);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movw   $0x8000,-0x12(%rbp)
movw   $0x7fff,-0x14(%rbp)
movw   $0x0,-0x16(%rbp)
movw   $0xffff,-0x18(%rbp)
movw   $0x0,-0x1a(%rbp)
movw   $0xffff,-0x1c(%rbp)
movw   $0x8000,-0x1e(%rbp)
movw   $0x7fff,-0x20(%rbp)
mov    -0x12(%rbp),%si
mov    -0x14(%rbp),%dx
mov    -0x16(%rbp),%cx
mov    -0x18(%rbp),%r8w
mov    -0x1a(%rbp),%r9w
mov    -0x1c(%rbp),%r10w
mov    -0x1e(%rbp),%ax
lea    0xe8b(%rip),%rdi
movswl %si,%esi
movswl %dx,%edx
movzwl %cx,%ecx
movzwl %r8w,%r8d
movswl %r9w,%r9d
movswl %r10w,%r10d
mov    %r10d,(%rsp)
movzwl %ax,%eax
mov    %eax,0x8(%rsp)
movzwl -0x20(%rbp),%eax
mov    %eax,0x10(%rsp)
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
sub    $0x8,%rsp
lea    0xee4(%rip),%rdi
mov    $0xffff8000,%esi
mov    $0x7fff,%edx
xor    %ecx,%ecx
mov    $0xffff,%r8d
xor    %r9d,%r9d
push   $0x7fff
push   $0x8000
push   $0xffffffffffffffff
call   1030 <printf@plt>
add    $0x20,%rsp
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [25 x i8] c"%d\0A%d\0A%d\0A%d\0A%d\0A%d\0A%d\0A%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i16 signext -32768, i16 signext 32767, i16 zeroext 0, i16 zeroext -1, i16 signext 0, i16 signext -1, i16 zeroext -32768, i16 zeroext 32767)
ret i32 0
}