#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *Fopen(char *, char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, double);
int fscanf(int /*<<< orphan*/ *, char *, double *);
int /*<<< orphan*/ stdout;
int OpFile(char *fn1, char *fn2) {
  FILE *F1 = Fopen(fn1, "r"), *F2 = Fopen(fn2, "r");
  double min1, min2;
  while (fscanf(F1, "%lf", &min1) == 1 && fscanf(F2, "%lf", &min2) == 1)
    fprintf(stdout, "%lf\n", min1 - min2);
  if (F1)
    fclose(F1);
  if (F2)
    fclose(F2);
  return 0;
}


x86 assembly (clang, -O0):
<OpFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea5(%rip),%rsi
call   1060 <Fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe91(%rip),%rsi
call   1060 <Fopen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe7f(%rip),%rsi
lea    -0x28(%rbp),%rdx
call   1040 <fscanf@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
mov    %al,-0x31(%rbp)
jne    11b9 <OpFile+0x79>
mov    -0x20(%rbp),%rdi
lea    0xe5b(%rip),%rsi
lea    -0x30(%rbp),%rdx
call   1040 <fscanf@plt>
cmp    $0x1,%eax
sete   %al
mov    %al,-0x31(%rbp)
mov    -0x31(%rbp),%al
test   $0x1,%al
jne    11c9 <OpFile+0x89>
jmp    11ed <OpFile+0xad>
mov    0x2e10(%rip),%rax
mov    (%rax),%edi
movsd  -0x28(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
lea    0xe23(%rip),%rsi
call   1050 <fprintf@plt>
jmp    1178 <OpFile+0x38>
cmpq   $0x0,-0x18(%rbp)
je     1201 <OpFile+0xc1>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
cmpq   $0x0,-0x20(%rbp)
je     1215 <OpFile+0xd5>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OpFile>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
lea    0xea8(%rip),%rbp
mov    %rbp,%rsi
call   1060 <Fopen@plt>
mov    %rax,%r15
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1060 <Fopen@plt>
mov    %rax,%r14
lea    0xe8a(%rip),%rsi
lea    0x8(%rsp),%rdx
mov    %r15,%rdi
call   1040 <fscanf@plt>
cmp    $0x1,%eax
jne    11f3 <OpFile+0xb3>
lea    0xe71(%rip),%rbx
lea    0x10(%rsp),%r12
lea    0xe69(%rip),%r13
lea    0x8(%rsp),%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
call   1040 <fscanf@plt>
cmp    $0x1,%eax
jne    11f3 <OpFile+0xb3>
mov    0x2e16(%rip),%rax
mov    (%rax),%edi
movsd  0x8(%rsp),%xmm0
subsd  0x10(%rsp),%xmm0
mov    %r13,%rsi
call   1050 <fprintf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
call   1040 <fscanf@plt>
cmp    $0x1,%eax
je     11b0 <OpFile+0x70>
test   %r15,%r15
je     1200 <OpFile+0xc0>
mov    %r15,%rdi
call   1030 <fclose@plt>
test   %r14,%r14
je     120d <OpFile+0xcd>
mov    %r14,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [4 x i8] c"%lf\00"
@stdout = global i32 0
@.str.2 = [5 x i8] c"%lf\0A\00"
define i32 @OpFile(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca double
%8 = alloca double
store i8* %0, i8** %3
store i8* %1, i8** %4
%9 = load i8*, i8** %3
%10 = call i32* @Fopen(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %10, i32** %5
%11 = load i8*, i8** %4
%12 = call i32* @Fopen(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %12, i32** %6
br label %13
13: ; preds = %23, %2
%14 = load i32*, i32** %5
%15 = call i32 @fscanf(i32* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %7)
%16 = icmp eq i32 %15, 1
br i1 %16, label %17, label %21
17: ; preds = %13
%18 = load i32*, i32** %6
%19 = call i32 @fscanf(i32* %18, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %8)
%20 = icmp eq i32 %19, 1
br label %21
21: ; preds = %17, %13
%22 = phi i1 [ false, %13 ], [ %20, %17 ]
br i1 %22, label %23, label %29
23: ; preds = %21
%24 = load i32, i32* @stdout
%25 = load double, double* %7
%26 = load double, double* %8
%27 = fsub double %25, %26
%28 = call i32 @fprintf(i32 %24, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), double %27)
br label %13
29: ; preds = %21
%30 = load i32*, i32** %5
%31 = icmp ne i32* %30, null
br i1 %31, label %32, label %35
32: ; preds = %29
%33 = load i32*, i32** %5
%34 = call i32 @fclose(i32* %33)
br label %35
35: ; preds = %32, %29
%36 = load i32*, i32** %6
%37 = icmp ne i32* %36, null
br i1 %37, label %38, label %41
38: ; preds = %35
%39 = load i32*, i32** %6
%40 = call i32 @fclose(i32* %39)
br label %41
41: ; preds = %38, %35
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [4 x i8] c"%lf\00"
@stdout = global i32 0
@.str.2 = [5 x i8] c"%lf\0A\00"
define i32 @OpFile(i8* %0, i8* %1) {
%3 = alloca double
%4 = alloca double
%5 = tail call i32* @Fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32* @Fopen(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = bitcast double* %3 to i8*
%8 = bitcast double* %4 to i8*
%9 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %22
11: ; preds = %2, %14
%12 = call i32 @fscanf(i32* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %4)
%13 = icmp eq i32 %12, 1
br i1 %13, label %14, label %22
14: ; preds = %11
%15 = load i32, i32* @stdout
%16 = load double, double* %3
%17 = load double, double* %4
%18 = fsub double %16, %17
%19 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), double %18)
%20 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
%21 = icmp eq i32 %20, 1
br i1 %21, label %11, label %22
22: ; preds = %11, %14, %2
%23 = icmp eq i32* %5, null
br i1 %23, label %26, label %24
24: ; preds = %22
%25 = call i32 @fclose(i32* %5)
br label %26
26: ; preds = %24, %22
%27 = icmp eq i32* %6, null
br i1 %27, label %30, label %28
28: ; preds = %26
%29 = call i32 @fclose(i32* %6)
br label %30
30: ; preds = %28, %26
ret i32 0
}