	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sunxi_ir_irq
_sunxi_ir_irq:                          ## @sunxi_ir_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	$0, -48(%rbp)
	leaq	4(%rsi), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_spin_lock
	movq	_SUNXI_IR_RXSTA_REG@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	16(%rbx), %rdi
	callq	_readl
	movq	%rax, %r15
	movq	_REG_RXSTA_CLEARALL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	orq	%r15, %rdi
	movq	(%r14), %rsi
	addq	16(%rbx), %rsi
	callq	_writel
	movq	_REG_RXSTA_RA@GOTPCREL(%rip), %rax
	movq	_REG_RXSTA_RPE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orq	(%rax), %rcx
	testq	%r15, %rcx
	je	LBB0_4
## %bb.1:
	movq	%r15, %rdi
	callq	_REG_RXSTA_GET_AC
	movl	(%rbx), %r13d
	cmpl	%r13d, %eax
	cmovbl	%eax, %r13d
	testl	%r13d, %r13d
	je	LBB0_4
## %bb.2:
	movq	_SUNXI_IR_RXFIFO_REG@GOTPCREL(%rip), %r14
	leaq	-48(%rbp), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	addq	16(%rbx), %rdi
	callq	_readb
	movl	%eax, %ecx
	shrb	$7, %al
	movzbl	%al, %eax
	movl	%eax, -48(%rbp)
	andb	$127, %cl
	incb	%cl
	movq	8(%rbx), %rdi
	movzbl	(%rdi), %eax
	mulb	%cl
	movb	%al, -44(%rbp)
	movq	%r12, %rsi
	callq	_ir_raw_event_store_with_filter
	decl	%r13d
	jne	LBB0_3
LBB0_4:
	movq	_REG_RXSTA_ROI@GOTPCREL(%rip), %rax
	testq	%r15, (%rax)
	je	LBB0_6
## %bb.5:
	movq	8(%rbx), %rdi
	callq	_ir_raw_event_reset
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_8
LBB0_6:
	movq	_REG_RXSTA_RPE@GOTPCREL(%rip), %rax
	testq	%r15, (%rax)
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_8
## %bb.7:
	movq	8(%rbx), %rdi
	movl	$1, %esi
	callq	_ir_raw_event_set_idle
	movq	8(%rbx), %rdi
	callq	_ir_raw_event_handle
LBB0_8:
	movq	%r14, %rdi
	callq	_spin_unlock
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SUNXI_IR_RXSTA_REG,8,3         ## @SUNXI_IR_RXSTA_REG
	.comm	_REG_RXSTA_CLEARALL,8,3         ## @REG_RXSTA_CLEARALL
	.comm	_REG_RXSTA_RA,8,3               ## @REG_RXSTA_RA
	.comm	_REG_RXSTA_RPE,8,3              ## @REG_RXSTA_RPE
	.comm	_SUNXI_IR_RXFIFO_REG,8,3        ## @SUNXI_IR_RXFIFO_REG
	.comm	_REG_RXSTA_ROI,8,3              ## @REG_RXSTA_ROI
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_sunxi_ir_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sunxi_ir_irq
_sunxi_ir_irq:                          ; @sunxi_ir_irq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x1
	str	xzr, [sp, #8]
	add	x19, x1, #4
	mov	x0, x19
	bl	_spin_lock
	ldr	x8, [x20, #16]
Lloh0:
	adrp	x22, _SUNXI_IR_RXSTA_REG@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SUNXI_IR_RXSTA_REG@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
Lloh2:
	adrp	x8, _REG_RXSTA_CLEARALL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _REG_RXSTA_CLEARALL@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	orr	x0, x8, x0
	ldr	x8, [x20, #16]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writel
Lloh5:
	adrp	x8, _REG_RXSTA_RA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _REG_RXSTA_RA@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	adrp	x22, _REG_RXSTA_RPE@GOTPAGE
Lloh9:
	ldr	x22, [x22, _REG_RXSTA_RPE@GOTPAGEOFF]
	ldr	x9, [x22]
	orr	x8, x9, x8
	tst	x8, x21
	b.eq	LBB0_4
; %bb.1:
	mov	x0, x21
	bl	_REG_RXSTA_GET_AC
	ldr	w8, [x20]
	cmp	w0, w8
	csel	w23, w0, w8, lo
	cbz	w23, LBB0_4
; %bb.2:
Lloh10:
	adrp	x24, _SUNXI_IR_RXFIFO_REG@GOTPAGE
Lloh11:
	ldr	x24, [x24, _SUNXI_IR_RXFIFO_REG@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #16]
	ldr	x9, [x24]
	add	x0, x9, x8
	bl	_readb
	lsr	w8, w0, #7
	str	w8, [sp, #8]
	and	w8, w0, #0x7f
	ldr	x0, [x20, #8]
	ldrb	w9, [x0]
	madd	w8, w9, w8, w9
	strb	w8, [sp, #12]
	add	x1, sp, #8
	bl	_ir_raw_event_store_with_filter
	subs	w23, w23, #1
	b.ne	LBB0_3
LBB0_4:
Lloh12:
	adrp	x8, _REG_RXSTA_ROI@GOTPAGE
Lloh13:
	ldr	x8, [x8, _REG_RXSTA_ROI@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	tst	x8, x21
	b.eq	LBB0_6
; %bb.5:
	ldr	x0, [x20, #8]
	bl	_ir_raw_event_reset
	b	LBB0_8
LBB0_6:
	ldr	x8, [x22]
	tst	x8, x21
	b.eq	LBB0_8
; %bb.7:
	ldr	x0, [x20, #8]
	mov	w1, #1
	bl	_ir_raw_event_set_idle
	ldr	x0, [x20, #8]
	bl	_ir_raw_event_handle
LBB0_8:
	mov	x0, x19
	bl	_spin_unlock
Lloh15:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_SUNXI_IR_RXSTA_REG,8,3         ; @SUNXI_IR_RXSTA_REG
	.comm	_REG_RXSTA_CLEARALL,8,3         ; @REG_RXSTA_CLEARALL
	.comm	_REG_RXSTA_RA,8,3               ; @REG_RXSTA_RA
	.comm	_REG_RXSTA_RPE,8,3              ; @REG_RXSTA_RPE
	.comm	_SUNXI_IR_RXFIFO_REG,8,3        ; @SUNXI_IR_RXFIFO_REG
	.comm	_REG_RXSTA_ROI,8,3              ; @REG_RXSTA_ROI
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_sunxi_ir_irq
.subsections_via_symbols
