	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvr2_ctrl_get_valname          ## -- Begin function pvr2_ctrl_get_valname
	.p2align	4, 0x90
_pvr2_ctrl_get_valname:                 ## @pvr2_ctrl_get_valname
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r15d, %r15d
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.1:
	movq	%r8, %r14
	movl	%ecx, %r12d
	movl	%esi, %ebx
	movq	%rdi, %r13
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	movl	$0, (%r8)
	movq	(%rdi), %rax
	movl	(%rax), %edi
	callq	_LOCK_TAKE
	movq	8(%r13), %rax
	movq	(%rax), %rcx
	movq	_pvr2_ctl_enum@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_5
## %bb.2:
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	movq	24(%rax), %r12
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_pvr2_ctrl_range_check
	testq	%rax, %rax
	jne	LBB0_15
## %bb.3:
	movslq	%ebx, %rax
	movq	(%r12,%rax,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.12:
	leaq	L_.str(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	jmp	LBB0_13
LBB0_5:
	movq	_pvr2_ctl_bitmask@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_15
## %bb.6:
	andl	16(%rax), %ebx
	je	LBB0_15
## %bb.7:
	movq	8(%rax), %rax
	xorl	%ecx, %ecx
	testb	$1, %bl
	jne	LBB0_11
## %bb.8:
	movl	$1, %edx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ecx
	addl	%edx, %edx
	testl	%ebx, %edx
	je	LBB0_9
## %bb.10:
	movl	%ecx, %ecx
LBB0_11:
	movl	%r12d, %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rcx
	leaq	L_.str(%rip), %rdx
LBB0_13:
	callq	_scnprintf
	jmp	LBB0_14
LBB0_4:
	xorl	%eax, %eax
LBB0_14:
	movl	%eax, (%r14)
	xorl	%r15d, %r15d
LBB0_15:
	movq	(%r13), %rax
	movl	(%rax), %edi
	callq	_LOCK_GIVE
LBB0_16:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_pvr2_ctl_enum,8,3              ## @pvr2_ctl_enum
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_pvr2_ctl_bitmask,8,3           ## @pvr2_ctl_bitmask
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvr2_ctrl_get_valname          ; -- Begin function pvr2_ctrl_get_valname
	.p2align	2
_pvr2_ctrl_get_valname:                 ; @pvr2_ctrl_get_valname
	.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
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x24, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w23, w8
	str	wzr, [x4]
	ldr	x8, [x0]
	ldr	w0, [x8]
	bl	_LOCK_TAKE
	ldr	x8, [x19, #8]
	ldr	x9, [x8]
Lloh3:
	adrp	x10, _pvr2_ctl_enum@GOTPAGE
Lloh4:
	ldr	x10, [x10, _pvr2_ctl_enum@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_6
; %bb.2:
	ldr	x25, [x8, #24]
	mov	x0, x19
	mov	x1, x24
	bl	_pvr2_ctrl_range_check
	cbnz	x0, LBB0_15
; %bb.3:
	ldr	x3, [x25, w24, sxtw #3]
	cbnz	x3, LBB0_13
; %bb.4:
	mov	w0, #0
	b	LBB0_14
LBB0_5:
	mov	w23, #0
	b	LBB0_16
LBB0_6:
Lloh6:
	adrp	x10, _pvr2_ctl_bitmask@GOTPAGE
Lloh7:
	ldr	x10, [x10, _pvr2_ctl_bitmask@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_15
; %bb.7:
	ldr	w9, [x8, #16]
	ands	w9, w9, w24
	b.eq	LBB0_15
; %bb.8:
	ldr	x8, [x8, #8]
	tbnz	w9, #0, LBB0_11
; %bb.9:
	mov	w10, #0
	mov	w11, #1
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	add	w10, w10, #1
	lsl	w11, w11, #1
	tst	w11, w9
	b.eq	LBB0_10
	b	LBB0_12
LBB0_11:
	mov	x10, #0
LBB0_12:
	ldr	x3, [x8, x10, lsl #3]
LBB0_13:
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x22
	mov	x1, x21
	bl	_scnprintf
LBB0_14:
	mov	w23, #0
	str	w0, [x20]
LBB0_15:
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_LOCK_GIVE
LBB0_16:
	mov	x0, x23
	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
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_pvr2_ctl_enum,8,3              ; @pvr2_ctl_enum
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_pvr2_ctl_bitmask,8,3           ; @pvr2_ctl_bitmask
.subsections_via_symbols
