#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 */
int /*<<< orphan*/ detab(int *);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ settabs(int *);
int main() {
  int tabstops[72];
  int i = 0;
  settabs(tabstops);
  for (i = 0; i < 72; i++) {
    printf("tabstops [ %d ] = %d;\n", i, tabstops[i]);
  }
  detab(tabstops);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x134(%rbp)
lea    -0x130(%rbp),%rdi
call   1040 <settabs@plt>
movl   $0x0,-0x134(%rbp)
cmpl   $0x48,-0x134(%rbp)
jge    11a3 <main+0x73>
mov    -0x134(%rbp),%esi
movslq -0x134(%rbp),%rax
mov    -0x130(%rbp,%rax,4),%edx
lea    0xe76(%rip),%rdi
call   1050 <printf@plt>
mov    -0x134(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x134(%rbp)
jmp    1162 <main+0x32>
lea    -0x130(%rbp),%rdi
call   1030 <detab@plt>
xor    %eax,%eax
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x128,%rsp
mov    %rsp,%rdi
call   1040 <settabs@plt>
xor    %ebx,%ebx
lea    0xeb5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%rsp,%rbx,4),%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    $0x48,%rbx
jne    1150 <main+0x20>
mov    %rsp,%rdi
call   1030 <detab@plt>
xor    %eax,%eax
add    $0x128,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [23 x i8] c"tabstops [ %d ] = %d;\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [72 x i32]
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
%4 = getelementptr inbounds [72 x i32], [72 x i32]* %2, i64 0, i64 0
%5 = call i32 @settabs(i32* %4)
store i32 0, i32* %3
br label %6
6: ; preds = %16, %0
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 72
br i1 %8, label %9, label %19
9: ; preds = %6
%10 = load i32, i32* %3
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [72 x i32], [72 x i32]* %2, i64 0, i64 %12
%14 = load i32, i32* %13
%15 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %14)
br label %16
16: ; preds = %9
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %6
19: ; preds = %6
%20 = getelementptr inbounds [72 x i32], [72 x i32]* %2, i64 0, i64 0
%21 = call i32 @detab(i32* %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"tabstops [ %d ] = %d;\0A\00"
define i32 @main() {
%1 = alloca [72 x i32]
%2 = bitcast [72 x i32]* %1 to i8*
%3 = getelementptr inbounds [72 x i32], [72 x i32]* %1, i64 0, i64 0
%4 = call i32 @settabs(i32* %3)
br label %5
5: ; preds = %0, %5
%6 = phi i64 [ 0, %0 ], [ %11, %5 ]
%7 = getelementptr inbounds [72 x i32], [72 x i32]* %1, i64 0, i64 %6
%8 = load i32, i32* %7
%9 = trunc i64 %6 to i32
%10 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %8)
%11 = add nuw nsw i64 %6, 1
%12 = icmp eq i64 %11, 72
br i1 %12, label %13, label %5
13: ; preds = %5
%14 = call i32 @detab(i32* %3)
ret i32 0
}