#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 LONG_MIN;
int /*<<< orphan*/ assert(int);
int float_to_signed(void) {
  char float_char_of = (char)160.0f, float_char_uf = (char)-160.0f,
       double_char_of = (char)160.0, double_char_uf = (char)-160.0;
  short float_short_of = (short)2234589.0f, float_short_uf = (short)-2234589.0f,
        double_short_of = (short)2234589.0, double_short_uf = (short)-2234589.0;
  int float_int_of = (int)5678134124.1f, float_int_uf = (int)-5678134124.0f,
      double_int_of = (int)5678134124.1, double_int_uf = (int)-5678134124.0;
  long float_long_of = (long)4.1e24f, float_long_uf = (long)-4.1e24f,
       double_long_of = (long)4.1e24, double_long_uf = (long)-4.1e24;
  assert(float_char_of == -96);
  assert(float_char_uf == 96);
  assert(double_char_of == -96);
  assert(double_char_uf == 96);
  assert(float_short_of == 6365);
  assert(float_short_uf == -6365);
  assert(double_short_of == 6365);
  assert(double_short_uf == -6365);
  assert(float_int_of == -2147483648);
  assert(float_int_uf == -2147483648);
  assert(double_int_of == -2147483648);
  assert(double_int_uf == -2147483648);
  assert(LONG_MIN == -9223372036854775807 - 1);
  assert(float_long_of == LONG_MIN);
  assert(float_long_uf == LONG_MIN);
  assert(double_long_of == LONG_MIN);
  assert(double_long_uf == LONG_MIN);
  return 0;
}


x86 assembly (clang, -O0):
<float_to_signed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %al,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    %al,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %ax,-0xc(%rbp)
mov    %eax,-0x10(%rbp)
mov    %eax,-0x14(%rbp)
mov    %eax,-0x18(%rbp)
mov    %eax,-0x1c(%rbp)
mov    %rax,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    %rax,-0x38(%rbp)
mov    %rax,-0x40(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0xffffffa0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsbl -0x2(%rbp),%eax
cmp    $0x60,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsbl -0x3(%rbp),%eax
cmp    $0xffffffa0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsbl -0x4(%rbp),%eax
cmp    $0x60,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movswl -0x6(%rbp),%eax
cmp    $0x18dd,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movswl -0x8(%rbp),%eax
cmp    $0xffffe723,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movswl -0xa(%rbp),%eax
cmp    $0x18dd,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movswl -0xc(%rbp),%eax
cmp    $0xffffe723,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movslq -0x10(%rbp),%rax
cmp    $0xffffffff80000000,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movslq -0x14(%rbp),%rax
cmp    $0xffffffff80000000,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movslq -0x18(%rbp),%rax
cmp    $0xffffffff80000000,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movslq -0x1c(%rbp),%rax
cmp    $0xffffffff80000000,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0x2d8d(%rip),%rax
movslq (%rax),%rax
movabs $0x8000000000000000,%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x28(%rbp),%rax
mov    0x2d65(%rip),%rcx
movslq (%rcx),%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x30(%rbp),%rax
mov    0x2d47(%rip),%rcx
movslq (%rcx),%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x38(%rbp),%rax
mov    0x2d29(%rip),%rcx
movslq (%rcx),%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x40(%rbp),%rax
mov    0x2d0b(%rip),%rcx
movslq (%rcx),%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_to_signed>:
push   %rax
call   1030 <assert@plt>
call   1030 <assert@plt>
call   1030 <assert@plt>
call   1030 <assert@plt>
call   1030 <assert@plt>
call   1030 <assert@plt>
call   1030 <assert@plt>
call   1030 <assert@plt>
call   1030 <assert@plt>
call   1030 <assert@plt>
call   1030 <assert@plt>
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
call   1030 <assert@plt>
call   1030 <assert@plt>
call   1030 <assert@plt>
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@LONG_MIN = global i32 0
define i32 @float_to_signed() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = alloca i16
%6 = alloca i16
%7 = alloca i16
%8 = alloca i16
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
store i8 poison, i8* %1
store i8 poison, i8* %2
store i8 poison, i8* %3
store i8 poison, i8* %4
store i16 poison, i16* %5
store i16 poison, i16* %6
store i16 poison, i16* %7
store i16 poison, i16* %8
store i32 poison, i32* %9
store i32 poison, i32* %10
store i32 poison, i32* %11
store i32 poison, i32* %12
store i64 poison, i64* %13
store i64 poison, i64* %14
store i64 poison, i64* %15
store i64 poison, i64* %16
%17 = load i8, i8* %1
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, -96
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
%22 = load i8, i8* %2
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 96
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
%27 = load i8, i8* %3
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, -96
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30)
%32 = load i8, i8* %4
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %33, 96
%35 = zext i1 %34 to i32
%36 = call i32 @assert(i32 %35)
%37 = load i16, i16* %5
%38 = sext i16 %37 to i32
%39 = icmp eq i32 %38, 6365
%40 = zext i1 %39 to i32
%41 = call i32 @assert(i32 %40)
%42 = load i16, i16* %6
%43 = sext i16 %42 to i32
%44 = icmp eq i32 %43, -6365
%45 = zext i1 %44 to i32
%46 = call i32 @assert(i32 %45)
%47 = load i16, i16* %7
%48 = sext i16 %47 to i32
%49 = icmp eq i32 %48, 6365
%50 = zext i1 %49 to i32
%51 = call i32 @assert(i32 %50)
%52 = load i16, i16* %8
%53 = sext i16 %52 to i32
%54 = icmp eq i32 %53, -6365
%55 = zext i1 %54 to i32
%56 = call i32 @assert(i32 %55)
%57 = load i32, i32* %9
%58 = sext i32 %57 to i64
%59 = icmp eq i64 %58, -2147483648
%60 = zext i1 %59 to i32
%61 = call i32 @assert(i32 %60)
%62 = load i32, i32* %10
%63 = sext i32 %62 to i64
%64 = icmp eq i64 %63, -2147483648
%65 = zext i1 %64 to i32
%66 = call i32 @assert(i32 %65)
%67 = load i32, i32* %11
%68 = sext i32 %67 to i64
%69 = icmp eq i64 %68, -2147483648
%70 = zext i1 %69 to i32
%71 = call i32 @assert(i32 %70)
%72 = load i32, i32* %12
%73 = sext i32 %72 to i64
%74 = icmp eq i64 %73, -2147483648
%75 = zext i1 %74 to i32
%76 = call i32 @assert(i32 %75)
%77 = load i32, i32* @LONG_MIN
%78 = sext i32 %77 to i64
%79 = icmp eq i64 %78, -9223372036854775808
%80 = zext i1 %79 to i32
%81 = call i32 @assert(i32 %80)
%82 = load i64, i64* %13
%83 = load i32, i32* @LONG_MIN
%84 = sext i32 %83 to i64
%85 = icmp eq i64 %82, %84
%86 = zext i1 %85 to i32
%87 = call i32 @assert(i32 %86)
%88 = load i64, i64* %14
%89 = load i32, i32* @LONG_MIN
%90 = sext i32 %89 to i64
%91 = icmp eq i64 %88, %90
%92 = zext i1 %91 to i32
%93 = call i32 @assert(i32 %92)
%94 = load i64, i64* %15
%95 = load i32, i32* @LONG_MIN
%96 = sext i32 %95 to i64
%97 = icmp eq i64 %94, %96
%98 = zext i1 %97 to i32
%99 = call i32 @assert(i32 %98)
%100 = load i64, i64* %16
%101 = load i32, i32* @LONG_MIN
%102 = sext i32 %101 to i64
%103 = icmp eq i64 %100, %102
%104 = zext i1 %103 to i32
%105 = call i32 @assert(i32 %104)
ret i32 0
}

LLVM IR (-O2):
@LONG_MIN = global i32 0
define i32 @float_to_signed() {
%1 = tail call i32 @assert(i32 poison)
%2 = tail call i32 @assert(i32 poison)
%3 = tail call i32 @assert(i32 poison)
%4 = tail call i32 @assert(i32 poison)
%5 = tail call i32 @assert(i32 poison)
%6 = tail call i32 @assert(i32 poison)
%7 = tail call i32 @assert(i32 poison)
%8 = tail call i32 @assert(i32 poison)
%9 = tail call i32 @assert(i32 poison)
%10 = tail call i32 @assert(i32 poison)
%11 = tail call i32 @assert(i32 poison)
%12 = tail call i32 @assert(i32 poison)
%13 = tail call i32 @assert(i32 0)
%14 = tail call i32 @assert(i32 poison)
%15 = tail call i32 @assert(i32 poison)
%16 = tail call i32 @assert(i32 poison)
%17 = tail call i32 @assert(i32 poison)
ret i32 0
}