#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*/ printf(char *, ...);
int main(void) {
  int t, y;
  int i = 1;
  int offset = 3;
  int nu_dag = 29;
  t = offset;
  while (i <= t) {
    printf("\t");
    t--;
  }
  y = i + offset;
  while (i <= nu_dag) {
    if (y % 7 == 0) {
      printf("%2d\n", i);
      i++;
      y++;
    } else {
      printf("%2d\t", i);
      i++;
      y++;
    }
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
movl   $0x1d,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1162 <main+0x52>
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <main+0x2a>
mov    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     11db <main+0xcb>
mov    -0xc(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11b3 <main+0xa3>
mov    -0x10(%rbp),%esi
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11d6 <main+0xc6>
mov    -0x10(%rbp),%esi
lea    0xe48(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116b <main+0x5b>
lea    0xe21(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    $0x4,%ebp
lea    0xeaf(%rip),%r14
lea    0xead(%rip),%r15
xor    %ebx,%ebx
jmp    1171 <main+0x51>
nopl   0x0(%rax)
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0x1d,%ebx
je     11a6 <main+0x86>
mov    %ebx,%eax
mov    %ebp,%ecx
imul   $0x24924925,%rcx,%rcx
shr    $0x20,%rcx
mov    %ebp,%edx
sub    %ecx,%edx
shr    %edx
add    %ecx,%edx
shr    $0x2,%edx
lea    0x0(,%rdx,8),%ecx
sub    %edx,%ecx
add    $0xfffffffc,%ecx
lea    0x1(%rax),%ebx
mov    %r14,%rdi
cmp    %eax,%ecx
je     1160 <main+0x40>
mov    %r15,%rdi
jmp    1160 <main+0x40>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\09\00"
@.str.1 = [5 x i8] c"%2d\0A\00"
@.str.2 = [5 x i8] c"%2d\09\00"
@.str.3 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %4
store i32 3, i32* %5
store i32 29, i32* %6
%7 = load i32, i32* %5
store i32 %7, i32* %2
br label %8
8: ; preds = %12, %0
%9 = load i32, i32* %4
%10 = load i32, i32* %2
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %16
12: ; preds = %8
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%14 = load i32, i32* %2
%15 = add nsw i32 %14, -1
store i32 %15, i32* %2
br label %8
16: ; preds = %8
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = add nsw i32 %17, %18
store i32 %19, i32* %3
br label %20
20: ; preds = %42, %16
%21 = load i32, i32* %4
%22 = load i32, i32* %6
%23 = icmp sle i32 %21, %22
br i1 %23, label %24, label %43
24: ; preds = %20
%25 = load i32, i32* %3
%26 = srem i32 %25, 7
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %35
28: ; preds = %24
%29 = load i32, i32* %4
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %29)
%31 = load i32, i32* %4
%32 = add nsw i32 %31, 1
store i32 %32, i32* %4
%33 = load i32, i32* %3
%34 = add nsw i32 %33, 1
store i32 %34, i32* %3
br label %42
35: ; preds = %24
%36 = load i32, i32* %4
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %36)
%38 = load i32, i32* %4
%39 = add nsw i32 %38, 1
store i32 %39, i32* %4
%40 = load i32, i32* %3
%41 = add nsw i32 %40, 1
store i32 %41, i32* %3
br label %42
42: ; preds = %35, %28
br label %20
43: ; preds = %20
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%45 = load i32, i32* %1
ret i32 %45
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"%2d\0A\00"
@.str.2 = [5 x i8] c"%2d\09\00"
define i32 @main() {
%1 = tail call i32 @putchar(i32 9)
%2 = tail call i32 @putchar(i32 9)
%3 = tail call i32 @putchar(i32 9)
br label %4
4: ; preds = %0, %4
%5 = phi i32 [ %11, %4 ], [ 4, %0 ]
%6 = phi i32 [ %12, %4 ], [ 1, %0 ]
%7 = urem i32 %5, 7
%8 = icmp eq i32 %7, 0
%9 = select i1 %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %9, i32 %6)
%11 = add nuw nsw i32 %5, 1
%12 = add nuw nsw i32 %6, 1
%13 = icmp eq i32 %11, 33
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = tail call i32 @putchar(i32 10)
ret i32 0
}