	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx24120_writeregs
_cx24120_writeregs:                     ## @cx24120_writeregs
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r15
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	cmovleq	%r15, %rcx
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	$0, -48(%rbp)
	movl	8(%rax), %eax
	movl	%eax, -44(%rbp)
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	leaq	1(%rcx), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	movq	%rax, -56(%rbp)
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	xorl	%ebx, %ebx
	testq	%r15, %r15
	je	LBB0_7
## %bb.2:
	movq	%rax, %rdi
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rbx
	movq	%r13, (%rdi)
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	cmpq	%rdx, %r15
	cmovlq	%r15, %rdx
	movq	%rdx, -64(%rbp)
	addq	$8, %rdi
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	movq	%r14, %rsi
	callq	_memcpy
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	movq	-64(%rbp), %r12
	movq	%r12, %r13
	cmoveq	%rax, %r13
	addq	%rbx, %r13
	leaq	1(%r12), %rax
	movq	%rax, -64(%rbp)
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rdi
	leaq	-64(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	cmpl	$1, %eax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rbx), %rdi
	movq	-64(%rbp), %rcx
	movq	-56(%rbp), %r8
	decq	%rcx
	addq	$8, %r8
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdx
	callq	_dev_dbg
	subq	%r12, %r15
	je	LBB0_6
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	leaq	(%r14,%r12,8), %r14
	movq	-56(%rbp), %rdi
	jmp	LBB0_3
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_4:
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	movq	%r13, %rdx
	callq	_err
	movl	%r14d, %ebx
	jmp	LBB0_7
LBB0_6:
	xorl	%ebx, %ebx
LBB0_7:
	movq	-56(%rbp), %rdi
	callq	_kfree
LBB0_8:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c_write error(err == %i, 0x%02x)\n"

L_.str.1:                               ## @.str.1
	.asciz	"reg=0x%02x; data=%*ph\n"

	.no_dead_strip	_cx24120_writeregs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx24120_writeregs
_cx24120_writeregs:                     ; @cx24120_writeregs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x19, x1
	mov	x23, x0
	ldr	x8, [x0, #8]
	ldr	x9, [x8]
	cmp	x9, #0
	csel	x26, x9, x3, gt
	stp	xzr, xzr, [sp, #16]
	str	xzr, [sp, #8]
	ldr	w8, [x8, #8]
	str	w8, [sp, #28]
	add	x0, x26, #1
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kmalloc
	str	x0, [sp, #16]
	cbz	x0, LBB0_7
; %bb.1:
	cbz	x21, LBB0_6
; %bb.2:
Lloh3:
	adrp	x24, l_.str.1@PAGE
Lloh4:
	add	x24, x24, l_.str.1@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	str	x19, [x0], #8
	cmp	x21, x26
	csel	x2, x21, x26, lt
	str	x2, [sp, #8]
	mov	x1, x22
	bl	_memcpy
	ldr	x27, [sp, #8]
	cmp	x20, #0
	csel	x8, xzr, x27, eq
	add	x19, x8, x19
	add	x8, x27, #1
	str	x8, [sp, #8]
	ldr	x0, [x23]
	add	x1, sp, #8
	mov	w2, #1
	bl	_i2c_transfer
	cmp	w0, #1
	b.ne	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	x21, x21, x27
	ldr	x0, [x23]
	ldp	x8, x9, [sp, #8]
	sub	x3, x8, #1
	add	x4, x9, #8
	mov	x1, x24
	mov	x2, x19
	bl	_dev_dbg
	cbz	x21, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, x27, lsl #3
	ldr	x0, [sp, #16]
	b	LBB0_3
LBB0_6:
	mov	w25, #0
	b	LBB0_9
LBB0_7:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_10
LBB0_8:
	mov	x25, x0
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x25
	mov	x2, x19
	bl	_err
LBB0_9:
	ldr	x0, [sp, #16]
	bl	_kfree
LBB0_10:
	mov	x0, x25
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c_write error(err == %i, 0x%02x)\n"

l_.str.1:                               ; @.str.1
	.asciz	"reg=0x%02x; data=%*ph\n"

	.no_dead_strip	_cx24120_writeregs
.subsections_via_symbols
