#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 getLoveValue(char *);
int /*<<< orphan*/ *gets(char *);
int /*<<< orphan*/ printf(char *, double);
int main(void) {
  char nameOne[30 + 1], nameTwo[30 + 1];
  int valOne, valTwo;
  double ratio;
  while (gets(nameOne) != NULL) {
    gets(nameTwo);
    valOne = getLoveValue(nameOne);
    valTwo = getLoveValue(nameTwo);
    if (valOne < valTwo)
      ratio = valOne / (double)valTwo;
    else
      ratio = valTwo / (double)valOne;
    ratio *= 100;
    printf("%.2f %%\n", ratio);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
call   1050 <gets@plt>
cmp    $0x0,%rax
je     11d2 <main+0xa2>
lea    -0x50(%rbp),%rdi
call   1050 <gets@plt>
lea    -0x30(%rbp),%rdi
call   1030 <getLoveValue@plt>
mov    %eax,-0x54(%rbp)
lea    -0x50(%rbp),%rdi
call   1030 <getLoveValue@plt>
mov    %eax,-0x58(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x58(%rbp),%eax
jge    1197 <main+0x67>
cvtsi2sdl -0x54(%rbp),%xmm0
cvtsi2sdl -0x58(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    11aa <main+0x7a>
cvtsi2sdl -0x58(%rbp),%xmm0
cvtsi2sdl -0x54(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xe4e(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
lea    0xe40(%rip),%rdi
call   1040 <printf@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %rsp,%rdi
call   1050 <gets@plt>
test   %rax,%rax
je     11b3 <main+0x83>
lea    0x20(%rsp),%r14
mov    %rsp,%rbx
lea    0xeb2(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1050 <gets@plt>
mov    %rbx,%rdi
call   1030 <getLoveValue@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1030 <getLoveValue@plt>
cmp    %eax,%ebp
mov    %eax,%ecx
cmovl  %ebp,%ecx
cmovl  %eax,%ebp
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %ebp,%xmm1
divsd  %xmm1,%xmm0
mulsd  0xe62(%rip),%xmm0
mov    %r15,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1050 <gets@plt>
test   %rax,%rax
jne    1160 <main+0x30>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%.2f %%\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [31 x i8]
%3 = alloca [31 x i8]
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
store i32 0, i32* %1
br label %7
7: ; preds = %33, %0
%8 = getelementptr inbounds [31 x i8], [31 x i8]* %2, i64 0, i64 0
%9 = call i32* @gets(i8* %8)
%10 = icmp ne i32* %9, null
br i1 %10, label %11, label %38
11: ; preds = %7
%12 = getelementptr inbounds [31 x i8], [31 x i8]* %3, i64 0, i64 0
%13 = call i32* @gets(i8* %12)
%14 = getelementptr inbounds [31 x i8], [31 x i8]* %2, i64 0, i64 0
%15 = call i32 @getLoveValue(i8* %14)
store i32 %15, i32* %4
%16 = getelementptr inbounds [31 x i8], [31 x i8]* %3, i64 0, i64 0
%17 = call i32 @getLoveValue(i8* %16)
store i32 %17, i32* %5
%18 = load i32, i32* %4
%19 = load i32, i32* %5
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %27
21: ; preds = %11
%22 = load i32, i32* %4
%23 = sitofp i32 %22 to double
%24 = load i32, i32* %5
%25 = sitofp i32 %24 to double
%26 = fdiv double %23, %25
store double %26, double* %6
br label %33
27: ; preds = %11
%28 = load i32, i32* %5
%29 = sitofp i32 %28 to double
%30 = load i32, i32* %4
%31 = sitofp i32 %30 to double
%32 = fdiv double %29, %31
store double %32, double* %6
br label %33
33: ; preds = %27, %21
%34 = load double, double* %6
%35 = fmul double %34, 1.000000e+02
store double %35, double* %6
%36 = load double, double* %6
%37 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double %36)
br label %7
38: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%.2f %%\0A\00"
define i32 @main() {
%1 = alloca [31 x i8]
%2 = alloca [31 x i8]
%3 = getelementptr inbounds [31 x i8], [31 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [31 x i8], [31 x i8]* %2, i64 0, i64 0
%5 = call i32* @gets(i8* %3)
%6 = icmp eq i32* %5, null
br i1 %6, label %21, label %7
7: ; preds = %0, %7
%8 = call i32* @gets(i8* %4)
%9 = call i32 @getLoveValue(i8* %3)
%10 = call i32 @getLoveValue(i8* %4)
%11 = icmp slt i32 %9, %10
%12 = select i1 %11, i32 %9, i32 %10
%13 = select i1 %11, i32 %10, i32 %9
%14 = sitofp i32 %12 to double
%15 = sitofp i32 %13 to double
%16 = fdiv double %14, %15
%17 = fmul double %16, 1.000000e+02
%18 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double %17)
%19 = call i32* @gets(i8* %3)
%20 = icmp eq i32* %19, null
br i1 %20, label %21, label %7
21: ; preds = %7, %0
ret i32 0
}