	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_dev_port_cntr
_write_dev_port_cntr:                   ## @write_dev_port_cntr
	.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, %rbx
	movq	_CNTR_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rsi)
	je	LBB0_2
## %bb.1:
	movl	16(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dd_dev_err
	xorl	%r12d, %r12d
	jmp	LBB0_9
LBB0_2:
	movl	%r9d, %r12d
	movl	%r8d, %r15d
	movq	%rcx, %r13
	movq	%rdx, %r14
	movq	_CNTR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%rbx), %edx
	movl	(%r14), %r8d
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_hfi1_cdbg
	movq	_CNTR_SYNTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_6
## %bb.3:
	movl	%r12d, (%r14)
	movq	_CNTR_32BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	8(%rbx), %rax
	movq	_CNTR_MODE_W@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%edx, (%rbx)
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	%r15d, %edx
	callq	*%rax
	jmp	LBB0_8
LBB0_6:
	movq	_CNTR_MODE_W@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	%r15d, %edx
	movl	%r12d, %r8d
	callq	*8(%rbx)
	jmp	LBB0_7
LBB0_5:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	%r15d, %edx
	movl	%r12d, %r8d
	callq	*%rax
LBB0_7:
	movl	%eax, %r12d
LBB0_8:
	movq	_CNTR@GOTPCREL(%rip), %rax
	movl	%r12d, (%r14)
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_hfi1_cdbg
LBB0_9:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CNTR_DISABLED,4,2              ## @CNTR_DISABLED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Counter %s not enabled"

	.comm	_CNTR,4,2                       ## @CNTR
L_.str.1:                               ## @.str.1
	.asciz	"cntr: %s vl %d psval 0x%llx"

	.comm	_CNTR_SYNTH,4,2                 ## @CNTR_SYNTH
	.comm	_CNTR_32BIT,4,2                 ## @CNTR_32BIT
	.comm	_CNTR_MODE_W,4,2                ## @CNTR_MODE_W
L_.str.2:                               ## @.str.2
	.asciz	"\tNew val=0x%llx"

	.no_dead_strip	_write_dev_port_cntr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_dev_port_cntr
_write_dev_port_cntr:                   ; @write_dev_port_cntr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x23, x1
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _CNTR_DISABLED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CNTR_DISABLED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	w2, [x23, #16]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dd_dev_err
	mov	w19, #0
	b	LBB0_8
LBB0_2:
	mov	x19, x5
	mov	x21, x4
	mov	x22, x3
	mov	x20, x2
Lloh5:
	adrp	x24, _CNTR@GOTPAGE
Lloh6:
	ldr	x24, [x24, _CNTR@GOTPAGEOFF]
	ldr	w0, [x24]
	ldr	w2, [x23, #16]
	ldr	w8, [x20]
	stp	x21, x8, [sp]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_hfi1_cdbg
	ldr	w8, [x23]
Lloh9:
	adrp	x9, _CNTR_SYNTH@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CNTR_SYNTH@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.3:
	str	w19, [x20]
	ldr	w9, [x23]
Lloh12:
	adrp	x8, _CNTR_32BIT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CNTR_32BIT@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x8]
	ldr	x8, [x23, #8]
Lloh15:
	adrp	x11, _CNTR_MODE_W@GOTPAGE
Lloh16:
	ldr	x11, [x11, _CNTR_MODE_W@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x11]
	tst	w10, w9
	b.eq	LBB0_6
; %bb.4:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	blr	x8
	b	LBB0_7
LBB0_5:
	ldr	x8, [x23, #8]
Lloh18:
	adrp	x9, _CNTR_MODE_W@GOTPAGE
Lloh19:
	ldr	x9, [x9, _CNTR_MODE_W@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x9]
LBB0_6:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	mov	x4, x19
	blr	x8
	mov	x19, x0
LBB0_7:
	str	w19, [x20]
	ldr	w0, [x24]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	bl	_hfi1_cdbg
LBB0_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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_CNTR_DISABLED,4,2              ; @CNTR_DISABLED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Counter %s not enabled"

	.comm	_CNTR,4,2                       ; @CNTR
l_.str.1:                               ; @.str.1
	.asciz	"cntr: %s vl %d psval 0x%llx"

	.comm	_CNTR_SYNTH,4,2                 ; @CNTR_SYNTH
	.comm	_CNTR_32BIT,4,2                 ; @CNTR_32BIT
	.comm	_CNTR_MODE_W,4,2                ; @CNTR_MODE_W
l_.str.2:                               ; @.str.2
	.asciz	"\tNew val=0x%llx"

	.no_dead_strip	_write_dev_port_cntr
.subsections_via_symbols
