#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 get_value(int);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int i;
  int j;
  printf("static const guint8\n");
  printf("sine_table[256] = {\n");
  for (i = 0; i < 256; i += 8) {
    printf("  ");
    for (j = 0; j < 8; j++) {
      printf("%3d", get_value(i + j));
      if (j != 7) {
        printf(", ");
      } else {
        if (i + j != 255) {
          printf(",\n");
        } else {
          printf("\n");
        }
      }
    }
  }
  printf("};\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x100,-0x14(%rbp)
jge    121a <main+0xfa>
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0x8,-0x18(%rbp)
jge    1207 <main+0xe7>
mov    -0x14(%rbp),%edi
add    -0x18(%rbp),%edi
call   1040 <get_value@plt>
mov    %eax,%esi
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x7,-0x18(%rbp)
je     11bd <main+0x9d>
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f4 <main+0xd4>
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
cmp    $0xff,%eax
je     11e1 <main+0xc1>
lea    0xe5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11ef <main+0xcf>
lea    0xe4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f4 <main+0xd4>
jmp    11f9 <main+0xd9>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    117b <main+0x5b>
jmp    120c <main+0xec>
mov    -0x14(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x14(%rbp)
jmp    1159 <main+0x39>
lea    0xe16(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
lea    0xeba(%rip),%rdi
call   1040 <puts@plt>
lea    0xec2(%rip),%rdi
call   1040 <puts@plt>
lea    0xe98(%rip),%r14
lea    0xe94(%rip),%r13
lea    0xe91(%rip),%r15
lea    0xeb8(%rip),%r12
xor    %ebx,%ebx
jmp    11ab <main+0x6b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    -0x7(%rbx),%eax
add    $0x1,%ebx
cmp    $0xf8,%eax
jae    12b5 <main+0x175>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %ebx,%edi
call   1060 <get_value@plt>
mov    %r13,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x1(%rbx),%edi
call   1060 <get_value@plt>
mov    %r13,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x2(%rbx),%edi
call   1060 <get_value@plt>
mov    %r13,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x3(%rbx),%edi
call   1060 <get_value@plt>
mov    %r13,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x4(%rbx),%edi
call   1060 <get_value@plt>
mov    %r13,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x5(%rbx),%edi
call   1060 <get_value@plt>
mov    %r13,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x6(%rbx),%edi
call   1060 <get_value@plt>
mov    %r13,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x7,%ebx
mov    %ebx,%edi
call   1060 <get_value@plt>
mov    %r13,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    $0xff,%ebx
je     1190 <main+0x50>
mov    %r12,%rdi
call   1040 <puts@plt>
jmp    119a <main+0x5a>
lea    0xd76(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str.2 = [3 x i8] c" \00"
@.str.3 = [4 x i8] c"%3d\00"
@.str.4 = [3 x i8] c", \00"
@str = [20 x i8] c"static const guint8\00"
@str.8 = [20 x i8] c"sine_table[256] = {\00"
@str.9 = [3 x i8] c"};\00"
@str.10 = [2 x i8] c",\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.8, i64 0, i64 0))
br label %5
5: ; preds = %2, %43
%6 = phi i32 [ 0, %2 ], [ %44, %43 ]
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 @get_value(i32 %6)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %8)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%11 = or i32 %6, 1
%12 = tail call i32 @get_value(i32 %11)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %12)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%15 = or i32 %6, 2
%16 = tail call i32 @get_value(i32 %15)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %16)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%19 = or i32 %6, 3
%20 = tail call i32 @get_value(i32 %19)
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %20)
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%23 = or i32 %6, 4
%24 = tail call i32 @get_value(i32 %23)
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %24)
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%27 = or i32 %6, 5
%28 = tail call i32 @get_value(i32 %27)
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %28)
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%31 = or i32 %6, 6
%32 = tail call i32 @get_value(i32 %31)
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %32)
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%35 = or i32 %6, 7
%36 = tail call i32 @get_value(i32 %35)
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %36)
%38 = icmp eq i32 %35, 255
br i1 %38, label %41, label %39
39: ; preds = %5
%40 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.10, i64 0, i64 0))
br label %43
41: ; preds = %5
%42 = tail call i32 @putchar(i32 10)
br label %43
43: ; preds = %41, %39
%44 = add nuw nsw i32 %6, 8
%45 = icmp ult i32 %6, 248
br i1 %45, label %5, label %46
46: ; preds = %43
%47 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.9, i64 0, i64 0))
ret i32 0
}