	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function change_speed
_change_speed:                          ## @change_speed
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_BASE_BAUD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %eax
	cltd
	idivl	%esi
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movslq	%ecx, %rax
	imulq	$458129845, %rax, %r14          ## imm = 0x1B4E81B5
	movq	%r14, %rax
	shrq	$63, %rax
	sarq	$42, %r14
	addl	%eax, %r14d
LBB0_2:
	movl	%ecx, %eax
	cltd
	idivl	%r14d
	movq	_UART_FCR_ENABLE_FIFO@GOTPCREL(%rip), %rcx
	cmpl	$2400, %eax                     ## imm = 0x960
	jge	LBB0_3
## %bb.4:
	movq	_UART_FCR_TRIGGER_1@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_UART_FCR_TRIGGER_8@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %edx
	orl	(%rcx), %edx
	movq	_UART_FCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_serial_outp
	movq	_UART_IER_MSI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	(%rbx), %edx
	movl	%edx, (%rbx)
	orl	(%rax), %edx
	movl	%edx, (%rbx)
	movq	_UART_IER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_serial_outp
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_debugl1
	movq	_UART_LCR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_UART_LCR_DLAB@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	$3, %edx
	movq	%rbx, %rdi
	callq	_serial_outp
	movq	_UART_DLL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%r14b, %edx
	movq	%rbx, %rdi
	callq	_serial_outp
	movq	_UART_DLM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	sarl	$8, %r14d
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_serial_outp
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$3, %edx
	callq	_serial_outp
	movq	_UART_RX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_serial_inp                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BASE_BAUD,4,2                  ## @BASE_BAUD
	.comm	_UART_FCR_ENABLE_FIFO,4,2       ## @UART_FCR_ENABLE_FIFO
	.comm	_UART_FCR_TRIGGER_1,4,2         ## @UART_FCR_TRIGGER_1
	.comm	_UART_FCR_TRIGGER_8,4,2         ## @UART_FCR_TRIGGER_8
	.comm	_UART_FCR,4,2                   ## @UART_FCR
	.comm	_UART_IER_MSI,4,2               ## @UART_IER_MSI
	.comm	_UART_IER,4,2                   ## @UART_IER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"modem quot=0x%x"

	.comm	_UART_LCR,4,2                   ## @UART_LCR
	.comm	_UART_LCR_DLAB,4,2              ## @UART_LCR_DLAB
	.comm	_UART_DLL,4,2                   ## @UART_DLL
	.comm	_UART_DLM,4,2                   ## @UART_DLM
	.comm	_UART_RX,4,2                    ## @UART_RX
	.no_dead_strip	_change_speed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function change_speed
_change_speed:                          ; @change_speed
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _BASE_BAUD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BASE_BAUD@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	sdiv	w9, w8, w1
	mov	w10, #33205
	movk	w10, #6990, lsl #16
	mul	x10, x8, x10
	lsr	x11, x10, #63
	asr	x10, x10, #42
	add	w10, w10, w11
	cmp	w9, #0
	csel	w20, w10, w9, eq
	sdiv	w8, w8, w20
Lloh3:
	adrp	x9, _UART_FCR_ENABLE_FIFO@GOTPAGE
Lloh4:
	ldr	x9, [x9, _UART_FCR_ENABLE_FIFO@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _UART_FCR_TRIGGER_1@GOTPAGE
Lloh7:
	ldr	x10, [x10, _UART_FCR_TRIGGER_1@GOTPAGEOFF]
Lloh8:
	adrp	x11, _UART_FCR_TRIGGER_8@GOTPAGE
Lloh9:
	ldr	x11, [x11, _UART_FCR_TRIGGER_8@GOTPAGEOFF]
	cmp	w8, #2400
	csel	x8, x10, x11, lt
	ldr	w8, [x8]
	orr	w2, w8, w9
Lloh10:
	adrp	x8, _UART_FCR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _UART_FCR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_serial_outp
Lloh13:
	adrp	x8, _UART_IER_MSI@GOTPAGE
Lloh14:
	ldr	x8, [x8, _UART_IER_MSI@GOTPAGEOFF]
	ldr	w9, [x8]
	ldr	w10, [x19]
	bic	w9, w10, w9
	str	w9, [x19]
	ldr	w8, [x8]
	orr	w2, w8, w9
	str	w2, [x19]
Lloh15:
	adrp	x8, _UART_IER@GOTPAGE
Lloh16:
	ldr	x8, [x8, _UART_IER@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_serial_outp
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_debugl1
Lloh20:
	adrp	x21, _UART_LCR@GOTPAGE
Lloh21:
	ldr	x21, [x21, _UART_LCR@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh22:
	adrp	x8, _UART_LCR_DLAB@GOTPAGE
Lloh23:
	ldr	x8, [x8, _UART_LCR_DLAB@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	orr	w2, w8, #0x3
	mov	x0, x19
	bl	_serial_outp
Lloh25:
	adrp	x8, _UART_DLL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _UART_DLL@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	and	w2, w20, #0xff
	mov	x0, x19
	bl	_serial_outp
Lloh28:
	adrp	x8, _UART_DLM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _UART_DLM@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	asr	w2, w20, #8
	mov	x0, x19
	bl	_serial_outp
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #3
	bl	_serial_outp
Lloh31:
	adrp	x8, _UART_RX@GOTPAGE
Lloh32:
	ldr	x8, [x8, _UART_RX@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_serial_inp
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BASE_BAUD,4,2                  ; @BASE_BAUD
	.comm	_UART_FCR_ENABLE_FIFO,4,2       ; @UART_FCR_ENABLE_FIFO
	.comm	_UART_FCR_TRIGGER_1,4,2         ; @UART_FCR_TRIGGER_1
	.comm	_UART_FCR_TRIGGER_8,4,2         ; @UART_FCR_TRIGGER_8
	.comm	_UART_FCR,4,2                   ; @UART_FCR
	.comm	_UART_IER_MSI,4,2               ; @UART_IER_MSI
	.comm	_UART_IER,4,2                   ; @UART_IER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"modem quot=0x%x"

	.comm	_UART_LCR,4,2                   ; @UART_LCR
	.comm	_UART_LCR_DLAB,4,2              ; @UART_LCR_DLAB
	.comm	_UART_DLL,4,2                   ; @UART_DLL
	.comm	_UART_DLM,4,2                   ; @UART_DLM
	.comm	_UART_RX,4,2                    ; @UART_RX
	.no_dead_strip	_change_speed
.subsections_via_symbols
