	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setautogain
_setautogain:                           ## @setautogain
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rdi), %eax
	movl	%eax, %ecx
	andl	$-2, %ecx
	cmpl	$128, %ecx
	jne	LBB0_1
## %bb.5:
	xorl	%ecx, %ecx
	cmpl	$129, %eax
	sete	%cl
	shll	$5, %ecx
	movq	(%rdi), %rax
	xorl	%edx, %edx
	cmpq	$0, (%rax)
	setne	%dl
	leal	(%rdx,%rdx,2), %edx
	orl	%ecx, %edx
	addl	$160, %edx
	addq	$8, %rdi
	movl	$19, %esi
	popq	%rbp
	jmp	_i2c_w1                         ## TAILCALL
LBB0_1:
	movq	(%rdi), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.2:
	movq	_AG_CNT_START@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rdi)
	popq	%rbp
	retq
LBB0_3:
	movl	$-1, 4(%rdi)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AG_CNT_START,4,2               ## @AG_CNT_START
	.no_dead_strip	_setautogain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setautogain
_setautogain:                           ; @setautogain
	.cfi_startproc
; %bb.0:
	ldr	w8, [x0]
	and	w9, w8, #0xfffffffe
	cmp	w9, #128
	b.ne	LBB0_2
; %bb.1:
	mov	w9, #160
	mov	w10, #192
	cmp	w8, #129
	csel	w8, w10, w9, eq
	ldr	x9, [x0], #8
	ldr	x9, [x9]
	orr	w10, w8, #0x3
	cmp	x9, #0
	csel	w2, w8, w10, eq
	mov	w1, #19
	b	_i2c_w1
LBB0_2:
	ldr	x8, [x0]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
Lloh0:
	adrp	x8, _AG_CNT_START@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AG_CNT_START@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0, #4]
	ret
LBB0_4:
	mov	w8, #-1
	str	w8, [x0, #4]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AG_CNT_START,4,2               ; @AG_CNT_START
	.no_dead_strip	_setautogain
.subsections_via_symbols
