	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btuart_change_speed
_btuart_change_speed:                   ## @btuart_change_speed
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.1:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r13d
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movl	(%rax), %r15d
	callq	_spin_lock_irqsave
	movq	_UART_IER@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r15, %rsi
	xorl	%edi, %edi
	callq	_outb
	movq	_SPEED_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edx, %edx
	divl	%r13d
	movl	%eax, %r12d
	movq	_UART_FCR_ENABLE_FIFO@GOTPCREL(%rip), %rax
	movq	_UART_FCR_CLEAR_RCVR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movq	_UART_FCR_CLEAR_XMIT@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	cmpl	$38400, %r13d                   ## imm = 0x9600
	jae	LBB0_2
## %bb.3:
	movq	_UART_FCR_TRIGGER_1@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_5:
	leaq	L_.str(%rip), %rdi
	jmp	_BT_ERR                         ## TAILCALL
LBB0_2:
	movq	_UART_FCR_TRIGGER_14@GOTPCREL(%rip), %rax
LBB0_4:
	orl	(%rax), %ebx
	movq	_UART_LCR_WLEN8@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_UART_LCR_DLAB@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	%r13d, %edi
	movq	_UART_LCR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r15, %rsi
	callq	_outb
	movzbl	%r12b, %edi
	movq	_UART_DLL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r15, %rsi
	callq	_outb
	sarl	$8, %r12d
	movq	_UART_DLM@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r15, %rsi
	movl	%r12d, %edi
	callq	_outb
	movq	_UART_LCR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r15, %rsi
	movl	%r13d, %edi
	callq	_outb
	movq	_UART_FCR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r15, %rsi
	movl	%ebx, %edi
	callq	_outb
	movq	_UART_IER_RLSI@GOTPCREL(%rip), %rax
	movq	_UART_IER_RDI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_UART_IER_THRI@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_UART_IER@GOTPCREL(%rip), %rax
	addq	(%rax), %r15
	movq	%r15, %rsi
	callq	_outb
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown device"

	.comm	_UART_IER,8,3                   ## @UART_IER
	.comm	_SPEED_MAX,4,2                  ## @SPEED_MAX
	.comm	_UART_FCR_ENABLE_FIFO,4,2       ## @UART_FCR_ENABLE_FIFO
	.comm	_UART_FCR_CLEAR_RCVR,4,2        ## @UART_FCR_CLEAR_RCVR
	.comm	_UART_FCR_CLEAR_XMIT,4,2        ## @UART_FCR_CLEAR_XMIT
	.comm	_UART_FCR_TRIGGER_1,4,2         ## @UART_FCR_TRIGGER_1
	.comm	_UART_FCR_TRIGGER_14,4,2        ## @UART_FCR_TRIGGER_14
	.comm	_UART_LCR_WLEN8,4,2             ## @UART_LCR_WLEN8
	.comm	_UART_LCR_DLAB,4,2              ## @UART_LCR_DLAB
	.comm	_UART_LCR,8,3                   ## @UART_LCR
	.comm	_UART_DLL,8,3                   ## @UART_DLL
	.comm	_UART_DLM,8,3                   ## @UART_DLM
	.comm	_UART_FCR,8,3                   ## @UART_FCR
	.comm	_UART_IER_RLSI,4,2              ## @UART_IER_RLSI
	.comm	_UART_IER_RDI,4,2               ## @UART_IER_RDI
	.comm	_UART_IER_THRI,4,2              ## @UART_IER_THRI
	.no_dead_strip	_btuart_change_speed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btuart_change_speed
_btuart_change_speed:                   ; @btuart_change_speed
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_2
; %bb.1:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	w22, [x8]
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x23, _UART_IER@GOTPAGE
Lloh1:
	ldr	x23, [x23, _UART_IER@GOTPAGEOFF]
	ldr	x8, [x23]
	add	x1, x8, x22
	mov	w0, #0
	bl	_outb
Lloh2:
	adrp	x8, _SPEED_MAX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SPEED_MAX@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _UART_FCR_ENABLE_FIFO@GOTPAGE
Lloh6:
	ldr	x9, [x9, _UART_FCR_ENABLE_FIFO@GOTPAGEOFF]
	udiv	w24, w8, w20
Lloh7:
	ldr	w8, [x9]
Lloh8:
	adrp	x9, _UART_FCR_CLEAR_RCVR@GOTPAGE
Lloh9:
	ldr	x9, [x9, _UART_FCR_CLEAR_RCVR@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh11:
	adrp	x9, _UART_FCR_CLEAR_XMIT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _UART_FCR_CLEAR_XMIT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh14:
	adrp	x9, _UART_FCR_TRIGGER_1@GOTPAGE
Lloh15:
	ldr	x9, [x9, _UART_FCR_TRIGGER_1@GOTPAGEOFF]
Lloh16:
	adrp	x10, _UART_FCR_TRIGGER_14@GOTPAGE
Lloh17:
	ldr	x10, [x10, _UART_FCR_TRIGGER_14@GOTPAGEOFF]
	lsr	w11, w20, #9
	cmp	w11, #75
	csel	x9, x9, x10, lo
	ldr	w9, [x9]
	orr	w20, w8, w9
Lloh18:
	adrp	x8, _UART_LCR_WLEN8@GOTPAGE
Lloh19:
	ldr	x8, [x8, _UART_LCR_WLEN8@GOTPAGEOFF]
Lloh20:
	ldr	w21, [x8]
Lloh21:
	adrp	x8, _UART_LCR_DLAB@GOTPAGE
Lloh22:
	ldr	x8, [x8, _UART_LCR_DLAB@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	orr	w0, w8, w21
Lloh24:
	adrp	x25, _UART_LCR@GOTPAGE
Lloh25:
	ldr	x25, [x25, _UART_LCR@GOTPAGEOFF]
	ldr	x8, [x25]
	add	x1, x8, x22
	bl	_outb
	and	w0, w24, #0xff
Lloh26:
	adrp	x8, _UART_DLL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _UART_DLL@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	add	x1, x8, x22
	bl	_outb
	asr	w0, w24, #8
Lloh29:
	adrp	x8, _UART_DLM@GOTPAGE
Lloh30:
	ldr	x8, [x8, _UART_DLM@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	add	x1, x8, x22
	bl	_outb
	ldr	x8, [x25]
	add	x1, x8, x22
	mov	x0, x21
	bl	_outb
Lloh32:
	adrp	x8, _UART_FCR@GOTPAGE
Lloh33:
	ldr	x8, [x8, _UART_FCR@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
	add	x1, x8, x22
	mov	x0, x20
	bl	_outb
Lloh35:
	adrp	x8, _UART_IER_RLSI@GOTPAGE
Lloh36:
	ldr	x8, [x8, _UART_IER_RLSI@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
Lloh38:
	adrp	x9, _UART_IER_RDI@GOTPAGE
Lloh39:
	ldr	x9, [x9, _UART_IER_RDI@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh41:
	adrp	x9, _UART_IER_THRI@GOTPAGE
Lloh42:
	ldr	x9, [x9, _UART_IER_THRI@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	orr	w0, w8, w9
	ldr	x8, [x23]
	add	x1, x8, x22
	bl	_outb
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
LBB0_2:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	.cfi_same_value w23
	.cfi_same_value w24
	.cfi_same_value w25
	.cfi_same_value w26
Lloh44:
	adrp	x0, l_.str@PAGE
Lloh45:
	add	x0, x0, l_.str@PAGEOFF
	b	_BT_ERR
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown device"

	.comm	_UART_IER,8,3                   ; @UART_IER
	.comm	_SPEED_MAX,4,2                  ; @SPEED_MAX
	.comm	_UART_FCR_ENABLE_FIFO,4,2       ; @UART_FCR_ENABLE_FIFO
	.comm	_UART_FCR_CLEAR_RCVR,4,2        ; @UART_FCR_CLEAR_RCVR
	.comm	_UART_FCR_CLEAR_XMIT,4,2        ; @UART_FCR_CLEAR_XMIT
	.comm	_UART_FCR_TRIGGER_1,4,2         ; @UART_FCR_TRIGGER_1
	.comm	_UART_FCR_TRIGGER_14,4,2        ; @UART_FCR_TRIGGER_14
	.comm	_UART_LCR_WLEN8,4,2             ; @UART_LCR_WLEN8
	.comm	_UART_LCR_DLAB,4,2              ; @UART_LCR_DLAB
	.comm	_UART_LCR,8,3                   ; @UART_LCR
	.comm	_UART_DLL,8,3                   ; @UART_DLL
	.comm	_UART_DLM,8,3                   ; @UART_DLM
	.comm	_UART_FCR,8,3                   ; @UART_FCR
	.comm	_UART_IER_RLSI,4,2              ; @UART_IER_RLSI
	.comm	_UART_IER_RDI,4,2               ; @UART_IER_RDI
	.comm	_UART_IER_THRI,4,2              ; @UART_IER_THRI
	.no_dead_strip	_btuart_change_speed
.subsections_via_symbols
