	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5k83a_set_gain
_s5k83a_set_gain:                       ## @s5k83a_set_gain
	.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	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movabsq	$137438953472, %rax             ## imm = 0x2000000000
	movq	%rax, -32(%rbp)
	leaq	-32(%rbp), %rdx
	movl	$20, %esi
	movl	$2, %ecx
	callq	_m5602_write_sensor
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	movq	$1, -32(%rbp)
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$13, %esi
	movl	$2, %ecx
	callq	_m5602_write_sensor
	testl	%eax, %eax
	js	LBB0_3
## %bb.2:
	movl	%r14d, %eax
	sarl	$3, %eax
	movl	%eax, -32(%rbp)
	sarl	%r14d
	movl	%r14d, -28(%rbp)
	movq	_S5K83A_GAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	_m5602_write_sensor
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_5
## %bb.4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_S5K83A_GAIN,4,2                ## @S5K83A_GAIN
	.no_dead_strip	_s5k83a_set_gain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function s5k83a_set_gain
lCPI0_0:
	.long	0                               ; 0x0
	.long	32                              ; 0x20
lCPI0_1:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
lCPI0_2:
	.long	4294967293                      ; 0xfffffffd
	.long	4294967295                      ; 0xffffffff
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_s5k83a_set_gain:                       ; @s5k83a_set_gain
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #8]
	add	x2, sp, #8
	mov	w1, #20
	mov	w3, #2
	bl	_m5602_write_sensor
	tbnz	w0, #31, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, lCPI0_1@PAGE
Lloh3:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	str	d0, [sp, #8]
	add	x2, sp, #8
	mov	x0, x19
	mov	w1, #13
	mov	w3, #2
	bl	_m5602_write_sensor
	tbnz	w0, #31, LBB0_3
; %bb.2:
	dup.2s	v0, w20
Lloh4:
	adrp	x8, lCPI0_2@PAGE
Lloh5:
	ldr	d1, [x8, lCPI0_2@PAGEOFF]
	sshl.2s	v0, v0, v1
	str	d0, [sp, #8]
Lloh6:
	adrp	x8, _S5K83A_GAIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _S5K83A_GAIN@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	mov	w3, #2
	bl	_m5602_write_sensor
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdrp	Lloh4, Lloh6
	.loh AdrpLdr	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_S5K83A_GAIN,4,2                ; @S5K83A_GAIN
	.no_dead_strip	_s5k83a_set_gain
.subsections_via_symbols
