#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 *, ...);
void handler_g01_test4(double x, double y, double z, double f) {
  printf("G1: X%f Y%f Z%f F%f\n", x, y, z, f);
  if (x == 2 && y == 3 && z == 4 && f == 5)
    printf("pass!");
  else
    printf("fail!");
}


x86 assembly (clang, -O0):
<handler_g01_test4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
lea    0xed9(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  0xea5(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11d5 <handler_g01_test4+0xc5>
jp     11d5 <handler_g01_test4+0xc5>
movsd  -0x10(%rbp),%xmm0
movsd  0xe90(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11d5 <handler_g01_test4+0xc5>
jp     11d5 <handler_g01_test4+0xc5>
movsd  -0x18(%rbp),%xmm0
movsd  0xe7b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11d5 <handler_g01_test4+0xc5>
jp     11d5 <handler_g01_test4+0xc5>
movsd  -0x20(%rbp),%xmm0
movsd  0xe66(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11d5 <handler_g01_test4+0xc5>
jp     11d5 <handler_g01_test4+0xc5>
lea    0xe6c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11e3 <handler_g01_test4+0xd3>
lea    0xe5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handler_g01_test4>:
sub    $0x28,%rsp
movsd  %xmm3,0x8(%rsp)
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,0x18(%rsp)
movsd  %xmm0,0x20(%rsp)
lea    0xeed(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
movsd  0x8(%rsp),%xmm0
ucomisd 0xeb8(%rip),%xmm0
lea    0xeec(%rip),%rax
lea    0xedf(%rip),%rdi
cmovne %rax,%rdi
cmovp  %rax,%rdi
movsd  0x10(%rsp),%xmm0
ucomisd 0xe9c(%rip),%xmm0
cmovne %rax,%rdi
cmovp  %rax,%rdi
movsd  0x18(%rsp),%xmm0
ucomisd 0xe8e(%rip),%xmm0
cmovne %rax,%rdi
cmovp  %rax,%rdi
movsd  0x20(%rsp),%xmm0
ucomisd 0xe80(%rip),%xmm0
cmovne %rax,%rdi
cmovp  %rax,%rdi
xor    %eax,%eax
add    $0x28,%rsp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"G1: X%f Y%f Z%f F%f\0A\00"
@.str.1 = [6 x i8] c"pass!\00"
@.str.2 = [6 x i8] c"fail!\00"
define void @handler_g01_test4(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %6
%11 = load double, double* %7
%12 = load double, double* %8
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), double %9, double %10, double %11, double %12)
%14 = load double, double* %5
%15 = fcmp oeq double %14, 2.000000e+00
br i1 %15, label %16, label %27
16: ; preds = %4
%17 = load double, double* %6
%18 = fcmp oeq double %17, 3.000000e+00
br i1 %18, label %19, label %27
19: ; preds = %16
%20 = load double, double* %7
%21 = fcmp oeq double %20, 4.000000e+00
br i1 %21, label %22, label %27
22: ; preds = %19
%23 = load double, double* %8
%24 = fcmp oeq double %23, 5.000000e+00
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %29
27: ; preds = %22, %19, %16, %4
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %29
29: ; preds = %27, %25
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"G1: X%f Y%f Z%f F%f\0A\00"
@.str.1 = [6 x i8] c"pass!\00"
@.str.2 = [6 x i8] c"fail!\00"
define void @handler_g01_test4(double %0, double %1, double %2, double %3) {
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), double %0, double %1, double %2, double %3)
%6 = fcmp oeq double %0, 2.000000e+00
%7 = fcmp oeq double %1, 3.000000e+00
%8 = and i1 %6, %7
%9 = fcmp oeq double %2, 4.000000e+00
%10 = and i1 %8, %9
%11 = fcmp oeq double %3, 5.000000e+00
%12 = and i1 %10, %11
%13 = select i1 %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %13)
ret void
}