	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mantis_uart_setup
_mantis_uart_setup:                     ## @mantis_uart_setup
	.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	%rsi, %rbx
	movq	_MANTIS_UART_CTL@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_mmread
	movl	(%rbx), %edi
	andl	$3, %edi
	orl	%eax, %edi
	movl	(%r14), %esi
	callq	_mmwrite
	movq	_MANTIS_UART_BAUD@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_mmread
	movl	4(%rbx), %ecx
	addl	$-128, %ecx
	cmpl	$5, %ecx
	jae	LBB0_1
## %bb.2:
	movslq	%ecx, %rcx
	leaq	l_switch.table.mantis_uart_setup(%rip), %rdx
	orl	(%rdx,%rcx,4), %eax
	movl	(%r14), %esi
	movl	%eax, %edi
	callq	_mmwrite
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MANTIS_UART_CTL,4,2            ## @MANTIS_UART_CTL
	.comm	_MANTIS_UART_BAUD,4,2           ## @MANTIS_UART_BAUD
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_mantis_uart_setup
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.mantis_uart_setup
l_switch.table.mantis_uart_setup:
	.long	216                             ## 0xd8
	.long	35                              ## 0x23
	.long	54                              ## 0x36
	.long	108                             ## 0x6c
	.long	17                              ## 0x11

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mantis_uart_setup
_mantis_uart_setup:                     ; @mantis_uart_setup
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
Lloh0:
	adrp	x20, _MANTIS_UART_CTL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MANTIS_UART_CTL@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_mmread
	ldr	w8, [x19]
	and	w8, w8, #0x3
	orr	w0, w8, w0
	ldr	w1, [x20]
	bl	_mmwrite
Lloh2:
	adrp	x20, _MANTIS_UART_BAUD@GOTPAGE
Lloh3:
	ldr	x20, [x20, _MANTIS_UART_BAUD@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_mmread
	ldr	w8, [x19, #4]
	sub	w8, w8, #128
	cmp	w8, #5
	b.hs	LBB0_2
; %bb.1:
Lloh4:
	adrp	x9, l_switch.table.mantis_uart_setup@PAGE
Lloh5:
	add	x9, x9, l_switch.table.mantis_uart_setup@PAGEOFF
	ldr	w8, [x9, w8, sxtw #2]
	orr	w0, w0, w8
	ldr	w1, [x20]
	bl	_mmwrite
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MANTIS_UART_CTL,4,2            ; @MANTIS_UART_CTL
	.comm	_MANTIS_UART_BAUD,4,2           ; @MANTIS_UART_BAUD
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_mantis_uart_setup
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.mantis_uart_setup
l_switch.table.mantis_uart_setup:
	.long	216                             ; 0xd8
	.long	35                              ; 0x23
	.long	54                              ; 0x36
	.long	108                             ; 0x6c
	.long	17                              ; 0x11

.subsections_via_symbols
