#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*/ fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, int *, int *, float *,
                          float *);
void skip_float_block(FILE *f) {
  int words, bits, i, count, bytes;
  float a, b;
  char line[80];
  fscanf(f, "%d %d %f %f", &words, &bits, &a, &b);
  fgetc(f);
  bytes = (bits + 5) / 6;
  count = 0;
  while (count < words) {
    fgets(line, 80, f);
    for (i = 0; i < 78 / bytes && count < words; i++) {
      count++;
    }
  }
}


x86 assembly (clang, -O0):
<skip_float_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb6(%rip),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x20(%rbp),%r8
lea    -0x24(%rbp),%r9
call   1030 <fscanf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fgetc@plt>
mov    -0x10(%rbp),%eax
add    $0x5,%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1201 <skip_float_block+0xd1>
lea    -0x80(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x50,%esi
call   1050 <fgets@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    $0x4e,%eax
cltd
idivl  -0x1c(%rbp)
mov    %eax,%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x81(%rbp)
jge    11d2 <skip_float_block+0xa2>
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
setl   %al
mov    %al,-0x81(%rbp)
mov    -0x81(%rbp),%al
test   $0x1,%al
jne    11e5 <skip_float_block+0xb5>
jmp    11fc <skip_float_block+0xcc>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11a5 <skip_float_block+0x75>
jmp    1180 <skip_float_block+0x50>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_float_block>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %rdi,%r15
lea    0xebb(%rip),%rsi
mov    %rsp,%rdx
lea    0x4(%rsp),%rcx
lea    0xc(%rsp),%r8
lea    0x8(%rsp),%r9
call   1030 <fscanf@plt>
mov    %r15,%rdi
call   1040 <fgetc@plt>
cmpl   $0x0,(%rsp)
jle    11e3 <skip_float_block+0xb3>
mov    0x4(%rsp),%eax
add    $0x5,%eax
cltq
imul   $0x2aaaaaab,%rax,%r12
mov    %r12,%rax
shr    $0x3f,%rax
shr    $0x20,%r12
add    %eax,%r12d
xor    %ebx,%ebx
lea    0x10(%rsp),%r14
jmp    11a4 <skip_float_block+0x74>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmp    %ecx,%ebx
jge    11e3 <skip_float_block+0xb3>
mov    %r14,%rdi
mov    $0x50,%esi
mov    %r15,%rdx
call   1050 <fgets@plt>
mov    $0x4e,%eax
xor    %edx,%edx
idiv   %r12d
mov    (%rsp),%ecx
test   %eax,%eax
jle    11a0 <skip_float_block+0x70>
cmp    %ecx,%ebx
jge    11a0 <skip_float_block+0x70>
add    $0xffffffff,%eax
mov    %ebx,%edx
not    %edx
add    %ecx,%edx
cmp    %eax,%edx
cmovae %eax,%edx
test   %eax,%eax
cmove  %eax,%edx
add    %edx,%ebx
add    $0x1,%ebx
jmp    11a0 <skip_float_block+0x70>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%d %d %f %f\00"
define void @skip_float_block(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca [80 x i8]
store i32* %0, i32** %2
%11 = load i32*, i32** %2
%12 = call i32 @fscanf(i32* %11, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4, float* %8, float* %9)
%13 = load i32*, i32** %2
%14 = call i32 @fgetc(i32* %13)
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 5
%17 = sdiv i32 %16, 6
store i32 %17, i32* %7
store i32 0, i32* %6
br label %18
18: ; preds = %43, %1
%19 = load i32, i32* %6
%20 = load i32, i32* %3
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %44
22: ; preds = %18
%23 = getelementptr inbounds [80 x i8], [80 x i8]* %10, i64 0, i64 0
%24 = load i32*, i32** %2
%25 = call i32 @fgets(i8* %23, i32 80, i32* %24)
store i32 0, i32* %5
br label %26
26: ; preds = %40, %22
%27 = load i32, i32* %5
%28 = load i32, i32* %7
%29 = sdiv i32 78, %28
%30 = icmp slt i32 %27, %29
br i1 %30, label %31, label %35
31: ; preds = %26
%32 = load i32, i32* %6
%33 = load i32, i32* %3
%34 = icmp slt i32 %32, %33
br label %35
35: ; preds = %31, %26
%36 = phi i1 [ false, %26 ], [ %34, %31 ]
br i1 %36, label %37, label %43
37: ; preds = %35
%38 = load i32, i32* %6
%39 = add nsw i32 %38, 1
store i32 %39, i32* %6
br label %40
40: ; preds = %37
%41 = load i32, i32* %5
%42 = add nsw i32 %41, 1
store i32 %42, i32* %5
br label %26
43: ; preds = %35
br label %18
44: ; preds = %18
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d %d %f %f\00"
define void @skip_float_block(i32* nocapture %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = alloca float
%6 = alloca [80 x i8]
%7 = bitcast i32* %2 to i8*
%8 = bitcast i32* %3 to i8*
%9 = bitcast float* %4 to i8*
%10 = bitcast float* %5 to i8*
%11 = getelementptr inbounds [80 x i8], [80 x i8]* %6, i64 0, i64 0
%12 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, float* %4, float* %5)
%13 = call i32 @fgetc(i32* %0)
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 5
%16 = sdiv i32 %15, 6
%17 = load i32, i32* %2
%18 = icmp sgt i32 %17, 0
br i1 %18, label %22, label %39
19: ; preds = %30, %22
%20 = phi i32 [ %23, %22 ], [ %38, %30 ]
%21 = icmp slt i32 %20, %26
br i1 %21, label %22, label %39
22: ; preds = %1, %19
%23 = phi i32 [ %20, %19 ], [ 0, %1 ]
%24 = call i32 @fgets(i8* %11, i32 80, i32* %0)
%25 = sdiv i32 78, %16
%26 = load i32, i32* %2
%27 = icmp sgt i32 %25, 0
%28 = icmp slt i32 %23, %26
%29 = select i1 %27, i1 %28, i1 false
br i1 %29, label %30, label %19
30: ; preds = %22
%31 = add nsw i32 %25, -1
%32 = xor i32 %23, -1
%33 = add i32 %26, %32
%34 = icmp eq i32 %31, 0
%35 = call i32 @llvm.umin.i32(i32 %33, i32 %31)
%36 = select i1 %34, i32 0, i32 %35
%37 = add nsw i32 %23, 1
%38 = add i32 %37, %36
br label %19
39: ; preds = %19, %1
ret void
}