#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*/ write_word(int /*<<< orphan*/ *, long long);
void write_empty_dir(FILE *f) {
  int i;
  for (i = 0; i < 128; i += 8) {
    write_word(f, 0777776777776LL);
    write_word(f, 0777776000000LL);
    write_word(f, 0);
    write_word(f, 0);
    write_word(f, 0);
    write_word(f, 0);
    write_word(f, 0);
    write_word(f, 0);
  }
}


x86 assembly (clang, -O0):
<write_empty_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x80,-0xc(%rbp)
jge    11b2 <write_empty_dir+0xa2>
mov    -0x8(%rbp),%rdi
movabs $0xffffbfffe,%rsi
call   1030 <write_word@plt>
mov    -0x8(%rbp),%rdi
movabs $0xffff80000,%rsi
call   1030 <write_word@plt>
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <write_word@plt>
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <write_word@plt>
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <write_word@plt>
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <write_word@plt>
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <write_word@plt>
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <write_word@plt>
mov    -0xc(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <write_empty_dir+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_empty_dir>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0xfffffff8,%ebp
movabs $0xffff80000,%r14
lea    0x3fffe(%r14),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <write_word@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <write_word@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <write_word@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <write_word@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <write_word@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <write_word@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <write_word@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <write_word@plt>
add    $0x8,%ebp
cmp    $0x78,%ebp
jb     1130 <write_empty_dir+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @write_empty_dir(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
br label %4
4: ; preds = %24, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 128
br i1 %6, label %7, label %27
7: ; preds = %4
%8 = load i32*, i32** %2
%9 = call i32 @write_word(i32* %8, i64 68719214590)
%10 = load i32*, i32** %2
%11 = call i32 @write_word(i32* %10, i64 68718952448)
%12 = load i32*, i32** %2
%13 = call i32 @write_word(i32* %12, i64 0)
%14 = load i32*, i32** %2
%15 = call i32 @write_word(i32* %14, i64 0)
%16 = load i32*, i32** %2
%17 = call i32 @write_word(i32* %16, i64 0)
%18 = load i32*, i32** %2
%19 = call i32 @write_word(i32* %18, i64 0)
%20 = load i32*, i32** %2
%21 = call i32 @write_word(i32* %20, i64 0)
%22 = load i32*, i32** %2
%23 = call i32 @write_word(i32* %22, i64 0)
br label %24
24: ; preds = %7
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 8
store i32 %26, i32* %3
br label %4
27: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @write_empty_dir(i32* %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ 0, %1 ], [ %12, %2 ]
%4 = tail call i32 @write_word(i32* %0, i64 68719214590)
%5 = tail call i32 @write_word(i32* %0, i64 68718952448)
%6 = tail call i32 @write_word(i32* %0, i64 0)
%7 = tail call i32 @write_word(i32* %0, i64 0)
%8 = tail call i32 @write_word(i32* %0, i64 0)
%9 = tail call i32 @write_word(i32* %0, i64 0)
%10 = tail call i32 @write_word(i32* %0, i64 0)
%11 = tail call i32 @write_word(i32* %0, i64 0)
%12 = add nuw nsw i32 %3, 8
%13 = icmp ult i32 %3, 120
br i1 %13, label %2, label %14
14: ; preds = %2
ret void
}