	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pma_set_portsamplescontrol
_pma_set_portsamplescontrol:            ## @pma_set_portsamplescontrol
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	16(%rdi), %r12
	movq	%rsi, %rdi
	callq	_to_idev
	movq	%rax, %rdi
	callq	_dd_from_dev
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_to_iport
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_ppd_from_ibp
	cmpq	$0, (%rbx)
	jne	LBB0_7
## %bb.1:
	cmpq	%r14, (%r12)
	jne	LBB0_7
## %bb.2:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movq	%rax, %r12
	callq	_spin_lock_irqsave
	movq	(%r12), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_IB_PMA_CONG_HW_CONTROL_SAMPLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
	movq	_QIBPORTCNTR_PSSTAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	callq	*(%rax)
	movq	_IB_PMA_SAMPLE_STATUS_DONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.3:
	movq	_IB_PMA_SAMPLE_STATUS_RUNNING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.4:
	movq	_IB_PMA_CONG_HW_CONTROL_TIMER@GOTPCREL(%rip), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	(%rax), %rcx
	jne	LBB0_6
LBB0_5:
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movl	24(%r12), %edi
	callq	_be32_to_cpu
	movq	%rax, 8(%r13)
	movl	20(%r12), %edi
	callq	_be32_to_cpu
	movq	%rax, 16(%r13)
	movl	16(%r12), %edi
	callq	_be16_to_cpu
	movl	%eax, 32(%r13)
	movq	8(%r12), %rax
	movl	(%rax), %ecx
	movq	24(%r13), %rdx
	movl	%ecx, (%rdx)
	movl	4(%rax), %ecx
	movl	%ecx, 4(%rdx)
	movl	8(%rax), %ecx
	movl	%ecx, 8(%rdx)
	movl	12(%rax), %ecx
	movl	%ecx, 12(%rdx)
	movl	16(%rax), %eax
	movl	%eax, 16(%rdx)
	movq	8(%r13), %rdx
	movq	16(%r13), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	callq	*8(%rax)
LBB0_6:
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pma_get_portsamplescontrol     ## TAILCALL
LBB0_7:
	movq	_IB_SMP_INVALID_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%rbx)
	movq	%rbx, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_reply                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_SMP_INVALID_FIELD,4,2       ## @IB_SMP_INVALID_FIELD
	.comm	_IB_PMA_CONG_HW_CONTROL_SAMPLE,8,3 ## @IB_PMA_CONG_HW_CONTROL_SAMPLE
	.comm	_QIBPORTCNTR_PSSTAT,4,2         ## @QIBPORTCNTR_PSSTAT
	.comm	_IB_PMA_SAMPLE_STATUS_DONE,8,3  ## @IB_PMA_SAMPLE_STATUS_DONE
	.comm	_IB_PMA_SAMPLE_STATUS_RUNNING,8,3 ## @IB_PMA_SAMPLE_STATUS_RUNNING
	.comm	_IB_PMA_CONG_HW_CONTROL_TIMER,8,3 ## @IB_PMA_CONG_HW_CONTROL_TIMER
	.no_dead_strip	_pma_set_portsamplescontrol
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pma_set_portsamplescontrol
_pma_set_portsamplescontrol:            ; @pma_set_portsamplescontrol
	.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, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x25, [x0, #16]
	mov	x0, x1
	bl	_to_idev
	bl	_dd_from_dev
	mov	x23, x0
	mov	x0, x21
	mov	x1, x20
	bl	_to_iport
	mov	x22, x0
	bl	_ppd_from_ibp
	ldr	x8, [x19]
	cbnz	x8, LBB0_6
; %bb.1:
	ldr	x8, [x25]
	cmp	x8, x20
	b.ne	LBB0_6
; %bb.2:
	mov	x24, x0
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	x26, [x24]
Lloh0:
	adrp	x8, _IB_PMA_CONG_HW_CONTROL_SAMPLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_PMA_CONG_HW_CONTROL_SAMPLE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [x24]
	ldr	x8, [x23]
Lloh3:
	adrp	x9, _QIBPORTCNTR_PSSTAT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _QIBPORTCNTR_PSSTAT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x9]
	mov	x0, x24
	blr	x8
Lloh6:
	adrp	x8, _IB_PMA_SAMPLE_STATUS_DONE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IB_PMA_SAMPLE_STATUS_DONE@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _IB_PMA_SAMPLE_STATUS_RUNNING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IB_PMA_SAMPLE_STATUS_RUNNING@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
Lloh12:
	adrp	x9, _IB_PMA_CONG_HW_CONTROL_TIMER@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IB_PMA_CONG_HW_CONTROL_TIMER@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x0, x8
	ccmp	x26, x9, #0, eq
	b.ne	LBB0_5
LBB0_4:
	ldr	w0, [x25, #24]
	bl	_be32_to_cpu
	str	x0, [x22, #8]
	ldr	w0, [x25, #20]
	bl	_be32_to_cpu
	str	x0, [x22, #16]
	ldr	w0, [x25, #16]
	bl	_be16_to_cpu
	str	w0, [x22, #32]
	ldr	x8, [x25, #8]
	ldr	w9, [x8]
	ldr	x10, [x22, #24]
	str	w9, [x10]
	ldr	w9, [x8, #4]
	str	w9, [x10, #4]
	ldr	w9, [x8, #8]
	str	w9, [x10, #8]
	ldr	w9, [x8, #12]
	str	w9, [x10, #12]
	ldr	w8, [x8, #16]
	str	w8, [x10, #16]
	ldr	x8, [x23, #8]
	ldp	x2, x1, [x22, #8]
	mov	x0, x24
	blr	x8
LBB0_5:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	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	_pma_get_portsamplescontrol
LBB0_6:
Lloh15:
	adrp	x8, _IB_SMP_INVALID_FIELD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IB_SMP_INVALID_FIELD@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	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	_reply
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_SMP_INVALID_FIELD,4,2       ; @IB_SMP_INVALID_FIELD
	.comm	_IB_PMA_CONG_HW_CONTROL_SAMPLE,8,3 ; @IB_PMA_CONG_HW_CONTROL_SAMPLE
	.comm	_QIBPORTCNTR_PSSTAT,4,2         ; @QIBPORTCNTR_PSSTAT
	.comm	_IB_PMA_SAMPLE_STATUS_DONE,8,3  ; @IB_PMA_SAMPLE_STATUS_DONE
	.comm	_IB_PMA_SAMPLE_STATUS_RUNNING,8,3 ; @IB_PMA_SAMPLE_STATUS_RUNNING
	.comm	_IB_PMA_CONG_HW_CONTROL_TIMER,8,3 ; @IB_PMA_CONG_HW_CONTROL_TIMER
	.no_dead_strip	_pma_set_portsamplescontrol
.subsections_via_symbols
