	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function siw_fastreg_mr
_siw_fastreg_mr:                        ## @siw_fastreg_mr
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	8(%rsi), %r12
	movl	(%rdi), %edi
	callq	_to_siw_dev
	movl	(%rbx), %esi
	sarl	$8, %esi
	movq	%rax, %rdi
	callq	_siw_mem_id2obj
	movq	%rax, %r14
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_siw_dbg_pd
	testq	%r14, %r14
	sete	%al
	testq	%r12, %r12
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_2:
	movl	(%rbx), %eax
	xorl	(%r12), %eax
	xorl	%edi, %edi
	cmpl	$256, %eax                      ## imm = 0x100
	setae	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%rbx), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
LBB0_8:
	xorl	%eax, %eax
	callq	_pr_warn
	jmp	LBB0_9
LBB0_4:
	xorl	%edi, %edi
	cmpq	%r15, 16(%r14)
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_warn
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_11:
	movq	%r14, %rdi
	callq	_siw_mem_put
LBB0_12:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%r14), %edi
	callq	_unlikely
	movl	(%rbx), %edx
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	leaq	L_.str.4(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%edx, %esi
	jmp	LBB0_8
LBB0_10:
	movl	%edx, 4(%r14)
	movl	4(%rbx), %eax
	movl	%eax, 12(%r14)
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	callq	_siw_dbg_mem
	movl	4(%r12), %eax
	movl	%eax, 8(%r14)
	movl	$1, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"STag 0x%08x\n"

L_.str.1:                               ## @.str.1
	.asciz	"siw: fastreg: STag 0x%08x unknown\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"siw: fastreg: STag 0x%08x: bad MR\n"

L_.str.3:                               ## @.str.3
	.asciz	"siw: fastreg: PD mismatch\n"

L_.str.4:                               ## @.str.4
	.asciz	"siw: fastreg: STag 0x%08x already valid\n"

L_.str.5:                               ## @.str.5
	.asciz	"STag 0x%08x now valid\n"

	.no_dead_strip	_siw_fastreg_mr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function siw_fastreg_mr
_siw_fastreg_mr:                        ; @siw_fastreg_mr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x1
	mov	x21, x0
	ldr	x22, [x1, #8]
	ldr	w0, [x0]
	bl	_to_siw_dev
	ldr	w8, [x20]
	asr	w1, w8, #8
	bl	_siw_mem_id2obj
	mov	x19, x0
	ldr	w2, [x20]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_siw_dbg_pd
	cmp	x19, #0
	ccmp	x22, #0, #4, ne
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w8, [x20]
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_warn
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_10
LBB0_2:
	ldr	w8, [x22]
	ldr	w9, [x20]
	eor	w8, w9, w8
	cmp	w8, #255
	cset	w0, hi
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w8, [x20]
	str	x8, [sp]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_4:
	ldr	x8, [x19, #16]
	cmp	x8, x21
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_6
; %bb.5:
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_8
LBB0_6:
	ldr	w0, [x19]
	bl	_unlikely
	ldr	w2, [x20]
	cbz	x0, LBB0_11
; %bb.7:
	str	x2, [sp]
Lloh11:
	adrp	x0, l_.str.4@PAGE
Lloh12:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_8:
	bl	_pr_warn
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_9:
	mov	x0, x19
	bl	_siw_mem_put
LBB0_10:
	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
	add	sp, sp, #64
	ret
LBB0_11:
	str	w2, [x19, #4]
	ldr	w8, [x20, #4]
	str	w8, [x19, #12]
Lloh16:
	adrp	x1, l_.str.5@PAGE
Lloh17:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_siw_dbg_mem
	mov	w20, #0
	ldr	w8, [x22, #4]
	str	w8, [x19, #8]
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_9
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"STag 0x%08x\n"

l_.str.1:                               ; @.str.1
	.asciz	"siw: fastreg: STag 0x%08x unknown\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"siw: fastreg: STag 0x%08x: bad MR\n"

l_.str.3:                               ; @.str.3
	.asciz	"siw: fastreg: PD mismatch\n"

l_.str.4:                               ; @.str.4
	.asciz	"siw: fastreg: STag 0x%08x already valid\n"

l_.str.5:                               ; @.str.5
	.asciz	"STag 0x%08x now valid\n"

	.no_dead_strip	_siw_fastreg_mr
.subsections_via_symbols
