#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 *, long, ...);
int main(void) {
  int x = -32769;
  signed char ch = 'M';
  printf("signed integer: %d & signed character %c\n", x, ch);
  unsigned int y = 65536;
  char ch2 = 'M';
  printf("unsigned integer: %d & unsigned character %c\n", y, ch2);
  short int z = 32767;
  printf("short integer: %d\n", z);
  long int m = 2E7;
  long double n = 5.576745846;
  printf("long integer: %d & double %Lf\n", m, n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffff7fff,-0x8(%rbp)
movb   $0x4d,-0x9(%rbp)
movslq -0x8(%rbp),%rsi
movsbl -0x9(%rbp),%edx
lea    0xecf(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x31(%rbp)
call   1030 <printf@plt>
mov    -0x31(%rbp),%al
movl   $0x10000,-0x10(%rbp)
movb   $0x4d,-0x11(%rbp)
mov    -0x10(%rbp),%ecx
mov    %ecx,%esi
movsbl -0x11(%rbp),%edx
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x31(%rbp),%al
movw   $0x7fff,-0x14(%rbp)
movswq -0x14(%rbp),%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
movq   $0x1312d00,-0x20(%rbp)
01
fldl   0xe72(%rip)
fstpt  -0x30(%rbp)
mov    -0x20(%rbp),%rsi
fldt   -0x30(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    0xecf(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xeed(%rip),%rdi
mov    $0xffffffffffff7fff,%rsi
mov    $0x4d,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xefd(%rip),%rdi
mov    $0x10000,%esi
mov    $0x4d,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf13(%rip),%rdi
mov    $0x7fff,%esi
xor    %eax,%eax
call   1030 <printf@plt>
fldl   0xea1(%rip)
fstpt  (%rsp)
lea    0xf0a(%rip),%rdi
mov    $0x1312d00,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [42 x i8] c"signed integer: %d & signed character %c\0A\00"
@.str.1 = [46 x i8] c"unsigned integer: %d & unsigned character %c\0A\00"
@.str.2 = [19 x i8] c"short integer: %d\0A\00"
@.str.3 = [31 x i8] c"long integer: %d & double %Lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca i32
%5 = alloca i8
%6 = alloca i16
%7 = alloca i64
%8 = alloca x86_fp80
store i32 0, i32* %1
store i32 -32769, i32* %2
store i8 77, i8* %3
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
%11 = load i8, i8* %3
%12 = sext i8 %11 to i32
%13 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i64 %10, i32 %12)
store i32 65536, i32* %4
store i8 77, i8* %5
%14 = load i32, i32* %4
%15 = zext i32 %14 to i64
%16 = load i8, i8* %5
%17 = sext i8 %16 to i32
%18 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i64 %15, i32 %17)
store i16 32767, i16* %6
%19 = load i16, i16* %6
%20 = sext i16 %19 to i64
%21 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i64 %20)
store i64 20000000, i64* %7
store x86_fp80 0xK4001B274B3B455903000, x86_fp80* %8
%22 = load i64, i64* %7
%23 = load x86_fp80, x86_fp80* %8
%24 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i64 %22, x86_fp80 %23)
ret i32 0
}

LLVM IR (-O2):
@.str = [42 x i8] c"signed integer: %d & signed character %c\0A\00"
@.str.1 = [46 x i8] c"unsigned integer: %d & unsigned character %c\0A\00"
@.str.2 = [19 x i8] c"short integer: %d\0A\00"
@.str.3 = [31 x i8] c"long integer: %d & double %Lf\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i64 -32769, i32 77)
%2 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i64 65536, i32 77)
%3 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i64 32767)
%4 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i64 20000000, x86_fp80 0xK4001B274B3B455903000)
ret i32 0
}