	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvrdma_modify_device           ## -- Begin function pvrdma_modify_device
	.p2align	4, 0x90
_pvrdma_modify_device:                  ## @pvrdma_modify_device
	.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	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	_IB_DEVICE_MODIFY_SYS_IMAGE_GUID@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	movq	_IB_DEVICE_MODIFY_NODE_DESC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %edx
	orl	%eax, %edx
	notl	%edx
	testl	%esi, %edx
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_to_vdev
	movq	16(%rax), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	callq	_dev_warn
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_2:
	testl	%r12d, %ecx
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	callq	_to_vdev
	leaq	8(%rax), %rdi
	callq	_spin_lock_irqsave
	movl	(%r15), %edi
	movl	4(%r14), %esi
	movl	$64, %edx
	callq	_memcpy
	movq	%r15, %rdi
	callq	_to_vdev
	leaq	8(%rax), %rdi
	callq	_spin_unlock_irqrestore
	movl	(%rbx), %eax
LBB0_4:
	xorl	%ebx, %ebx
	testl	%r12d, %eax
	je	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	callq	_to_vdev
	movq	%rax, %rdi
	callq	_mutex_lock
	movl	(%r14), %edi
	callq	_cpu_to_be64
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_to_vdev
	movl	%r14d, 4(%rax)
	movq	%r15, %rdi
	callq	_to_vdev
	movq	%rax, %rdi
	callq	_mutex_unlock
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_DEVICE_MODIFY_SYS_IMAGE_GUID,4,2 ## @IB_DEVICE_MODIFY_SYS_IMAGE_GUID
	.comm	_IB_DEVICE_MODIFY_NODE_DESC,4,2 ## @IB_DEVICE_MODIFY_NODE_DESC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unsupported device modify mask %#x\n"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvrdma_modify_device           ; -- Begin function pvrdma_modify_device
	.p2align	2
_pvrdma_modify_device:                  ; @pvrdma_modify_device
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _IB_DEVICE_MODIFY_SYS_IMAGE_GUID@GOTPAGE
Lloh1:
	ldr	x22, [x22, _IB_DEVICE_MODIFY_SYS_IMAGE_GUID@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh2:
	adrp	x9, _IB_DEVICE_MODIFY_NODE_DESC@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IB_DEVICE_MODIFY_NODE_DESC@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	orr	w10, w9, w8
	bics	wzr, w1, w10
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_to_vdev
	ldr	x0, [x0, #16]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_warn
Lloh7:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_2:
	mov	x20, x2
	tst	w9, w21
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_to_vdev
	add	x0, x0, #8
	bl	_spin_lock_irqsave
	ldr	w0, [x19]
	ldr	w1, [x20, #4]
	mov	w2, #64
	bl	_memcpy
	mov	x0, x19
	bl	_to_vdev
	add	x0, x0, #8
	bl	_spin_unlock_irqrestore
	ldr	w8, [x22]
LBB0_4:
	tst	w8, w21
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_to_vdev
	bl	_mutex_lock
	ldr	w0, [x20]
	bl	_cpu_to_be64
	mov	x20, x0
	mov	x0, x19
	bl	_to_vdev
	str	w20, [x0, #4]
	mov	x0, x19
	bl	_to_vdev
	bl	_mutex_unlock
LBB0_6:
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_DEVICE_MODIFY_SYS_IMAGE_GUID,4,2 ; @IB_DEVICE_MODIFY_SYS_IMAGE_GUID
	.comm	_IB_DEVICE_MODIFY_NODE_DESC,4,2 ; @IB_DEVICE_MODIFY_NODE_DESC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unsupported device modify mask %#x\n"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
.subsections_via_symbols
