#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 *, ...);
test_1() {
  float i, ans, ans1;
  unsigned int *cp = &ans, *cp1 = &ans1;
  i = 0.3010;
  ans = (-1.0) * 0.3010 * 1.0;
  ans1 = (-1.0) * i * 1.0;
  printf("*cp = %08x, *cp1 = %08x\n", *cp, *cp1);
  if (*cp != 0xbe9a1cac) {
    printf("FAIL: %s\n", "float multiple 1");
    ;
  } else {
    printf("PASS: %s\n", "float multiple 1");
    ;
  }
  if (*cp1 != 0xbe9a1cac) {
    printf("FAIL: %s\n", "float multiple 2");
    ;
  } else {
    printf("PASS: %s\n", "float multiple 2");
    ;
  }
}


x86 assembly (clang, -O0):
<test_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
movss  0xee4(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xed3(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeb5(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xea1(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
cmpl   $0xbe9a1cac,(%rax)
je     11b0 <test_1+0xa0>
lea    0xe94(%rip),%rdi
lea    0xe97(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11c5 <test_1+0xb5>
lea    0xe95(%rip),%rdi
lea    0xe7d(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
cmpl   $0xbe9a1cac,(%rax)
je     11ef <test_1+0xdf>
lea    0xe55(%rip),%rdi
lea    0xe73(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1204 <test_1+0xf4>
lea    0xe56(%rip),%rdi
lea    0xe59(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_1>:
push   %rbx
lea    0xee8(%rip),%rdi
mov    $0xbe9a1cac,%esi
mov    $0xbe9a1cac,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xefa(%rip),%rbx
lea    0xee2(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeec(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"*cp = %08x, *cp1 = %08x\0A\00"
@.str.1 = [10 x i8] c"FAIL: %s\0A\00"
@.str.2 = [17 x i8] c"float multiple 1\00"
@.str.3 = [10 x i8] c"PASS: %s\0A\00"
@.str.4 = [17 x i8] c"float multiple 2\00"
define i32 @test_1() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca i32*
%6 = alloca i32*
%7 = bitcast float* %3 to i32*
store i32* %7, i32** %5
%8 = bitcast float* %4 to i32*
store i32* %8, i32** %6
store float 0x3FD3439580000000, float* %2
store float 0xBFD3439580000000, float* %3
%9 = load float, float* %2
%10 = fpext float %9 to double
%11 = fmul double -1.000000e+00, %10
%12 = fmul double %11, 1.000000e+00
%13 = fptrunc double %12 to float
store float %13, float* %4
%14 = load i32*, i32** %5
%15 = load i32, i32* %14
%16 = load i32*, i32** %6
%17 = load i32, i32* %16
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %17)
%19 = load i32*, i32** %5
%20 = load i32, i32* %19
%21 = icmp ne i32 %20, -1097196372
br i1 %21, label %22, label %24
22: ; preds = %0
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
br label %26
24: ; preds = %0
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
br label %26
26: ; preds = %24, %22
%27 = load i32*, i32** %6
%28 = load i32, i32* %27
%29 = icmp ne i32 %28, -1097196372
br i1 %29, label %30, label %32
30: ; preds = %26
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
br label %34
32: ; preds = %26
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
br label %34
34: ; preds = %32, %30
%35 = load i32, i32* %1
ret i32 %35
}

LLVM IR (-O2):
@.str = [25 x i8] c"*cp = %08x, *cp1 = %08x\0A\00"
@.str.2 = [17 x i8] c"float multiple 1\00"
@.str.3 = [10 x i8] c"PASS: %s\0A\00"
@.str.4 = [17 x i8] c"float multiple 2\00"
define i32 @test_1() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 -1097196372, i32 -1097196372)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
ret i32 undef
}