	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dos_baudconv
_dos_baudconv:                          ## @dos_baudconv
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	$-1, %esi
	testl	%edi, %edi
	jle	LBB0_6
## %bb.1:
	movq	_COMTICK@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leal	(%r8,%r8), %eax
	cltd
	idivl	%edi
	testl	%eax, %eax
	jle	LBB0_6
## %bb.2:
	movl	%eax, %ecx
	incl	%ecx
	shrl	%ecx
	imull	$2000, %r8d, %eax               ## imm = 0x7D0
	movslq	%eax, %rdx
	movl	%edi, %esi
	imulq	%rcx, %rsi
	movq	%rdx, %rdi
	orq	%rsi, %rdi
	shrq	$32, %rdi
	je	LBB0_3
## %bb.4:
	movq	%rdx, %rax
	cqto
	idivq	%rsi
	jmp	LBB0_5
LBB0_3:
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $eax killed $eax def $rax
LBB0_5:
	leaq	1(%rax), %rdx
	shrq	$63, %rdx
	addq	%rax, %rdx
	incq	%rdx
	sarq	%rdx
	movl	$1000, %esi                     ## imm = 0x3E8
	subq	%rdx, %rsi
	addq	$-1000, %rdx                    ## imm = 0xFC18
	cmpq	$1999, %rax                     ## imm = 0x7CF
	cmovlq	%rsi, %rdx
	movq	_SPEED_TOLERANCE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	movl	$-1, %eax
	cmovgl	%eax, %ecx
	movl	%ecx, %esi
LBB0_6:
	movl	%esi, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_COMTICK,4,2                    ## @COMTICK
	.comm	_SPEED_TOLERANCE,8,3            ## @SPEED_TOLERANCE
	.no_dead_strip	_dos_baudconv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dos_baudconv
_dos_baudconv:                          ; @dos_baudconv
	.cfi_startproc
; %bb.0:
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _COMTICK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _COMTICK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	lsl	w9, w8, #1
	sdiv	w9, w9, w0
	cmp	w9, #1
	b.lt	LBB0_3
; %bb.2:
	add	w9, w9, #1
	lsr	w9, w9, #1
	mov	w10, #2000
	mul	w8, w8, w10
	sxtw	x8, w8
	umull	x10, w9, w0
	sdiv	x8, x8, x10
	add	x10, x8, #1
	add	x11, x8, #2
	cmp	x10, #0
	csinc	x10, x11, x8, lt
	asr	x10, x10, #1
	sub	x11, x10, #1000
	mov	w12, #1000
	sub	x10, x12, x10
	cmp	x8, #1999
	csel	x8, x10, x11, lt
Lloh3:
	adrp	x10, _SPEED_TOLERANCE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _SPEED_TOLERANCE@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x10
	csinv	w0, w9, wzr, le
	ret
LBB0_3:
	mov	w0, #-1
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_COMTICK,4,2                    ; @COMTICK
	.comm	_SPEED_TOLERANCE,8,3            ; @SPEED_TOLERANCE
	.no_dead_strip	_dos_baudconv
.subsections_via_symbols
