#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 EXIT_SUCCESS;
int /*<<< orphan*/ error(char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned int,
                           unsigned int, unsigned int, unsigned int,
                           unsigned int, unsigned int, unsigned int,
                           unsigned int);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, unsigned int *,
                          unsigned int *, unsigned int *, unsigned int *,
                          unsigned int *, unsigned int *, unsigned int *,
                          unsigned int *);
scalar_t__ round(unsigned int);
int /*<<< orphan*/ sscanf(char *, char *, float *);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ usage();
int main(int argc, char **argv) {
  FILE *filep;
  float irate;
  unsigned start;
  unsigned size;
  unsigned srcx, srcy, srcz;
  unsigned destx, desty, destz;
  if (argc < 3)
    usage();
  sscanf(argv[2], "%f", &irate);
  if (irate < 1.0)
    irate += 1.0;
  filep = fopen(argv[1], "r");
  if (filep == NULL)
    error("failed to open input file");
  fscanf(filep, "%u %u %u %u %u %u %u %u\n", &start, &srcx, &srcy, &srcz,
         &destx, &desty, &destz, &size);
  while (!feof(filep)) {
    start = (unsigned)round(start * irate);
    fprintf(stdout, "%u %u %u %u %u %u %u %u\n", start, srcx, srcy, srcz, destx,
            desty, destz, size);
    fscanf(filep, "%u %u %u %u %u %u %u %u\n", &start, &srcx, &srcy, &srcz,
           &destx, &desty, &destz, &size);
  }
  fclose(filep);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x68,%rsp
movl   $0x0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpl   $0x3,-0x10(%rbp)
jge    11b8 <main+0x28>
mov    $0x0,%al
call   1080 <usage@plt>
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe41(%rip),%rsi
lea    -0x24(%rbp),%rdx
call   1070 <sscanf@plt>
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe1f(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1209 <main+0x79>
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe04(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdf3(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1238 <main+0xa8>
lea    0xdda(%rip),%rdi
call   1090 <error@plt>
mov    -0x20(%rbp),%rdi
lea    0xde4(%rip),%rsi
lea    -0x28(%rbp),%rdx
lea    -0x30(%rbp),%rcx
lea    -0x34(%rbp),%r8
lea    -0x38(%rbp),%r9
lea    -0x3c(%rbp),%rbx
lea    -0x40(%rbp),%r11
lea    -0x44(%rbp),%r10
lea    -0x2c(%rbp),%rax
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1040 <fscanf@plt>
mov    -0x20(%rbp),%rdi
call   1060 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1299 <main+0x109>
jmp    1343 <main+0x1b3>
mov    -0x28(%rbp),%eax
cvtsi2ss %rax,%xmm0
movss  -0x24(%rbp),%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%rax
mov    %eax,%edi
call   10b0 <round@plt>
mov    %eax,-0x28(%rbp)
mov    0x2d20(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%edx
mov    -0x30(%rbp),%ecx
mov    -0x34(%rbp),%r8d
mov    -0x38(%rbp),%r9d
mov    -0x3c(%rbp),%ebx
mov    -0x40(%rbp),%r11d
mov    -0x44(%rbp),%r10d
mov    -0x2c(%rbp),%eax
lea    0xd42(%rip),%rsi
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xd21(%rip),%rsi
lea    -0x28(%rbp),%rdx
lea    -0x30(%rbp),%rcx
lea    -0x34(%rbp),%r8
lea    -0x38(%rbp),%r9
lea    -0x3c(%rbp),%rbx
lea    -0x40(%rbp),%r11
lea    -0x44(%rbp),%r10
lea    -0x2c(%rbp),%rax
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1040 <fscanf@plt>
jmp    127b <main+0xeb>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
mov    0x2c85(%rip),%rax
mov    (%rax),%eax
add    $0x68,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%rbx
cmp    $0x2,%edi
jg     11ad <main+0x1d>
xor    %eax,%eax
call   1080 <usage@plt>
mov    0x10(%rbx),%rdi
lea    0xe4c(%rip),%rsi
lea    0x10(%rsp),%rdx
call   1070 <sscanf@plt>
movss  0x10(%rsp),%xmm0
movss  0xe30(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    11e3 <main+0x53>
addss  0xe23(%rip),%xmm0
movss  %xmm0,0x10(%rsp)
mov    0x8(%rbx),%rdi
lea    0xe19(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1207 <main+0x77>
lea    0xe07(%rip),%rdi
call   1090 <error@plt>
lea    0x2c(%rsp),%r13
lea    0x20(%rsp),%r15
lea    0x24(%rsp),%r14
lea    0x28(%rsp),%r12
lea    0xe01(%rip),%rsi
lea    0xc(%rsp),%rdx
lea    0x1c(%rsp),%rcx
lea    0x18(%rsp),%r8
lea    0x14(%rsp),%r9
mov    %rbx,%rdi
nopl   0x0(%rax)
push   %r13
push   %r15
push   %r14
push   %r12
call   1040 <fscanf@plt>
add    $0x20,%rsp
mov    %rbx,%rdi
call   1060 <feof@plt>
test   %eax,%eax
jne    12f1 <main+0x161>
mov    0xc(%rsp),%eax
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
mulss  0x10(%rsp),%xmm0
cvttss2si %xmm0,%rdi
call   10b0 <round@plt>
mov    %eax,0xc(%rsp)
mov    0x2d58(%rip),%rcx
mov    (%rcx),%edi
mov    0x1c(%rsp),%ecx
mov    0x18(%rsp),%r8d
mov    0x14(%rsp),%r9d
mov    0x28(%rsp),%edx
mov    %rdx,0x30(%rsp)
mov    0x24(%rsp),%r11d
mov    0x20(%rsp),%ebp
mov    %rbx,%r10
mov    0x2c(%rsp),%ebx
lea    0xd6b(%rip),%rsi
mov    %eax,%edx
push   %rbx
mov    %r10,%rbx
push   %rbp
push   %r11
push   0x48(%rsp)
call   1050 <fprintf@plt>
add    $0x20,%rsp
mov    %rbx,%rdi
lea    0xd4b(%rip),%rsi
lea    0xc(%rsp),%rdx
lea    0x1c(%rsp),%rcx
lea    0x18(%rsp),%r8
lea    0x14(%rsp),%r9
jmp    1240 <main+0xb0>
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    0x2cd8(%rip),%rax
mov    (%rax),%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [26 x i8] c"failed to open input file\00"
@.str.3 = [25 x i8] c"%u %u %u %u %u %u %u %u\0A\00"
@stdout = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca float
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = load i32, i32* %4
%17 = icmp slt i32 %16, 3
br i1 %17, label %18, label %20
18: ; preds = %2
%19 = call i32 (...) @usage()
br label %20
20: ; preds = %18, %2
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 2
%23 = load i8*, i8** %22
%24 = call i32 @sscanf(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %7)
%25 = load float, float* %7
%26 = fpext float %25 to double
%27 = fcmp olt double %26, 1.000000e+00
br i1 %27, label %28, label %33
28: ; preds = %20
%29 = load float, float* %7
%30 = fpext float %29 to double
%31 = fadd double %30, 1.000000e+00
%32 = fptrunc double %31 to float
store float %32, float* %7
br label %33
33: ; preds = %28, %20
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 1
%36 = load i8*, i8** %35
%37 = call i32* @fopen(i8* %36, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %37, i32** %6
%38 = load i32*, i32** %6
%39 = icmp eq i32* %38, null
br i1 %39, label %40, label %42
40: ; preds = %33
%41 = call i32 @error(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
br label %42
42: ; preds = %40, %33
%43 = load i32*, i32** %6
%44 = call i32 @fscanf(i32* %43, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32* %8, i32* %10, i32* %11, i32* %12, i32* %13, i32* %14, i32* %15, i32* %9)
br label %45
45: ; preds = %50, %42
%46 = load i32*, i32** %6
%47 = call i32 @feof(i32* %46)
%48 = icmp ne i32 %47, 0
%49 = xor i1 %48, true
br i1 %49, label %50, label %70
50: ; preds = %45
%51 = load i32, i32* %8
%52 = uitofp i32 %51 to float
%53 = load float, float* %7
%54 = fmul float %52, %53
%55 = fptoui float %54 to i32
%56 = call i64 @round(i32 %55)
%57 = trunc i64 %56 to i32
store i32 %57, i32* %8
%58 = load i32, i32* @stdout
%59 = load i32, i32* %8
%60 = load i32, i32* %10
%61 = load i32, i32* %11
%62 = load i32, i32* %12
%63 = load i32, i32* %13
%64 = load i32, i32* %14
%65 = load i32, i32* %15
%66 = load i32, i32* %9
%67 = call i32 @fprintf(i32 %58, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 %59, i32 %60, i32 %61, i32 %62, i32 %63, i32 %64, i32 %65, i32 %66)
%68 = load i32*, i32** %6
%69 = call i32 @fscanf(i32* %68, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32* %8, i32* %10, i32* %11, i32* %12, i32* %13, i32* %14, i32* %15, i32* %9)
br label %45
70: ; preds = %45
%71 = load i32*, i32** %6
%72 = call i32 @fclose(i32* %71)
%73 = load i32, i32* @EXIT_SUCCESS
ret i32 %73
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [26 x i8] c"failed to open input file\00"
@.str.3 = [25 x i8] c"%u %u %u %u %u %u %u %u\0A\00"
@stdout = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca float
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = bitcast float* %3 to i8*
%13 = bitcast i32* %4 to i8*
%14 = bitcast i32* %5 to i8*
%15 = bitcast i32* %6 to i8*
%16 = bitcast i32* %7 to i8*
%17 = bitcast i32* %8 to i8*
%18 = bitcast i32* %9 to i8*
%19 = bitcast i32* %10 to i8*
%20 = bitcast i32* %11 to i8*
%21 = icmp slt i32 %0, 3
br i1 %21, label %22, label %24
22: ; preds = %2
%23 = tail call i32 (...) @usage()
br label %24
24: ; preds = %22, %2
%25 = getelementptr inbounds i8*, i8** %1, i64 2
%26 = load i8*, i8** %25
%27 = call i32 @sscanf(i8* %26, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %3)
%28 = load float, float* %3
%29 = fcmp olt float %28, 1.000000e+00
br i1 %29, label %30, label %32
30: ; preds = %24
%31 = fadd float %28, 1.000000e+00
store float %31, float* %3
br label %32
32: ; preds = %30, %24
%33 = getelementptr inbounds i8*, i8** %1, i64 1
%34 = load i8*, i8** %33
%35 = call i32* @fopen(i8* %34, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%36 = icmp eq i32* %35, null
br i1 %36, label %37, label %39
37: ; preds = %32
%38 = call i32 @error(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
br label %39
39: ; preds = %37, %32
%40 = call i32 @fscanf(i32* %35, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32* %4, i32* %6, i32* %7, i32* %8, i32* %9, i32* %10, i32* %11, i32* %5)
%41 = call i32 @feof(i32* %35)
%42 = icmp eq i32 %41, 0
br i1 %42, label %43, label %63
43: ; preds = %39, %43
%44 = load i32, i32* %4
%45 = uitofp i32 %44 to float
%46 = load float, float* %3
%47 = fmul float %46, %45
%48 = fptoui float %47 to i32
%49 = call i64 @round(i32 %48)
%50 = trunc i64 %49 to i32
store i32 %50, i32* %4
%51 = load i32, i32* @stdout
%52 = load i32, i32* %6
%53 = load i32, i32* %7
%54 = load i32, i32* %8
%55 = load i32, i32* %9
%56 = load i32, i32* %10
%57 = load i32, i32* %11
%58 = load i32, i32* %5
%59 = call i32 @fprintf(i32 %51, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 %50, i32 %52, i32 %53, i32 %54, i32 %55, i32 %56, i32 %57, i32 %58)
%60 = call i32 @fscanf(i32* %35, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32* %4, i32* %6, i32* %7, i32* %8, i32* %9, i32* %10, i32* %11, i32* %5)
%61 = call i32 @feof(i32* %35)
%62 = icmp eq i32 %61, 0
br i1 %62, label %43, label %63
63: ; preds = %43, %39
%64 = call i32 @fclose(i32* %35)
%65 = load i32, i32* @EXIT_SUCCESS
ret i32 %65
}