#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*/ SEEK_SET;
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, float *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
float getdelta(FILE *fp) {
  fseek(fp, SEEK_SET, sizeof(int));
  int i;
  float area = 1;
  float delta[2];
  for (i = 0; i < 2; i++) {
    fscanf(fp, "%f", &delta[i]);
    area *= delta[i];
  }
  return area;
}


x86 assembly (clang, -O0):
<getdelta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
mov    $0x4,%edx
call   1040 <fseek@plt>
movss  0xeb5(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jge    11a2 <getdelta+0x82>
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
lea    -0x18(%rbp),%rdx
shl    $0x2,%rax
add    %rax,%rdx
lea    0xe89(%rip),%rsi
call   1030 <fscanf@plt>
movslq -0xc(%rbp),%rax
movss  -0x18(%rbp,%rax,4),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1157 <getdelta+0x37>
movss  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getdelta>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%rbx
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
mov    $0x4,%edx
call   1040 <fseek@plt>
lea    0xebc(%rip),%r14
lea    0x10(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <fscanf@plt>
movss  0x10(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
lea    0x14(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <fscanf@plt>
movss  0xc(%rsp),%xmm0
mulss  0x14(%rsp),%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@SEEK_SET = global i32 0
@.str = [3 x i8] c"%f\00"
define float @getdelta(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca float
%5 = alloca [2 x float]
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = load i32, i32* @SEEK_SET
%8 = call i32 @fseek(i32* %6, i32 %7, i32 4)
store float 1.000000e+00, float* %4
store i32 0, i32* %3
br label %9
9: ; preds = %24, %1
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 2
br i1 %11, label %12, label %27
12: ; preds = %9
%13 = load i32*, i32** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [2 x float], [2 x float]* %5, i64 0, i64 %15
%17 = call i32 @fscanf(i32* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %16)
%18 = load i32, i32* %3
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [2 x float], [2 x float]* %5, i64 0, i64 %19
%21 = load float, float* %20
%22 = load float, float* %4
%23 = fmul float %22, %21
store float %23, float* %4
br label %24
24: ; preds = %12
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
br label %9
27: ; preds = %9
%28 = load float, float* %4
ret float %28
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
@.str = [3 x i8] c"%f\00"
define float @getdelta(i32* nocapture %0) {
%2 = alloca [2 x float]
%3 = load i32, i32* @SEEK_SET
%4 = tail call i32 @fseek(i32* %0, i32 %3, i32 4)
%5 = bitcast [2 x float]* %2 to i8*
%6 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
%7 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %6)
%8 = load float, float* %6
%9 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 1
%10 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %9)
%11 = load float, float* %9
%12 = fmul float %8, %11
ret float %12
}