int gzip_header_blank(char *buf) {
  int i = 0;
  buf[i++] = 0x1f;
  buf[i++] = 0x8b;
  buf[i++] = 0x08;
  buf[i++] = 0x00;
  buf[i++] = 0x00;
  buf[i++] = 0x00;
  buf[i++] = 0x00;
  buf[i++] = 0x00;
  buf[i++] = 0x04;
  buf[i++] = 0x03;
  return i;
}


x86 assembly (clang, -O0):
<gzip_header_blank>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movb   $0x1f,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movb   $0x8b,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movb   $0x8,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movb   $0x4,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movb   $0x3,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gzip_header_blank>:
movw   $0x8b1f,(%rdi)
movb   $0x8,0x2(%rdi)
movl   $0x0,0x3(%rdi)
movb   $0x0,0x7(%rdi)
movw   $0x304,0x8(%rdi)
mov    $0xa,%eax
ret

LLVM IR (-O0):
define i32 @gzip_header_blank(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = load i32, i32* %3
%6 = add nsw i32 %5, 1
store i32 %6, i32* %3
%7 = sext i32 %5 to i64
%8 = getelementptr inbounds i8, i8* %4, i64 %7
store i8 31, i8* %8
%9 = load i8*, i8** %2
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
%12 = sext i32 %10 to i64
%13 = getelementptr inbounds i8, i8* %9, i64 %12
store i8 -117, i8* %13
%14 = load i8*, i8** %2
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
%17 = sext i32 %15 to i64
%18 = getelementptr inbounds i8, i8* %14, i64 %17
store i8 8, i8* %18
%19 = load i8*, i8** %2
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
%22 = sext i32 %20 to i64
%23 = getelementptr inbounds i8, i8* %19, i64 %22
store i8 0, i8* %23
%24 = load i8*, i8** %2
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
%27 = sext i32 %25 to i64
%28 = getelementptr inbounds i8, i8* %24, i64 %27
store i8 0, i8* %28
%29 = load i8*, i8** %2
%30 = load i32, i32* %3
%31 = add nsw i32 %30, 1
store i32 %31, i32* %3
%32 = sext i32 %30 to i64
%33 = getelementptr inbounds i8, i8* %29, i64 %32
store i8 0, i8* %33
%34 = load i8*, i8** %2
%35 = load i32, i32* %3
%36 = add nsw i32 %35, 1
store i32 %36, i32* %3
%37 = sext i32 %35 to i64
%38 = getelementptr inbounds i8, i8* %34, i64 %37
store i8 0, i8* %38
%39 = load i8*, i8** %2
%40 = load i32, i32* %3
%41 = add nsw i32 %40, 1
store i32 %41, i32* %3
%42 = sext i32 %40 to i64
%43 = getelementptr inbounds i8, i8* %39, i64 %42
store i8 0, i8* %43
%44 = load i8*, i8** %2
%45 = load i32, i32* %3
%46 = add nsw i32 %45, 1
store i32 %46, i32* %3
%47 = sext i32 %45 to i64
%48 = getelementptr inbounds i8, i8* %44, i64 %47
store i8 4, i8* %48
%49 = load i8*, i8** %2
%50 = load i32, i32* %3
%51 = add nsw i32 %50, 1
store i32 %51, i32* %3
%52 = sext i32 %50 to i64
%53 = getelementptr inbounds i8, i8* %49, i64 %52
store i8 3, i8* %53
%54 = load i32, i32* %3
ret i32 %54
}

LLVM IR (-O2):
define i32 @gzip_header_blank(i8* nocapture writeonly %0) {
store i8 31, i8* %0
%2 = getelementptr inbounds i8, i8* %0, i64 1
store i8 -117, i8* %2
%3 = getelementptr inbounds i8, i8* %0, i64 2
store i8 8, i8* %3
%4 = getelementptr inbounds i8, i8* %0, i64 3
%5 = getelementptr inbounds i8, i8* %0, i64 8
store i8 4, i8* %5
%6 = getelementptr inbounds i8, i8* %0, i64 9
store i8 3, i8* %6
ret i32 10
}