	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun8i_sid_register_readout
_sun8i_sid_register_readout:            ## @sun8i_sid_register_readout
	.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
	movl	%esi, %ebx
	movq	_SUN8I_SID_OFFSET_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	_SUN8I_SID_OFFSET_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	movq	%rdx, %r14
	movq	%rdi, %r15
	movq	_SUN8I_SID_OP_LOCK@GOTPCREL(%rip), %rax
	movq	_SUN8I_SID_READ@GOTPCREL(%rip), %r13
	orl	(%rax), %ebx
	orl	(%r13), %ebx
	movq	_SUN8I_SID_PRCTL@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	(%rdi), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	(%r12), %rdi
	addq	(%r15), %rdi
	xorl	%edx, %edx
	movl	(%r13), %eax
	andl	%ebx, %eax
	sete	%dl
	movl	%ebx, %esi
	movl	$100, %ecx
	movl	$250000, %r8d                   ## imm = 0x3D090
	callq	_readl_poll_timeout
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	testq	%r14, %r14
	je	LBB0_3
## %bb.2:
	movq	_SUN8I_SID_RDKEY@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r15), %rdi
	callq	_readl
	movl	%eax, (%r14)
LBB0_3:
	movq	(%r12), %rsi
	addq	(%r15), %rsi
	xorl	%edi, %edi
	callq	_writel
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SUN8I_SID_OFFSET_MASK,4,2      ## @SUN8I_SID_OFFSET_MASK
	.comm	_SUN8I_SID_OFFSET_SHIFT,4,2     ## @SUN8I_SID_OFFSET_SHIFT
	.comm	_SUN8I_SID_OP_LOCK,4,2          ## @SUN8I_SID_OP_LOCK
	.comm	_SUN8I_SID_READ,4,2             ## @SUN8I_SID_READ
	.comm	_SUN8I_SID_PRCTL,8,3            ## @SUN8I_SID_PRCTL
	.comm	_SUN8I_SID_RDKEY,8,3            ## @SUN8I_SID_RDKEY
	.no_dead_strip	_sun8i_sid_register_readout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun8i_sid_register_readout
_sun8i_sid_register_readout:            ; @sun8i_sid_register_readout
	.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	x20, x2
	mov	x19, x0
Lloh0:
	adrp	x8, _SUN8I_SID_OFFSET_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SUN8I_SID_OFFSET_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w1
Lloh3:
	adrp	x9, _SUN8I_SID_OFFSET_SHIFT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SUN8I_SID_OFFSET_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _SUN8I_SID_OP_LOCK@GOTPAGE
Lloh7:
	ldr	x10, [x10, _SUN8I_SID_OP_LOCK@GOTPAGEOFF]
	lsl	w8, w8, w9
Lloh8:
	ldr	w9, [x10]
Lloh9:
	adrp	x23, _SUN8I_SID_READ@GOTPAGE
Lloh10:
	ldr	x23, [x23, _SUN8I_SID_READ@GOTPAGEOFF]
	ldr	w10, [x23]
	orr	w8, w8, w9
	orr	w21, w8, w10
	ldr	x8, [x0]
Lloh11:
	adrp	x22, _SUN8I_SID_PRCTL@GOTPAGE
Lloh12:
	ldr	x22, [x22, _SUN8I_SID_PRCTL@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x0, x9, x8
	ldr	w8, [x23]
	tst	w8, w21
	cset	w2, eq
	mov	x1, x21
	mov	w3, #100
	mov	w4, #53392
	movk	w4, #3, lsl #16
	bl	_readl_poll_timeout
	mov	x21, x0
	cbnz	w0, LBB0_4
; %bb.1:
	cbz	x20, LBB0_3
; %bb.2:
	ldr	x8, [x19]
Lloh13:
	adrp	x9, _SUN8I_SID_RDKEY@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SUN8I_SID_RDKEY@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	str	w0, [x20]
LBB0_3:
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
LBB0_4:
	mov	x0, x21
	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 AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_SUN8I_SID_OFFSET_MASK,4,2      ; @SUN8I_SID_OFFSET_MASK
	.comm	_SUN8I_SID_OFFSET_SHIFT,4,2     ; @SUN8I_SID_OFFSET_SHIFT
	.comm	_SUN8I_SID_OP_LOCK,4,2          ; @SUN8I_SID_OP_LOCK
	.comm	_SUN8I_SID_READ,4,2             ; @SUN8I_SID_READ
	.comm	_SUN8I_SID_PRCTL,8,3            ; @SUN8I_SID_PRCTL
	.comm	_SUN8I_SID_RDKEY,8,3            ; @SUN8I_SID_RDKEY
	.no_dead_strip	_sun8i_sid_register_readout
.subsections_via_symbols
