#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*/ generate_f64_array_seed(unsigned long *, int, unsigned int,
                                           char *);
int /*<<< orphan*/ generate_f64_integer_seed(int, unsigned int, char *);
int /*<<< orphan*/ generate_ui32_array_seed(unsigned long *, int, unsigned int,
                                            char *);
int /*<<< orphan*/ generate_ui32_integer_seed(int, unsigned int, char *);
int main(void) {
  unsigned int len;
  len = 1000;
  unsigned long seed[4] = {0x123, 0x234, 0x345, 0x456};
  generate_ui32_integer_seed(1234, len, "uint32_integer_seed.json");
  generate_ui32_array_seed(seed, 4, len, "uint32_array_seed.json");
  generate_f64_integer_seed(1234, len, "float64_integer_seed.json");
  generate_f64_array_seed(seed, 4, len, "float64_array_seed.json");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3e8,-0x8(%rbp)
mov    0xea3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xea0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xe9d(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe9a(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%esi
mov    $0x4d2,%edi
lea    0xe8f(%rip),%rdx
call   1030 <generate_ui32_integer_seed@plt>
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%edx
mov    $0x4,%esi
lea    0xe90(%rip),%rcx
call   1040 <generate_ui32_array_seed@plt>
mov    -0x8(%rbp),%esi
mov    $0x4d2,%edi
lea    0xe93(%rip),%rdx
call   1050 <generate_f64_integer_seed@plt>
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%edx
mov    $0x4,%esi
lea    0xe95(%rip),%rcx
call   1060 <generate_f64_array_seed@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movaps 0xec4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea8(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xebd(%rip),%rdx
mov    $0x4d2,%edi
mov    $0x3e8,%esi
call   1030 <generate_ui32_integer_seed@plt>
lea    0xec0(%rip),%rcx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x3e8,%edx
call   1040 <generate_ui32_array_seed@plt>
lea    0xebb(%rip),%rdx
mov    $0x4d2,%edi
mov    $0x3e8,%esi
call   1050 <generate_f64_integer_seed@plt>
lea    0xebf(%rip),%rcx
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x3e8,%edx
call   1060 <generate_f64_array_seed@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.seed = [4 x i64] [i64 291, i64 564, i64 837, i64 1110]
@.str = [25 x i8] c"uint32_integer_seed.json\00"
@.str.1 = [23 x i8] c"uint32_array_seed.json\00"
@.str.2 = [26 x i8] c"float64_integer_seed.json\00"
@.str.3 = [24 x i8] c"float64_array_seed.json\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [4 x i64]
store i32 0, i32* %1
store i32 1000, i32* %2
%4 = bitcast [4 x i64]* %3 to i8*
%5 = load i32, i32* %2
%6 = call i32 @generate_ui32_integer_seed(i32 1234, i32 %5, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%7 = getelementptr inbounds [4 x i64], [4 x i64]* %3, i64 0, i64 0
%8 = load i32, i32* %2
%9 = call i32 @generate_ui32_array_seed(i64* %7, i32 4, i32 %8, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32, i32* %2
%11 = call i32 @generate_f64_integer_seed(i32 1234, i32 %10, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%12 = getelementptr inbounds [4 x i64], [4 x i64]* %3, i64 0, i64 0
%13 = load i32, i32* %2
%14 = call i32 @generate_f64_array_seed(i64* %12, i32 4, i32 %13, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@__const.main.seed = [4 x i64] [i64 291, i64 564, i64 837, i64 1110]
@.str = [25 x i8] c"uint32_integer_seed.json\00"
@.str.1 = [23 x i8] c"uint32_array_seed.json\00"
@.str.2 = [26 x i8] c"float64_integer_seed.json\00"
@.str.3 = [24 x i8] c"float64_array_seed.json\00"
define i32 @main() {
%1 = alloca [4 x i64]
%2 = bitcast [4 x i64]* %1 to i8*
%3 = tail call i32 @generate_ui32_integer_seed(i32 1234, i32 1000, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [4 x i64], [4 x i64]* %1, i64 0, i64 0
%5 = call i32 @generate_ui32_array_seed(i64* %4, i32 4, i32 1000, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @generate_f64_integer_seed(i32 1234, i32 1000, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @generate_f64_array_seed(i64* %4, i32 4, i32 1000, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}