	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function az6007_ci_read_cam_control
_az6007_ci_read_cam_control:            ## @az6007_ci_read_cam_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	%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
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	(%rdi), %r13
	movq	%r13, %rdi
	callq	_d_to_priv
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_3:
	movq	%rax, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$12, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_mutex_lock
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	movl	$195, %esi
	movl	%r15d, %edx
	xorl	%ecx, %ecx
	movq	%r12, %r8
	movl	$2, %r9d
	callq	_az6007_read
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	cmpl	$0, (%r12)
	jne	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_warn
LBB0_9:
	movl	4(%r12), %ebx
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	callq	_pr_debug
	jmp	LBB0_10
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_6:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_10:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%r12, %rdi
	callq	_kfree
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"usb in operation failed. (%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"Read CI IO error\n"

L_.str.2:                               ## @.str.2
	.asciz	"read cam data = %x from 0x%x\n"

	.no_dead_strip	_az6007_ci_read_cam_control
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function az6007_ci_read_cam_control
_az6007_ci_read_cam_control:            ; @az6007_ci_read_cam_control
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x2
	mov	x20, x1
	ldr	x22, [x0]
	mov	x0, x22
	bl	_d_to_priv
	cbz	w20, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_11
LBB0_3:
	mov	x19, x0
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #12
	bl	_kmalloc
	cbz	x0, LBB0_8
; %bb.4:
	mov	x20, x0
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x22
	mov	w1, #195
	mov	x2, x21
	mov	w3, #0
	mov	x4, x20
	mov	w5, #2
	bl	_az6007_read
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_9
; %bb.5:
	ldr	w8, [x20]
	cbnz	w8, LBB0_7
; %bb.6:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_warn
LBB0_7:
	ldr	w22, [x20, #4]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x22
	mov	x2, x21
	bl	_pr_debug
	b	LBB0_10
LBB0_8:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
LBB0_9:
	str	x0, [sp]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_10:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	bl	_kfree
LBB0_11:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"usb in operation failed. (%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"Read CI IO error\n"

l_.str.2:                               ; @.str.2
	.asciz	"read cam data = %x from 0x%x\n"

	.no_dead_strip	_az6007_ci_read_cam_control
.subsections_via_symbols
