	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function af9013_rregs
_af9013_rregs:                          ## @af9013_rregs
	.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	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movl	$3, -96(%rbp)
	leaq	-44(%rbp), %rax
	movq	%rax, -88(%rbp)
	movl	$0, -80(%rbp)
	movl	8(%rdi), %eax
	movl	%eax, -76(%rbp)
	movl	%r8d, -72(%rbp)
	movq	%rcx, -64(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -56(%rbp)
	movl	%eax, -52(%rbp)
	movzbl	%dh, %eax
	movl	%eax, -44(%rbp)
	movzbl	%dl, %eax
	movl	%eax, -40(%rbp)
	movl	%esi, -36(%rbp)
	movl	4(%rdi), %edi
	testl	%r9d, %r9d
	je	LBB0_1
## %bb.2:
	movq	_I2C_LOCK_SEGMENT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_i2c_lock_bus
	movl	4(%r14), %edi
	leaq	-96(%rbp), %rsi
	movl	$2, %edx
	callq	___i2c_transfer
	movl	%eax, %ebx
	movl	4(%r14), %edi
	movl	(%r15), %esi
	callq	_i2c_unlock_bus
	testl	%ebx, %ebx
	jns	LBB0_4
	jmp	LBB0_6
LBB0_1:
	leaq	-96(%rbp), %rsi
	movl	$2, %edx
	callq	___i2c_transfer
	movl	%eax, %ebx
	testl	%ebx, %ebx
	js	LBB0_6
LBB0_4:
	xorl	%eax, %eax
	cmpl	$2, %ebx
	je	LBB0_7
## %bb.5:
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_dev_dbg
	movl	%ebx, %eax
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_9
## %bb.8:
	addq	$72, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_I2C_LOCK_SEGMENT,4,2           ## @I2C_LOCK_SEGMENT
	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed %d\n"

	.no_dead_strip	_af9013_rregs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function af9013_rregs
_af9013_rregs:                          ; @af9013_rregs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	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
	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]
	mov	w8, #3
	str	w8, [sp, #8]
	sub	x8, x29, #52
	str	x8, [sp, #16]
	ldp	w0, w8, [x0, #4]
	str	wzr, [sp, #24]
	stp	w8, w4, [sp, #28]
	str	x3, [sp, #40]
Lloh3:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #48]
	ubfx	w8, w2, #8, #8
	and	w9, w2, #0xff
	stp	w8, w9, [x29, #-52]
	stur	w1, [x29, #-44]
	cbz	w5, LBB0_2
; %bb.1:
Lloh6:
	adrp	x21, _I2C_LOCK_SEGMENT@GOTPAGE
Lloh7:
	ldr	x21, [x21, _I2C_LOCK_SEGMENT@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_i2c_lock_bus
	ldr	w0, [x19, #4]
	add	x1, sp, #8
	mov	w2, #2
	bl	___i2c_transfer
	mov	x20, x0
	ldr	w0, [x19, #4]
	ldr	w1, [x21]
	bl	_i2c_unlock_bus
	tbz	w20, #31, LBB0_3
	b	LBB0_6
LBB0_2:
	add	x1, sp, #8
	mov	w2, #2
	bl	___i2c_transfer
	mov	x20, x0
	tbnz	w20, #31, LBB0_6
LBB0_3:
	cmp	w20, #2
	b.ne	LBB0_5
; %bb.4:
	mov	w20, #0
	b	LBB0_7
LBB0_5:
Lloh8:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_6:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_dev_dbg
LBB0_7:
	ldur	x8, [x29, #-40]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x20
	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
	add	sp, sp, #128
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_I2C_LOCK_SEGMENT,4,2           ; @I2C_LOCK_SEGMENT
	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed %d\n"

	.no_dead_strip	_af9013_rregs
.subsections_via_symbols
