	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function int_cos
_int_cos:                               ## @int_cos
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_INT_PI@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%edi, %eax
	cltd
	idivl	%ecx
	testb	$1, %al
	jne	LBB0_1
## %bb.3:
	movl	%ecx, %edi
	shrl	$31, %edi
	addl	%ecx, %edi
	sarl	%edi
	cmpl	%edi, %edx
	jle	LBB0_5
## %bb.4:
	movl	%edx, %eax
	cltd
	idivl	%edi
	subl	%edx, %edi
	jmp	LBB0_2
LBB0_1:
	subl	%ecx, %edi
LBB0_2:
	callq	_int_cos
	negl	%eax
	popq	%rbp
	retq
LBB0_5:
	movl	%edx, %r8d
	imull	%edx, %r8d
	shrl	$16, %r8d
	movl	%r8d, %ecx
	imull	%edx, %ecx
	leal	32767(%rcx), %esi
	testl	%ecx, %ecx
	cmovnsl	%ecx, %esi
	sarl	$15, %esi
	imull	%edx, %esi
	movslq	%esi, %rcx
	imulq	$715827883, %rcx, %rcx          ## imm = 0x2AAAAAAB
	movq	%rcx, %rsi
	shrq	$63, %rsi
	shrq	$32, %rcx
	sarl	$16, %ecx
	addl	%esi, %ecx
	movl	%ecx, %esi
	imull	%edx, %esi
	leal	32767(%rsi), %edi
	testl	%esi, %esi
	cmovnsl	%esi, %edi
	sarl	$15, %edi
	imull	%edx, %edi
	movslq	%edi, %rsi
	imulq	$-2004318071, %rsi, %rdi        ## imm = 0x88888889
	shrq	$32, %rdi
	addl	%edi, %esi
	movl	%esi, %edi
	shrl	$31, %edi
	sarl	$19, %esi
	addl	%edi, %esi
	movl	%esi, %edi
	imull	%edx, %edi
	leal	32767(%rdi), %eax
	testl	%edi, %edi
	cmovnsl	%edi, %eax
	sarl	$15, %eax
	imull	%edx, %eax
	cltq
	imulq	$-1840700269, %rax, %rdx        ## imm = 0x92492493
	shrq	$32, %rdx
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	sarl	$20, %eax
	addl	%edx, %eax
	addl	%r8d, %esi
	subl	%esi, %ecx
	addl	%ecx, %eax
	addl	$32768, %eax                    ## imm = 0x8000
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_PI,4,2                     ## @INT_PI
	.no_dead_strip	_int_cos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function int_cos
_int_cos:                               ; @int_cos
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _INT_PI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INT_PI@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	sdiv	w8, w0, w9
	tbnz	w8, #0, LBB0_3
; %bb.1:
	msub	w8, w8, w9, w0
	cmp	w9, #0
	cinc	w9, w9, lt
	asr	w9, w9, #1
	cmp	w8, w9
	b.le	LBB0_5
; %bb.2:
	sdiv	w10, w8, w9
	neg	w8, w8
	madd	w8, w10, w9, w8
	add	w0, w9, w8
	b	LBB0_4
LBB0_3:
	sub	w0, w0, w9
LBB0_4:
	bl	_int_cos
	neg	w0, w0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_5:
	mul	w9, w8, w8
	lsr	w9, w9, #16
	mul	w10, w9, w8
	mov	w11, #32767
	add	w12, w10, w11
	cmp	w10, #0
	csel	w10, w12, w10, lt
	asr	w10, w10, #15
	mul	w10, w10, w8
	mov	w12, #43691
	movk	w12, #10922, lsl #16
	smull	x10, w10, w12
	lsr	x12, x10, #32
	lsr	x10, x10, #63
	add	w10, w10, w12, asr #16
	mul	w12, w10, w8
	add	w13, w12, w11
	cmp	w12, #0
	csel	w12, w13, w12, lt
	asr	w12, w12, #15
	mul	w12, w12, w8
	mov	w13, #34953
	movk	w13, #34952, lsl #16
	smull	x13, w12, w13
	lsr	x13, x13, #32
	add	w12, w13, w12
	asr	w13, w12, #19
	add	w12, w13, w12, lsr #31
	mul	w13, w12, w8
	add	w11, w13, w11
	cmp	w13, #0
	csel	w11, w11, w13, lt
	asr	w11, w11, #15
	mul	w8, w11, w8
	mov	w11, #9363
	movk	w11, #37449, lsl #16
	smull	x11, w8, w11
	lsr	x11, x11, #32
	add	w8, w11, w8
	asr	w11, w8, #20
	add	w8, w11, w8, lsr #31
	add	w9, w9, w12
	sub	w9, w10, w9
	add	w8, w9, w8
	add	w0, w8, #8, lsl #12             ; =32768
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_PI,4,2                     ; @INT_PI
	.no_dead_strip	_int_cos
.subsections_via_symbols
