/****************************************************************************
 *
 * cuda-reverse.cu - Array reversal with CUDA
 *
 * Written in 2017 by Moreno Marzolla <moreno.marzolla(at)unibo.it>
 *
 * To the extent possible under law, the author(s) have dedicated all 
 * copyright and related and neighboring rights to this software to the 
 * public domain worldwide. This software is distributed without any warranty.
 *
 * You should have received a copy of the CC0 Public Domain Dedication
 * along with this software. If not, see 
 * <http://creativecommons.org/publicdomain/zero/1.0/>. 
 *
 * ---------------------------------------------------------------------------
 *
 * Compile with:
 * nvcc cuda-reverse.cu -o cuda-reverse
 *
 * Run with:
 * ./cuda-reverse [len]
 *
 * Example:
 * ./cuda-reverse
 *
 ****************************************************************************/
#include <stdio.h>
#include <math.h>

/* Reverse in[] into out[] */
void reverse( int *in, int *out, int n )
{
    int i;
    for (i=0; i<n; i++) {
        out[n - 1 - i] = in[i];
    }
}

/* In-place reversal of x[] into itself */
void inplace_reverse( int *x, int n )
{
    int i = 0, j = n-1;
    while (i < j) {
        int tmp = x[j];
        x[j] = x[i];
        x[i] = tmp;
        j--;
        i++;
    }
}

void fill( int *x, int n )
{
    int i;
    for (i=0; i<n; i++) {
        x[i] = i;
    }
}

int check( int *x, int n )
{
    int i;
    for (i=0; i<n; i++) {
        if (x[i] != n - 1 - i) {
            printf("FAILED: x[%d]=%d, expected %d\n", i, x[i], n-1-i);
            return -1;
        }
    }
    printf("OK\n");
    return 0;
}

int main( int argc, char* argv[] )
{
    int *in, *out;
    int n;
    const int default_len = 1024*1024;

    if ( argc > 2 ) {
        printf("\nUsage: %s [len]\n\nReverse an array of \"len\" elements (default %d)\n\n", argv[0], default_len);
        return -1;
    }

    if ( argc > 1 ) {
        n = atoi(argv[1]);
    } else {
        n = default_len;
    }

    const size_t size = n * sizeof(*in);

    /* Allocate and initialize in[] and out[] */
    in = (int*)malloc(size); 
    fill(in, n);
    out = (int*)malloc(size);
    
    /* Reverse */
    printf("Reverse of %d elements... ", n);
    reverse(in, out, n);    
    check(out, n);

    /* In-place reverse */
    printf("In-place reverse of %d elements... ", n);
    inplace_reverse(in, n);    
    check(in, n);

    /* Cleanup */
    free(in); 
    free(out);
    return 0;
}

	.file	"tmpxft_00345e35_00000000-6_cuda-reverse.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2034:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2034:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z7reversePiS_i
	.type	_Z7reversePiS_i, @function
_Z7reversePiS_i:
.LFB2027:
	.cfi_startproc
	endbr64
	movslq	%edx, %rax
	leaq	(%rsi,%rax,4), %rcx
	xorl	%eax, %eax
.L3:
	subq	$4, %rcx
	cmpl	%eax, %edx
	jle	.L6
	movl	(%rdi,%rax,4), %esi
	incq	%rax
	movl	%esi, (%rcx)
	jmp	.L3
.L6:
	ret
	.cfi_endproc
.LFE2027:
	.size	_Z7reversePiS_i, .-_Z7reversePiS_i
	.globl	_Z15inplace_reversePii
	.type	_Z15inplace_reversePii, @function
_Z15inplace_reversePii:
.LFB2028:
	.cfi_startproc
	endbr64
	decl	%esi
	xorl	%eax, %eax
	movslq	%esi, %rsi
.L8:
	cmpl	%esi, %eax
	jge	.L10
	movl	(%rdi,%rsi,4), %edx
	movl	(%rdi,%rax,4), %ecx
	movl	%ecx, (%rdi,%rsi,4)
	decq	%rsi
	movl	%edx, (%rdi,%rax,4)
	incq	%rax
	jmp	.L8
.L10:
	ret
	.cfi_endproc
.LFE2028:
	.size	_Z15inplace_reversePii, .-_Z15inplace_reversePii
	.globl	_Z4fillPii
	.type	_Z4fillPii, @function
_Z4fillPii:
.LFB2029:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
.L12:
	cmpl	%eax, %esi
	jle	.L14
	movl	%eax, (%rdi,%rax,4)
	incq	%rax
	jmp	.L12
.L14:
	ret
	.cfi_endproc
.LFE2029:
	.size	_Z4fillPii, .-_Z4fillPii
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"FAILED: x[%d]=%d, expected %d\n"
.LC1:
	.string	"OK\n"
	.text
	.globl	_Z5checkPii
	.type	_Z5checkPii, @function
_Z5checkPii:
.LFB2030:
	.cfi_startproc
	endbr64
	pushq	%rcx
	.cfi_def_cfa_offset 16
	leal	-1(%rsi), %r8d
	xorl	%edx, %edx
.L16:
	cmpl	%edx, %esi
	jle	.L21
	movl	(%rdi,%rdx,4), %ecx
	leaq	1(%rdx), %rax
	cmpl	%r8d, %ecx
	je	.L17
	leaq	.LC0(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	orl	$-1, %eax
	jmp	.L15
.L17:
	decl	%r8d
	movq	%rax, %rdx
	jmp	.L16
.L21:
	leaq	.LC1(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
.L15:
	popq	%rdx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2030:
	.size	_Z5checkPii, .-_Z5checkPii
	.section	.rodata.str1.1
.LC2:
	.string	"\nUsage: %s [len]\n\nReverse an array of \"len\" elements (default %d)\n\n"
.LC3:
	.string	"Reverse of %d elements... "
.LC4:
	.string	"In-place reverse of %d elements... "
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2031:
	.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
	cmpl	$2, %edi
	jle	.L23
	movq	(%rsi), %rdx
	movl	$1048576, %ecx
	movl	$2, %edi
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	orl	$-1, %eax
	jmp	.L22
.L23:
	movl	$1048576, %ebx
	jne	.L25
	movq	8(%rsi), %rdi
	call	atoi@PLT
	movl	%eax, %ebx
.L25:
	movslq	%ebx, %r12
	salq	$2, %r12
	movq	%r12, %rdi
	call	malloc@PLT
	movl	%ebx, %esi
	movq	%rax, %rdi
	movq	%rax, %rbp
	call	_Z4fillPii
	movq	%r12, %rdi
	call	malloc@PLT
	movl	%ebx, %edx
	movl	$2, %edi
	leaq	.LC3(%rip), %rsi
	movq	%rax, %r12
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	%ebx, %edx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	_Z7reversePiS_i
	movl	%ebx, %esi
	movq	%r12, %rdi
	call	_Z5checkPii
	movl	%ebx, %edx
	leaq	.LC4(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
	movq	%rbp, %rdi
	movl	%ebx, %esi
	call	_Z15inplace_reversePii
	movl	%ebx, %esi
	call	_Z5checkPii
	movq	%rbp, %rdi
	call	free@PLT
	movq	%r12, %rdi
	call	free@PLT
	xorl	%eax, %eax
.L22:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2031:
	.size	main, .-main
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2057:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	movq	%rax, %rdi
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE2057:
	.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
	.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:

/****************************************************************************
 *
 * cuda-reverse.cu - Array reversal with CUDA
 *
 * Written in 2017 by Moreno Marzolla <moreno.marzolla(at)unibo.it>
 *
 * To the extent possible under law, the author(s) have dedicated all 
 * copyright and related and neighboring rights to this software to the 
 * public domain worldwide. This software is distributed without any warranty.
 *
 * You should have received a copy of the CC0 Public Domain Dedication
 * along with this software. If not, see 
 * <http://creativecommons.org/publicdomain/zero/1.0/>. 
 *
 * ---------------------------------------------------------------------------
 *
 * Compile with:
 * nvcc cuda-reverse.cu -o cuda-reverse
 *
 * Run with:
 * ./cuda-reverse [len]
 *
 * Example:
 * ./cuda-reverse
 *
 ****************************************************************************/

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

/* Reverse in[] into out[] */
void reverse( int *in, int *out, int n )
{
    int i;
    for (i=0; i<n; i++) {
        out[n - 1 - i] = in[i];
    }
}

/* In-place reversal of x[] into itself */
void inplace_reverse( int *x, int n )
{
    int i = 0, j = n-1;
    while (i < j) {
        int tmp = x[j];
        x[j] = x[i];
        x[i] = tmp;
        j--;
        i++;
    }
}

void fill( int *x, int n )
{
    int i;
    for (i=0; i<n; i++) {
        x[i] = i;
    }
}

int check( int *x, int n )
{
    int i;
    for (i=0; i<n; i++) {
        if (x[i] != n - 1 - i) {
            printf("FAILED: x[%d]=%d, expected %d\n", i, x[i], n-1-i);
            return -1;
        }
    }
    printf("OK\n");
    return 0;
}

int main( int argc, char* argv[] )
{
    int *in, *out;
    int n;
    const int default_len = 1024*1024;

    if ( argc > 2 ) {
        printf("\nUsage: %s [len]\n\nReverse an array of \"len\" elements (default %d)\n\n", argv[0], default_len);
        return -1;
    }

    if ( argc > 1 ) {
        n = atoi(argv[1]);
    } else {
        n = default_len;
    }

    const size_t size = n * sizeof(*in);

    /* Allocate and initialize in[] and out[] */
    in = (int*)malloc(size); 
    fill(in, n);
    out = (int*)malloc(size);
    
    /* Reverse */
    printf("Reverse of %d elements... ", n);
    reverse(in, out, n);    
    check(out, n);

    /* In-place reverse */
    printf("In-place reverse of %d elements... ", n);
    inplace_reverse(in, n);    
    check(in, n);

    /* Cleanup */
    free(in); 
    free(out);
    return 0;
}

	.text
	.file	"cuda-reverse.hip"
	.globl	_Z7reversePiS_i                 # -- Begin function _Z7reversePiS_i
	.type	_Z7reversePiS_i,@function
_Z7reversePiS_i:                        # @_Z7reversePiS_i
	.cfi_startproc
# %bb.0:
	testl	%edx, %edx
	jle	.LBB0_3
# %bb.1:                                # %.lr.ph.preheader
	movl	%edx, %eax
.LBB0_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movl	(%rdi), %ecx
	movl	%ecx, -4(%rsi,%rax,4)
	addq	$4, %rdi
	decq	%rax
	jne	.LBB0_2
.LBB0_3:                                # %._crit_edge
	retq
.Lfunc_end0:
	.size	_Z7reversePiS_i, .Lfunc_end0-_Z7reversePiS_i
	.cfi_endproc
                                        # -- End function
	.globl	_Z15inplace_reversePii          # -- Begin function _Z15inplace_reversePii
	.type	_Z15inplace_reversePii,@function
_Z15inplace_reversePii:                 # @_Z15inplace_reversePii
	.cfi_startproc
# %bb.0:
	cmpl	$2, %esi
	jl	.LBB1_3
# %bb.1:                                # %.lr.ph.preheader
	movl	%esi, %eax
	addq	$-2, %rax
	xorl	%ecx, %ecx
.LBB1_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movl	4(%rdi,%rax,4), %edx
	movl	(%rdi,%rcx,4), %esi
	movl	%esi, 4(%rdi,%rax,4)
	movl	%edx, (%rdi,%rcx,4)
	incq	%rcx
	leaq	-1(%rax), %rdx
	cmpq	%rax, %rcx
	movq	%rdx, %rax
	jl	.LBB1_2
.LBB1_3:                                # %._crit_edge
	retq
.Lfunc_end1:
	.size	_Z15inplace_reversePii, .Lfunc_end1-_Z15inplace_reversePii
	.cfi_endproc
                                        # -- End function
	.globl	_Z4fillPii                      # -- Begin function _Z4fillPii
	.type	_Z4fillPii,@function
_Z4fillPii:                             # @_Z4fillPii
	.cfi_startproc
# %bb.0:
	testl	%esi, %esi
	jle	.LBB2_3
# %bb.1:                                # %.lr.ph.preheader
	movl	%esi, %eax
	xorl	%ecx, %ecx
.LBB2_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movl	%ecx, (%rdi,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB2_2
.LBB2_3:                                # %._crit_edge
	retq
.Lfunc_end2:
	.size	_Z4fillPii, .Lfunc_end2-_Z4fillPii
	.cfi_endproc
                                        # -- End function
	.globl	_Z5checkPii                     # -- Begin function _Z5checkPii
	.type	_Z5checkPii,@function
_Z5checkPii:                            # @_Z5checkPii
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	testl	%esi, %esi
	jle	.LBB3_5
# %bb.1:                                # %.lr.ph.preheader
	movl	%esi, %ecx
	movl	%esi, %eax
	decl	%ecx
	xorl	%esi, %esi
.LBB3_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movl	(%rdi,%rsi,4), %edx
	cmpl	%edx, %ecx
	jne	.LBB3_3
# %bb.4:                                #   in Loop: Header=BB3_2 Depth=1
	incq	%rsi
	decl	%ecx
	cmpq	%rsi, %rax
	jne	.LBB3_2
.LBB3_5:                                # %._crit_edge
	movl	$.Lstr, %edi
	callq	puts@PLT
	xorl	%eax, %eax
	jmp	.LBB3_6
.LBB3_3:
	movl	$.L.str, %edi
                                        # kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	printf
	movl	$-1, %eax
.LBB3_6:
	popq	%rcx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end3:
	.size	_Z5checkPii, .Lfunc_end3-_Z5checkPii
	.cfi_endproc
                                        # -- End function
	.globl	main                            # -- Begin function main
	.type	main,@function
main:                                   # @main
	.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	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	pushq	%rax
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	cmpl	$3, %edi
	jl	.LBB4_2
# %bb.1:
	movq	(%rsi), %rsi
	movl	$.L.str.2, %edi
	movl	$1048576, %edx                  # imm = 0x100000
	xorl	%eax, %eax
	callq	printf
	movl	$-1, %ebp
	jmp	.LBB4_14
.LBB4_2:
	movl	$1048576, %ebx                  # imm = 0x100000
	cmpl	$2, %edi
	jne	.LBB4_4
# %bb.3:
	movq	8(%rsi), %rdi
	callq	atoi
	movl	%eax, %ebx
.LBB4_4:
	movslq	%ebx, %r13
	leaq	(,%r13,4), %r15
	movq	%r15, %rdi
	callq	malloc
	movq	%rax, %r14
	movl	%ebx, %r12d
	testl	%r13d, %r13d
	jle	.LBB4_7
# %bb.5:                                # %.lr.ph.preheader.i
	xorl	%eax, %eax
.LBB4_6:                                # %.lr.ph.i
                                        # =>This Inner Loop Header: Depth=1
	movl	%eax, (%r14,%rax,4)
	incq	%rax
	cmpq	%rax, %r12
	jne	.LBB4_6
.LBB4_7:                                # %_Z4fillPii.exit
	movq	%r15, %rdi
	callq	malloc
	movq	%rax, %r15
	movl	$.L.str.3, %edi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	printf
	testl	%ebx, %ebx
	jle	.LBB4_10
# %bb.8:                                # %.lr.ph.preheader.i24
	movq	%r14, %rax
	movq	%r12, %rcx
.LBB4_9:                                # %.lr.ph.i26
                                        # =>This Inner Loop Header: Depth=1
	movl	(%rax), %edx
	movl	%edx, -4(%r15,%rcx,4)
	addq	$4, %rax
	decq	%rcx
	jne	.LBB4_9
.LBB4_10:                               # %_Z7reversePiS_i.exit
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_Z5checkPii
	xorl	%ebp, %ebp
	movl	$.L.str.4, %edi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	printf
	cmpl	$2, %ebx
	jl	.LBB4_13
# %bb.11:                               # %.lr.ph.preheader.i30
	addq	$-2, %r12
	xorl	%eax, %eax
.LBB4_12:                               # %.lr.ph.i31
                                        # =>This Inner Loop Header: Depth=1
	movl	4(%r14,%r12,4), %ecx
	movl	(%r14,%rax,4), %edx
	movl	%edx, 4(%r14,%r12,4)
	movl	%ecx, (%r14,%rax,4)
	incq	%rax
	leaq	-1(%r12), %rcx
	cmpq	%r12, %rax
	movq	%rcx, %r12
	jl	.LBB4_12
.LBB4_13:                               # %_Z15inplace_reversePii.exit
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_Z5checkPii
	movq	%r14, %rdi
	callq	free
	movq	%r15, %rdi
	callq	free
.LBB4_14:
	movl	%ebp, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.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_end4:
	.size	main, .Lfunc_end4-main
	.cfi_endproc
                                        # -- End function
	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"FAILED: x[%d]=%d, expected %d\n"
	.size	.L.str, 31

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"\nUsage: %s [len]\n\nReverse an array of \"len\" elements (default %d)\n\n"
	.size	.L.str.2, 68

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"Reverse of %d elements... "
	.size	.L.str.3, 27

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"In-place reverse of %d elements... "
	.size	.L.str.4, 36

	.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	"OK"
	.size	.Lstr, 3

	.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_

	.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_
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.amdgpu_metadata
---
amdhsa.kernels:  []
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
