#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*/ reg_print_pos(double, int, char *);
void reg_print_pos_pair(double x, double y, int world, char *xbuf, char *ybuf) {
  if (world == 3)
    reg_print_pos(x / 15.0, world, xbuf);
  else
    reg_print_pos(x, world, xbuf);
  reg_print_pos(y, world, ybuf);
}


x86 assembly (clang, -O0):
<reg_print_pos_pair>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
cmpl   $0x3,-0x14(%rbp)
jne    1159 <reg_print_pos_pair+0x49>
movsd  -0x8(%rbp),%xmm0
movsd  0xebc(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   1030 <reg_print_pos@plt>
jmp    116a <reg_print_pos_pair+0x5a>
movsd  -0x8(%rbp),%xmm0
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   1030 <reg_print_pos@plt>
movsd  -0x10(%rbp),%xmm0
mov    -0x14(%rbp),%edi
mov    -0x28(%rbp),%rsi
call   1030 <reg_print_pos@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg_print_pos_pair>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %edi,%ebp
movsd  %xmm1,(%rsp)
cmp    $0x3,%edi
jne    1131 <reg_print_pos_pair+0x21>
divsd  0xed6(%rip),%xmm0
mov    $0x3,%edi
jmp    1133 <reg_print_pos_pair+0x23>
mov    %ebp,%edi
call   1030 <reg_print_pos@plt>
movsd  (%rsp),%xmm0
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <reg_print_pos@plt>

LLVM IR (-O0):
define void @reg_print_pos_pair(double %0, double %1, i32 %2, i8* %3, i8* %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
store double %0, double* %6
store double %1, double* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load i32, i32* %8
%12 = icmp eq i32 %11, 3
br i1 %12, label %13, label %19
13: ; preds = %5
%14 = load double, double* %6
%15 = fdiv double %14, 1.500000e+01
%16 = load i32, i32* %8
%17 = load i8*, i8** %9
%18 = call i32 @reg_print_pos(double %15, i32 %16, i8* %17)
br label %24
19: ; preds = %5
%20 = load double, double* %6
%21 = load i32, i32* %8
%22 = load i8*, i8** %9
%23 = call i32 @reg_print_pos(double %20, i32 %21, i8* %22)
br label %24
24: ; preds = %19, %13
%25 = load double, double* %7
%26 = load i32, i32* %8
%27 = load i8*, i8** %10
%28 = call i32 @reg_print_pos(double %25, i32 %26, i8* %27)
ret void
}

LLVM IR (-O2):
define void @reg_print_pos_pair(double %0, double %1, i32 %2, i8* %3, i8* %4) {
%6 = icmp eq i32 %2, 3
br i1 %6, label %7, label %10
7: ; preds = %5
%8 = fdiv double %0, 1.500000e+01
%9 = tail call i32 @reg_print_pos(double %8, i32 3, i8* %3)
br label %12
10: ; preds = %5
%11 = tail call i32 @reg_print_pos(double %0, i32 %2, i8* %3)
br label %12
12: ; preds = %10, %7
%13 = tail call i32 @reg_print_pos(double %1, i32 %2, i8* %4)
ret void
}