void init_string(char string[], char x, char alert, char backspace,
                 char form_feed, char line_feed, char carriage_return,
                 char horizontal_tab, char vertical_tab, char cent,
                 char misc_ctrl) {
  int i;
  for (i = 0; i < (71); ++i)
    string[i] = x;
  string[0] = alert;
  string[1] = backspace;
  string[2] = form_feed;
  string[3] = line_feed;
  string[4] = carriage_return;
  string[5] = horizontal_tab;
  string[6] = vertical_tab;
  string[69] = cent;
  string[70] = misc_ctrl;
}


x86 assembly (clang, -O0):
<init_string>:
push   %rbp
mov    %rsp,%rbp
mov    %r8d,-0x24(%rbp)
mov    %ecx,%eax
mov    -0x24(%rbp),%ecx
mov    %eax,-0x20(%rbp)
mov    %edx,%eax
mov    -0x20(%rbp),%edx
mov    %eax,-0x1c(%rbp)
mov    %esi,%eax
mov    -0x1c(%rbp),%esi
mov    %eax,-0x18(%rbp)
mov    %rdi,%r8
mov    -0x18(%rbp),%edi
mov    %r9b,%al
mov    0x30(%rbp),%r9b
mov    0x28(%rbp),%r9b
mov    0x20(%rbp),%r9b
mov    0x18(%rbp),%r9b
mov    0x10(%rbp),%r9b
mov    %r8,-0x8(%rbp)
mov    %dil,-0x9(%rbp)
mov    %sil,-0xa(%rbp)
mov    %dl,-0xb(%rbp)
mov    %cl,-0xc(%rbp)
mov    %al,-0xd(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x47,-0x14(%rbp)
jge    117f <init_string+0x7f>
mov    -0x9(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1159 <init_string+0x59>
mov    -0xa(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xd(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
mov    0x10(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x4(%rax)
mov    0x18(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x5(%rax)
mov    0x20(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x6(%rax)
mov    0x28(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x45(%rax)
mov    0x30(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x46(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_string>:
push   %rbp
push   %rbx
mov    0x38(%rsp),%r10b
mov    0x30(%rsp),%r11b
mov    0x28(%rsp),%bpl
mov    0x20(%rsp),%bl
mov    0x18(%rsp),%al
movd   %esi,%xmm0
punpcklbw %xmm0,%xmm0
pshuflw $0x0,%xmm0,%xmm0
pshufd $0x0,%xmm0,%xmm0
movdqu %xmm0,0x35(%rdi)
movdqu %xmm0,0x27(%rdi)
movdqu %xmm0,0x17(%rdi)
movdqu %xmm0,0x7(%rdi)
mov    %dl,(%rdi)
mov    %cl,0x1(%rdi)
mov    %r8b,0x2(%rdi)
mov    %r9b,0x3(%rdi)
mov    %al,0x4(%rdi)
mov    %bl,0x5(%rdi)
mov    %bpl,0x6(%rdi)
mov    %r11b,0x45(%rdi)
mov    %r10b,0x46(%rdi)
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @init_string(i8* %0, i8 signext %1, i8 signext %2, i8 signext %3, i8 signext %4, i8 signext %5, i8 signext %6, i8 signext %7, i8 signext %8, i8 signext %9, i8 signext %10) {
%12 = alloca i8*
%13 = alloca i8
%14 = alloca i8
%15 = alloca i8
%16 = alloca i8
%17 = alloca i8
%18 = alloca i8
%19 = alloca i8
%20 = alloca i8
%21 = alloca i8
%22 = alloca i8
%23 = alloca i32
store i8* %0, i8** %12
store i8 %1, i8* %13
store i8 %2, i8* %14
store i8 %3, i8* %15
store i8 %4, i8* %16
store i8 %5, i8* %17
store i8 %6, i8* %18
store i8 %7, i8* %19
store i8 %8, i8* %20
store i8 %9, i8* %21
store i8 %10, i8* %22
store i32 0, i32* %23
br label %24
24: ; preds = %33, %11
%25 = load i32, i32* %23
%26 = icmp slt i32 %25, 71
br i1 %26, label %27, label %36
27: ; preds = %24
%28 = load i8, i8* %13
%29 = load i8*, i8** %12
%30 = load i32, i32* %23
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8, i8* %29, i64 %31
store i8 %28, i8* %32
br label %33
33: ; preds = %27
%34 = load i32, i32* %23
%35 = add nsw i32 %34, 1
store i32 %35, i32* %23
br label %24
36: ; preds = %24
%37 = load i8, i8* %14
%38 = load i8*, i8** %12
%39 = getelementptr inbounds i8, i8* %38, i64 0
store i8 %37, i8* %39
%40 = load i8, i8* %15
%41 = load i8*, i8** %12
%42 = getelementptr inbounds i8, i8* %41, i64 1
store i8 %40, i8* %42
%43 = load i8, i8* %16
%44 = load i8*, i8** %12
%45 = getelementptr inbounds i8, i8* %44, i64 2
store i8 %43, i8* %45
%46 = load i8, i8* %17
%47 = load i8*, i8** %12
%48 = getelementptr inbounds i8, i8* %47, i64 3
store i8 %46, i8* %48
%49 = load i8, i8* %18
%50 = load i8*, i8** %12
%51 = getelementptr inbounds i8, i8* %50, i64 4
store i8 %49, i8* %51
%52 = load i8, i8* %19
%53 = load i8*, i8** %12
%54 = getelementptr inbounds i8, i8* %53, i64 5
store i8 %52, i8* %54
%55 = load i8, i8* %20
%56 = load i8*, i8** %12
%57 = getelementptr inbounds i8, i8* %56, i64 6
store i8 %55, i8* %57
%58 = load i8, i8* %21
%59 = load i8*, i8** %12
%60 = getelementptr inbounds i8, i8* %59, i64 69
store i8 %58, i8* %60
%61 = load i8, i8* %22
%62 = load i8*, i8** %12
%63 = getelementptr inbounds i8, i8* %62, i64 70
store i8 %61, i8* %63
ret void
}

LLVM IR (-O2):
define void @init_string(i8* nocapture writeonly %0, i8 signext %1, i8 signext %2, i8 signext %3, i8 signext %4, i8 signext %5, i8 signext %6, i8 signext %7, i8 signext %8, i8 signext %9, i8 signext %10) {
%12 = getelementptr inbounds i8, i8* %0, i64 7
store i8 %2, i8* %0
%13 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %3, i8* %13
%14 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %4, i8* %14
%15 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %5, i8* %15
%16 = getelementptr inbounds i8, i8* %0, i64 4
store i8 %6, i8* %16
%17 = getelementptr inbounds i8, i8* %0, i64 5
store i8 %7, i8* %17
%18 = getelementptr inbounds i8, i8* %0, i64 6
store i8 %8, i8* %18
%19 = getelementptr inbounds i8, i8* %0, i64 69
store i8 %9, i8* %19
%20 = getelementptr inbounds i8, i8* %0, i64 70
store i8 %10, i8* %20
ret void
}