#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*/ regPrintVal(double, char *);
int /*<<< orphan*/ strcat(char *, char *);
void regPrintRadius(double r, int world, char *buf) {
  double x;
  if (world && r < 1.0) {
    x = r * 60.0;
    regPrintVal(x, buf);
    strcat(buf, "'");
  } else
    regPrintVal(r, buf);
}


x86 assembly (clang, -O0):
<regPrintRadius>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1186 <regPrintRadius+0x66>
movsd  0xeba(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1186 <regPrintRadius+0x66>
movsd  0xeaf(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    -0x18(%rbp),%rdi
call   1030 <regPrintVal@plt>
mov    -0x18(%rbp),%rdi
lea    0xe94(%rip),%rsi
call   1040 <strcat@plt>
jmp    1194 <regPrintRadius+0x74>
movsd  -0x8(%rbp),%xmm0
mov    -0x18(%rbp),%rdi
call   1030 <regPrintVal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<regPrintRadius>:
push   %rbx
mov    %rsi,%rbx
movsd  0xed4(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1156 <regPrintRadius+0x36>
test   %edi,%edi
je     1156 <regPrintRadius+0x36>
mulsd  0xeca(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <regPrintVal@plt>
lea    0xec3(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <strcat@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <regPrintVal@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"'\00"
define void @regPrintRadius(double %0, i32 %1, i8* %2) {
%4 = alloca double
%5 = alloca i32
%6 = alloca i8*
%7 = alloca double
store double %0, double* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = load i32, i32* %5
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %21
10: ; preds = %3
%11 = load double, double* %4
%12 = fcmp olt double %11, 1.000000e+00
br i1 %12, label %13, label %21
13: ; preds = %10
%14 = load double, double* %4
%15 = fmul double %14, 6.000000e+01
store double %15, double* %7
%16 = load double, double* %7
%17 = load i8*, i8** %6
%18 = call i32 @regPrintVal(double %16, i8* %17)
%19 = load i8*, i8** %6
%20 = call i32 @strcat(i8* %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %25
21: ; preds = %10, %3
%22 = load double, double* %4
%23 = load i8*, i8** %6
%24 = call i32 @regPrintVal(double %22, i8* %23)
br label %25
25: ; preds = %21, %13
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"'\00"
define void @regPrintRadius(double %0, i32 %1, i8* %2) {
%4 = icmp ne i32 %1, 0
%5 = fcmp olt double %0, 1.000000e+00
%6 = and i1 %5, %4
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = fmul double %0, 6.000000e+01
%9 = tail call i32 @regPrintVal(double %8, i8* %2)
%10 = tail call i32 @strcat(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %13
11: ; preds = %3
%12 = tail call i32 @regPrintVal(double %0, i8* %2)
br label %13
13: ; preds = %11, %7
ret void
}