/* Author: Christopher Mitchell <chrism@lclark.edu>
 * Date: 2011-07-15
 *
 * Compile with `gcc gol.c`.
 */

#include <stdlib.h> // for rand
#include <string.h> // for memcpy
#include <stdio.h> // for printf
#include <time.h> // for nanosleep
#include<curand.h>

#define WIDTH 60
#define HEIGHT 30

// The two boards 
int current[WIDTH * HEIGHT];
int next[WIDTH * HEIGHT];


const int offsets[8][2] = {{-1, 1},{0, 1},{1, 1},
                           {-1, 0},       {1, 0},
                           {-1,-1},{0,-1},{1,-1}};


void fill_board(int *board) {
    int i;
    for (i=0; i<WIDTH*HEIGHT; i++)
        board[i] = rand() % 2;
}

__global__ void fill_board_kernel(int *board, int current, int someNum) {
     int idx = blockDim.x * blockIdx.x + threadIdx.x;
     if (idx < current) {
          board[idx] = someNum % 2;
     }
}

void fill_board_dev(int *board, int currentVal) {
     int *board_dev, *current_dev;
     cudaMalloc((void **) &board_dev, sizeof(int) * currentVal);
     cudaMalloc((void **) &current_dev, sizeof(int));
     cudaMemcpy(current_dev, &currentVal, sizeof(int), cudaMemcpyHostToDevice);
     dim3 dimGrid((currentVal + 512 - 1) / 512, 1, 1);
     dim3 dimBlock(512, 1, 1);
     fill_board_kernel<<<dimGrid, dimBlock>>>(board_dev, currentVal, rand());
     cudaMemcpy(board, board_dev, sizeof(int) * currentVal, cudaMemcpyDeviceToHost);
     cudaFree(board_dev);
}

void print_board(int *board) {
    int x, y;
    for (y=0; y<HEIGHT; y++) {
        for (x=0; x<WIDTH; x++) {
            char c = board[y * WIDTH + x] ? '#':' ';
            printf("%c", c);
        }
        printf("\n");
    }
    printf("-----\n");
}

void step() {
    // coordinates of the cell we're currently evaluating
    int x, y;
    // offset index, neighbor coordinates, alive neighbor count
    int i, nx, ny, num_neighbors;

    // write the next board state
    for (y=0; y<HEIGHT; y++) {
        for (x=0; x<WIDTH; x++) {
            // count this cell's alive neighbors
            num_neighbors = 0;
            for (i=0; i<8; i++) {
                // To make the board torroidal, we use modular arithmetic to
                // wrap neighbor coordinates around to the other side of the
                // board if they fall off.
                nx = (x + offsets[i][0] + WIDTH) % WIDTH;
                ny = (y + offsets[i][1] + HEIGHT) % HEIGHT;
                if (current[ny * WIDTH + nx]) {
                    num_neighbors++;
                }
            }

            // apply the Game of Life rules to this cell
            next[y * WIDTH + x] = 0;
            if ((current[y * WIDTH + x] && num_neighbors==2) ||
                    num_neighbors==3) {
                next[y * WIDTH + x] = 1;
            }
        }
    }
}

void animate() {
    struct timespec delay = {0, 125000000}; // 0.125 seconds
    struct timespec remaining;
    while (1) {
        print_board(current);
        step();
        // Copy the next state, that step() just wrote into, to current state
        memcpy(current, next, sizeof(int) * WIDTH * HEIGHT);
        // We sleep only because textual output is slow and the console needs
        // time to catch up. We don't sleep in the graphical X11 version.
        nanosleep(&delay, &remaining);
    }
}


int main(void) {
    // Initialize the global "current".
    fill_board(current);
    //fill_board_dev(current, *current);
    animate();

    return 0;
}

	.file	"tmpxft_002d381b_00000000-6_gol_textual.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2035:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2035:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z10fill_boardPi
	.type	_Z10fill_boardPi, @function
_Z10fill_boardPi:
.LFB2027:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$2, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	xorl	%ebx, %ebx
.L3:
	call	rand@PLT
	cltd
	idivl	%r12d
	movl	%edx, 0(%rbp,%rbx,4)
	incq	%rbx
	cmpq	$1800, %rbx
	jne	.L3
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2027:
	.size	_Z10fill_boardPi, .-_Z10fill_boardPi
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%c"
.LC1:
	.string	"\n"
.LC2:
	.string	"-----\n"
	.text
	.globl	_Z11print_boardPi
	.type	_Z11print_boardPi, @function
_Z11print_boardPi:
.LFB2029:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	xorl	%ebx, %ebx
.L8:
	imulq	$240, %rbx, %rbp
	xorl	%r14d, %r14d
	addq	%r12, %rbp
.L10:
	cmpl	$1, 0(%rbp,%r14,4)
	movq	%r13, %rsi
	movl	$2, %edi
	sbbl	%edx, %edx
	xorl	%eax, %eax
	incq	%r14
	andl	$-3, %edx
	addl	$35, %edx
	movsbl	%dl, %edx
	call	__printf_chk@PLT
	cmpq	$60, %r14
	jne	.L10
	leaq	.LC1(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	incq	%rbx
	call	__printf_chk@PLT
	cmpq	$30, %rbx
	jne	.L8
	popq	%rbx
	.cfi_def_cfa_offset 40
	leaq	.LC2(%rip), %rsi
	popq	%rbp
	.cfi_def_cfa_offset 32
	movl	$2, %edi
	popq	%r12
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE2029:
	.size	_Z11print_boardPi, .-_Z11print_boardPi
	.globl	_Z4stepv
	.type	_Z4stepv, @function
_Z4stepv:
.LFB2030:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xorl	%edi, %edi
	leaq	64+_ZL7offsets(%rip), %r14
	leaq	current(%rip), %r11
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	next(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movl	$60, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movl	$30, %ebx
.L16:
	imulq	$240, %rdi, %rsi
	movl	%edi, %r13d
	xorl	%r9d, %r9d
.L24:
	leaq	_ZL7offsets(%rip), %r8
	xorl	%r10d, %r10d
.L18:
	movl	4(%r8), %eax
	addl	%r13d, %eax
	addl	$30, %eax
	cltd
	idivl	%ebx
	movl	(%r8), %eax
	addl	%r9d, %eax
	addl	$60, %eax
	imull	$60, %edx, %ecx
	cltd
	idivl	%ebp
	addl	%edx, %ecx
	movslq	%ecx, %rcx
	cmpl	$0, (%r11,%rcx,4)
	je	.L17
	incl	%r10d
.L17:
	addq	$8, %r8
	cmpq	%r8, %r14
	jne	.L18
	xorl	%eax, %eax
	cmpl	$0, (%r11,%rsi)
	movl	%eax, (%r12,%rsi)
	je	.L25
	cmpl	$2, %r10d
	je	.L19
.L25:
	cmpl	$3, %r10d
	jne	.L21
.L19:
	movl	$1, (%r12,%rsi)
.L21:
	incl	%r9d
	addq	$4, %rsi
	cmpl	$60, %r9d
	jne	.L24
	incq	%rdi
	cmpq	$30, %rdi
	jne	.L16
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2030:
	.size	_Z4stepv, .-_Z4stepv
	.globl	_Z7animatev
	.type	_Z7animatev, @function
_Z7animatev:
.LFB2031:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	current(%rip), %rbx
	subq	$48, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	xorl	%eax, %eax
	movq	$125000000, 16(%rsp)
	movq	%rax, 8(%rsp)
.L32:
	movq	%rbx, %rdi
	call	_Z11print_boardPi
	call	_Z4stepv
	movq	%rbx, %rdi
	movl	$1800, %ecx
	leaq	next(%rip), %rsi
	rep movsl
	leaq	24(%rsp), %rsi
	leaq	8(%rsp), %rdi
	call	nanosleep@PLT
	jmp	.L32
	.cfi_endproc
.LFE2031:
	.size	_Z7animatev, .-_Z7animatev
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2032:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	popq	%rax
	.cfi_def_cfa_offset 8
	leaq	current(%rip), %rdi
	pushq	%rax
	.cfi_def_cfa_offset 16
	call	_Z10fill_boardPi
	call	_Z7animatev
	.cfi_endproc
.LFE2032:
	.size	main, .-main
	.text
	.globl	_Z39__device_stub__Z17fill_board_kernelPiiiPiii
	.type	_Z39__device_stub__Z17fill_board_kernelPiiiPiii, @function
_Z39__device_stub__Z17fill_board_kernelPiiiPiii:
.LFB2057:
	.cfi_startproc
	endbr64
	subq	$120, %rsp
	.cfi_def_cfa_offset 128
	movq	%rdi, 8(%rsp)
	leaq	24(%rsp), %rcx
	leaq	32(%rsp), %rdi
	movl	%esi, 4(%rsp)
	leaq	44(%rsp), %rsi
	movl	%edx, (%rsp)
	leaq	16(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rax
	movl	$1, 40(%rsp)
	movq	%rax, 80(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 88(%rsp)
	movq	%rsp, %rax
	movq	%rax, 96(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 32(%rsp)
	movq	%rax, 44(%rsp)
	movl	$1, 52(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L37
	pushq	24(%rsp)
	.cfi_def_cfa_offset 136
	leaq	_Z17fill_board_kernelPiii(%rip), %rdi
	pushq	24(%rsp)
	.cfi_def_cfa_offset 144
	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 136
	popq	%rdx
	.cfi_def_cfa_offset 128
.L37:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	je	.L39
	call	__stack_chk_fail@PLT
.L39:
	addq	$120, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2057:
	.size	_Z39__device_stub__Z17fill_board_kernelPiiiPiii, .-_Z39__device_stub__Z17fill_board_kernelPiiiPiii
	.globl	_Z17fill_board_kernelPiii
	.type	_Z17fill_board_kernelPiii, @function
_Z17fill_board_kernelPiii:
.LFB2058:
	.cfi_startproc
	endbr64
	jmp	_Z39__device_stub__Z17fill_board_kernelPiiiPiii
	.cfi_endproc
.LFE2058:
	.size	_Z17fill_board_kernelPiii, .-_Z17fill_board_kernelPiii
	.globl	_Z14fill_board_devPii
	.type	_Z14fill_board_devPii, @function
_Z14fill_board_devPii:
.LFB2028:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	subq	$64, %rsp
	.cfi_def_cfa_offset 80
	movl	%esi, 12(%rsp)
	movslq	%esi, %rsi
	leaq	16(%rsp), %rdi
	salq	$2, %rsi
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	call	cudaMalloc@PLT
	leaq	24(%rsp), %rdi
	movl	$4, %esi
	call	cudaMalloc@PLT
	movq	24(%rsp), %rdi
	leaq	12(%rsp), %rsi
	movl	$1, %ecx
	movl	$4, %edx
	call	cudaMemcpy@PLT
	movl	12(%rsp), %eax
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$512, %ecx
	addl	$511, %eax
	cltd
	idivl	%ecx
	movl	$8388609, %edx
	movl	$1, %ecx
	salq	$9, %rdx
	movl	%eax, 32(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 36(%rsp)
	movq	32(%rsp), %rdi
	movl	40(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L43
	call	rand@PLT
	movl	12(%rsp), %esi
	movq	16(%rsp), %rdi
	movl	%eax, %edx
	call	_Z39__device_stub__Z17fill_board_kernelPiiiPiii
.L43:
	movslq	12(%rsp), %rdx
	movq	16(%rsp), %rsi
	movq	%rbx, %rdi
	movl	$2, %ecx
	salq	$2, %rdx
	call	cudaMemcpy@PLT
	movq	16(%rsp), %rdi
	call	cudaFree@PLT
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	je	.L44
	call	__stack_chk_fail@PLT
.L44:
	addq	$64, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2028:
	.size	_Z14fill_board_devPii, .-_Z14fill_board_devPii
	.section	.rodata.str1.1
.LC3:
	.string	"_Z17fill_board_kernelPiii"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2060:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 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	.LC3(%rip), %rdx
	movq	%rax, %rdi
	leaq	_Z17fill_board_kernelPiii(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	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	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE2060:
	.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
	.align 32
	.type	_ZL7offsets, @object
	.size	_ZL7offsets, 64
_ZL7offsets:
	.long	-1
	.long	1
	.long	0
	.long	1
	.long	1
	.long	1
	.long	-1
	.long	0
	.long	1
	.long	0
	.long	-1
	.long	-1
	.long	0
	.long	-1
	.long	1
	.long	-1
	.globl	next
	.bss
	.align 32
	.type	next, @object
	.size	next, 7200
next:
	.zero	7200
	.globl	current
	.align 32
	.type	current, @object
	.size	current, 7200
current:
	.zero	7200
	.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:

/* Author: Christopher Mitchell <chrism@lclark.edu>
 * Date: 2011-07-15
 *
 * Compile with `gcc gol.c`.
 */


#include <hip/hip_runtime.h>
#include <stdlib.h> // for rand
#include <string.h> // for memcpy
#include <stdio.h> // for printf
#include <time.h> // for nanosleep
#include<hiprand/hiprand.h>

#define WIDTH 60
#define HEIGHT 30

// The two boards 
int current[WIDTH * HEIGHT];
int next[WIDTH * HEIGHT];


const int offsets[8][2] = {{-1, 1},{0, 1},{1, 1},
                           {-1, 0},       {1, 0},
                           {-1,-1},{0,-1},{1,-1}};


void fill_board(int *board) {
    int i;
    for (i=0; i<WIDTH*HEIGHT; i++)
        board[i] = rand() % 2;
}

__global__ void fill_board_kernel(int *board, int current, int someNum) {
     int idx = blockDim.x * blockIdx.x + threadIdx.x;
     if (idx < current) {
          board[idx] = someNum % 2;
     }
}

void fill_board_dev(int *board, int currentVal) {
     int *board_dev, *current_dev;
     hipMalloc((void **) &board_dev, sizeof(int) * currentVal);
     hipMalloc((void **) &current_dev, sizeof(int));
     hipMemcpy(current_dev, &currentVal, sizeof(int), hipMemcpyHostToDevice);
     dim3 dimGrid((currentVal + 512 - 1) / 512, 1, 1);
     dim3 dimBlock(512, 1, 1);
     fill_board_kernel<<<dimGrid, dimBlock>>>(board_dev, currentVal, rand());
     hipMemcpy(board, board_dev, sizeof(int) * currentVal, hipMemcpyDeviceToHost);
     hipFree(board_dev);
}

void print_board(int *board) {
    int x, y;
    for (y=0; y<HEIGHT; y++) {
        for (x=0; x<WIDTH; x++) {
            char c = board[y * WIDTH + x] ? '#':' ';
            printf("%c", c);
        }
        printf("\n");
    }
    printf("-----\n");
}

void step() {
    // coordinates of the cell we're currently evaluating
    int x, y;
    // offset index, neighbor coordinates, alive neighbor count
    int i, nx, ny, num_neighbors;

    // write the next board state
    for (y=0; y<HEIGHT; y++) {
        for (x=0; x<WIDTH; x++) {
            // count this cell's alive neighbors
            num_neighbors = 0;
            for (i=0; i<8; i++) {
                // To make the board torroidal, we use modular arithmetic to
                // wrap neighbor coordinates around to the other side of the
                // board if they fall off.
                nx = (x + offsets[i][0] + WIDTH) % WIDTH;
                ny = (y + offsets[i][1] + HEIGHT) % HEIGHT;
                if (current[ny * WIDTH + nx]) {
                    num_neighbors++;
                }
            }

            // apply the Game of Life rules to this cell
            next[y * WIDTH + x] = 0;
            if ((current[y * WIDTH + x] && num_neighbors==2) ||
                    num_neighbors==3) {
                next[y * WIDTH + x] = 1;
            }
        }
    }
}

void animate() {
    struct timespec delay = {0, 125000000}; // 0.125 seconds
    struct timespec remaining;
    while (1) {
        print_board(current);
        step();
        // Copy the next state, that step() just wrote into, to current state
        memcpy(current, next, sizeof(int) * WIDTH * HEIGHT);
        // We sleep only because textual output is slow and the console needs
        // time to catch up. We don't sleep in the graphical X11 version.
        nanosleep(&delay, &remaining);
    }
}


int main(void) {
    // Initialize the global "current".
    fill_board(current);
    //fill_board_dev(current, *current);
    animate();

    return 0;
}

	.text
	.file	"gol_textual.hip"
	.globl	_Z10fill_boardPi                # -- Begin function _Z10fill_boardPi
	.type	_Z10fill_boardPi,@function
_Z10fill_boardPi:                       # @_Z10fill_boardPi
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movq	%rdi, %rbx
	xorl	%r14d, %r14d
.LBB0_1:                                # =>This Inner Loop Header: Depth=1
	callq	rand
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	andl	$-2, %ecx
	subl	%ecx, %eax
	movl	%eax, (%rbx,%r14,4)
	incq	%r14
	cmpq	$1800, %r14                     # imm = 0x708
	jne	.LBB0_1
# %bb.2:
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z10fill_boardPi, .Lfunc_end0-_Z10fill_boardPi
	.cfi_endproc
                                        # -- End function
	.globl	_Z32__device_stub__fill_board_kernelPiii # -- Begin function _Z32__device_stub__fill_board_kernelPiii
	.type	_Z32__device_stub__fill_board_kernelPiii,@function
_Z32__device_stub__fill_board_kernelPiii: # @_Z32__device_stub__fill_board_kernelPiii
	.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	$96, %rsp
	.cfi_def_cfa_offset 144
	.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	4(%rsp), %rcx
	movl	%esi, (%rcx)
	movq	%rsp, %rsi
	movl	%edx, (%rsi)
	leaq	64(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%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	$_Z17fill_board_kernelPiii, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$112, %rsp
	.cfi_adjust_cfa_offset -112
	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	_Z32__device_stub__fill_board_kernelPiii, .Lfunc_end1-_Z32__device_stub__fill_board_kernelPiii
	.cfi_endproc
                                        # -- End function
	.globl	_Z14fill_board_devPii           # -- Begin function _Z14fill_board_devPii
	.type	_Z14fill_board_devPii,@function
_Z14fill_board_devPii:                  # @_Z14fill_board_devPii
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdi, %rbx
	leaq	4(%rsp), %r14
	movl	%esi, (%r14)
	movslq	%esi, %rsi
	shlq	$2, %rsi
	leaq	8(%rsp), %rdi
	callq	hipMalloc
	leaq	16(%rsp), %r15
	movl	$4, %esi
	movq	%r15, %rdi
	callq	hipMalloc
	movq	(%r15), %rdi
	movl	$4, %edx
	movq	%r14, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movl	(%r14), %edi
	leal	511(%rdi), %eax
	addl	$1022, %edi                     # imm = 0x3FE
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$9, %edi
	btsq	$32, %rdi
	movabsq	$4294967296, %rdx               # imm = 0x100000000
	orq	$512, %rdx                      # imm = 0x200
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB2_2
# %bb.1:
	movq	8(%rsp), %r14
	movl	4(%rsp), %ebp
	callq	rand
	movq	%r14, %rdi
	movl	%ebp, %esi
	movl	%eax, %edx
	callq	_Z32__device_stub__fill_board_kernelPiii
.LBB2_2:
	movq	8(%rsp), %rsi
	movslq	4(%rsp), %rdx
	shlq	$2, %rdx
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	8(%rsp), %rdi
	callq	hipFree
	addq	$24, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end2:
	.size	_Z14fill_board_devPii, .Lfunc_end2-_Z14fill_board_devPii
	.cfi_endproc
                                        # -- End function
	.globl	_Z11print_boardPi               # -- Begin function _Z11print_boardPi
	.type	_Z11print_boardPi,@function
_Z11print_boardPi:                      # @_Z11print_boardPi
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdi, %rbx
	xorl	%r14d, %r14d
.LBB3_1:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB3_2 Depth 2
	xorl	%r15d, %r15d
.LBB3_2:                                #   Parent Loop BB3_1 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	xorl	%eax, %eax
	cmpl	$0, (%rbx,%r15,4)
	setne	%al
	leal	(%rax,%rax,2), %edi
	addl	$32, %edi
	callq	putchar@PLT
	incq	%r15
	cmpq	$60, %r15
	jne	.LBB3_2
# %bb.3:                                #   in Loop: Header=BB3_1 Depth=1
	movl	$10, %edi
	callq	putchar@PLT
	incq	%r14
	addq	$240, %rbx
	cmpq	$30, %r14
	jne	.LBB3_1
# %bb.4:
	movl	$.Lstr, %edi
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	puts@PLT                        # TAILCALL
.Lfunc_end3:
	.size	_Z11print_boardPi, .Lfunc_end3-_Z11print_boardPi
	.cfi_endproc
                                        # -- End function
	.globl	_Z4stepv                        # -- Begin function _Z4stepv
	.type	_Z4stepv,@function
_Z4stepv:                               # @_Z4stepv
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset %rbx, -24
	.cfi_offset %rbp, -16
	xorl	%eax, %eax
.LBB4_1:                                # %.preheader27
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB4_2 Depth 2
                                        #       Child Loop BB4_3 Depth 3
	imulq	$60, %rax, %rcx
	leal	30(%rax), %edx
	xorl	%esi, %esi
.LBB4_2:                                # %.preheader
                                        #   Parent Loop BB4_1 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB4_3 Depth 3
	leal	60(%rsi), %r8d
	xorl	%edi, %edi
	movq	$-64, %r9
.LBB4_3:                                #   Parent Loop BB4_1 Depth=1
                                        #     Parent Loop BB4_2 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movl	_ZL7offsets+64(%r9), %r10d
	addl	%r8d, %r10d
	movslq	%r10d, %r10
	imulq	$-2004318071, %r10, %r11        # imm = 0x88888889
	shrq	$32, %r11
	addl	%r10d, %r11d
	movl	%r11d, %ebx
	shrl	$31, %ebx
	sarl	$5, %r11d
	addl	%ebx, %r11d
	imull	$60, %r11d, %r11d
	subl	%r11d, %r10d
	movl	_ZL7offsets+68(%r9), %r11d
	addl	%edx, %r11d
	movslq	%r11d, %r11
	imulq	$-2004318071, %r11, %rbx        # imm = 0x88888889
	shrq	$32, %rbx
	addl	%r11d, %ebx
	movl	%ebx, %ebp
	shrl	$31, %ebp
	sarl	$4, %ebx
	addl	%ebp, %ebx
	movl	%ebx, %ebp
	shll	$5, %ebp
	addl	%ebx, %ebx
	subl	%ebp, %ebx
	addl	%r11d, %ebx
	imull	$60, %ebx, %r11d
	addl	%r10d, %r11d
	movslq	%r11d, %r10
	cmpl	$1, current(,%r10,4)
	sbbl	$-1, %edi
	addq	$8, %r9
	jne	.LBB4_3
# %bb.4:                                #   in Loop: Header=BB4_2 Depth=2
	leaq	(%rsi,%rcx), %r8
	cmpl	$0, current(,%r8,4)
	setne	%r9b
	cmpl	$2, %edi
	sete	%r10b
	andb	%r9b, %r10b
	cmpl	$3, %edi
	sete	%dil
	orb	%r10b, %dil
	movzbl	%dil, %edi
	movl	%edi, next(,%r8,4)
	incq	%rsi
	cmpq	$60, %rsi
	jne	.LBB4_2
# %bb.5:                                #   in Loop: Header=BB4_1 Depth=1
	incq	%rax
	cmpq	$30, %rax
	jne	.LBB4_1
# %bb.6:
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end4:
	.size	_Z4stepv, .Lfunc_end4-_Z4stepv
	.cfi_endproc
                                        # -- End function
	.globl	_Z7animatev                     # -- Begin function _Z7animatev
	.type	_Z7animatev,@function
_Z7animatev:                            # @_Z7animatev
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	subq	$40, %rsp
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	leaq	24(%rsp), %rbx
	movq	$0, (%rbx)
	movq	$125000000, 8(%rbx)             # imm = 0x7735940
	leaq	8(%rsp), %r14
.LBB5_1:                                # =>This Inner Loop Header: Depth=1
	movl	$current, %edi
	callq	_Z11print_boardPi
	callq	_Z4stepv
	movl	$current, %edi
	movl	$next, %esi
	movl	$7200, %edx                     # imm = 0x1C20
	callq	memcpy@PLT
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	nanosleep
	jmp	.LBB5_1
.Lfunc_end5:
	.size	_Z7animatev, .Lfunc_end5-_Z7animatev
	.cfi_endproc
                                        # -- End function
	.globl	main                            # -- Begin function main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	$-7200, %rbx                    # imm = 0xE3E0
.LBB6_1:                                # =>This Inner Loop Header: Depth=1
	callq	rand
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	andl	$-2, %ecx
	subl	%ecx, %eax
	movl	%eax, current+7200(%rbx)
	addq	$4, %rbx
	jne	.LBB6_1
# %bb.2:                                # %_Z10fill_boardPi.exit
	callq	_Z7animatev
.Lfunc_end6:
	.size	main, .Lfunc_end6-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:
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	jne	.LBB7_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rdi
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB7_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z17fill_board_kernelPiii, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$40, %rsp
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end7:
	.size	__hip_module_ctor, .Lfunc_end7-__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	.LBB8_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
.LBB8_2:
	retq
.Lfunc_end8:
	.size	__hip_module_dtor, .Lfunc_end8-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	current,@object                 # @current
	.bss
	.globl	current
	.p2align	4, 0x0
current:
	.zero	7200
	.size	current, 7200

	.type	next,@object                    # @next
	.globl	next
	.p2align	4, 0x0
next:
	.zero	7200
	.size	next, 7200

	.type	_Z17fill_board_kernelPiii,@object # @_Z17fill_board_kernelPiii
	.section	.rodata,"a",@progbits
	.globl	_Z17fill_board_kernelPiii
	.p2align	3, 0x0
_Z17fill_board_kernelPiii:
	.quad	_Z32__device_stub__fill_board_kernelPiii
	.size	_Z17fill_board_kernelPiii, 8

	.type	_ZL7offsets,@object             # @_ZL7offsets
	.p2align	4, 0x0
_ZL7offsets:
	.long	4294967295                      # 0xffffffff
	.long	1                               # 0x1
	.long	0                               # 0x0
	.long	1                               # 0x1
	.long	1                               # 0x1
	.long	1                               # 0x1
	.long	4294967295                      # 0xffffffff
	.long	0                               # 0x0
	.long	1                               # 0x1
	.long	0                               # 0x0
	.zero	8,255
	.long	0                               # 0x0
	.long	4294967295                      # 0xffffffff
	.long	1                               # 0x1
	.long	4294967295                      # 0xffffffff
	.size	_ZL7offsets, 64

	.type	.L__unnamed_1,@object           # @0
	.section	.rodata.str1.1,"aMS",@progbits,1
.L__unnamed_1:
	.asciz	"_Z17fill_board_kernelPiii"
	.size	.L__unnamed_1, 26

	.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

	.type	.Lstr,@object                   # @str
	.section	.rodata.str1.1,"aMS",@progbits,1
.Lstr:
	.asciz	"-----"
	.size	.Lstr, 6

	.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 _Z32__device_stub__fill_board_kernelPiii
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym current
	.addrsig_sym _Z17fill_board_kernelPiii
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z17fill_board_kernelPiii ; -- Begin function _Z17fill_board_kernelPiii
	.globl	_Z17fill_board_kernelPiii
	.p2align	8
	.type	_Z17fill_board_kernelPiii,@function
_Z17fill_board_kernelPiii:              ; @_Z17fill_board_kernelPiii
; %bb.0:
	s_clause 0x1
	s_load_b32 s4, s[0:1], 0x1c
	s_load_b64 s[2:3], s[0:1], 0x8
	s_waitcnt lgkmcnt(0)
	s_and_b32 s4, s4, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s4, v[0:1]
	v_cmp_gt_i32_e32 vcc_lo, s2, v1
	s_and_saveexec_b32 s2, vcc_lo
	s_cbranch_execz .LBB0_2
; %bb.1:
	s_load_b64 s[0:1], s[0:1], 0x0
	v_ashrrev_i32_e32 v2, 31, v1
	s_lshr_b32 s2, s3, 31
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	s_add_i32 s2, s3, s2
	v_lshlrev_b64 v[0:1], 2, v[1:2]
	s_and_b32 s2, s2, -2
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_sub_i32 s2, s3, s2
	v_mov_b32_e32 v2, s2
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(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_b32 v[0:1], v2, off
.LBB0_2:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z17fill_board_kernelPiii
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 272
		.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 3
		.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_end0:
	.size	_Z17fill_board_kernelPiii, .Lfunc_end0-_Z17fill_board_kernelPiii
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 144
; NumSgprs: 18
; NumVgprs: 3
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 3
; 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
	.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 __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .offset:         8
        .size:           4
        .value_kind:     by_value
      - .offset:         12
        .size:           4
        .value_kind:     by_value
      - .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
    .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:           _Z17fill_board_kernelPiii
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z17fill_board_kernelPiii.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     3
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
