	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl2830_regmap_gather_write
_rtl2830_regmap_gather_write:           ## @rtl2830_regmap_gather_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	$1072, %rsp                     ## imm = 0x430
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%r8, %rdx
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	leal	1(%r8), %eax
	movl	%eax, -1088(%rbp)
	leaq	-1056(%rbp), %rax
	movq	%rax, -1080(%rbp)
	movl	$0, -1072(%rbp)
	movl	8(%rdi), %eax
	movl	%eax, -1068(%rbp)
	movl	(%rsi), %eax
	movl	%eax, -1056(%rbp)
	leaq	-1052(%rbp), %rdi
	movq	%rcx, %rsi
	callq	_memcpy
	movl	4(%r14), %edi
	leaq	-1088(%rbp), %rsi
	movl	$1, %edx
	callq	___i2c_transfer
	movl	%eax, %ebx
	xorl	%eax, %eax
	cmpl	$1, %ebx
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_dev_warn
	movq	_EREMOTEIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	testl	%ebx, %ebx
	cmovsl	%ebx, %eax
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_4
## %bb.3:
	addq	$1072, %rsp                     ## imm = 0x430
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c reg write failed %d\n"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.no_dead_strip	_rtl2830_regmap_gather_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl2830_regmap_gather_write
_rtl2830_regmap_gather_write:           ; @rtl2830_regmap_gather_write
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -40
	.cfi_offset w28, -48
	sub	sp, sp, #1056
	mov	x2, x4
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	add	w8, w2, #1
	str	w8, [sp]
	add	x8, sp, #24
	str	x8, [sp, #8]
	ldr	w9, [x0, #8]
	stp	wzr, w9, [sp, #16]
	ldr	w9, [x1]
	str	w9, [sp, #24]
	add	x0, x8, #4
	mov	x1, x3
	bl	_memcpy
	ldr	w0, [x19, #4]
	mov	x1, sp
	mov	w2, #1
	bl	___i2c_transfer
	mov	x20, x0
	mov	w0, #0
	cmp	w20, #1
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_dev_warn
Lloh5:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w20, #0
	csneg	w0, w20, w8, lt
LBB0_2:
	ldur	x8, [x29, #-40]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	add	sp, sp, #1056
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c reg write failed %d\n"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.no_dead_strip	_rtl2830_regmap_gather_write
.subsections_via_symbols
