	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_handle_uart_irq                ## -- Begin function handle_uart_irq
	.p2align	4, 0x90
_handle_uart_irq:                       ## @handle_uart_irq
	.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	%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
	movq	_AUX_MU_IIR_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_get32
	andl	$6, %eax
	cmpl	$2, %eax
	je	LBB0_7
## %bb.1:
	cmpl	$4, %eax
	jne	LBB0_13
## %bb.2:
	movq	_AUX_MU_LSR_REG@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_get32
	testb	$1, %al
	je	LBB0_13
## %bb.3:
	movq	_AUX_MU_IO_REG@GOTPCREL(%rip), %r15
	movq	_buffer@GOTPCREL(%rip), %r12
	movq	_wr_buffer_index@GOTPCREL(%rip), %rbx
	movq	_BUFFER_SIZE@GOTPCREL(%rip), %r13
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r14), %edi
	callq	_get32
	testb	$1, %al
	je	LBB0_13
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	callq	_get32
	movq	(%r12), %rcx
	movq	(%rbx), %rdx
	leaq	1(%rdx), %rsi
	movq	%rsi, (%rbx)
	movb	%al, (%rcx,%rdx)
	movq	(%rbx), %rax
	cmpq	(%r13), %rax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	$0, (%rbx)
	jmp	LBB0_6
LBB0_7:
	movq	_AUX_MU_LSR_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_get32
	testb	$32, %al
	jne	LBB0_8
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_rd_buffer_index@GOTPCREL(%rip), %rbx
	movq	_wr_buffer_index@GOTPCREL(%rip), %r15
	movq	_buffer@GOTPCREL(%rip), %r12
	movq	_AUX_MU_IO_REG@GOTPCREL(%rip), %r13
	movq	_BUFFER_SIZE@GOTPCREL(%rip), %r14
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	_AUX_MU_LSR_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_get32
	testb	$32, %al
	je	LBB0_13
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	cmpq	(%r15), %rax
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	(%r12), %rcx
	leaq	1(%rax), %rdx
	movq	%rdx, (%rbx)
	movsbl	(%rcx,%rax), %esi
	movl	(%r13), %edi
	callq	_put32
	movq	(%rbx), %rax
	cmpq	(%r14), %rax
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	$0, (%rbx)
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_AUX_MU_IIR_REG,4,2             ## @AUX_MU_IIR_REG
	.comm	_AUX_MU_LSR_REG,4,2             ## @AUX_MU_LSR_REG
	.comm	_AUX_MU_IO_REG,4,2              ## @AUX_MU_IO_REG
	.comm	_buffer,8,3                     ## @buffer
	.comm	_wr_buffer_index,8,3            ## @wr_buffer_index
	.comm	_BUFFER_SIZE,8,3                ## @BUFFER_SIZE
	.comm	_rd_buffer_index,8,3            ## @rd_buffer_index
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_handle_uart_irq                ; -- Begin function handle_uart_irq
	.p2align	2
_handle_uart_irq:                       ; @handle_uart_irq
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x8, _AUX_MU_IIR_REG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AUX_MU_IIR_REG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_get32
	and	w8, w0, #0x6
	cmp	w8, #2
	b.eq	LBB0_7
; %bb.1:
	cmp	w8, #4
	b.ne	LBB0_8
; %bb.2:
Lloh3:
	adrp	x19, _AUX_MU_LSR_REG@GOTPAGE
Lloh4:
	ldr	x19, [x19, _AUX_MU_LSR_REG@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_get32
	tbz	w0, #0, LBB0_8
; %bb.3:
Lloh5:
	adrp	x20, _AUX_MU_IO_REG@GOTPAGE
Lloh6:
	ldr	x20, [x20, _AUX_MU_IO_REG@GOTPAGEOFF]
Lloh7:
	adrp	x21, _buffer@GOTPAGE
Lloh8:
	ldr	x21, [x21, _buffer@GOTPAGEOFF]
Lloh9:
	adrp	x22, _wr_buffer_index@GOTPAGE
Lloh10:
	ldr	x22, [x22, _wr_buffer_index@GOTPAGEOFF]
Lloh11:
	adrp	x23, _BUFFER_SIZE@GOTPAGE
Lloh12:
	ldr	x23, [x23, _BUFFER_SIZE@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19]
	bl	_get32
	tbz	w0, #0, LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	bl	_get32
	ldr	x8, [x21]
	ldr	x9, [x22]
	add	x10, x9, #1
	str	x10, [x22]
	strb	w0, [x8, x9]
	ldr	x8, [x22]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	str	xzr, [x22]
	b	LBB0_4
LBB0_7:
Lloh13:
	adrp	x19, _AUX_MU_LSR_REG@GOTPAGE
Lloh14:
	ldr	x19, [x19, _AUX_MU_LSR_REG@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_get32
	tbnz	w0, #5, LBB0_9
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh15:
	adrp	x20, _rd_buffer_index@GOTPAGE
Lloh16:
	ldr	x20, [x20, _rd_buffer_index@GOTPAGEOFF]
Lloh17:
	adrp	x21, _wr_buffer_index@GOTPAGE
Lloh18:
	ldr	x21, [x21, _wr_buffer_index@GOTPAGEOFF]
Lloh19:
	adrp	x22, _buffer@GOTPAGE
Lloh20:
	ldr	x22, [x22, _buffer@GOTPAGEOFF]
Lloh21:
	adrp	x23, _AUX_MU_IO_REG@GOTPAGE
Lloh22:
	ldr	x23, [x23, _AUX_MU_IO_REG@GOTPAGEOFF]
Lloh23:
	adrp	x24, _BUFFER_SIZE@GOTPAGE
Lloh24:
	ldr	x24, [x24, _BUFFER_SIZE@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [x19]
	bl	_get32
	tbz	w0, #5, LBB0_8
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	x9, [x21]
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x9, [x22]
	add	x10, x8, #1
	str	x10, [x20]
	ldrsb	w1, [x9, x8]
	ldr	w0, [x23]
	bl	_put32
	ldr	x8, [x20]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	str	xzr, [x20]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_AUX_MU_IIR_REG,4,2             ; @AUX_MU_IIR_REG
	.comm	_AUX_MU_LSR_REG,4,2             ; @AUX_MU_LSR_REG
	.comm	_AUX_MU_IO_REG,4,2              ; @AUX_MU_IO_REG
	.comm	_buffer,8,3                     ; @buffer
	.comm	_wr_buffer_index,8,3            ; @wr_buffer_index
	.comm	_BUFFER_SIZE,8,3                ; @BUFFER_SIZE
	.comm	_rd_buffer_index,8,3            ; @rd_buffer_index
.subsections_via_symbols
