#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, ...);
long random();
main() {
  int i;
  long l;
  printf("#define STOPBITS 0x%04x\n", 0x1820);
  for (i = 0; i < 5408; ++i)
    random();
  for (i = 0; i < 100; ++i) {
    do
      l = random();
    while (!(l & 0x1820));
    printf("#define RAND%02d 0x%08x\n", i, l);
  }
  for (i = 0; i < 28; ++i) {
    l = random();
    printf("#define STOP%02d 0x%08x\n", i, l & ~0x1820);
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x1820,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x1520,-0x8(%rbp)
jge    117b <main+0x4b>
mov    $0x0,%al
call   1040 <random@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1159 <main+0x29>
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    11da <main+0xaa>
jmp    1191 <main+0x61>
mov    $0x0,%al
call   1040 <random@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x1820,%rax
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1191 <main+0x61>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xe54(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1182 <main+0x52>
movl   $0x0,-0x8(%rbp)
cmpl   $0x1c,-0x8(%rbp)
jge    1220 <main+0xf0>
mov    $0x0,%al
call   1040 <random@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
and    $0xffffffffffffe7df,%rdx
lea    0xe27(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11e1 <main+0xb1>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xec6(%rip),%rdi
mov    $0x1820,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1520,%ebx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <random@plt>
add    $0xffffffff,%ebx
jne    1150 <main+0x20>
lea    0xeb6(%rip),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1040 <random@plt>
test   $0x1820,%eax
je     1170 <main+0x40>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %rax,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    $0x64,%ebp
jne    1170 <main+0x40>
lea    0xe96(%rip),%rbx
xor    %ebp,%ebp
xchg   %ax,%ax
xor    %eax,%eax
call   1040 <random@plt>
and    $0xffffffffffffe7df,%rax
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %rax,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    $0x1c,%ebp
jne    11a0 <main+0x70>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"#define STOPBITS 0x%04x\0A\00"
@.str.1 = [25 x i8] c"#define RAND%02d 0x%08x\0A\00"
@.str.2 = [25 x i8] c"#define STOP%02d 0x%08x\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i64
store i32 0, i32* %1
%4 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 6176)
store i32 0, i32* %2
br label %5
5: ; preds = %10, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 5408
br i1 %7, label %8, label %13
8: ; preds = %5
%9 = call i64 (...) @random()
br label %10
10: ; preds = %8
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %5
13: ; preds = %5
store i32 0, i32* %2
br label %14
14: ; preds = %29, %13
%15 = load i32, i32* %2
%16 = icmp slt i32 %15, 100
br i1 %16, label %17, label %32
17: ; preds = %14
br label %18
18: ; preds = %20, %17
%19 = call i64 (...) @random()
store i64 %19, i64* %3
br label %20
20: ; preds = %18
%21 = load i64, i64* %3
%22 = and i64 %21, 6176
%23 = icmp ne i64 %22, 0
%24 = xor i1 %23, true
br i1 %24, label %18, label %25
25: ; preds = %20
%26 = load i32, i32* %2
%27 = load i64, i64* %3
%28 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %26, i64 %27)
br label %29
29: ; preds = %25
%30 = load i32, i32* %2
%31 = add nsw i32 %30, 1
store i32 %31, i32* %2
br label %14
32: ; preds = %14
store i32 0, i32* %2
br label %33
33: ; preds = %42, %32
%34 = load i32, i32* %2
%35 = icmp slt i32 %34, 28
br i1 %35, label %36, label %45
36: ; preds = %33
%37 = call i64 (...) @random()
store i64 %37, i64* %3
%38 = load i32, i32* %2
%39 = load i64, i64* %3
%40 = and i64 %39, -6177
%41 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %38, i64 %40)
br label %42
42: ; preds = %36
%43 = load i32, i32* %2
%44 = add nsw i32 %43, 1
store i32 %44, i32* %2
br label %33
45: ; preds = %33
%46 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [25 x i8] c"#define STOPBITS 0x%04x\0A\00"
@.str.1 = [25 x i8] c"#define RAND%02d 0x%08x\0A\00"
@.str.2 = [25 x i8] c"#define STOP%02d 0x%08x\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 6176)
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %5, %2 ]
%4 = tail call i64 (...) @random()
%5 = add nuw nsw i32 %3, 1
%6 = icmp eq i32 %5, 5408
br i1 %6, label %7, label %2
7: ; preds = %2, %13
%8 = phi i32 [ %15, %13 ], [ 0, %2 ]
br label %9
9: ; preds = %7, %9
%10 = tail call i64 (...) @random()
%11 = and i64 %10, 6176
%12 = icmp eq i64 %11, 0
br i1 %12, label %9, label %13
13: ; preds = %9
%14 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %8, i64 %10)
%15 = add nuw nsw i32 %8, 1
%16 = icmp eq i32 %15, 100
br i1 %16, label %17, label %7
17: ; preds = %13, %17
%18 = phi i32 [ %22, %17 ], [ 0, %13 ]
%19 = tail call i64 (...) @random()
%20 = and i64 %19, -6177
%21 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %18, i64 %20)
%22 = add nuw nsw i32 %18, 1
%23 = icmp eq i32 %22, 28
br i1 %23, label %24, label %17
24: ; preds = %17
%25 = tail call i32 @exit(i32 0)
unreachable
}