	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function avc_identify_subunit
LCPI0_0:
	.long	255                             ## 0xff
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	8                               ## 0x8
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_avc_identify_subunit
	.p2align	4, 0x90
_avc_identify_subunit:                  ## @avc_identify_subunit
	.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	%rdi, %r15
	movq	16(%rdi), %rbx
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_AVC_CTYPE_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_AVC_SUBUNIT_TYPE_TUNER@GOTPCREL(%rip), %rax
	movl	(%r15), %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%rbx)
	movq	_AVC_OPCODE_READ_DESCRIPTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_DESCRIPTOR_SUBUNIT_IDENTIFIER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx)
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [255,0,0,8]
	movups	%xmm0, 4(%rcx)
	movabsq	$55834574848, %rax              ## imm = 0xD00000000
	movq	%rax, 20(%rcx)
	movq	%rbx, %rdi
	movl	$7, %esi
	movl	$8, %edx
	callq	_clear_operands
	movl	$12, 4(%r15)
	movq	%r15, %rdi
	callq	_avc_write
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	movq	(%rbx), %rax
	movq	_AVC_RESPONSE_STABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.2:
	movq	_AVC_RESPONSE_ACCEPTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
LBB0_3:
	movq	8(%rbx), %rax
	movl	12(%rax), %ecx
	shll	$8, %ecx
	addl	16(%rax), %ecx
	cmpl	$8, %ecx
	je	LBB0_5
LBB0_4:
	movl	12(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_5:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVC_CTYPE_CONTROL,4,2          ## @AVC_CTYPE_CONTROL
	.comm	_AVC_SUBUNIT_TYPE_TUNER,4,2     ## @AVC_SUBUNIT_TYPE_TUNER
	.comm	_AVC_OPCODE_READ_DESCRIPTOR,4,2 ## @AVC_OPCODE_READ_DESCRIPTOR
	.comm	_DESCRIPTOR_SUBUNIT_IDENTIFIER,4,2 ## @DESCRIPTOR_SUBUNIT_IDENTIFIER
	.comm	_AVC_RESPONSE_STABLE,8,3        ## @AVC_RESPONSE_STABLE
	.comm	_AVC_RESPONSE_ACCEPTED,8,3      ## @AVC_RESPONSE_ACCEPTED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot read subunit identifier\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function avc_identify_subunit
lCPI0_0:
	.long	255                             ; 0xff
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	8                               ; 0x8
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
lCPI0_1:
	.long	0                               ; 0x0
	.long	13                              ; 0xd
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_avc_identify_subunit
	.p2align	2
_avc_identify_subunit:                  ; @avc_identify_subunit
	.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	x20, x0
	ldr	x21, [x0, #16]
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x8, _AVC_SUBUNIT_TYPE_TUNER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVC_SUBUNIT_TYPE_TUNER@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
Lloh3:
	adrp	x9, _AVC_CTYPE_CONTROL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AVC_CTYPE_CONTROL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	str	w8, [x21]
Lloh6:
	adrp	x8, _AVC_OPCODE_READ_DESCRIPTOR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AVC_OPCODE_READ_DESCRIPTOR@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	stp	w8, w9, [x21, #16]
Lloh9:
	adrp	x8, _DESCRIPTOR_SUBUNIT_IDENTIFIER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DESCRIPTOR_SUBUNIT_IDENTIFIER@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	x9, [x21, #8]
	str	w8, [x9]
Lloh12:
	adrp	x8, lCPI0_0@PAGE
Lloh13:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	stur	q0, [x9, #4]
Lloh14:
	adrp	x8, lCPI0_1@PAGE
Lloh15:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	stur	d0, [x9, #20]
	mov	x0, x21
	mov	w1, #7
	mov	w2, #8
	bl	_clear_operands
	mov	w8, #12
	str	w8, [x20, #4]
	mov	x0, x20
	bl	_avc_write
	mov	x22, x0
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	x8, [x21]
Lloh16:
	adrp	x9, _AVC_RESPONSE_STABLE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _AVC_RESPONSE_STABLE@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.2:
Lloh19:
	adrp	x9, _AVC_RESPONSE_ACCEPTED@GOTPAGE
Lloh20:
	ldr	x9, [x9, _AVC_RESPONSE_ACCEPTED@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
LBB0_3:
	ldr	x8, [x21, #8]
	ldp	w9, w8, [x8, #12]
	add	w8, w8, w9, lsl #8
	cmp	w8, #8
	b.eq	LBB0_5
LBB0_4:
	ldr	w0, [x20, #12]
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_5:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x22
	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 AdrpLdr	Lloh14, Lloh15
	.loh AdrpAdrp	Lloh12, Lloh14
	.loh AdrpLdr	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_AVC_CTYPE_CONTROL,4,2          ; @AVC_CTYPE_CONTROL
	.comm	_AVC_SUBUNIT_TYPE_TUNER,4,2     ; @AVC_SUBUNIT_TYPE_TUNER
	.comm	_AVC_OPCODE_READ_DESCRIPTOR,4,2 ; @AVC_OPCODE_READ_DESCRIPTOR
	.comm	_DESCRIPTOR_SUBUNIT_IDENTIFIER,4,2 ; @DESCRIPTOR_SUBUNIT_IDENTIFIER
	.comm	_AVC_RESPONSE_STABLE,8,3        ; @AVC_RESPONSE_STABLE
	.comm	_AVC_RESPONSE_ACCEPTED,8,3      ; @AVC_RESPONSE_ACCEPTED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot read subunit identifier\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
