#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 *, ...);
int handler_g01_test4(int *a, 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!\n");
  else
    printf("Fail!\n");
  return 0;
}


x86 assembly (clang, -O0):
<handler_g01_test4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
lea    0xed5(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  0xea1(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11d9 <handler_g01_test4+0xc9>
jp     11d9 <handler_g01_test4+0xc9>
movsd  -0x18(%rbp),%xmm0
movsd  0xe8c(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11d9 <handler_g01_test4+0xc9>
jp     11d9 <handler_g01_test4+0xc9>
movsd  -0x20(%rbp),%xmm0
movsd  0xe77(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11d9 <handler_g01_test4+0xc9>
jp     11d9 <handler_g01_test4+0xc9>
movsd  -0x28(%rbp),%xmm0
movsd  0xe62(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11d9 <handler_g01_test4+0xc9>
jp     11d9 <handler_g01_test4+0xc9>
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11e7 <handler_g01_test4+0xd7>
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%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    0xedd(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
ucomisd 0xea8(%rip),%xmm0
lea    0xed6(%rip),%rax
lea    0xed5(%rip),%rdi
cmovne %rax,%rdi
cmovp  %rax,%rdi
movsd  0x10(%rsp),%xmm0
ucomisd 0xe8c(%rip),%xmm0
cmovne %rax,%rdi
cmovp  %rax,%rdi
movsd  0x18(%rsp),%xmm0
ucomisd 0xe7e(%rip),%xmm0
cmovne %rax,%rdi
cmovp  %rax,%rdi
movsd  0x20(%rsp),%xmm0
ucomisd 0xe70(%rip),%xmm0
cmovne %rax,%rdi
cmovp  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

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

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