#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 */

/* Variables and functions */
unsigned char Get7Bits(unsigned char *, int);
void MakeKey(unsigned char *key, unsigned char *des_key) {
  des_key[0] = Get7Bits(key, 0);
  des_key[1] = Get7Bits(key, 7);
  des_key[2] = Get7Bits(key, 14);
  des_key[3] = Get7Bits(key, 21);
  des_key[4] = Get7Bits(key, 28);
  des_key[5] = Get7Bits(key, 35);
  des_key[6] = Get7Bits(key, 42);
  des_key[7] = Get7Bits(key, 49);
}


x86 assembly (clang, -O0):
<MakeKey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <Get7Bits@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rdi
mov    $0x7,%esi
call   1030 <Get7Bits@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x8(%rbp),%rdi
mov    $0xe,%esi
call   1030 <Get7Bits@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x8(%rbp),%rdi
mov    $0x15,%esi
call   1030 <Get7Bits@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0x8(%rbp),%rdi
mov    $0x1c,%esi
call   1030 <Get7Bits@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x4(%rax)
mov    -0x8(%rbp),%rdi
mov    $0x23,%esi
call   1030 <Get7Bits@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x5(%rax)
mov    -0x8(%rbp),%rdi
mov    $0x2a,%esi
call   1030 <Get7Bits@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x6(%rax)
mov    -0x8(%rbp),%rdi
mov    $0x31,%esi
call   1030 <Get7Bits@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x7(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MakeKey>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %esi,%esi
call   1030 <Get7Bits@plt>
mov    %al,(%r14)
mov    %rbx,%rdi
mov    $0x7,%esi
call   1030 <Get7Bits@plt>
mov    %al,0x1(%r14)
mov    %rbx,%rdi
mov    $0xe,%esi
call   1030 <Get7Bits@plt>
mov    %al,0x2(%r14)
mov    %rbx,%rdi
mov    $0x15,%esi
call   1030 <Get7Bits@plt>
mov    %al,0x3(%r14)
mov    %rbx,%rdi
mov    $0x1c,%esi
call   1030 <Get7Bits@plt>
mov    %al,0x4(%r14)
mov    %rbx,%rdi
mov    $0x23,%esi
call   1030 <Get7Bits@plt>
mov    %al,0x5(%r14)
mov    %rbx,%rdi
mov    $0x2a,%esi
call   1030 <Get7Bits@plt>
mov    %al,0x6(%r14)
mov    %rbx,%rdi
mov    $0x31,%esi
call   1030 <Get7Bits@plt>
mov    %al,0x7(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @MakeKey(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call zeroext i8 @Get7Bits(i8* %5, i32 0)
%7 = load i8*, i8** %4
%8 = getelementptr inbounds i8, i8* %7, i64 0
store i8 %6, i8* %8
%9 = load i8*, i8** %3
%10 = call zeroext i8 @Get7Bits(i8* %9, i32 7)
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i64 1
store i8 %10, i8* %12
%13 = load i8*, i8** %3
%14 = call zeroext i8 @Get7Bits(i8* %13, i32 14)
%15 = load i8*, i8** %4
%16 = getelementptr inbounds i8, i8* %15, i64 2
store i8 %14, i8* %16
%17 = load i8*, i8** %3
%18 = call zeroext i8 @Get7Bits(i8* %17, i32 21)
%19 = load i8*, i8** %4
%20 = getelementptr inbounds i8, i8* %19, i64 3
store i8 %18, i8* %20
%21 = load i8*, i8** %3
%22 = call zeroext i8 @Get7Bits(i8* %21, i32 28)
%23 = load i8*, i8** %4
%24 = getelementptr inbounds i8, i8* %23, i64 4
store i8 %22, i8* %24
%25 = load i8*, i8** %3
%26 = call zeroext i8 @Get7Bits(i8* %25, i32 35)
%27 = load i8*, i8** %4
%28 = getelementptr inbounds i8, i8* %27, i64 5
store i8 %26, i8* %28
%29 = load i8*, i8** %3
%30 = call zeroext i8 @Get7Bits(i8* %29, i32 42)
%31 = load i8*, i8** %4
%32 = getelementptr inbounds i8, i8* %31, i64 6
store i8 %30, i8* %32
%33 = load i8*, i8** %3
%34 = call zeroext i8 @Get7Bits(i8* %33, i32 49)
%35 = load i8*, i8** %4
%36 = getelementptr inbounds i8, i8* %35, i64 7
store i8 %34, i8* %36
ret void
}

LLVM IR (-O2):
define void @MakeKey(i8* %0, i8* nocapture writeonly %1) {
%3 = tail call zeroext i8 @Get7Bits(i8* %0, i32 0)
store i8 %3, i8* %1
%4 = tail call zeroext i8 @Get7Bits(i8* %0, i32 7)
%5 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %4, i8* %5
%6 = tail call zeroext i8 @Get7Bits(i8* %0, i32 14)
%7 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %6, i8* %7
%8 = tail call zeroext i8 @Get7Bits(i8* %0, i32 21)
%9 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %8, i8* %9
%10 = tail call zeroext i8 @Get7Bits(i8* %0, i32 28)
%11 = getelementptr inbounds i8, i8* %1, i64 4
store i8 %10, i8* %11
%12 = tail call zeroext i8 @Get7Bits(i8* %0, i32 35)
%13 = getelementptr inbounds i8, i8* %1, i64 5
store i8 %12, i8* %13
%14 = tail call zeroext i8 @Get7Bits(i8* %0, i32 42)
%15 = getelementptr inbounds i8, i8* %1, i64 6
store i8 %14, i8* %15
%16 = tail call zeroext i8 @Get7Bits(i8* %0, i32 49)
%17 = getelementptr inbounds i8, i8* %1, i64 7
store i8 %16, i8* %17
ret void
}