	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ssbi_read_bytes
_ssbi_read_bytes:                       ## @ssbi_read_bytes
	.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	%ecx, %r12d
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r13
	movq	_SSBI_CMD_RDWRN@GOTPCREL(%rip), %rax
	movzbl	%bl, %r15d
	shll	$16, %r15d
	orl	(%rax), %r15d
	movq	(%rdi), %rax
	movq	_MSM_SBI_CTRL_SSBI2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_SSBI2_MODE2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_ssbi_readl
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_SET_SSBI_MODE2_REG_ADDR_15_8
	movq	_SSBI2_MODE2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_ssbi_writel
LBB0_2:
	testl	%r12d, %r12d
	je	LBB0_7
## %bb.3:
	movl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_SSBI_STATUS_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_ssbi_wait_mask
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_SSBI2_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_ssbi_writel
	movq	_SSBI_STATUS_RD_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_ssbi_wait_mask
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_SSBI2_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_ssbi_readl
	movzbl	%al, %eax
	movl	%eax, (%r14,%rbx,4)
	incq	%rbx
	cmpl	%ebx, %r12d
	jne	LBB0_4
LBB0_7:
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SSBI_CMD_RDWRN,4,2             ## @SSBI_CMD_RDWRN
	.comm	_MSM_SBI_CTRL_SSBI2,8,3         ## @MSM_SBI_CTRL_SSBI2
	.comm	_SSBI2_MODE2,4,2                ## @SSBI2_MODE2
	.comm	_SSBI_STATUS_READY,4,2          ## @SSBI_STATUS_READY
	.comm	_SSBI2_CMD,4,2                  ## @SSBI2_CMD
	.comm	_SSBI_STATUS_RD_READY,4,2       ## @SSBI_STATUS_RD_READY
	.comm	_SSBI2_RD,4,2                   ## @SSBI2_RD
	.no_dead_strip	_ssbi_read_bytes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ssbi_read_bytes
_ssbi_read_bytes:                       ; @ssbi_read_bytes
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _SSBI_CMD_RDWRN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SSBI_CMD_RDWRN@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _MSM_SBI_CTRL_SSBI2@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MSM_SBI_CTRL_SSBI2@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x24, _SSBI2_MODE2@GOTPAGE
Lloh7:
	ldr	x24, [x24, _SSBI2_MODE2@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x21
	bl	_ssbi_readl
	mov	x1, x22
	bl	_SET_SSBI_MODE2_REG_ADDR_15_8
	mov	x1, x0
	ldr	w2, [x24]
	mov	x0, x21
	bl	_ssbi_writel
LBB0_2:
	cbz	w19, LBB0_7
; %bb.3:
	ubfiz	w8, w22, #16, #8
	orr	w22, w23, w8
Lloh8:
	adrp	x23, _SSBI_STATUS_READY@GOTPAGE
Lloh9:
	ldr	x23, [x23, _SSBI_STATUS_READY@GOTPAGEOFF]
Lloh10:
	adrp	x24, _SSBI2_CMD@GOTPAGE
Lloh11:
	ldr	x24, [x24, _SSBI2_CMD@GOTPAGEOFF]
Lloh12:
	adrp	x25, _SSBI_STATUS_RD_READY@GOTPAGE
Lloh13:
	ldr	x25, [x25, _SSBI_STATUS_RD_READY@GOTPAGEOFF]
Lloh14:
	adrp	x26, _SSBI2_RD@GOTPAGE
Lloh15:
	ldr	x26, [x26, _SSBI2_RD@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x21
	mov	w2, #0
	bl	_ssbi_wait_mask
	cbnz	w0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w2, [x24]
	mov	x0, x21
	mov	x1, x22
	bl	_ssbi_writel
	ldr	w1, [x25]
	mov	x0, x21
	mov	w2, #0
	bl	_ssbi_wait_mask
	cbnz	w0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x26]
	mov	x0, x21
	bl	_ssbi_readl
	and	w8, w0, #0xff
	str	w8, [x20], #4
	subs	w19, w19, #1
	b.ne	LBB0_4
LBB0_7:
	mov	w0, #0
LBB0_8:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_SSBI_CMD_RDWRN,4,2             ; @SSBI_CMD_RDWRN
	.comm	_MSM_SBI_CTRL_SSBI2,8,3         ; @MSM_SBI_CTRL_SSBI2
	.comm	_SSBI2_MODE2,4,2                ; @SSBI2_MODE2
	.comm	_SSBI_STATUS_READY,4,2          ; @SSBI_STATUS_READY
	.comm	_SSBI2_CMD,4,2                  ; @SSBI2_CMD
	.comm	_SSBI_STATUS_RD_READY,4,2       ; @SSBI_STATUS_RD_READY
	.comm	_SSBI2_RD,4,2                   ; @SSBI2_RD
	.no_dead_strip	_ssbi_read_bytes
.subsections_via_symbols
