#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 i;
  printf("start:\n");
  for (i = 0; i < 100; i++) {
    printf("\tadd\t$1,$2,$3\n");
    printf("\tadd\t$1,$2,0x5555\n");
    printf("\tsub\t$4,$5,$6\n");
    printf("\tsub\t$4,$5,0xAAAA\n");
    printf("\tand\t$7,$8,$9\n");
    printf("\tand\t$7,$8,0x5555\n");
    printf("\tor\t$10,$11,$12\n");
    printf("\tor\t$10,$11,0xAAAA\n");
    printf("\txor\t$13,$14,$15\n");
    printf("\txor\t$13,$14,0x5555\n");
    printf("\txnor\t$16,$17,$18\n");
    printf("\txnor\t$16,$17,0xAAAA\n");
  }
  printf("\tj\tstart\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    11da <main+0xca>
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1132 <main+0x22>
lea    0xf02(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
mov    $0x64,%r14d
lea    0xf4c(%rip),%r15
lea    0xf58(%rip),%r12
lea    0xf62(%rip),%r13
lea    0xf6f(%rip),%rbx
lea    0xf7a(%rip),%rbp
lea    0xeb9(%rip),%rdi
call   1030 <puts@plt>
lea    0xebb(%rip),%rdi
call   1030 <puts@plt>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
lea    0xec3(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %r12,%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbp,%rdi
call   1030 <puts@plt>
add    $0xffffffff,%r14d
jne    1150 <main+0x40>
lea    0xe2a(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"start:\0A\00"
@.str.1 = [15 x i8] c"\09add\09$1,$2,$3\0A\00"
@.str.2 = [19 x i8] c"\09add\09$1,$2,0x5555\0A\00"
@.str.3 = [15 x i8] c"\09sub\09$4,$5,$6\0A\00"
@.str.4 = [19 x i8] c"\09sub\09$4,$5,0xAAAA\0A\00"
@.str.5 = [15 x i8] c"\09and\09$7,$8,$9\0A\00"
@.str.6 = [19 x i8] c"\09and\09$7,$8,0x5555\0A\00"
@.str.7 = [17 x i8] c"\09or\09$10,$11,$12\0A\00"
@.str.8 = [20 x i8] c"\09or\09$10,$11,0xAAAA\0A\00"
@.str.9 = [18 x i8] c"\09xor\09$13,$14,$15\0A\00"
@.str.10 = [21 x i8] c"\09xor\09$13,$14,0x5555\0A\00"
@.str.11 = [19 x i8] c"\09xnor\09$16,$17,$18\0A\00"
@.str.12 = [22 x i8] c"\09xnor\09$16,$17,0xAAAA\0A\00"
@.str.13 = [10 x i8] c"\09j\09start\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %4
4: ; preds = %20, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 100
br i1 %6, label %7, label %23
7: ; preds = %4
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i64 0, i64 0))
br label %20
20: ; preds = %7
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 1
store i32 %22, i32* %2
br label %4
23: ; preds = %4
%24 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [7 x i8] c"start:\00"
@str.14 = [9 x i8] c"\09j\09start\00"
@str.15 = [14 x i8] c"\09add\09$1,$2,$3\00"
@str.16 = [18 x i8] c"\09add\09$1,$2,0x5555\00"
@str.17 = [14 x i8] c"\09sub\09$4,$5,$6\00"
@str.18 = [18 x i8] c"\09sub\09$4,$5,0xAAAA\00"
@str.19 = [14 x i8] c"\09and\09$7,$8,$9\00"
@str.20 = [18 x i8] c"\09and\09$7,$8,0x5555\00"
@str.21 = [16 x i8] c"\09or\09$10,$11,$12\00"
@str.22 = [19 x i8] c"\09or\09$10,$11,0xAAAA\00"
@str.23 = [17 x i8] c"\09xor\09$13,$14,$15\00"
@str.24 = [20 x i8] c"\09xor\09$13,$14,0x5555\00"
@str.25 = [18 x i8] c"\09xnor\09$16,$17,$18\00"
@str.26 = [21 x i8] c"\09xnor\09$16,$17,0xAAAA\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %16, %2 ]
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.15, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.16, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.17, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.18, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.19, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.20, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.21, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.22, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.23, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.24, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.25, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.26, i64 0, i64 0))
%16 = add nuw nsw i32 %3, 1
%17 = icmp eq i32 %16, 100
br i1 %17, label %18, label %2
18: ; preds = %2
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.14, i64 0, i64 0))
ret i32 0
}