void settabs(int tabstops[]) {
  int i;
  for (i = 0; i < 72; i++)
    tabstops[i] = (i % 4 == 0);
}


x86 assembly (clang, -O0):
<settabs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x48,-0xc(%rbp)
jge    1148 <settabs+0x48>
mov    -0xc(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
sete   %al
and    $0x1,%al
movzbl %al,%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <settabs+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<settabs>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x30(%rdi)
movups %xmm0,0x40(%rdi)
movups %xmm0,0x50(%rdi)
movups %xmm0,0x60(%rdi)
movups %xmm0,0x70(%rdi)
movups %xmm0,0x80(%rdi)
movups %xmm0,0x90(%rdi)
movups %xmm0,0xa0(%rdi)
movups %xmm0,0xb0(%rdi)
movups %xmm0,0xc0(%rdi)
movups %xmm0,0xd0(%rdi)
movups %xmm0,0xe0(%rdi)
movups %xmm0,0xf0(%rdi)
movups %xmm0,0x100(%rdi)
movups %xmm0,0x110(%rdi)
ret

LLVM IR (-O0):
define void @settabs(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
br label %4
4: ; preds = %16, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 72
br i1 %6, label %7, label %19
7: ; preds = %4
%8 = load i32, i32* %3
%9 = srem i32 %8, 4
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
%12 = load i32*, i32** %2
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
store i32 %11, i32* %15
br label %16
16: ; preds = %7
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %4
19: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @settabs(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> <i32 1, i32 0, i32 0, i32 0>, <4 x i32>* %2
%3 = getelementptr inbounds i32, i32* %0, i64 4
%4 = bitcast i32* %3 to <4 x i32>*
store <4 x i32> <i32 1, i32 0, i32 0, i32 0>, <4 x i32>* %4
%5 = getelementptr inbounds i32, i32* %0, i64 8
%6 = bitcast i32* %5 to <4 x i32>*
store <4 x i32> <i32 1, i32 0, i32 0, i32 0>, <4 x i32>* %6
%7 = getelementptr inbounds i32, i32* %0, i64 12
%8 = bitcast i32* %7 to <4 x i32>*
store <4 x i32> <i32 1, i32 0, i32 0, i32 0>, <4 x i32>* %8
%9 = getelementptr inbounds i32, i32* %0, i64 16
%10 = bitcast i32* %9 to <4 x i32>*
store <4 x i32> <i32 1, i32 0, i32 0, i32 0>, <4 x i32>* %10
%11 = getelementptr inbounds i32, i32* %0, i64 20
%12 = bitcast i32* %11 to <4 x i32>*
store <4 x i32> <i32 1, i32 0, i32 0, i32 0>, <4 x i32>* %12
%13 = getelementptr inbounds i32, i32* %0, i64 24
%14 = bitcast i32* %13 to <4 x i32>*
store <4 x i32> <i32 1, i32 0, i32 0, i32 0>, <4 x i32>* %14
%15 = getelementptr inbounds i32, i32* %0, i64 28
%16 = bitcast i32* %15 to <4 x i32>*
store <4 x i32> <i32 1, i32 0, i32 0, i32 0>, <4 x i32>* %16
%17 = getelementptr inbounds i32, i32* %0, i64 32
%18 = bitcast i32* %17 to <4 x i32>*
store <4 x i32> <i32 1, i32 0, i32 0, i32 0>, <4 x i32>* %18
%19 = getelementptr inbounds i32, i32* %0, i64 36
%20 = bitcast i32* %19 to <4 x i32>*
store <4 x i32> <i32 1, i32 0, i32 0, i32 0>, <4 x i32>* %20
%21 = getelementptr inbounds i32, i32* %0, i64 40
%22 = bitcast i32* %21 to <4 x i32>*
store <4 x i32> <i32 1, i32 0, i32 0, i32 0>, <4 x i32>* %22
%23 = getelementptr inbounds i32, i32* %0, i64 44
%24 = bitcast i32* %23 to <4 x i32>*
store <4 x i32> <i32 1, i32 0, i32 0, i32 0>, <4 x i32>* %24
%25 = getelementptr inbounds i32, i32* %0, i64 48
%26 = bitcast i32* %25 to <4 x i32>*
store <4 x i32> <i32 1, i32 0, i32 0, i32 0>, <4 x i32>* %26
%27 = getelementptr inbounds i32, i32* %0, i64 52
%28 = bitcast i32* %27 to <4 x i32>*
store <4 x i32> <i32 1, i32 0, i32 0, i32 0>, <4 x i32>* %28
%29 = getelementptr inbounds i32, i32* %0, i64 56
%30 = bitcast i32* %29 to <4 x i32>*
store <4 x i32> <i32 1, i32 0, i32 0, i32 0>, <4 x i32>* %30
%31 = getelementptr inbounds i32, i32* %0, i64 60
%32 = bitcast i32* %31 to <4 x i32>*
store <4 x i32> <i32 1, i32 0, i32 0, i32 0>, <4 x i32>* %32
%33 = getelementptr inbounds i32, i32* %0, i64 64
%34 = bitcast i32* %33 to <4 x i32>*
store <4 x i32> <i32 1, i32 0, i32 0, i32 0>, <4 x i32>* %34
%35 = getelementptr inbounds i32, i32* %0, i64 68
%36 = bitcast i32* %35 to <4 x i32>*
store <4 x i32> <i32 1, i32 0, i32 0, i32 0>, <4 x i32>* %36
ret void
}