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


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

x86 assembly (clang, -O2):
<reg_print_radius>:
push   %rbx
mov    %rsi,%rbx
movsd  0xed4(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1157 <reg_print_radius+0x37>
cmp    $0x3,%edi
jne    1157 <reg_print_radius+0x37>
mulsd  0xec9(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <reg_print_val@plt>
lea    0xec2(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <strcat@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <reg_print_val@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"'\00"
define void @reg_print_radius(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 eq i32 %8, 3
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 @reg_print_val(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 @reg_print_val(double %22, i8* %23)
br label %25
25: ; preds = %21, %13
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"'\00"
define void @reg_print_radius(double %0, i32 %1, i8* %2) {
%4 = icmp eq i32 %1, 3
%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 @reg_print_val(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 @reg_print_val(double %0, i8* %2)
br label %13
13: ; preds = %11, %7
ret void
}