	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max9877_write_regs
_max9877_write_regs:                    ## @max9877_write_regs
	.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	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	_MAX9877_INPUT_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	_max9877_regs@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	movl	(%rdi,%rbx,4), %eax
	movl	%eax, -44(%rbp,%rbx,4)
	incq	%rbx
	callq	_ARRAY_SIZE
	movl	%eax, %eax
	cmpq	%rax, %rbx
	jb	LBB0_2
LBB0_3:
	movq	_i2c@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	leaq	-48(%rbp), %rsi
	movl	$6, %edx
	callq	_i2c_master_send
	cmpl	$6, %eax
	je	LBB0_5
## %bb.4:
	movq	(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX9877_INPUT_MODE,4,2         ## @MAX9877_INPUT_MODE
	.comm	_max9877_regs,8,3               ## @max9877_regs
	.comm	_i2c,8,3                        ## @i2c
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c write failed\n"

	.no_dead_strip	_max9877_write_regs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max9877_write_regs
_max9877_write_regs:                    ; @max9877_write_regs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _MAX9877_INPUT_MODE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MAX9877_INPUT_MODE@GOTPAGEOFF]
	str	x8, [sp, #24]
Lloh5:
	ldr	w8, [x9]
	str	w8, [sp]
Lloh6:
	adrp	x19, _max9877_regs@GOTPAGE
Lloh7:
	ldr	x19, [x19, _max9877_regs@GOTPAGEOFF]
	ldr	x0, [x19]
	bl	_ARRAY_SIZE
	cbz	w0, LBB0_3
; %bb.1:
	mov	x20, #0
	mov	x8, sp
	add	x21, x8, #4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19]
	lsl	x8, x20, #2
	ldr	w9, [x0, x8]
	add	x20, x20, #1
	str	w9, [x21, x8]
	bl	_ARRAY_SIZE
	cmp	x20, w0, uxtw
	b.lo	LBB0_2
LBB0_3:
Lloh8:
	adrp	x19, _i2c@GOTPAGE
Lloh9:
	ldr	x19, [x19, _i2c@GOTPAGEOFF]
	ldr	x0, [x19]
	mov	x1, sp
	mov	w2, #6
	bl	_i2c_master_send
	cmp	w0, #6
	b.eq	LBB0_5
; %bb.4:
	ldr	x0, [x19]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_5:
	ldr	x8, [sp, #24]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX9877_INPUT_MODE,4,2         ; @MAX9877_INPUT_MODE
	.comm	_max9877_regs,8,3               ; @max9877_regs
	.comm	_i2c,8,3                        ; @i2c
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c write failed\n"

	.no_dead_strip	_max9877_write_regs
.subsections_via_symbols
