	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_partition_keys
_set_partition_keys:                    ## @set_partition_keys
	.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	%rdi, %r14
	movq	8(%rdi), %r15
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dd_dev_info
	movq	%r15, %rdi
	callq	_hfi1_get_npkeys
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	xorl	%r12d, %r12d
	movl	$-6, %r13d
	xorl	%eax, %eax
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r12
	movq	%r15, %rdi
	callq	_hfi1_get_npkeys
	movslq	%eax, %rcx
	addl	$2, %r13d
	movl	%ebx, %eax
	cmpq	%rcx, %r12
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rcx
	movq	_RCV_PARTITION_KEY_PARTITION_KEY_A_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	andl	(%rcx,%r12,4), %ebx
	movl	%r12d, %edx
	andl	$3, %edx
	movq	_RCV_PARTITION_KEY_PARTITION_KEY_B_SHIFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	imull	%edx, %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	orl	%eax, %ebx
	cmpl	$3, %edx
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r13d, %rsi
	movq	_RCV_PARTITION_KEY@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_write_csr
	xorl	%ebx, %ebx
	jmp	LBB0_4
LBB0_5:
	movq	_RCV_CTRL_RCV_PARTITION_KEY_ENABLE_SMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_add_rcvctrl                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Setting partition keys\n"

	.comm	_RCV_PARTITION_KEY_PARTITION_KEY_A_MASK,4,2 ## @RCV_PARTITION_KEY_PARTITION_KEY_A_MASK
	.comm	_RCV_PARTITION_KEY_PARTITION_KEY_B_SHIFT,4,2 ## @RCV_PARTITION_KEY_PARTITION_KEY_B_SHIFT
	.comm	_RCV_PARTITION_KEY,8,3          ## @RCV_PARTITION_KEY
	.comm	_RCV_CTRL_RCV_PARTITION_KEY_ENABLE_SMASK,4,2 ## @RCV_CTRL_RCV_PARTITION_KEY_ENABLE_SMASK
	.no_dead_strip	_set_partition_keys
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_partition_keys
_set_partition_keys:                    ; @set_partition_keys
	.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	x20, x0
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dd_dev_info
	mov	x0, x19
	bl	_hfi1_get_npkeys
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x22, #0
	mov	w21, #0
	mov	w23, #-6
Lloh2:
	adrp	x24, _RCV_PARTITION_KEY_PARTITION_KEY_A_MASK@GOTPAGE
Lloh3:
	ldr	x24, [x24, _RCV_PARTITION_KEY_PARTITION_KEY_A_MASK@GOTPAGEOFF]
Lloh4:
	adrp	x25, _RCV_PARTITION_KEY_PARTITION_KEY_B_SHIFT@GOTPAGE
Lloh5:
	ldr	x25, [x25, _RCV_PARTITION_KEY_PARTITION_KEY_B_SHIFT@GOTPAGEOFF]
Lloh6:
	adrp	x26, _RCV_PARTITION_KEY@GOTPAGE
Lloh7:
	ldr	x26, [x26, _RCV_PARTITION_KEY@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	mov	x0, x19
	bl	_hfi1_get_npkeys
	add	w23, w23, #2
	cmp	x22, w0, sxtw
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	w8, [x8, x22, lsl #2]
	ldr	w9, [x24]
	and	w8, w9, w8
	and	w9, w22, #0x3
	ldr	w10, [x25]
	mul	w10, w10, w9
	lsl	w8, w8, w10
	orr	w21, w8, w21
	cmp	w9, #3
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x26]
	add	x1, x8, w23, sxtw
	mov	x0, x19
	mov	x2, x21
	bl	_write_csr
	mov	w21, #0
	b	LBB0_2
LBB0_5:
Lloh8:
	adrp	x8, _RCV_CTRL_RCV_PARTITION_KEY_ENABLE_SMASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RCV_CTRL_RCV_PARTITION_KEY_ENABLE_SMASK@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	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
	b	_add_rcvctrl
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Setting partition keys\n"

	.comm	_RCV_PARTITION_KEY_PARTITION_KEY_A_MASK,4,2 ; @RCV_PARTITION_KEY_PARTITION_KEY_A_MASK
	.comm	_RCV_PARTITION_KEY_PARTITION_KEY_B_SHIFT,4,2 ; @RCV_PARTITION_KEY_PARTITION_KEY_B_SHIFT
	.comm	_RCV_PARTITION_KEY,8,3          ; @RCV_PARTITION_KEY
	.comm	_RCV_CTRL_RCV_PARTITION_KEY_ENABLE_SMASK,4,2 ; @RCV_CTRL_RCV_PARTITION_KEY_ENABLE_SMASK
	.no_dead_strip	_set_partition_keys
.subsections_via_symbols
