	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sata_pmp_read_gscr
_sata_pmp_read_gscr:                    ## @sata_pmp_read_gscr
	.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	%rsi, %r12
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	leaq	_sata_pmp_read_gscr.gscr_to_read(%rip), %r14
	movq	%r14, %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	movq	%r14, %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%r15), %r13
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	(%r12,%r13,4), %rdx
	movl	%r13d, %esi
	callq	_sata_pmp_read
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movq	%r14, %rdi
	callq	_ARRAY_SIZE
	cltq
	addq	$4, %r15
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_5:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_6:
	movq	_KERN_ERR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %ecx
	movl	%eax, %r8d
	callq	_ata_dev_printk
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @sata_pmp_read_gscr.gscr_to_read
_sata_pmp_read_gscr.gscr_to_read:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	32                              ## 0x20
	.long	33                              ## 0x21
	.long	64                              ## 0x40
	.long	96                              ## 0x60

	.comm	_KERN_ERR,4,2                   ## @KERN_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to read PMP GSCR[%d] (Emask=0x%x)\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_sata_pmp_read_gscr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sata_pmp_read_gscr
_sata_pmp_read_gscr:                    ; @sata_pmp_read_gscr
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _sata_pmp_read_gscr.gscr_to_read@PAGE
Lloh1:
	add	x21, x21, _sata_pmp_read_gscr.gscr_to_read@PAGEOFF
	mov	x0, x21
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x23, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x22, [x21, x23, lsl #2]
	ldr	w0, [x19]
	add	x2, x20, x22, lsl #2
	mov	x1, x22
	bl	_sata_pmp_read
	cbnz	w0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x23, #1
	mov	x0, x21
	bl	_ARRAY_SIZE
	cmp	x23, w0, sxtw
	b.lt	LBB0_2
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	mov	x4, x0
Lloh2:
	adrp	x8, _KERN_ERR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _KERN_ERR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x22
	bl	_ata_dev_printk
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @sata_pmp_read_gscr.gscr_to_read
_sata_pmp_read_gscr.gscr_to_read:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	32                              ; 0x20
	.long	33                              ; 0x21
	.long	64                              ; 0x40
	.long	96                              ; 0x60

	.comm	_KERN_ERR,4,2                   ; @KERN_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to read PMP GSCR[%d] (Emask=0x%x)\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_sata_pmp_read_gscr
.subsections_via_symbols
