	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fixed_point_to_int_frac        ## -- Begin function fixed_point_to_int_frac
	.p2align	4, 0x90
_fixed_point_to_int_frac:               ## @fixed_point_to_int_frac
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	movl	%esi, %r15d
	movl	%edi, %r14d
	movl	$1, %ebx
	movl	$1, %eax
	movl	%r13d, %ecx
	shll	%cl, %eax
	movslq	%eax, %r12
	callq	_dc_fixpt_abs
	movl	%eax, %edi
	callq	_dc_fixpt_floor
	movl	%r15d, %ecx
	shll	%cl, %ebx
	cmpl	$1, %r13d
	sbbl	$0, %ebx
	cmpl	%eax, %ebx
	jge	LBB0_1
## %bb.2:
	movl	$1, %edi
	movl	%r15d, %ecx
	shlq	%cl, %rdi
	callq	_dc_fixpt_from_int
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_dc_fixpt_from_int
	movl	%eax, %edi
	callq	_dc_fixpt_recip
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_dc_fixpt_sub
	movl	%eax, %edi
	callq	_dc_fixpt_floor
	jmp	LBB0_3
LBB0_1:
	movl	%r14d, %edi
	movq	%r12, %rsi
	callq	_dc_fixpt_mul_int
	movl	%eax, %edi
	callq	_dc_fixpt_round
	cltq
LBB0_3:
	addl	%r15d, %r13d
	leal	1(%r13), %ecx
	movl	$1, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	movq	%rax, %rbx
	sarq	$63, %rbx
	andl	%edx, %ebx
	addl	%eax, %ebx
	je	LBB0_4
## %bb.5:
	movq	_dc_fixpt_zero@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_dc_fixpt_lt
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	btsl	%r13d, %ebx
	jmp	LBB0_7
LBB0_4:
	xorl	%ebx, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dc_fixpt_zero,4,2              ## @dc_fixpt_zero
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fixed_point_to_int_frac        ; -- Begin function fixed_point_to_int_frac
	.p2align	2
_fixed_point_to_int_frac:               ; @fixed_point_to_int_frac
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x21, x1
	mov	w23, #1
	lsl	w8, w23, w2
	sxtw	x22, w8
	and	x19, x0, #0xffffffff
	mov	x0, x19
	bl	_dc_fixpt_abs
	bl	_dc_fixpt_floor
	lsl	w8, w23, w21
	cmp	w20, #0
	cset	w9, eq
	sub	w8, w8, w9
	cmp	w8, w0
	b.ge	LBB0_2
; %bb.1:
	mov	w8, #1
	lsl	x0, x8, x21
	bl	_dc_fixpt_from_int
	mov	x23, x0
	mov	x0, x22
	bl	_dc_fixpt_from_int
	bl	_dc_fixpt_recip
	mov	x1, x0
	mov	x0, x23
	bl	_dc_fixpt_sub
	bl	_dc_fixpt_floor
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	mov	x1, x22
	bl	_dc_fixpt_mul_int
	bl	_dc_fixpt_round
	sxtw	x0, w0
LBB0_3:
	add	w21, w20, w21
	add	w8, w21, #1
	mov	w9, #1
	lsl	w8, w9, w8
	asr	x9, x0, #63
	and	w8, w9, w8
	adds	w20, w8, w0
	b.eq	LBB0_6
; %bb.4:
Lloh0:
	adrp	x8, _dc_fixpt_zero@GOTPAGE
Lloh1:
	ldr	x8, [x8, _dc_fixpt_zero@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dc_fixpt_lt
	cbz	x0, LBB0_6
; %bb.5:
	mov	w8, #1
	lsl	w8, w8, w21
	orr	w20, w20, w8
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_dc_fixpt_zero,4,2              ; @dc_fixpt_zero
.subsections_via_symbols
