	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aml8726_uart_bus_ipend
_aml8726_uart_bus_ipend:                ## @aml8726_uart_bus_ipend
	.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	%rdi, %r14
	leaq	4(%rdi), %r15
	movl	(%rdi), %edi
	callq	_uart_lock
	movq	_AML_UART_STATUS_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_uart_getreg
	movl	%eax, %r12d
	movq	_AML_UART_CONTROL_REG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_uart_getreg
	movq	_AML_UART_STATUS_RX_FIFO_OVERFLOW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	andl	%r12d, %r13d
	je	LBB0_2
## %bb.1:
	movq	_SER_INT_OVERRUN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
LBB0_2:
	movq	_AML_UART_STATUS_TX_FIFO_EMPTY@GOTPCREL(%rip), %rcx
	testl	%r12d, (%rcx)
	je	LBB0_5
## %bb.3:
	movq	_AML_UART_CONTROL_TX_INT_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_5
## %bb.4:
	movq	_SER_INT_TXIDLE@GOTPCREL(%rip), %rdx
	orl	(%rdx), %r13d
	notl	%ecx
	andl	%ecx, %eax
	movl	(%rbx), %esi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_uart_setreg
	movq	%r15, %rdi
	callq	_uart_barrier
LBB0_5:
	movq	_AML_UART_STATUS_RX_FIFO_EMPTY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	movl	(%rax), %eax
	andl	%r12d, %eax
	jne	LBB0_7
## %bb.6:
	movq	_SER_INT_RXREADY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_7:
	orl	%r13d, %ebx
	movl	(%r14), %edi
	callq	_uart_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AML_UART_STATUS_REG,4,2        ## @AML_UART_STATUS_REG
	.comm	_AML_UART_CONTROL_REG,4,2       ## @AML_UART_CONTROL_REG
	.comm	_AML_UART_STATUS_RX_FIFO_OVERFLOW,4,2 ## @AML_UART_STATUS_RX_FIFO_OVERFLOW
	.comm	_SER_INT_OVERRUN,4,2            ## @SER_INT_OVERRUN
	.comm	_AML_UART_STATUS_TX_FIFO_EMPTY,4,2 ## @AML_UART_STATUS_TX_FIFO_EMPTY
	.comm	_AML_UART_CONTROL_TX_INT_EN,4,2 ## @AML_UART_CONTROL_TX_INT_EN
	.comm	_SER_INT_TXIDLE,4,2             ## @SER_INT_TXIDLE
	.comm	_AML_UART_STATUS_RX_FIFO_EMPTY,4,2 ## @AML_UART_STATUS_RX_FIFO_EMPTY
	.comm	_SER_INT_RXREADY,4,2            ## @SER_INT_RXREADY
	.no_dead_strip	_aml8726_uart_bus_ipend
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aml8726_uart_bus_ipend
_aml8726_uart_bus_ipend:                ; @aml8726_uart_bus_ipend
	.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
	mov	x19, x0
	mov	x20, x0
	ldr	w0, [x20], #4
	bl	_uart_lock
Lloh0:
	adrp	x8, _AML_UART_STATUS_REG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AML_UART_STATUS_REG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_uart_getreg
	mov	x21, x0
Lloh3:
	adrp	x23, _AML_UART_CONTROL_REG@GOTPAGE
Lloh4:
	ldr	x23, [x23, _AML_UART_CONTROL_REG@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_uart_getreg
Lloh5:
	adrp	x8, _AML_UART_STATUS_RX_FIFO_OVERFLOW@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AML_UART_STATUS_RX_FIFO_OVERFLOW@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _SER_INT_OVERRUN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SER_INT_OVERRUN@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w8, w21
	csel	w22, wzr, w9, eq
Lloh11:
	adrp	x8, _AML_UART_STATUS_TX_FIFO_EMPTY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AML_UART_STATUS_TX_FIFO_EMPTY@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_3
; %bb.1:
Lloh14:
	adrp	x8, _AML_UART_CONTROL_TX_INT_EN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AML_UART_CONTROL_TX_INT_EN@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.2:
Lloh17:
	adrp	x9, _SER_INT_TXIDLE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _SER_INT_TXIDLE@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w22, w9, w22
	bic	w2, w0, w8
	ldr	w1, [x23]
	mov	x0, x20
	bl	_uart_setreg
	mov	x0, x20
	bl	_uart_barrier
LBB0_3:
Lloh20:
	adrp	x8, _AML_UART_STATUS_RX_FIFO_EMPTY@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AML_UART_STATUS_RX_FIFO_EMPTY@GOTPAGEOFF]
Lloh22:
	adrp	x9, _SER_INT_RXREADY@GOTPAGE
Lloh23:
	ldr	x9, [x9, _SER_INT_RXREADY@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	ldr	w9, [x9]
	tst	w8, w21
	csel	w8, w9, wzr, eq
	orr	w20, w8, w22
	ldr	w0, [x19]
	bl	_uart_unlock
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_AML_UART_STATUS_REG,4,2        ; @AML_UART_STATUS_REG
	.comm	_AML_UART_CONTROL_REG,4,2       ; @AML_UART_CONTROL_REG
	.comm	_AML_UART_STATUS_RX_FIFO_OVERFLOW,4,2 ; @AML_UART_STATUS_RX_FIFO_OVERFLOW
	.comm	_SER_INT_OVERRUN,4,2            ; @SER_INT_OVERRUN
	.comm	_AML_UART_STATUS_TX_FIFO_EMPTY,4,2 ; @AML_UART_STATUS_TX_FIFO_EMPTY
	.comm	_AML_UART_CONTROL_TX_INT_EN,4,2 ; @AML_UART_CONTROL_TX_INT_EN
	.comm	_SER_INT_TXIDLE,4,2             ; @SER_INT_TXIDLE
	.comm	_AML_UART_STATUS_RX_FIFO_EMPTY,4,2 ; @AML_UART_STATUS_RX_FIFO_EMPTY
	.comm	_SER_INT_RXREADY,4,2            ; @SER_INT_RXREADY
	.no_dead_strip	_aml8726_uart_bus_ipend
.subsections_via_symbols
