#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 /*<<< orphan*/ sprintf(char *, char *, int);
int main(int argc, char *argv[]) {
  unsigned int i, numdoms, domain_iterator, domain_length, initial_seed;
  initial_seed = 0x2b44c;
  domain_length = 0;
  domain_iterator = 0x00;
  numdoms = 0;
  char dom[16];
  int dom_byte;
  while (numdoms < 30) {
    unsigned int xor1 = 0;
    unsigned int shl = initial_seed << 1;
    domain_iterator += 1;
    unsigned int step1 = domain_iterator * shl;
    unsigned int step1b = domain_iterator * initial_seed;
    domain_iterator -= 1;
    unsigned int iter_seed = domain_iterator * initial_seed;
    unsigned int imul_edx = iter_seed * 0x1a;
    xor1 = step1 ^ imul_edx;
    domain_length = 0;
    while (domain_length < 0x10) {
      unsigned int xor1_divide = xor1 / 0x1a;
      unsigned int xor1_remainder = xor1 % 0x1a;
      unsigned int xo1_rem_20 = xor1_remainder + 0x20;
      unsigned int xo1_step2 = xo1_rem_20 ^ 0xa1;
      dom_byte = 0x41 + (0xa1 ^ xo1_step2);
      sprintf(dom, "%c", dom_byte);
      printf("%s", dom);
      unsigned int imul_iter = domain_length * step1;
      unsigned int imul_result = domain_length * imul_iter;
      unsigned int imul_1a = 0x1a * imul_result;
      unsigned int xor2 = xor1 ^ imul_1a;
      xor1 = xor1 + xor2;
      domain_length += 1;
    }
    printf(".org\n");
    domain_iterator += 1;
    numdoms += 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2b44c,-0x24(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x1e,-0x18(%rbp)
jae    1285 <main+0x165>
movl   $0x0,-0x48(%rbp)
mov    -0x24(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
imul   -0x4c(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x1c(%rbp),%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0x58(%rbp)
imul   $0x1a,-0x58(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x50(%rbp),%eax
xor    -0x5c(%rbp),%eax
mov    %eax,-0x48(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x10,-0x20(%rbp)
jae    1260 <main+0x140>
mov    -0x48(%rbp),%eax
mov    $0x1a,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x60(%rbp)
mov    -0x48(%rbp),%eax
mov    $0x1a,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,-0x64(%rbp)
mov    -0x64(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x68(%rbp)
mov    -0x68(%rbp),%eax
xor    $0xa1,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
xor    $0xa1,%eax
add    $0x41,%eax
mov    %eax,-0x44(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x44(%rbp),%edx
lea    0xdf2(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x40(%rbp),%rsi
lea    0xde5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
imul   -0x50(%rbp),%eax
mov    %eax,-0x70(%rbp)
mov    -0x20(%rbp),%eax
imul   -0x70(%rbp),%eax
mov    %eax,-0x74(%rbp)
imul   $0x1a,-0x74(%rbp),%eax
mov    %eax,-0x78(%rbp)
mov    -0x48(%rbp),%eax
xor    -0x78(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x48(%rbp),%eax
add    -0x7c(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11b6 <main+0x96>
lea    0xd9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1155 <main+0x35>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    $0x8c9f70,%ebp
lea    0xec6(%rip),%r14
lea    0x10(%rsp),%r13
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
imul   $0x464fb8,%eax,%ebx
add    $0x1,%eax
mov    %eax,0xc(%rsp)
imul   $0x56898,%eax,%eax
xor    %eax,%ebx
xor    %r15d,%r15d
xor    %r12d,%r12d
nopl   0x0(%rax,%rax,1)
mov    %ebx,%eax
imul   $0x4ec4ec4f,%rax,%rax
shr    $0x23,%rax
lea    (%rax,%rax,4),%ecx
lea    (%rcx,%rcx,4),%ecx
add    %eax,%ecx
mov    %ebx,%eax
sub    %ecx,%eax
add    $0x61,%al
mov    %al,0x10(%rsp)
movb   $0x0,0x11(%rsp)
mov    %r14,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15d,%eax
imul   %r12d,%eax
xor    %ebx,%eax
add    %eax,%ebx
add    $0x1,%r12d
add    %ebp,%r15d
cmp    $0x10,%r12d
jne    1170 <main+0x50>
lea    0xe43(%rip),%rdi
call   1030 <puts@plt>
add    $0x8c9f70,%ebp
mov    0xc(%rsp),%eax
cmp    $0x1e,%eax
jne    1150 <main+0x30>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [6 x i8] c".org\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca [16 x i8]
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 177228, i32* %10
store i32 0, i32* %9
store i32 0, i32* %8
store i32 0, i32* %7
br label %27
27: ; preds = %87, %2
%28 = load i32, i32* %7
%29 = icmp ult i32 %28, 30
br i1 %29, label %30, label %93
30: ; preds = %27
store i32 0, i32* %13
%31 = load i32, i32* %10
%32 = shl i32 %31, 1
store i32 %32, i32* %14
%33 = load i32, i32* %8
%34 = add i32 %33, 1
store i32 %34, i32* %8
%35 = load i32, i32* %8
%36 = load i32, i32* %14
%37 = mul i32 %35, %36
store i32 %37, i32* %15
%38 = load i32, i32* %8
%39 = load i32, i32* %10
%40 = mul i32 %38, %39
store i32 %40, i32* %16
%41 = load i32, i32* %8
%42 = sub i32 %41, 1
store i32 %42, i32* %8
%43 = load i32, i32* %8
%44 = load i32, i32* %10
%45 = mul i32 %43, %44
store i32 %45, i32* %17
%46 = load i32, i32* %17
%47 = mul i32 %46, 26
store i32 %47, i32* %18
%48 = load i32, i32* %15
%49 = load i32, i32* %18
%50 = xor i32 %48, %49
store i32 %50, i32* %13
store i32 0, i32* %9
br label %51
51: ; preds = %54, %30
%52 = load i32, i32* %9
%53 = icmp ult i32 %52, 16
br i1 %53, label %54, label %87
54: ; preds = %51
%55 = load i32, i32* %13
%56 = udiv i32 %55, 26
store i32 %56, i32* %19
%57 = load i32, i32* %13
%58 = urem i32 %57, 26
store i32 %58, i32* %20
%59 = load i32, i32* %20
%60 = add i32 %59, 32
store i32 %60, i32* %21
%61 = load i32, i32* %21
%62 = xor i32 %61, 161
store i32 %62, i32* %22
%63 = load i32, i32* %22
%64 = xor i32 161, %63
%65 = add i32 65, %64
store i32 %65, i32* %12
%66 = getelementptr inbounds [16 x i8], [16 x i8]* %11, i64 0, i64 0
%67 = load i32, i32* %12
%68 = call i32 @sprintf(i8* %66, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %67)
%69 = getelementptr inbounds [16 x i8], [16 x i8]* %11, i64 0, i64 0
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %69)
%71 = load i32, i32* %9
%72 = load i32, i32* %15
%73 = mul i32 %71, %72
store i32 %73, i32* %23
%74 = load i32, i32* %9
%75 = load i32, i32* %23
%76 = mul i32 %74, %75
store i32 %76, i32* %24
%77 = load i32, i32* %24
%78 = mul i32 26, %77
store i32 %78, i32* %25
%79 = load i32, i32* %13
%80 = load i32, i32* %25
%81 = xor i32 %79, %80
store i32 %81, i32* %26
%82 = load i32, i32* %13
%83 = load i32, i32* %26
%84 = add i32 %82, %83
store i32 %84, i32* %13
%85 = load i32, i32* %9
%86 = add i32 %85, 1
store i32 %86, i32* %9
br label %51
87: ; preds = %51
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%89 = load i32, i32* %8
%90 = add i32 %89, 1
store i32 %90, i32* %8
%91 = load i32, i32* %7
%92 = add i32 %91, 1
store i32 %92, i32* %7
br label %27
93: ; preds = %27
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%s\00"
@str = [5 x i8] c".org\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 1
br label %6
6: ; preds = %2, %26
%7 = phi i32 [ 0, %2 ], [ %8, %26 ]
%8 = add nuw nsw i32 %7, 1
%9 = mul nuw nsw i32 %8, 354456
%10 = mul nuw nsw i32 %7, 4607928
%11 = xor i32 %9, %10
%12 = mul nuw nsw i32 %8, 9215856
br label %13
13: ; preds = %6, %13
%14 = phi i32 [ 0, %6 ], [ %24, %13 ]
%15 = phi i32 [ %11, %6 ], [ %23, %13 ]
%16 = urem i32 %15, 26
%17 = trunc i32 %16 to i8
%18 = add nuw nsw i8 %17, 97
store i8 %18, i8* %4
store i8 0, i8* %5
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%20 = mul nuw i32 %12, %14
%21 = mul i32 %20, %14
%22 = xor i32 %21, %15
%23 = add i32 %22, %15
%24 = add nuw nsw i32 %14, 1
%25 = icmp eq i32 %24, 16
br i1 %25, label %26, label %13
26: ; preds = %13
%27 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%28 = icmp eq i32 %8, 30
br i1 %28, label %29, label %6
29: ; preds = %26
ret i32 0
}