	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx88_get_control               ## -- Begin function cx88_get_control
	.p2align	4, 0x90
_cx88_get_control:                      ## @cx88_get_control
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	_CX8800_CTLS@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	testl	%r9d, %r9d
	jle	LBB0_1
## %bb.2:
	movq	_cx8800_ctls@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movl	(%r14), %r10d
	leaq	-1(%r9), %rdx
	movl	%r9d, %ecx
	andl	$3, %ecx
	cmpq	$3, %rdx
	jae	LBB0_4
## %bb.3:
	xorl	%edi, %edi
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_4:
	andl	$-4, %r9d
	leaq	80(%r8), %rdx
	xorl	%edi, %edi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leaq	-80(%rdx), %rsi
	cmpl	%r10d, -52(%rdx)
	cmovneq	%rbx, %rsi
	leaq	-40(%rdx), %rax
	cmpl	%r10d, -12(%rdx)
	cmovneq	%rsi, %rax
	cmpl	%r10d, 28(%rdx)
	cmoveq	%rdx, %rax
	leaq	40(%rdx), %rbx
	cmpl	%r10d, 68(%rdx)
	cmovneq	%rax, %rbx
	addq	$4, %rdi
	addq	$160, %rdx
	cmpq	%rdi, %r9
	jne	LBB0_5
LBB0_6:
	testq	%rcx, %rcx
	je	LBB0_9
## %bb.7:
	leaq	(%rdi,%rdi,4), %rax
	leaq	(%r8,%rax,8), %rdx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%r10d, 28(%rdx)
	cmoveq	%rdx, %rbx
	addq	$40, %rdx
	decq	%rcx
	jne	LBB0_8
LBB0_9:
	xorl	%edi, %edi
	testq	%rbx, %rbx
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_20
LBB0_11:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	callq	_cx_sread
	jmp	LBB0_14
LBB0_13:
	movl	24(%rbx), %edi
	callq	_cx_read
LBB0_14:
                                        ## kill: def $eax killed $eax def $rax
	movl	(%r14), %edx
	cmpl	$128, %edx
	je	LBB0_17
## %bb.15:
	cmpl	$129, %edx
	jne	LBB0_18
## %bb.16:
	movl	%eax, %ecx
	andl	$127, %ecx
	leal	64(%rcx), %esi
	movl	%ecx, %r8d
	xorl	$127, %r8d
	cmpl	$64, %ecx
	cmovbl	%esi, %r8d
	jmp	LBB0_19
LBB0_17:
	movl	%eax, %r8d
	notl	%r8d
	andl	$63, %r8d
	jmp	LBB0_19
LBB0_18:
	movl	(%rbx), %r8d
	movb	4(%rbx), %cl
	shll	%cl, %r8d
	addl	%eax, %r8d
	andl	8(%rbx), %r8d
	sarl	%cl, %r8d
LBB0_19:
	movl	%r8d, 4(%r14)
	movl	32(%rbx), %ecx
	movl	8(%rbx), %r10d
	movl	24(%rbx), %r9d
	cmpq	$0, 16(%rbx)
	leaq	L_.str.2(%rip), %rsi
	leaq	L_.str.1(%rip), %rbx
	cmoveq	%rsi, %rbx
	subq	$8, %rsp
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	pushq	%rbx
	pushq	%r10
	pushq	%rax
	callq	_dprintk
	addq	$32, %rsp
	xorl	%eax, %eax
LBB0_20:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CX8800_CTLS,4,2                ## @CX8800_CTLS
	.comm	_cx8800_ctls,8,3                ## @cx8800_ctls
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"get_control id=0x%X(%s) ctrl=0x%02x, reg=0x%02x val=0x%02x (mask 0x%02x)%s\n"

L_.str.1:                               ## @.str.1
	.asciz	" [shadowed]"

L_.str.2:                               ## @.str.2
	.space	1

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx88_get_control               ; -- Begin function cx88_get_control
	.p2align	2
_cx88_get_control:                      ; @cx88_get_control
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
Lloh0:
	adrp	x8, _CX8800_CTLS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CX8800_CTLS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x20, #0
Lloh3:
	adrp	x9, _cx8800_ctls@GOTPAGE
Lloh4:
	ldr	x9, [x9, _cx8800_ctls@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	w10, [x19]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9, #28]
	cmp	w11, w10
	csel	x20, x9, x20, eq
	add	x9, x9, #40
	subs	x8, x8, #1
	b.ne	LBB0_2
	b	LBB0_4
LBB0_3:
	mov	x20, #0
LBB0_4:
	cmp	x20, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_6
; %bb.5:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
LBB0_6:
	ldr	x0, [x20, #16]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_cx_sread
	b	LBB0_9
LBB0_8:
	ldr	w0, [x20, #24]
	bl	_cx_read
LBB0_9:
	mov	x6, x0
	ldr	w2, [x19]
	cmp	w2, #128
	b.eq	LBB0_12
; %bb.10:
	cmp	w2, #129
	b.ne	LBB0_13
; %bb.11:
	and	w8, w6, #0x7f
	add	w9, w8, #64
	eor	w10, w8, #0x7f
	cmp	w8, #64
	csel	w4, w9, w10, lo
	b	LBB0_14
LBB0_12:
	mvn	w8, w6
	and	w4, w8, #0x3f
	b	LBB0_14
LBB0_13:
	ldp	w8, w9, [x20]
	lsl	w8, w8, w9
	ldr	w10, [x20, #8]
	add	w8, w8, w6
	and	w8, w8, w10
	asr	w4, w8, w9
LBB0_14:
	str	w4, [x19, #4]
	ldr	w3, [x20, #32]
	ldr	w5, [x20, #24]
	ldr	w7, [x20, #8]
	ldr	x8, [x20, #16]
Lloh9:
	adrp	x9, l_.str.1@PAGE
Lloh10:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh11:
	adrp	x10, l_.str.2@PAGE
Lloh12:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	x8, #0
	csel	x8, x10, x9, eq
	str	x8, [sp]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_dprintk
	mov	w0, #0
LBB0_15:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_CX8800_CTLS,4,2                ; @CX8800_CTLS
	.comm	_cx8800_ctls,8,3                ; @cx8800_ctls
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"get_control id=0x%X(%s) ctrl=0x%02x, reg=0x%02x val=0x%02x (mask 0x%02x)%s\n"

l_.str.1:                               ; @.str.1
	.asciz	" [shadowed]"

l_.str.2:                               ; @.str.2
	.space	1

.subsections_via_symbols
