	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function ring2_test
LCPI0_0:
	.quad	0x403e000000000000              ## double 30
LCPI0_1:
	.quad	0x4034000000000000              ## double 20
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_ring2_test:                            ## @ring2_test
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cvtsi2sd	%edx, %xmm0
	divsd	LCPI0_0(%rip), %xmm0
	movq	%rdi, %rbx
	movslq	%esi, %rax
	addq	$1024, %rbx                     ## imm = 0x400
	shlq	$2, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	movl	$255, %r13d
	xorl	%eax, %eax
	movsd	%xmm0, -64(%rbp)                ## 8-byte Spill
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leal	-128(%rax), %r14d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leal	-128(%r15), %edi
	movl	%r14d, %esi
	callq	_hypot
	movsd	LCPI0_1(%rip), %xmm1            ## xmm1 = mem[0],zero
	divsd	%xmm1, %xmm0
	cvttpd2dq	%xmm0, %xmm1
	cvtdq2pd	%xmm1, %xmm1
	subsd	%xmm1, %xmm0
	movsd	-64(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	movl	%r15d, %eax
	cmoval	%r13d, %eax
	movl	%r15d, %ecx
	cmoval	%r12d, %ecx
	movl	%eax, -1024(%rbx,%r15,4)
	movl	%ecx, (%rbx,%r15,4)
	incq	%r15
	cmpq	$256, %r15                      ## imm = 0x100
	jne	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	incq	%rax
	addq	-48(%rbp), %rbx                 ## 8-byte Folded Reload
	cmpq	$256, %rax                      ## imm = 0x100
	jne	LBB0_1
## %bb.4:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ring2_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ring2_test
_ring2_test:                            ; @ring2_test
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-80]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset b8, -72
	.cfi_offset b9, -80
                                        ; kill: def $w1 killed $w1 def $x1
	mov	x19, x0
	mov	x21, #0
	scvtf	d0, w2
	fmov	d1, #30.00000000
	fdiv	d8, d0, d1
	sbfiz	x22, x1, #2, #32
	fmov	d9, #20.00000000
	mov	w23, #255
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_2 Depth 2
	mov	x24, #0
	sub	w20, w21, #128
LBB0_2:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	w0, w24, #128
	mov	x1, x20
	bl	_hypot
	fdiv	d0, d0, d9
	fcvtzs	w8, d0
	scvtf	d1, w8
	fsub	d0, d0, d1
	add	x8, x19, x24, lsl #2
	fcmp	d0, d8
	csel	w9, w23, w24, mi
	csel	w10, wzr, w24, mi
	str	w9, [x8]
	str	w10, [x8, #1024]
	add	x24, x24, #1
	cmp	x24, #256
	b.ne	LBB0_2
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x21, x21, #1
	add	x19, x19, x22
	cmp	x21, #256
	b.ne	LBB0_1
; %bb.4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #80               ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ring2_test
.subsections_via_symbols
