#include <stdio.h>
#include <stdlib.h>

#define N 250000

struct Strategy {
    double profitLoss;
    void (*backtest)(struct Strategy *, struct Tick *);
};

struct Tick {
    long timestamp;
    double open;
    double high;
    double low;
    double close;
    double rsi2;
    double rsi5;
    double rsi7;
    double rsi9;
    double rsi14;
    double stochastic5K;
    double stochastic5D;
    double stochastic10K;
    double stochastic10D;
    double stochastic14K;
    double stochastic14D;
};

__device__ void backtest(struct Strategy *self, struct Tick *tick) {
    int i;
    int j = 0;

    // Pretend to do something.
    // TODO: Actually do something useful.
    for (i=0; i<50; i++) {
        j++;
    }
}

__global__ void initializeStrategies(struct Strategy *strategies) {
    int i = blockIdx.x * blockDim.x + threadIdx.x;

    if (i < N) {
        strategies[i].profitLoss = 10000 + i;
        strategies[i].backtest = backtest;
    }
}

__global__ void backtestStrategies(struct Strategy *strategies, struct Tick *tick) {
    int i = blockIdx.x * blockDim.x + threadIdx.x;

    if (i < N) {
        strategies[i].backtest(&strategies[i], tick);
    }
}

int main() {
    int threadsPerBlock = 1000;
    int blockCount = N / threadsPerBlock;

    struct Strategy strategies[N];
    struct Strategy *devStrategies;
    int i;
    int j;

    int tickCount = 1000000;
    struct Tick *ticks = (Tick*) malloc(tickCount * sizeof(Tick));
    struct Tick *devTicks;
    int kFoldCount = 10;

    void (*backtester)(struct Strategy*, struct Tick*);

    backtester = &backtestStrategies;

    for (i=0; i<tickCount; i++) {
        ticks[i].timestamp = 1460611103;
        ticks[i].open = 89.5;
        ticks[i].high = 89.9;
        ticks[i].low = 89.2;
        ticks[i].close = 89.4;
        ticks[i].rsi2 = 89.7;
        ticks[i].rsi5 = 89.75;
        ticks[i].rsi7 = 89.72;
        ticks[i].rsi9 = 89.76;
        ticks[i].rsi14 = 89.9;
        ticks[i].stochastic5K = 89.2;
        ticks[i].stochastic5D = 89.4;
        ticks[i].stochastic10K = 89.7;
        ticks[i].stochastic10D = 89.75;
        ticks[i].stochastic14K = 89.72;
        ticks[i].stochastic14D = 89.76;
    }

    cudaSetDevice(0);

    // Allocate memory on the GPU for the strategies.
    cudaMalloc((void**)&devStrategies, N * sizeof(Strategy));
    
    // Copy tick data to the GPU.
    cudaMalloc((void**)&devTicks, N * sizeof(Tick));
    cudaMemcpy(devTicks, ticks, N * sizeof(Tick), cudaMemcpyHostToDevice);

    // Initialize strategies on the GPU.
    initializeStrategies<<<blockCount, threadsPerBlock>>>(devStrategies);

    for (i=0; i<kFoldCount; i++) {
        for (j=0; j<tickCount; j++) {
            // Run backtests for all strategies.
            (*backtester)<<<blockCount, threadsPerBlock>>>(devStrategies, &devTicks[j]);
        }
    }

    // Free memory for the tick data from the GPU.
    cudaFree(devTicks);

    // TODO: Determine if this is necessary.
    //cudaDeviceSynchronize();

    // Copy strategies from the GPU.
    cudaMemcpy(strategies, devStrategies, N * sizeof(Strategy), cudaMemcpyDeviceToHost);

    // Display results.
    for (i=0; i<N; i++) {
        printf("%f\n", strategies[i].profitLoss);
    }

    // Free memory for the strategies on the GPU.
    cudaFree(devStrategies);

    return 0;
}

	.file	"tmpxft_00292554_00000000-6_c_class.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2031:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2031:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z8backtestP8StrategyP4Tick
	.type	_Z8backtestP8StrategyP4Tick, @function
_Z8backtestP8StrategyP4Tick:
.LFB2027:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	popq	%rax
	.cfi_def_cfa_offset 8
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movl	$1, 12(%rsp)
	movl	12(%rsp), %edi
	call	exit@PLT
	.cfi_endproc
.LFE2027:
	.size	_Z8backtestP8StrategyP4Tick, .-_Z8backtestP8StrategyP4Tick
	.globl	_Z48__device_stub__Z20initializeStrategiesP8StrategyP8Strategy
	.type	_Z48__device_stub__Z20initializeStrategiesP8StrategyP8Strategy, @function
_Z48__device_stub__Z20initializeStrategiesP8StrategyP8Strategy:
.LFB2053:
	.cfi_startproc
	endbr64
	subq	$104, %rsp
	.cfi_def_cfa_offset 112
	movq	%rdi, 8(%rsp)
	leaq	24(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	44(%rsp), %rsi
	leaq	32(%rsp), %rdi
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rax
	movl	$1, 40(%rsp)
	movq	%rax, 80(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 32(%rsp)
	movq	%rax, 44(%rsp)
	movl	$1, 52(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L4
	pushq	24(%rsp)
	.cfi_def_cfa_offset 120
	leaq	_Z20initializeStrategiesP8Strategy(%rip), %rdi
	pushq	24(%rsp)
	.cfi_def_cfa_offset 128
	movq	60(%rsp), %rcx
	movl	68(%rsp), %r8d
	movq	48(%rsp), %rsi
	movl	56(%rsp), %edx
	leaq	96(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 120
	popq	%rdx
	.cfi_def_cfa_offset 112
.L4:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	addq	$104, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2053:
	.size	_Z48__device_stub__Z20initializeStrategiesP8StrategyP8Strategy, .-_Z48__device_stub__Z20initializeStrategiesP8StrategyP8Strategy
	.globl	_Z20initializeStrategiesP8Strategy
	.type	_Z20initializeStrategiesP8Strategy, @function
_Z20initializeStrategiesP8Strategy:
.LFB2054:
	.cfi_startproc
	endbr64
	jmp	_Z48__device_stub__Z20initializeStrategiesP8StrategyP8Strategy
	.cfi_endproc
.LFE2054:
	.size	_Z20initializeStrategiesP8Strategy, .-_Z20initializeStrategiesP8Strategy
	.globl	_Z52__device_stub__Z18backtestStrategiesP8StrategyP4TickP8StrategyP4Tick
	.type	_Z52__device_stub__Z18backtestStrategiesP8StrategyP4TickP8StrategyP4Tick, @function
_Z52__device_stub__Z18backtestStrategiesP8StrategyP4TickP8StrategyP4Tick:
.LFB2055:
	.cfi_startproc
	endbr64
	subq	$120, %rsp
	.cfi_def_cfa_offset 128
	movq	%rdi, 8(%rsp)
	leaq	32(%rsp), %rcx
	leaq	24(%rsp), %rdx
	movq	%rsi, (%rsp)
	leaq	40(%rsp), %rdi
	leaq	52(%rsp), %rsi
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rax
	movl	$1, 48(%rsp)
	movq	%rax, 88(%rsp)
	movq	%rsp, %rax
	movq	%rax, 96(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 40(%rsp)
	movq	%rax, 52(%rsp)
	movl	$1, 60(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L10
	pushq	32(%rsp)
	.cfi_def_cfa_offset 136
	leaq	_Z18backtestStrategiesP8StrategyP4Tick(%rip), %rdi
	pushq	32(%rsp)
	.cfi_def_cfa_offset 144
	movq	68(%rsp), %rcx
	movl	76(%rsp), %r8d
	movq	56(%rsp), %rsi
	movl	64(%rsp), %edx
	leaq	104(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 136
	popq	%rdx
	.cfi_def_cfa_offset 128
.L10:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	addq	$120, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2055:
	.size	_Z52__device_stub__Z18backtestStrategiesP8StrategyP4TickP8StrategyP4Tick, .-_Z52__device_stub__Z18backtestStrategiesP8StrategyP4TickP8StrategyP4Tick
	.globl	_Z18backtestStrategiesP8StrategyP4Tick
	.type	_Z18backtestStrategiesP8StrategyP4Tick, @function
_Z18backtestStrategiesP8StrategyP4Tick:
.LFB2056:
	.cfi_startproc
	endbr64
	jmp	_Z52__device_stub__Z18backtestStrategiesP8StrategyP4TickP8StrategyP4Tick
	.cfi_endproc
.LFE2056:
	.size	_Z18backtestStrategiesP8StrategyP4Tick, .-_Z18backtestStrategiesP8StrategyP4Tick
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC8:
	.string	"%f\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2028:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-3997696(%rsp), %r11
	.cfi_def_cfa 11, 3997728
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2368, %rsp
	.cfi_def_cfa_offset 4000096
	movl	$128000000, %edi
	movq	%fs:40, %rax
	movq	%rax, 4000056(%rsp)
	xorl	%eax, %eax
	call	malloc@PLT
	movsd	.LC0(%rip), %xmm7
	movsd	.LC1(%rip), %xmm6
	movsd	.LC2(%rip), %xmm5
	movsd	.LC3(%rip), %xmm4
	movq	%rax, %rbx
	movq	%rax, %rdx
	movsd	.LC4(%rip), %xmm3
	movsd	.LC5(%rip), %xmm2
	leaq	128000000(%rax), %rax
	movsd	.LC6(%rip), %xmm1
	movsd	.LC7(%rip), %xmm0
.L16:
	movq	$1460611103, (%rdx)
	subq	$-128, %rdx
	movsd	%xmm7, -120(%rdx)
	movsd	%xmm6, -112(%rdx)
	movsd	%xmm5, -104(%rdx)
	movsd	%xmm4, -96(%rdx)
	movsd	%xmm3, -88(%rdx)
	movsd	%xmm2, -80(%rdx)
	movsd	%xmm1, -72(%rdx)
	movsd	%xmm0, -64(%rdx)
	movsd	%xmm6, -56(%rdx)
	movsd	%xmm5, -48(%rdx)
	movsd	%xmm4, -40(%rdx)
	movsd	%xmm3, -32(%rdx)
	movsd	%xmm2, -24(%rdx)
	movsd	%xmm1, -16(%rdx)
	movsd	%xmm0, -8(%rdx)
	cmpq	%rax, %rdx
	jne	.L16
	xorl	%edi, %edi
	call	cudaSetDevice@PLT
	leaq	8(%rsp), %rdi
	movl	$4000000, %esi
	call	cudaMalloc@PLT
	leaq	16(%rsp), %rdi
	movl	$32000000, %esi
	call	cudaMalloc@PLT
	movq	16(%rsp), %rdi
	movl	$1, %ecx
	movq	%rbx, %rsi
	movl	$32000000, %edx
	call	cudaMemcpy@PLT
	movl	$536871037, %edx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$2147483773, %edi
	salq	$3, %rdx
	movl	$1, %ecx
	movl	$1, %esi
	addq	%rdi, %rdi
	movq	%rdx, 36(%rsp)
	movl	$1, 44(%rsp)
	movq	%rdi, 24(%rsp)
	movl	$1, 32(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L17
	movq	8(%rsp), %rdi
	call	_Z48__device_stub__Z20initializeStrategiesP8StrategyP8Strategy
.L17:
	movabsq	$4294968296, %r12
	movl	$10, %ebp
.L18:
	xorl	%ebx, %ebx
.L20:
	movl	$2147483773, %edi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r12, %rdx
	addq	%rdi, %rdi
	movl	$1, %ecx
	movl	$1, %esi
	movq	%r12, 36(%rsp)
	movl	$1, 44(%rsp)
	movq	%rdi, 24(%rsp)
	movl	$1, 32(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L19
	movq	16(%rsp), %rsi
	movq	8(%rsp), %rdi
	addq	%rbx, %rsi
	call	_Z52__device_stub__Z18backtestStrategiesP8StrategyP4TickP8StrategyP4Tick
.L19:
	subq	$-128, %rbx
	cmpq	$128000000, %rbx
	jne	.L20
	decl	%ebp
	jne	.L18
	movq	16(%rsp), %rdi
	leaq	48(%rsp), %rbx
	leaq	4000048(%rsp), %rbp
	leaq	.LC8(%rip), %r12
	call	cudaFree@PLT
	movq	8(%rsp), %rsi
	movl	$2, %ecx
	movq	%rbx, %rdi
	movl	$4000000, %edx
	call	cudaMemcpy@PLT
.L22:
	movsd	(%rbx), %xmm0
	movq	%r12, %rsi
	movl	$2, %edi
	movb	$1, %al
	addq	$16, %rbx
	call	__printf_chk@PLT
	cmpq	%rbp, %rbx
	jne	.L22
	movq	8(%rsp), %rdi
	call	cudaFree@PLT
	movq	4000056(%rsp), %rax
	subq	%fs:40, %rax
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	addq	$4000064, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2028:
	.size	main, .-main
	.section	.rodata.str1.1
.LC9:
	.string	"_Z18backtestStrategiesP8StrategyP4Tick"
.LC10:
	.string	"_Z20initializeStrategiesP8Strategy"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2058:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	pushq	$0
	.cfi_def_cfa_offset 24
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC9(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z18backtestStrategiesP8StrategyP4Tick(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC10(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z20initializeStrategiesP8Strategy(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE2058:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	1079402496
	.align 8
.LC1:
	.long	-1717986918
	.long	1079409049
	.align 8
.LC2:
	.long	-858993459
	.long	1079397580
	.align 8
.LC3:
	.long	-1717986918
	.long	1079400857
	.align 8
.LC4:
	.long	-858993459
	.long	1079405772
	.align 8
.LC5:
	.long	0
	.long	1079406592
	.align 8
.LC6:
	.long	2061584302
	.long	1079406100
	.align 8
.LC7:
	.long	-687194767
	.long	1079406755
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


#include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>

#define N 250000

struct Strategy {
    double profitLoss;
    void (*backtest)(struct Strategy *, struct Tick *);
};

struct Tick {
    long timestamp;
    double open;
    double high;
    double low;
    double close;
    double rsi2;
    double rsi5;
    double rsi7;
    double rsi9;
    double rsi14;
    double stochastic5K;
    double stochastic5D;
    double stochastic10K;
    double stochastic10D;
    double stochastic14K;
    double stochastic14D;
};

__device__ void backtest(struct Strategy *self, struct Tick *tick) {
    int i;
    int j = 0;

    // Pretend to do something.
    // TODO: Actually do something useful.
    for (i=0; i<50; i++) {
        j++;
    }
}

__global__ void initializeStrategies(struct Strategy *strategies) {
    int i = blockIdx.x * blockDim.x + threadIdx.x;

    if (i < N) {
        strategies[i].profitLoss = 10000 + i;
        strategies[i].backtest = backtest;
    }
}

__global__ void backtestStrategies(struct Strategy *strategies, struct Tick *tick) {
    int i = blockIdx.x * blockDim.x + threadIdx.x;

    if (i < N) {
        strategies[i].backtest(&strategies[i], tick);
    }
}

int main() {
    int threadsPerBlock = 1000;
    int blockCount = N / threadsPerBlock;

    struct Strategy strategies[N];
    struct Strategy *devStrategies;
    int i;
    int j;

    int tickCount = 1000000;
    struct Tick *ticks = (Tick*) malloc(tickCount * sizeof(Tick));
    struct Tick *devTicks;
    int kFoldCount = 10;

    void (*backtester)(struct Strategy*, struct Tick*);

    backtester = &backtestStrategies;

    for (i=0; i<tickCount; i++) {
        ticks[i].timestamp = 1460611103;
        ticks[i].open = 89.5;
        ticks[i].high = 89.9;
        ticks[i].low = 89.2;
        ticks[i].close = 89.4;
        ticks[i].rsi2 = 89.7;
        ticks[i].rsi5 = 89.75;
        ticks[i].rsi7 = 89.72;
        ticks[i].rsi9 = 89.76;
        ticks[i].rsi14 = 89.9;
        ticks[i].stochastic5K = 89.2;
        ticks[i].stochastic5D = 89.4;
        ticks[i].stochastic10K = 89.7;
        ticks[i].stochastic10D = 89.75;
        ticks[i].stochastic14K = 89.72;
        ticks[i].stochastic14D = 89.76;
    }

    hipSetDevice(0);

    // Allocate memory on the GPU for the strategies.
    hipMalloc((void**)&devStrategies, N * sizeof(Strategy));
    
    // Copy tick data to the GPU.
    hipMalloc((void**)&devTicks, N * sizeof(Tick));
    hipMemcpy(devTicks, ticks, N * sizeof(Tick), hipMemcpyHostToDevice);

    // Initialize strategies on the GPU.
    initializeStrategies<<<blockCount, threadsPerBlock>>>(devStrategies);

    for (i=0; i<kFoldCount; i++) {
        for (j=0; j<tickCount; j++) {
            // Run backtests for all strategies.
            (*backtester)<<<blockCount, threadsPerBlock>>>(devStrategies, &devTicks[j]);
        }
    }

    // Free memory for the tick data from the GPU.
    hipFree(devTicks);

    // TODO: Determine if this is necessary.
    //cudaDeviceSynchronize();

    // Copy strategies from the GPU.
    hipMemcpy(strategies, devStrategies, N * sizeof(Strategy), hipMemcpyDeviceToHost);

    // Display results.
    for (i=0; i<N; i++) {
        printf("%f\n", strategies[i].profitLoss);
    }

    // Free memory for the strategies on the GPU.
    hipFree(devStrategies);

    return 0;
}

	.text
	.file	"c_class.hip"
	.globl	_Z35__device_stub__initializeStrategiesP8Strategy # -- Begin function _Z35__device_stub__initializeStrategiesP8Strategy
	.type	_Z35__device_stub__initializeStrategiesP8Strategy,@function
_Z35__device_stub__initializeStrategiesP8Strategy: # @_Z35__device_stub__initializeStrategiesP8Strategy
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$64, %rsp
	.cfi_def_cfa_offset 112
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	24(%rsp), %rax
	movq	%rdi, (%rax)
	movq	%rsp, %rbx
	movq	%rax, (%rbx)
	leaq	48(%rsp), %r14
	leaq	32(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z20initializeStrategiesP8Strategy, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$80, %rsp
	.cfi_adjust_cfa_offset -80
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z35__device_stub__initializeStrategiesP8Strategy, .Lfunc_end0-_Z35__device_stub__initializeStrategiesP8Strategy
	.cfi_endproc
                                        # -- End function
	.globl	_Z33__device_stub__backtestStrategiesP8StrategyP4Tick # -- Begin function _Z33__device_stub__backtestStrategiesP8StrategyP4Tick
	.type	_Z33__device_stub__backtestStrategiesP8StrategyP4Tick,@function
_Z33__device_stub__backtestStrategiesP8StrategyP4Tick: # @_Z33__device_stub__backtestStrategiesP8StrategyP4Tick
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$80, %rsp
	.cfi_def_cfa_offset 128
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	24(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	16(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	64(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	leaq	48(%rsp), %r14
	leaq	32(%rsp), %r15
	leaq	8(%rsp), %r12
	movq	%rsp, %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z18backtestStrategiesP8StrategyP4Tick, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$96, %rsp
	.cfi_adjust_cfa_offset -96
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end1:
	.size	_Z33__device_stub__backtestStrategiesP8StrategyP4Tick, .Lfunc_end1-_Z33__device_stub__backtestStrategiesP8StrategyP4Tick
	.cfi_endproc
                                        # -- End function
	.globl	main                            # -- Begin function main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	subq	$4000024, %rsp                  # imm = 0x3D0918
	.cfi_def_cfa_offset 4000064
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movl	$128000000, %edi                # imm = 0x7A12000
	callq	malloc
	movq	%rax, %r14
	movl	$120, %eax
	movabsq	$4635998419540770816, %rcx      # imm = 0x4056600000000000
	movabsq	$4636026567038441882, %rdx      # imm = 0x405679999999999A
	movabsq	$4635977308917517517, %rsi      # imm = 0x40564CCCCCCCCCCD
	movabsq	$4635991382666353050, %rdi      # imm = 0x405659999999999A
	movabsq	$4636012493289606349, %r8       # imm = 0x40566CCCCCCCCCCD
	movabsq	$4636016011726815232, %r9       # imm = 0x4056700000000000
	movabsq	$4636013900664489902, %r10      # imm = 0x40566E147AE147AE
	movabsq	$4636016715414257009, %r11      # imm = 0x405670A3D70A3D71
.LBB2_1:                                # =>This Inner Loop Header: Depth=1
	movq	$1460611103, -120(%r14,%rax)    # imm = 0x570F281F
	movq	%rcx, -112(%r14,%rax)
	movq	%rdx, -104(%r14,%rax)
	movq	%rsi, -96(%r14,%rax)
	movq	%rdi, -88(%r14,%rax)
	movq	%r8, -80(%r14,%rax)
	movq	%r9, -72(%r14,%rax)
	movq	%r10, -64(%r14,%rax)
	movq	%r11, -56(%r14,%rax)
	movq	%rdx, -48(%r14,%rax)
	movq	%rsi, -40(%r14,%rax)
	movq	%rdi, -32(%r14,%rax)
	movq	%r8, -24(%r14,%rax)
	movq	%r9, -16(%r14,%rax)
	movq	%r10, -8(%r14,%rax)
	movq	%r11, (%r14,%rax)
	subq	$-128, %rax
	cmpq	$128000120, %rax                # imm = 0x7A12078
	jne	.LBB2_1
# %bb.2:
	movabsq	$4294967546, %rbx               # imm = 0x1000000FA
	xorl	%r12d, %r12d
	xorl	%edi, %edi
	callq	hipSetDevice
	movq	%rsp, %rdi
	movl	$4000000, %esi                  # imm = 0x3D0900
	callq	hipMalloc
	leaq	8(%rsp), %r15
	movl	$32000000, %esi                 # imm = 0x1E84800
	movq	%r15, %rdi
	callq	hipMalloc
	movq	(%r15), %rdi
	movl	$32000000, %edx                 # imm = 0x1E84800
	movq	%r14, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	750(%rbx), %r14
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%r14, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB2_4
# %bb.3:
	movq	(%rsp), %rdi
	callq	_Z35__device_stub__initializeStrategiesP8Strategy
.LBB2_4:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_5 Depth 2
	xorl	%r15d, %r15d
.LBB2_5:                                #   Parent Loop BB2_4 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%r14, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB2_7
# %bb.6:                                #   in Loop: Header=BB2_5 Depth=2
	movq	(%rsp), %rdi
	movq	8(%rsp), %rsi
	addq	%r15, %rsi
	callq	_Z33__device_stub__backtestStrategiesP8StrategyP4Tick
.LBB2_7:                                #   in Loop: Header=BB2_5 Depth=2
	subq	$-128, %r15
	cmpq	$128000000, %r15                # imm = 0x7A12000
	jne	.LBB2_5
# %bb.8:                                #   in Loop: Header=BB2_4 Depth=1
	incl	%r12d
	cmpl	$10, %r12d
	jne	.LBB2_4
# %bb.9:
	movq	8(%rsp), %rdi
	callq	hipFree
	movq	(%rsp), %rsi
	leaq	16(%rsp), %rdi
	movl	$4000000, %edx                  # imm = 0x3D0900
	movl	$2, %ecx
	callq	hipMemcpy
	xorl	%ebx, %ebx
.LBB2_10:                               # =>This Inner Loop Header: Depth=1
	movsd	16(%rsp,%rbx), %xmm0            # xmm0 = mem[0],zero
	movl	$.L.str, %edi
	movb	$1, %al
	callq	printf
	addq	$16, %rbx
	cmpq	$4000000, %rbx                  # imm = 0x3D0900
	jne	.LBB2_10
# %bb.11:
	movq	(%rsp), %rdi
	callq	hipFree
	xorl	%eax, %eax
	addq	$4000024, %rsp                  # imm = 0x3D0918
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end2:
	.size	main, .Lfunc_end2-main
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_ctor
	.type	__hip_module_ctor,@function
__hip_module_ctor:                      # @__hip_module_ctor
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -16
	movq	__hip_gpubin_handle(%rip), %rbx
	testq	%rbx, %rbx
	jne	.LBB3_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB3_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z20initializeStrategiesP8Strategy, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z18backtestStrategiesP8StrategyP4Tick, %esi
	movl	$.L__unnamed_2, %edx
	movl	$.L__unnamed_2, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end3:
	.size	__hip_module_ctor, .Lfunc_end3-__hip_module_ctor
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_dtor
	.type	__hip_module_dtor,@function
__hip_module_dtor:                      # @__hip_module_dtor
	.cfi_startproc
# %bb.0:
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB4_2
# %bb.1:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	__hipUnregisterFatBinary
	movq	$0, __hip_gpubin_handle(%rip)
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
.LBB4_2:
	retq
.Lfunc_end4:
	.size	__hip_module_dtor, .Lfunc_end4-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z20initializeStrategiesP8Strategy,@object # @_Z20initializeStrategiesP8Strategy
	.section	.rodata,"a",@progbits
	.globl	_Z20initializeStrategiesP8Strategy
	.p2align	3, 0x0
_Z20initializeStrategiesP8Strategy:
	.quad	_Z35__device_stub__initializeStrategiesP8Strategy
	.size	_Z20initializeStrategiesP8Strategy, 8

	.type	_Z18backtestStrategiesP8StrategyP4Tick,@object # @_Z18backtestStrategiesP8StrategyP4Tick
	.globl	_Z18backtestStrategiesP8StrategyP4Tick
	.p2align	3, 0x0
_Z18backtestStrategiesP8StrategyP4Tick:
	.quad	_Z33__device_stub__backtestStrategiesP8StrategyP4Tick
	.size	_Z18backtestStrategiesP8StrategyP4Tick, 8

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"%f\n"
	.size	.L.str, 4

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z20initializeStrategiesP8Strategy"
	.size	.L__unnamed_1, 35

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z18backtestStrategiesP8StrategyP4Tick"
	.size	.L__unnamed_2, 39

	.type	__hip_fatbin_wrapper,@object    # @__hip_fatbin_wrapper
	.section	.hipFatBinSegment,"a",@progbits
	.p2align	3, 0x0
__hip_fatbin_wrapper:
	.long	1212764230                      # 0x48495046
	.long	1                               # 0x1
	.quad	__hip_fatbin
	.quad	0
	.size	__hip_fatbin_wrapper, 24

	.type	__hip_gpubin_handle,@object     # @__hip_gpubin_handle
	.local	__hip_gpubin_handle
	.comm	__hip_gpubin_handle,8,8
	.section	.init_array,"aw",@init_array
	.p2align	3, 0x0
	.quad	__hip_module_ctor
	.type	__hip_cuid_,@object             # @__hip_cuid_
	.bss
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               # 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym _Z35__device_stub__initializeStrategiesP8Strategy
	.addrsig_sym _Z33__device_stub__backtestStrategiesP8StrategyP4Tick
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z20initializeStrategiesP8Strategy
	.addrsig_sym _Z18backtestStrategiesP8StrategyP4Tick
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.p2align	2                               ; -- Begin function _Z8backtestP8StrategyP4Tick
	.type	_Z8backtestP8StrategyP4Tick,@function
_Z8backtestP8StrategyP4Tick:            ; @_Z8backtestP8StrategyP4Tick
; %bb.0:
	s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
	s_setpc_b64 s[30:31]
.Lfunc_end0:
	.size	_Z8backtestP8StrategyP4Tick, .Lfunc_end0-_Z8backtestP8StrategyP4Tick
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Function info:
; codeLenInByte = 8
; NumSgprs: 32
; NumVgprs: 0
; ScratchSize: 0
; MemoryBound: 0
	.text
	.protected	_Z20initializeStrategiesP8Strategy ; -- Begin function _Z20initializeStrategiesP8Strategy
	.globl	_Z20initializeStrategiesP8Strategy
	.p2align	8
	.type	_Z20initializeStrategiesP8Strategy,@function
_Z20initializeStrategiesP8Strategy:     ; @_Z20initializeStrategiesP8Strategy
; %bb.0:
	s_load_b32 s2, s[0:1], 0x14
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s2, v[0:1]
	s_mov_b32 s2, exec_lo
	v_cmpx_gt_i32_e32 0x3d090, v1
	s_cbranch_execz .LBB1_2
; %bb.1:
	s_getpc_b64 s[2:3]
	s_add_u32 s2, s2, _Z8backtestP8StrategyP4Tick@rel32@lo+4
	s_addc_u32 s3, s3, _Z8backtestP8StrategyP4Tick@rel32@hi+12
	v_dual_mov_b32 v5, s2 :: v_dual_add_nc_u32 v0, 0x2710, v1
	s_load_b64 s[0:1], s[0:1], 0x0
	v_ashrrev_i32_e32 v2, 31, v1
	v_mov_b32_e32 v6, s3
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cvt_f64_i32_e32 v[3:4], v0
	v_lshlrev_b64 v[0:1], 4, v[1:2]
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, s0, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s1, v1, vcc_lo
	global_store_b128 v[0:1], v[3:6], off
.LBB1_2:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z20initializeStrategiesP8Strategy
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 264
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 7
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end1:
	.size	_Z20initializeStrategiesP8Strategy, .Lfunc_end1-_Z20initializeStrategiesP8Strategy
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 152
; NumSgprs: 18
; NumVgprs: 7
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 7
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z18backtestStrategiesP8StrategyP4Tick ; -- Begin function _Z18backtestStrategiesP8StrategyP4Tick
	.globl	_Z18backtestStrategiesP8StrategyP4Tick
	.p2align	8
	.type	_Z18backtestStrategiesP8StrategyP4Tick,@function
_Z18backtestStrategiesP8StrategyP4Tick: ; @_Z18backtestStrategiesP8StrategyP4Tick
; %bb.0:
	s_mov_b64 s[36:37], s[0:1]
	s_load_b32 s0, s[2:3], 0x1c
	v_mov_b32_e32 v31, v0
	s_mov_b32 s40, s13
	s_mov_b32 s32, 0
	s_delay_alu instid0(VALU_DEP_1)
	v_and_b32_e32 v2, 0x3ff, v31
	s_waitcnt lgkmcnt(0)
	s_and_b32 s0, s0, 0xffff
	s_delay_alu instid0(VALU_DEP_1) | instid1(SALU_CYCLE_1)
	v_mad_u64_u32 v[0:1], null, s40, s0, v[2:3]
	s_mov_b32 s0, exec_lo
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_gt_i32_e32 0x3d090, v0
	s_cbranch_execz .LBB2_3
; %bb.1:
	s_load_b128 s[44:47], s[2:3], 0x0
	v_ashrrev_i32_e32 v1, 31, v0
	s_add_u32 s38, s2, 16
	s_mov_b32 s33, s15
	s_mov_b32 s41, s14
	s_mov_b64 s[34:35], s[4:5]
	v_lshlrev_b64 v[0:1], 4, v[0:1]
	s_addc_u32 s39, s3, 0
	s_mov_b32 s0, exec_lo
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, s44, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s45, v1, vcc_lo
	global_load_b64 v[2:3], v[0:1], off offset:8
.LBB2_2:                                ; =>This Inner Loop Header: Depth=1
	s_waitcnt vmcnt(0)
	v_readfirstlane_b32 s0, v2
	v_readfirstlane_b32 s1, v3
	s_mov_b32 s42, exec_lo
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_eq_u64_e64 s[0:1], v[2:3]
	v_dual_mov_b32 v2, s46 :: v_dual_mov_b32 v3, s47
	s_mov_b64 s[4:5], s[36:37]
	s_mov_b64 s[8:9], s[38:39]
	s_mov_b64 s[10:11], s[34:35]
	s_mov_b32 s12, s40
	s_mov_b32 s13, s41
	s_mov_b32 s14, s33
	s_swappc_b64 s[30:31], s[0:1]
                                        ; implicit-def: $vgpr2_vgpr3
                                        ; implicit-def: $vgpr31
                                        ; implicit-def: $vgpr0
	s_xor_b32 exec_lo, exec_lo, s42
	s_cbranch_execnz .LBB2_2
.LBB2_3:
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z18backtestStrategiesP8StrategyP4Tick
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 272
		.amdhsa_user_sgpr_count 13
		.amdhsa_user_sgpr_dispatch_ptr 1
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 1
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 1
		.amdhsa_enable_private_segment 1
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 1
		.amdhsa_system_sgpr_workgroup_id_z 1
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 2
		.amdhsa_next_free_vgpr 32
		.amdhsa_next_free_sgpr 48
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end2:
	.size	_Z18backtestStrategiesP8StrategyP4Tick, .Lfunc_end2-_Z18backtestStrategiesP8StrategyP4Tick
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 228
; NumSgprs: 50
; NumVgprs: 32
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 6
; VGPRBlocks: 3
; NumSGPRsForWavesPerEU: 50
; NumVGPRsForWavesPerEU: 32
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 1
; COMPUTE_PGM_RSRC2:USER_SGPR: 13
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 1
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 2
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym _Z8backtestP8StrategyP4Tick
	.addrsig_sym __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .offset:         8
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         12
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         16
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         20
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         22
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         24
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         26
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         28
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         30
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         48
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         56
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         72
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 264
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z20initializeStrategiesP8Strategy
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z20initializeStrategiesP8Strategy.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     7
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .offset:         16
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         20
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         28
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         30
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         32
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         34
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         36
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         38
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         56
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         80
        .size:           2
        .value_kind:     hidden_grid_dims
      - .offset:         96
        .size:           8
        .value_kind:     hidden_hostcall_buffer
      - .offset:         104
        .size:           8
        .value_kind:     hidden_multigrid_sync_arg
      - .offset:         112
        .size:           8
        .value_kind:     hidden_heap_v1
      - .offset:         120
        .size:           8
        .value_kind:     hidden_default_queue
      - .offset:         216
        .size:           8
        .value_kind:     hidden_queue_ptr
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 272
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z18backtestStrategiesP8StrategyP4Tick
    .private_segment_fixed_size: 0
    .sgpr_count:     50
    .sgpr_spill_count: 0
    .symbol:         _Z18backtestStrategiesP8StrategyP4Tick.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: true
    .vgpr_count:     32
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
