#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*/ scanf(char *, int *);
int displayGeneratorOptions() {
  int option = 0;
  printf("           G E N E R A T O R    S E L E C T I O N \n");
  printf("           ______________________________________\n\n");
  printf("    [0] Input File                 [1] Linear Congruential\n");
  printf("    [2] Quadratic Congruential I   [3] Quadratic Congruential II\n");
  printf("    [4] Cubic Congruential         [5] XOR\n");
  printf("    [6] Modular Exponentiation     [7] Blum-Blum-Shub\n");
  printf("    [8] Micali-Schnorr             [9] G Using SHA-1\n\n");
  printf("   Enter Choice: ");
  scanf("%d", &option);
  printf("\n\n");
  return option;
}


x86 assembly (clang, -O0):
<displayGeneratorOptions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
call   1030 <printf@plt>
lea    0xf1a(%rip),%rdi
call   1030 <printf@plt>
lea    0xf4a(%rip),%rdi
call   1030 <printf@plt>
lea    0xf80(%rip),%rdi
call   1030 <printf@plt>
lea    0xfa0(%rip),%rdi
call   1030 <printf@plt>
lea    0xfcb(%rip),%rdi
call   1030 <printf@plt>
lea    0xff6(%rip),%rdi
call   1030 <printf@plt>
lea    0xffc(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xfd7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<displayGeneratorOptions>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
lea    0xefc(%rip),%rdi
call   1030 <puts@plt>
lea    0xf23(%rip),%rdi
call   1030 <puts@plt>
lea    0xf52(%rip),%rdi
call   1030 <puts@plt>
lea    0xf87(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa6(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd0(%rip),%rdi
call   1030 <puts@plt>
lea    0xe6c(%rip),%rdi
call   1040 <printf@plt>
lea    0xe72(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
lea    0xfdb(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [52 x i8] c" G E N E R A T O R S E L E C T I O N \0A\00"
@.str.1 = [52 x i8] c" ______________________________________\0A\0A\00"
@.str.2 = [60 x i8] c" [0] Input File [1] Linear Congruential\0A\00"
@.str.3 = [66 x i8] c" [2] Quadratic Congruential I [3] Quadratic Congruential II\0A\00"
@.str.4 = [44 x i8] c" [4] Cubic Congruential [5] XOR\0A\00"
@.str.5 = [55 x i8] c" [6] Modular Exponentiation [7] Blum-Blum-Shub\0A\00"
@.str.6 = [55 x i8] c" [8] Micali-Schnorr [9] G Using SHA-1\0A\0A\00"
@.str.7 = [18 x i8] c" Enter Choice: \00"
@.str.8 = [3 x i8] c"%d\00"
@.str.9 = [3 x i8] c"\0A\0A\00"
define i32 @displayGeneratorOptions() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.5, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.6, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32* %1)
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@.str.7 = [18 x i8] c" Enter Choice: \00"
@.str.8 = [3 x i8] c"%d\00"
@str = [51 x i8] c" G E N E R A T O R S E L E C T I O N \00"
@str.10 = [51 x i8] c" ______________________________________\0A\00"
@str.11 = [59 x i8] c" [0] Input File [1] Linear Congruential\00"
@str.12 = [65 x i8] c" [2] Quadratic Congruential I [3] Quadratic Congruential II\00"
@str.13 = [43 x i8] c" [4] Cubic Congruential [5] XOR\00"
@str.14 = [54 x i8] c" [6] Modular Exponentiation [7] Blum-Blum-Shub\00"
@str.15 = [54 x i8] c" [8] Micali-Schnorr [9] G Using SHA-1\0A\00"
@str.16 = [2 x i8] c"\0A\00"
define i32 @displayGeneratorOptions() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.10, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.11, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.12, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.13, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.14, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.15, i64 0, i64 0))
%10 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32* %1)
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.16, i64 0, i64 0))
%13 = load i32, i32* %1
ret i32 %13
}