	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ivtv_validate_speed
_ivtv_validate_speed:                   ## @ivtv_validate_speed
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	%esi, %ecx
	sarl	$31, %ecx
	orl	$1, %ecx
	testl	%edi, %edi
	movl	$1000, %eax                     ## imm = 0x3E8
	cmovnel	%edi, %eax
	movl	%esi, %edi
	negl	%edi
	cmovsl	%esi, %edi
	movl	%eax, %esi
	negl	%esi
	cmovsl	%eax, %esi
	cmpl	%edi, %esi
	jbe	LBB0_3
## %bb.1:
	cmpl	$2000, %edi                     ## imm = 0x7D0
	jae	LBB0_4
## %bb.5:
	cmpl	$1500, %edi                     ## imm = 0x5DC
	jae	LBB0_8
## %bb.9:
	cmpl	$1000, %edi                     ## imm = 0x3E8
	jb	LBB0_11
## %bb.10:
	imull	$1000, %ecx, %ecx               ## imm = 0x3E8
	jmp	LBB0_20
LBB0_3:
	cmpl	$1501, %edi                     ## imm = 0x5DD
	jb	LBB0_7
LBB0_4:
	imull	$2000, %ecx, %ecx               ## imm = 0x7D0
	jmp	LBB0_20
LBB0_7:
	cmpl	$1001, %edi                     ## imm = 0x3E9
	jb	LBB0_11
LBB0_8:
	imull	$1500, %ecx, %ecx               ## imm = 0x5DC
	jmp	LBB0_20
LBB0_11:
	testl	%edi, %edi
	je	LBB0_15
## %bb.12:
	cmpl	$1000, %edi                     ## imm = 0x3E8
	je	LBB0_14
## %bb.13:
	cmpl	$1, %edi
	jne	LBB0_16
LBB0_14:
	imull	%edi, %ecx
	jmp	LBB0_20
LBB0_15:
	movl	$1000, %ecx                     ## imm = 0x3E8
	jmp	LBB0_20
LBB0_16:
	xorl	%r8d, %r8d
	movw	$1000, %ax                      ## imm = 0x3E8
	xorl	%edx, %edx
	divw	%di
	movzwl	%ax, %r9d
	movl	$1000, %eax                     ## imm = 0x3E8
	xorl	%edx, %edx
	divl	%esi
	xorl	%edx, %edx
	cmpl	%edi, %esi
	setae	%dl
	cmpl	%r9d, %eax
	leal	-1(%rdx,%rdx), %esi
	cmovnel	%r8d, %esi
	addl	%r9d, %esi
	cmpl	$61, %esi
	jb	LBB0_18
## %bb.17:
	imull	$60, %ecx, %ecx
	movw	$1000, %ax                      ## imm = 0x3E8
	xorl	%edx, %edx
	idivw	%cx
	jmp	LBB0_19
LBB0_18:
	imull	%ecx, %esi
	movw	$1000, %ax                      ## imm = 0x3E8
	xorl	%edx, %edx
	idivw	%si
LBB0_19:
	movswl	%ax, %ecx
LBB0_20:
	movl	%ecx, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ivtv_validate_speed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ivtv_validate_speed
_ivtv_validate_speed:                   ; @ivtv_validate_speed
	.cfi_startproc
; %bb.0:
	asr	w8, w1, #31
	orr	w8, w8, #0x1
	mov	w9, #1000
	cmp	w0, #0
	csel	w10, w9, w0, eq
	cmp	w1, #0
	cneg	w9, w1, mi
	cmp	w10, #0
	cneg	w10, w10, mi
	cmp	w10, w9
	b.ls	LBB0_5
; %bb.1:
	cmp	w9, #2000
	b.hs	LBB0_6
; %bb.2:
	cmp	w9, #1500
	b.hs	LBB0_8
; %bb.3:
	cmp	w9, #1000
	b.lo	LBB0_9
; %bb.4:
	mov	w9, #1000
	mul	w0, w8, w9
	ret
LBB0_5:
	cmp	w9, #1501
	b.lo	LBB0_7
LBB0_6:
	mov	w9, #2000
	mul	w0, w8, w9
	ret
LBB0_7:
	cmp	w9, #1001
	b.lo	LBB0_9
LBB0_8:
	mov	w9, #1500
	mul	w0, w8, w9
	ret
LBB0_9:
	cbz	w9, LBB0_13
; %bb.10:
	cmp	w9, #1000
	b.eq	LBB0_12
; %bb.11:
	cmp	w9, #1
	b.ne	LBB0_14
LBB0_12:
	mul	w0, w8, w9
	ret
LBB0_13:
	mov	w0, #1000
	ret
LBB0_14:
	and	w12, w9, #0xffff
	mov	w11, #1000
	udiv	w12, w11, w12
	cmp	w10, w9
	mov	w9, #-1
	cneg	w9, w9, hs
	udiv	w10, w11, w10
	cmp	w10, w12
	csel	w9, w9, wzr, eq
	add	w9, w9, w12
	cmp	w9, #61
	b.lo	LBB0_16
; %bb.15:
	mov	w9, #60
	mul	w8, w8, w9
	b	LBB0_17
LBB0_16:
	mul	w8, w9, w8
	sxth	w8, w8
LBB0_17:
	sdiv	w8, w11, w8
	sxth	w0, w8
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ivtv_validate_speed
.subsections_via_symbols
