#include "cuda_runtime.h"
#include "device_launch_parameters.h"

#include <stdio.h>
#include <iostream>
#include <ctime>

void ReadArray(double* arr, int size);
void WriteArray(double* arr, int size);

void Operate(double* firstDevice, double* secondDevice, double* resultDevice, int vectorLength);

double Min(double a, double b);

int main()
{
	int vectorLength;
	std::cin >> vectorLength;

	clock_t begin = clock();

	double* first;
	double* second;
	double* result;

	first = (double*)malloc(sizeof(double) * vectorLength);
	second = (double*)malloc(sizeof(double) * vectorLength);
	result = (double*)malloc(sizeof(double) * vectorLength);

	ReadArray(first, vectorLength);
	ReadArray(second, vectorLength);

	Operate(first, second, result, vectorLength);

	clock_t end = clock();

	std::cout << double(end - begin) / CLOCKS_PER_SEC << std::endl;

	WriteArray(result, vectorLength);
}

void ReadArray(double* arr, int size)
{
	for (int i = 0; i < size; i++)
	{
		std::cin >> arr[i];
	}
}

void WriteArray(double* arr, int size)
{
	for (int i = 0; i < size; i++)
	{
		std::cout << arr[i];

		if (i < size - 1)
		{
			std::cout << ' ';
		}
	}
}

int Min(int a, int b)
{
	return (a > b)
		? b
		: a;
}

int Max(int a, int b)
{
	return (a < b)
		? b
		: a;
}

void Operate(double* firstDevice, double* secondDevice, double* resultDevice, int vectorLength)
{
	for (int i = 0; i < vectorLength - 1; i++)
	{
		resultDevice[i] = Min(firstDevice[i], secondDevice[i]);
	}
}

double Min(double a, double b)
{
	return (a > b)
		? b
		: a;
}
	.file	"tmpxft_002b0b9e_00000000-6_kernelCPU.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3644:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE3644:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z9ReadArrayPdi
	.type	_Z9ReadArrayPdi, @function
_Z9ReadArrayPdi:
.LFB3636:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	_ZSt3cin(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rdi, %rbx
	pushq	%rdx
	.cfi_def_cfa_offset 48
.L3:
	cmpl	%ebp, %r12d
	jge	.L7
	movq	%rbx, %rsi
	movq	%r13, %rdi
	incl	%r12d
	addq	$8, %rbx
	call	_ZNSi10_M_extractIdEERSiRT_@PLT
	jmp	.L3
.L7:
	popq	%rax
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3636:
	.size	_Z9ReadArrayPdi, .-_Z9ReadArrayPdi
	.globl	_Z10WriteArrayPdi
	.type	_Z10WriteArrayPdi, @function
_Z10WriteArrayPdi:
.LFB3637:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	_ZSt4cout(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
.L9:
	cmpl	%ebx, %r12d
	jle	.L16
	movsd	0(%r13,%rbx,8), %xmm0
	movq	%rbp, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	leal	-1(%r12), %eax
	cmpl	%ebx, %eax
	jle	.L10
	movq	0(%rbp), %rax
	movb	$32, 7(%rsp)
	movq	-24(%rax), %rax
	cmpq	$0, 16(%rbp,%rax)
	je	.L11
	leaq	7(%rsp), %rsi
	movl	$1, %edx
	movq	%rbp, %rdi
	call	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l@PLT
	jmp	.L10
.L11:
	movl	$32, %esi
	movq	%rbp, %rdi
	call	_ZNSo3putEc@PLT
.L10:
	incq	%rbx
	jmp	.L9
.L16:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	addq	$24, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3637:
	.size	_Z10WriteArrayPdi, .-_Z10WriteArrayPdi
	.globl	_Z3Minii
	.type	_Z3Minii, @function
_Z3Minii:
.LFB3638:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE3638:
	.size	_Z3Minii, .-_Z3Minii
	.globl	_Z3Maxii
	.type	_Z3Maxii, @function
_Z3Maxii:
.LFB3639:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovge	%edi, %eax
	ret
	.cfi_endproc
.LFE3639:
	.size	_Z3Maxii, .-_Z3Maxii
	.globl	_Z7OperatePdS_S_i
	.type	_Z7OperatePdS_S_i, @function
_Z7OperatePdS_S_i:
.LFB3640:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	decl	%ecx
.L20:
	cmpl	%eax, %ecx
	jle	.L25
	movsd	(%rsi,%rax,8), %xmm0
	minsd	(%rdi,%rax,8), %xmm0
	movsd	%xmm0, (%rdx,%rax,8)
	incq	%rax
	jmp	.L20
.L25:
	ret
	.cfi_endproc
.LFE3640:
	.size	_Z7OperatePdS_S_i, .-_Z7OperatePdS_S_i
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB3635:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	_ZSt3cin(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	_ZNSirsERi@PLT
	call	clock@PLT
	movslq	4(%rsp), %rbx
	movq	%rax, %r13
	movq	%rbx, %r14
	salq	$3, %rbx
	movq	%rbx, %rdi
	call	malloc@PLT
	movq	%rbx, %rdi
	movq	%rax, %rbp
	call	malloc@PLT
	movq	%rbx, %rdi
	movq	%rax, %r12
	call	malloc@PLT
	movl	%r14d, %esi
	movq	%rbp, %rdi
	movq	%rax, %rbx
	call	_Z9ReadArrayPdi
	movl	4(%rsp), %esi
	movq	%r12, %rdi
	call	_Z9ReadArrayPdi
	movl	4(%rsp), %ecx
	movq	%r12, %rsi
	movq	%rbx, %rdx
	movq	%rbp, %rdi
	call	_Z7OperatePdS_S_i
	call	clock@PLT
	leaq	_ZSt4cout(%rip), %rdi
	subq	%r13, %rax
	cvtsi2sdq	%rax, %xmm0
	divsd	.LC0(%rip), %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
	movl	4(%rsp), %esi
	movq	%rbx, %rdi
	call	_Z10WriteArrayPdi
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	addq	$16, %rsp
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	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
.LFE3635:
	.size	main, .-main
	.text
	.globl	_Z3Mindd
	.type	_Z3Mindd, @function
_Z3Mindd:
.LFB3641:
	.cfi_startproc
	endbr64
	minsd	%xmm0, %xmm1
	movaps	%xmm1, %xmm0
	ret
	.cfi_endproc
.LFE3641:
	.size	_Z3Mindd, .-_Z3Mindd
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB3667:
	.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
.LFE3667:
	.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	1093567616
	.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 <iostream>
#include <ctime>

void ReadArray(double* arr, int size);
void WriteArray(double* arr, int size);

void Operate(double* firstDevice, double* secondDevice, double* resultDevice, int vectorLength);

double Min(double a, double b);

int main()
{
	int vectorLength;
	std::cin >> vectorLength;

	clock_t begin = clock();

	double* first;
	double* second;
	double* result;

	first = (double*)malloc(sizeof(double) * vectorLength);
	second = (double*)malloc(sizeof(double) * vectorLength);
	result = (double*)malloc(sizeof(double) * vectorLength);

	ReadArray(first, vectorLength);
	ReadArray(second, vectorLength);

	Operate(first, second, result, vectorLength);

	clock_t end = clock();

	std::cout << double(end - begin) / CLOCKS_PER_SEC << std::endl;

	WriteArray(result, vectorLength);
}

void ReadArray(double* arr, int size)
{
	for (int i = 0; i < size; i++)
	{
		std::cin >> arr[i];
	}
}

void WriteArray(double* arr, int size)
{
	for (int i = 0; i < size; i++)
	{
		std::cout << arr[i];

		if (i < size - 1)
		{
			std::cout << ' ';
		}
	}
}

int Min(int a, int b)
{
	return (a > b)
		? b
		: a;
}

int Max(int a, int b)
{
	return (a < b)
		? b
		: a;
}

void Operate(double* firstDevice, double* secondDevice, double* resultDevice, int vectorLength)
{
	for (int i = 0; i < vectorLength - 1; i++)
	{
		resultDevice[i] = Min(firstDevice[i], secondDevice[i]);
	}
}

double Min(double a, double b)
{
	return (a > b)
		? b
		: a;
}
	.text
	.file	"kernelCPU.hip"
                                        # Start of file scope inline assembly
	.globl	_ZSt21ios_base_library_initv

                                        # End of file scope inline assembly
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function main
.LCPI0_0:
	.quad	0x412e848000000000              # double 1.0E+6
	.text
	.globl	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
	leaq	4(%rsp), %rbx
	movl	$_ZSt3cin, %edi
	movq	%rbx, %rsi
	callq	_ZNSirsERi
	callq	clock
	movq	%rax, %r14
	movslq	(%rbx), %r13
	leaq	(,%r13,8), %rbx
	movq	%rbx, %rdi
	callq	malloc
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	malloc
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	malloc
	movq	%rax, %rbx
	testq	%r13, %r13
	jle	.LBB0_9
# %bb.1:                                # %.lr.ph.preheader.i
	movl	%r13d, %ebp
	movq	%r15, %r13
.LBB0_2:                                # %.lr.ph.i
                                        # =>This Inner Loop Header: Depth=1
	movl	$_ZSt3cin, %edi
	movq	%r13, %rsi
	callq	_ZNSi10_M_extractIdEERSiRT_
	addq	$8, %r13
	decq	%rbp
	jne	.LBB0_2
# %bb.3:                                # %_Z9ReadArrayPdi.exit
	movl	4(%rsp), %ebp
	testl	%ebp, %ebp
	jle	.LBB0_9
# %bb.4:                                # %.lr.ph.preheader.i7
	movq	%r12, %r13
.LBB0_5:                                # %.lr.ph.i9
                                        # =>This Inner Loop Header: Depth=1
	movl	$_ZSt3cin, %edi
	movq	%r13, %rsi
	callq	_ZNSi10_M_extractIdEERSiRT_
	addq	$8, %r13
	decq	%rbp
	jne	.LBB0_5
# %bb.6:                                # %_Z9ReadArrayPdi.exit13
	movl	4(%rsp), %eax
	cmpl	$2, %eax
	jl	.LBB0_9
# %bb.7:                                # %.lr.ph.preheader.i14
	decl	%eax
	xorl	%ecx, %ecx
.LBB0_8:                                # %.lr.ph.i16
                                        # =>This Inner Loop Header: Depth=1
	movsd	(%r12,%rcx,8), %xmm0            # xmm0 = mem[0],zero
	minsd	(%r15,%rcx,8), %xmm0
	movsd	%xmm0, (%rbx,%rcx,8)
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB0_8
.LBB0_9:                                # %_Z7OperatePdS_S_i.exit
	callq	clock
	subq	%r14, %rax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	divsd	.LCPI0_0(%rip), %xmm0
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %r14
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r14, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	4(%rsp), %esi
	movq	%rbx, %rdi
	callq	_Z10WriteArrayPdi
	xorl	%eax, %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_end0:
	.size	main, .Lfunc_end0-main
	.cfi_endproc
                                        # -- End function
	.globl	_Z9ReadArrayPdi                 # -- Begin function _Z9ReadArrayPdi
	.type	_Z9ReadArrayPdi,@function
_Z9ReadArrayPdi:                        # @_Z9ReadArrayPdi
	.cfi_startproc
# %bb.0:
	testl	%esi, %esi
	jle	.LBB1_4
# %bb.1:                                # %.lr.ph.preheader
	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
	movl	%esi, %r14d
.LBB1_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movl	$_ZSt3cin, %edi
	movq	%rbx, %rsi
	callq	_ZNSi10_M_extractIdEERSiRT_
	addq	$8, %rbx
	decq	%r14
	jne	.LBB1_2
# %bb.3:
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
	.cfi_restore %r14
.LBB1_4:                                # %._crit_edge
	retq
.Lfunc_end1:
	.size	_Z9ReadArrayPdi, .Lfunc_end1-_Z9ReadArrayPdi
	.cfi_endproc
                                        # -- End function
	.globl	_Z7OperatePdS_S_i               # -- Begin function _Z7OperatePdS_S_i
	.type	_Z7OperatePdS_S_i,@function
_Z7OperatePdS_S_i:                      # @_Z7OperatePdS_S_i
	.cfi_startproc
# %bb.0:
                                        # kill: def $ecx killed $ecx def $rcx
	cmpl	$2, %ecx
	jl	.LBB2_3
# %bb.1:                                # %.lr.ph.preheader
	decl	%ecx
	xorl	%eax, %eax
.LBB2_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movsd	(%rsi,%rax,8), %xmm0            # xmm0 = mem[0],zero
	minsd	(%rdi,%rax,8), %xmm0
	movsd	%xmm0, (%rdx,%rax,8)
	incq	%rax
	cmpq	%rax, %rcx
	jne	.LBB2_2
.LBB2_3:                                # %._crit_edge
	retq
.Lfunc_end2:
	.size	_Z7OperatePdS_S_i, .Lfunc_end2-_Z7OperatePdS_S_i
	.cfi_endproc
                                        # -- End function
	.globl	_Z10WriteArrayPdi               # -- Begin function _Z10WriteArrayPdi
	.type	_Z10WriteArrayPdi,@function
_Z10WriteArrayPdi:                      # @_Z10WriteArrayPdi
	.cfi_startproc
# %bb.0:
                                        # kill: def $esi killed $esi def $rsi
	testl	%esi, %esi
	jle	.LBB3_8
# %bb.1:                                # %.lr.ph
	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	$16, %rsp
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdi, %rbx
	leal	-1(%rsi), %r15d
	movl	%esi, %r12d
	xorl	%r13d, %r13d
	leaq	15(%rsp), %r14
.LBB3_2:                                # =>This Inner Loop Header: Depth=1
	movsd	(%rbx,%r13,8), %xmm0            # xmm0 = mem[0],zero
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
	cmpq	%r15, %r13
	jae	.LBB3_6
# %bb.3:                                #   in Loop: Header=BB3_2 Depth=1
	movb	$32, 15(%rsp)
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rax
	cmpq	$0, _ZSt4cout+16(%rax)
	je	.LBB3_5
# %bb.4:                                #   in Loop: Header=BB3_2 Depth=1
	movl	$_ZSt4cout, %edi
	movl	$1, %edx
	movq	%r14, %rsi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB3_6
.LBB3_5:                                #   in Loop: Header=BB3_2 Depth=1
	movl	$_ZSt4cout, %edi
	movl	$32, %esi
	callq	_ZNSo3putEc
.LBB3_6:                                #   in Loop: Header=BB3_2 Depth=1
	incq	%r13
	cmpq	%r13, %r12
	jne	.LBB3_2
# %bb.7:
	addq	$16, %rsp
	.cfi_def_cfa_offset 48
	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
	.cfi_restore %rbx
	.cfi_restore %r12
	.cfi_restore %r13
	.cfi_restore %r14
	.cfi_restore %r15
.LBB3_8:                                # %._crit_edge
	retq
.Lfunc_end3:
	.size	_Z10WriteArrayPdi, .Lfunc_end3-_Z10WriteArrayPdi
	.cfi_endproc
                                        # -- End function
	.globl	_Z3Minii                        # -- Begin function _Z3Minii
	.type	_Z3Minii,@function
_Z3Minii:                               # @_Z3Minii
	.cfi_startproc
# %bb.0:
	movl	%esi, %eax
	cmpl	%esi, %edi
	cmovll	%edi, %eax
	retq
.Lfunc_end4:
	.size	_Z3Minii, .Lfunc_end4-_Z3Minii
	.cfi_endproc
                                        # -- End function
	.globl	_Z3Maxii                        # -- Begin function _Z3Maxii
	.type	_Z3Maxii,@function
_Z3Maxii:                               # @_Z3Maxii
	.cfi_startproc
# %bb.0:
	movl	%esi, %eax
	cmpl	%esi, %edi
	cmovgl	%edi, %eax
	retq
.Lfunc_end5:
	.size	_Z3Maxii, .Lfunc_end5-_Z3Maxii
	.cfi_endproc
                                        # -- End function
	.globl	_Z3Mindd                        # -- Begin function _Z3Mindd
	.type	_Z3Mindd,@function
_Z3Mindd:                               # @_Z3Mindd
	.cfi_startproc
# %bb.0:
	minsd	%xmm0, %xmm1
	movapd	%xmm1, %xmm0
	retq
.Lfunc_end6:
	.size	_Z3Mindd, .Lfunc_end6-_Z3Mindd
	.cfi_endproc
                                        # -- End function
	.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 _ZSt3cin
	.addrsig_sym _ZSt4cout
	.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
