	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function normalize_double
_normalize_double:                      ## @normalize_double
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movsd	%xmm0, -16(%rbp)                ## 8-byte Spill
	callq	_isnan
	testq	%rax, %rax
	jne	LBB0_4
## %bb.1:
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movsd	(%rax), %xmm3                   ## xmm3 = mem[0],zero
	movsd	-16(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	ucomisd	%xmm3, %xmm0
	movq	_INT_MIN@GOTPCREL(%rip), %rax
	movsd	(%rax), %xmm1                   ## xmm1 = mem[0],zero
	ja	LBB0_3
## %bb.2:
	ucomisd	%xmm0, %xmm1
	ja	LBB0_3
## %bb.5:
	callq	_lrint
	movl	%eax, (%rbx)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_3:
	movapd	%xmm3, %xmm2
	cmpltsd	%xmm0, %xmm2
	andpd	%xmm2, %xmm3
	andnpd	%xmm1, %xmm2
	orpd	%xmm3, %xmm2
	cvttsd2si	%xmm2, %eax
	movl	%eax, (%rbx)
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_INT_MAX,8,3                    ## @INT_MAX
	.comm	_INT_MIN,8,3                    ## @INT_MIN
	.no_dead_strip	_normalize_double
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function normalize_double
_normalize_double:                      ; @normalize_double
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-48]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset b8, -40
	.cfi_offset b9, -48
	fmov	d8, d0
	mov	x19, x0
	bl	_isnan
	cbnz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	d0, [x8]
Lloh3:
	adrp	x8, _INT_MIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INT_MIN@GOTPAGEOFF]
Lloh5:
	ldr	d1, [x8]
	fcmp	d0, d8
	fccmp	d1, d8, #0, pl
	b.le	LBB0_4
; %bb.2:
	fcmp	d0, d8
	fcsel	d0, d0, d1, mi
	fcvtzs	w8, d0
	str	w8, [x19]
LBB0_3:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #48               ; 16-byte Folded Reload
	b	_AVERROR
LBB0_4:
	fmov	d0, d8
	bl	_lrint
	str	w0, [x19]
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #48               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_INT_MAX,8,3                    ; @INT_MAX
	.comm	_INT_MIN,8,3                    ; @INT_MIN
	.no_dead_strip	_normalize_double
.subsections_via_symbols
