	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad5820_write
_ad5820_write:                          ## @ad5820_write
	.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
	subq	$48, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	callq	_v4l2_get_subdevdata
	cmpl	$0, 4(%rax)
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movl	%r14d, %edi
	callq	_cpu_to_be16
	movl	%eax, -20(%rbp)
	movl	8(%rbx), %eax
	movl	%eax, -32(%rbp)
	movq	$0, -40(%rbp)
	movl	$2, -56(%rbp)
	leaq	-20(%rbp), %rax
	movq	%rax, -48(%rbp)
	movl	4(%rbx), %edi
	leaq	-56(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	movl	%eax, %r14d
	xorl	%eax, %eax
	testl	%r14d, %r14d
	jns	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_dev_err
	movl	%r14d, %eax
	jmp	LBB0_4
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	addq	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"write failed, error %d\n"

	.no_dead_strip	_ad5820_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad5820_write
_ad5820_write:                          ; @ad5820_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x1
	bl	_v4l2_get_subdevdata
	ldr	w8, [x0, #4]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x19, x0
	mov	x0, x20
	bl	_cpu_to_be16
	ldr	w8, [x19, #8]
	str	w8, [sp, #40]
	mov	w8, #2
	stp	w0, w8, [sp, #12]
	add	x8, sp, #12
	stp	x8, xzr, [sp, #24]
	ldr	w0, [x19, #4]
	add	x1, sp, #16
	mov	w2, #1
	bl	_i2c_transfer
	tbnz	w0, #31, LBB0_4
; %bb.2:
	mov	w20, #0
	b	LBB0_5
LBB0_3:
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_5
LBB0_4:
	mov	x20, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_dev_err
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"write failed, error %d\n"

	.no_dead_strip	_ad5820_write
.subsections_via_symbols
