	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decode_erp
_decode_erp:                            ## @decode_erp
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_HIGH_PEAK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_LOW_PEAK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	leal	(%r8,%rax), %ecx
	movl	%ecx, %r14d
	shrl	$31, %r14d
	addl	%ecx, %r14d
	sarl	%r14d
	movl	%r14d, %r10d
	subl	%edi, %r10d
	jle	LBB0_2
## %bb.1:
	movl	%esi, %r9d
	subl	%r8d, %r9d
	movq	_DEG270@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %r11d
	addl	%r9d, %r11d
	movq	_DEG360@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	xorl	%ecx, %ecx
	cmpl	%r9d, %r11d
	cmovgel	%r9d, %ecx
	subl	%ecx, %r11d
	jmp	LBB0_3
LBB0_2:
	movl	%eax, %r11d
	subl	%esi, %r11d
	movq	_DEG90@GOTPCREL(%rip), %rcx
	addl	(%rcx), %r11d
	movq	_DEG360@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
LBB0_3:
	movl	%eax, %ecx
	subl	%r8d, %ecx
	movl	%ecx, %ebx
	shrl	$31, %ebx
	addl	%ecx, %ebx
	sarl	%ebx
	movl	%ebx, %ecx
	addl	$-100, %ecx
	shrl	$31, %ecx
	addl	%ebx, %ecx
	addl	$-100, %ecx
	sarl	%ecx
	movl	%r10d, %ebx
	negl	%ebx
	cmovsl	%r10d, %ebx
	subl	%ecx, %ebx
	xorl	%ecx, %ecx
	testl	%ebx, %ebx
	cmovgl	%ebx, %ecx
	cmpl	$100, %ecx
	movl	$100, %ebx
	cmovael	%ebx, %ecx
	subl	%ecx, %ebx
	subl	%edi, %eax
	movq	_DEG180@GOTPCREL(%rip), %rdx
	addl	(%rdx), %eax
	subl	%r8d, %edi
	cmpl	%esi, %r14d
	cmovll	%edi, %eax
	imull	%ebx, %eax
	imull	%r11d, %ecx
	addl	%eax, %ecx
	addl	%ecx, %ecx
	leal	(%rcx,%rcx,4), %eax
	cltd
	idivl	%r9d
                                        ## kill: def $eax killed $eax def $rax
	leal	1000(%rax), %ecx
	testl	%eax, %eax
	cmovsl	%ecx, %eax
	leal	-1000(%rax), %ecx
	cmpl	$1000, %eax                     ## imm = 0x3E8
	cmovgel	%ecx, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HIGH_PEAK,4,2                  ## @HIGH_PEAK
	.comm	_LOW_PEAK,4,2                   ## @LOW_PEAK
	.comm	_DEG270,1,0                     ## @DEG270
	.comm	_DEG360,4,2                     ## @DEG360
	.comm	_DEG90,4,2                      ## @DEG90
	.comm	_DEG180,4,2                     ## @DEG180
	.no_dead_strip	_decode_erp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decode_erp
_decode_erp:                            ; @decode_erp
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _HIGH_PEAK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HIGH_PEAK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _LOW_PEAK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _LOW_PEAK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	add	w10, w9, w8
	cmp	w10, #0
	cinc	w10, w10, lt
	asr	w10, w10, #1
	subs	w12, w10, w0
	b.le	LBB0_2
; %bb.1:
Lloh6:
	adrp	x11, _DEG270@GOTPAGE
Lloh7:
	ldr	x11, [x11, _DEG270@GOTPAGEOFF]
	ldrb	w11, [x11]
	sub	w13, w1, w9
	add	w13, w13, w11
Lloh8:
	adrp	x11, _DEG360@GOTPAGE
Lloh9:
	ldr	x11, [x11, _DEG360@GOTPAGEOFF]
Lloh10:
	ldr	w11, [x11]
	cmp	w13, w11
	csel	w14, wzr, w11, lt
	sub	w13, w13, w14
	b	LBB0_3
LBB0_2:
Lloh11:
	adrp	x11, _DEG90@GOTPAGE
Lloh12:
	ldr	x11, [x11, _DEG90@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
	sub	w13, w8, w1
	add	w13, w13, w11
Lloh14:
	adrp	x11, _DEG360@GOTPAGE
Lloh15:
	ldr	x11, [x11, _DEG360@GOTPAGEOFF]
Lloh16:
	ldr	w11, [x11]
LBB0_3:
	sub	w14, w8, w9
	cmp	w14, #0
	cinc	w14, w14, lt
	asr	w14, w14, #1
	sub	w15, w14, #100
	sub	w14, w14, #99
	cmp	w15, #0
	csel	w14, w14, w15, lt
	cmp	w12, #0
	cneg	w12, w12, mi
	sub	w12, w12, w14, asr #1
	cmp	w12, #0
	csel	w12, w12, wzr, gt
	mov	w14, #100
	cmp	w12, #100
	csel	w12, w12, w14, lo
	sub	w14, w14, w12
Lloh17:
	adrp	x15, _DEG180@GOTPAGE
Lloh18:
	ldr	x15, [x15, _DEG180@GOTPAGEOFF]
	sub	w9, w0, w9
Lloh19:
	ldr	w15, [x15]
	sub	w8, w8, w0
	add	w8, w8, w15
	cmp	w10, w1
	csel	w8, w9, w8, lt
	mul	w9, w13, w12
	madd	w8, w8, w14, w9
	add	w8, w8, w8, lsl #2
	lsl	w8, w8, #1
	sdiv	w8, w8, w11
	add	w9, w8, #1000
	cmp	w8, #0
	csel	w8, w9, w8, lt
	sub	w9, w8, #1000
	cmp	w8, #999
	csel	w0, w9, w8, gt
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_HIGH_PEAK,4,2                  ; @HIGH_PEAK
	.comm	_LOW_PEAK,4,2                   ; @LOW_PEAK
	.comm	_DEG270,1,0                     ; @DEG270
	.comm	_DEG360,4,2                     ; @DEG360
	.comm	_DEG90,4,2                      ; @DEG90
	.comm	_DEG180,4,2                     ; @DEG180
	.no_dead_strip	_decode_erp
.subsections_via_symbols
