#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 */
scalar_t__ gets(char *);
int love(char *);
int /*<<< orphan*/ printf(char *, float);
int ratio(int);
int main() {
  char p1[26], p2[26];
  int f1, f2;
  float Love, n1, n2;
  while (gets(p1)) {
    gets(p2);
    f1 = love(p1);
    f2 = love(p2);
    f1 = ratio(f1);
    n1 = f1;
    f2 = ratio(f2);
    n2 = f2;
    if (n1 > n2)
      Love = (n2 / n1) * 100.0;
    else
      Love = (n1 / n2) * 100.0;
    printf("%.2f %%\n", Love);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
call   1050 <gets@plt>
cmp    $0x0,%rax
je     121d <main+0xdd>
lea    -0x40(%rbp),%rdi
call   1050 <gets@plt>
lea    -0x20(%rbp),%rdi
call   1040 <love@plt>
mov    %eax,-0x44(%rbp)
lea    -0x40(%rbp),%rdi
call   1040 <love@plt>
mov    %eax,-0x48(%rbp)
mov    -0x44(%rbp),%edi
call   1060 <ratio@plt>
mov    %eax,-0x44(%rbp)
cvtsi2ssl -0x44(%rbp),%xmm0
movss  %xmm0,-0x50(%rbp)
mov    -0x48(%rbp),%edi
call   1060 <ratio@plt>
mov    %eax,-0x48(%rbp)
cvtsi2ssl -0x48(%rbp),%xmm0
movss  %xmm0,-0x54(%rbp)
movss  -0x50(%rbp),%xmm0
ucomiss -0x54(%rbp),%xmm0
jbe    11e4 <main+0xa4>
movss  -0x54(%rbp),%xmm0
divss  -0x50(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe2e(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4c(%rbp)
jmp    1207 <main+0xc7>
movss  -0x50(%rbp),%xmm0
divss  -0x54(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe06(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  -0x4c(%rbp),%xmm0
lea    0xdf5(%rip),%rdi
call   1030 <printf@plt>
jmp    114f <main+0xf>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x50,%rsp
lea    0x10(%rsp),%rdi
call   1050 <gets@plt>
test   %rax,%rax
je     11f3 <main+0xb3>
lea    0x30(%rsp),%r14
lea    0x10(%rsp),%r12
lea    0xe94(%rip),%r15
jmp    11a4 <main+0x64>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
mulss  0xe71(%rip),%xmm0
mov    %r15,%rdi
call   1030 <printf@plt>
mov    %r12,%rdi
call   1050 <gets@plt>
test   %rax,%rax
je     11f3 <main+0xb3>
mov    %r14,%rdi
call   1050 <gets@plt>
mov    %r12,%rdi
call   1040 <love@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1040 <love@plt>
mov    %eax,%ebx
mov    %ebp,%edi
call   1060 <ratio@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0xc(%rsp)
mov    %ebx,%edi
call   1060 <ratio@plt>
movss  0xc(%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
ucomiss %xmm0,%xmm1
jbe    1180 <main+0x40>
divss  %xmm1,%xmm0
jmp    1187 <main+0x47>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
pop    %r12
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 [26 x i8]
%3 = alloca [26 x i8]
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
%7 = alloca float
%8 = alloca float
store i32 0, i32* %1
br label %9
9: ; preds = %45, %0
%10 = getelementptr inbounds [26 x i8], [26 x i8]* %2, i64 0, i64 0
%11 = call i64 @gets(i8* %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %48
13: ; preds = %9
%14 = getelementptr inbounds [26 x i8], [26 x i8]* %3, i64 0, i64 0
%15 = call i64 @gets(i8* %14)
%16 = getelementptr inbounds [26 x i8], [26 x i8]* %2, i64 0, i64 0
%17 = call i32 @love(i8* %16)
store i32 %17, i32* %4
%18 = getelementptr inbounds [26 x i8], [26 x i8]* %3, i64 0, i64 0
%19 = call i32 @love(i8* %18)
store i32 %19, i32* %5
%20 = load i32, i32* %4
%21 = call i32 @ratio(i32 %20)
store i32 %21, i32* %4
%22 = load i32, i32* %4
%23 = sitofp i32 %22 to float
store float %23, float* %7
%24 = load i32, i32* %5
%25 = call i32 @ratio(i32 %24)
store i32 %25, i32* %5
%26 = load i32, i32* %5
%27 = sitofp i32 %26 to float
store float %27, float* %8
%28 = load float, float* %7
%29 = load float, float* %8
%30 = fcmp ogt float %28, %29
br i1 %30, label %31, label %38
31: ; preds = %13
%32 = load float, float* %8
%33 = load float, float* %7
%34 = fdiv float %32, %33
%35 = fpext float %34 to double
%36 = fmul double %35, 1.000000e+02
%37 = fptrunc double %36 to float
store float %37, float* %6
br label %45
38: ; preds = %13
%39 = load float, float* %7
%40 = load float, float* %8
%41 = fdiv float %39, %40
%42 = fpext float %41 to double
%43 = fmul double %42, 1.000000e+02
%44 = fptrunc double %43 to float
store float %44, float* %6
br label %45
45: ; preds = %38, %31
%46 = load float, float* %6
%47 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %46)
br label %9
48: ; preds = %9
ret i32 0
}

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