#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*/ create_markov(int, double *, int /*<<< orphan*/, char *);
void add_markov(int nstate, char *name) {
  double st[50];
  int i;
  for (i = 0; i < 50; i++)
    st[i] = (double)i;
  create_markov(nstate, st, 0, name);
}


x86 assembly (clang, -O0):
<add_markov>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1a4(%rbp)
cmpl   $0x32,-0x1a4(%rbp)
jge    1165 <add_markov+0x55>
cvtsi2sdl -0x1a4(%rbp),%xmm0
ff
movslq -0x1a4(%rbp),%rax
movsd  %xmm0,-0x1a0(%rbp,%rax,8)
ff ff
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    112c <add_markov+0x1c>
mov    -0x4(%rbp),%edi
lea    -0x1a0(%rbp),%rsi
mov    -0x10(%rbp),%rcx
xor    %edx,%edx
call   1030 <create_markov@plt>
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_markov>:
sub    $0x198,%rsp
mov    %rsi,%rcx
xorps  %xmm0,%xmm0
movhps 0xedc(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xee1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xeed(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xef1(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xef5(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xefd(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xefe(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xeff(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xf00(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0xf01(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0xf02(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps 0xf03(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0xf04(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0xf05(%rip),%xmm0
movaps %xmm0,0x100(%rsp)
movaps 0xf06(%rip),%xmm0
movaps %xmm0,0x110(%rsp)
movaps 0xf07(%rip),%xmm0
movaps %xmm0,0x120(%rsp)
movaps 0xf08(%rip),%xmm0
movaps %xmm0,0x130(%rsp)
movaps 0xf09(%rip),%xmm0
movaps %xmm0,0x140(%rsp)
movaps 0xf0a(%rip),%xmm0
movaps %xmm0,0x150(%rsp)
movaps 0xf0b(%rip),%xmm0
movaps %xmm0,0x160(%rsp)
movaps 0xf0c(%rip),%xmm0
movaps %xmm0,0x170(%rsp)
movaps 0xf0d(%rip),%xmm0
movaps %xmm0,0x180(%rsp)
mov    %rsp,%rsi
xor    %edx,%edx
call   1030 <create_markov@plt>
add    $0x198,%rsp
ret

LLVM IR (-O0):
define void @add_markov(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca [50 x double]
%6 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
store i32 0, i32* %6
br label %7
7: ; preds = %16, %2
%8 = load i32, i32* %6
%9 = icmp slt i32 %8, 50
br i1 %9, label %10, label %19
10: ; preds = %7
%11 = load i32, i32* %6
%12 = sitofp i32 %11 to double
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [50 x double], [50 x double]* %5, i64 0, i64 %14
store double %12, double* %15
br label %16
16: ; preds = %10
%17 = load i32, i32* %6
%18 = add nsw i32 %17, 1
store i32 %18, i32* %6
br label %7
19: ; preds = %7
%20 = load i32, i32* %3
%21 = getelementptr inbounds [50 x double], [50 x double]* %5, i64 0, i64 0
%22 = load i8*, i8** %4
%23 = call i32 @create_markov(i32 %20, double* %21, i32 0, i8* %22)
ret void
}

LLVM IR (-O2):
define void @add_markov(i32 %0, i8* %1) {
%3 = alloca [50 x double]
%4 = bitcast [50 x double]* %3 to i8*
%5 = bitcast [50 x double]* %3 to <2 x double>*
store <2 x double> <double 0.000000e+00, double 1.000000e+00>, <2 x double>* %5
%6 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 2
%7 = bitcast double* %6 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 3.000000e+00>, <2 x double>* %7
%8 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 4
%9 = bitcast double* %8 to <2 x double>*
store <2 x double> <double 4.000000e+00, double 5.000000e+00>, <2 x double>* %9
%10 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 6
%11 = bitcast double* %10 to <2 x double>*
store <2 x double> <double 6.000000e+00, double 7.000000e+00>, <2 x double>* %11
%12 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 8
%13 = bitcast double* %12 to <2 x double>*
store <2 x double> <double 8.000000e+00, double 9.000000e+00>, <2 x double>* %13
%14 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 10
%15 = bitcast double* %14 to <2 x double>*
store <2 x double> <double 1.000000e+01, double 1.100000e+01>, <2 x double>* %15
%16 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 12
%17 = bitcast double* %16 to <2 x double>*
store <2 x double> <double 1.200000e+01, double 1.300000e+01>, <2 x double>* %17
%18 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 14
%19 = bitcast double* %18 to <2 x double>*
store <2 x double> <double 1.400000e+01, double 1.500000e+01>, <2 x double>* %19
%20 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 16
%21 = bitcast double* %20 to <2 x double>*
store <2 x double> <double 1.600000e+01, double 1.700000e+01>, <2 x double>* %21
%22 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 18
%23 = bitcast double* %22 to <2 x double>*
store <2 x double> <double 1.800000e+01, double 1.900000e+01>, <2 x double>* %23
%24 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 20
%25 = bitcast double* %24 to <2 x double>*
store <2 x double> <double 2.000000e+01, double 2.100000e+01>, <2 x double>* %25
%26 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 22
%27 = bitcast double* %26 to <2 x double>*
store <2 x double> <double 2.200000e+01, double 2.300000e+01>, <2 x double>* %27
%28 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 24
%29 = bitcast double* %28 to <2 x double>*
store <2 x double> <double 2.400000e+01, double 2.500000e+01>, <2 x double>* %29
%30 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 26
%31 = bitcast double* %30 to <2 x double>*
store <2 x double> <double 2.600000e+01, double 2.700000e+01>, <2 x double>* %31
%32 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 28
%33 = bitcast double* %32 to <2 x double>*
store <2 x double> <double 2.800000e+01, double 2.900000e+01>, <2 x double>* %33
%34 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 30
%35 = bitcast double* %34 to <2 x double>*
store <2 x double> <double 3.000000e+01, double 3.100000e+01>, <2 x double>* %35
%36 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 32
%37 = bitcast double* %36 to <2 x double>*
store <2 x double> <double 3.200000e+01, double 3.300000e+01>, <2 x double>* %37
%38 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 34
%39 = bitcast double* %38 to <2 x double>*
store <2 x double> <double 3.400000e+01, double 3.500000e+01>, <2 x double>* %39
%40 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 36
%41 = bitcast double* %40 to <2 x double>*
store <2 x double> <double 3.600000e+01, double 3.700000e+01>, <2 x double>* %41
%42 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 38
%43 = bitcast double* %42 to <2 x double>*
store <2 x double> <double 3.800000e+01, double 3.900000e+01>, <2 x double>* %43
%44 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 40
%45 = bitcast double* %44 to <2 x double>*
store <2 x double> <double 4.000000e+01, double 4.100000e+01>, <2 x double>* %45
%46 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 42
%47 = bitcast double* %46 to <2 x double>*
store <2 x double> <double 4.200000e+01, double 4.300000e+01>, <2 x double>* %47
%48 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 44
%49 = bitcast double* %48 to <2 x double>*
store <2 x double> <double 4.400000e+01, double 4.500000e+01>, <2 x double>* %49
%50 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 46
%51 = bitcast double* %50 to <2 x double>*
store <2 x double> <double 4.600000e+01, double 4.700000e+01>, <2 x double>* %51
%52 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 48
%53 = bitcast double* %52 to <2 x double>*
store <2 x double> <double 4.800000e+01, double 4.900000e+01>, <2 x double>* %53
%54 = getelementptr inbounds [50 x double], [50 x double]* %3, i64 0, i64 0
%55 = call i32 @create_markov(i32 %0, double* %54, i32 0, i8* %1)
ret void
}