	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stk8312_set_sample_rate
_stk8312_set_sample_rate:               ## @stk8312_set_sample_rate
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%ebx, %ebx
	cmpl	%esi, (%rdi)
	je	LBB0_7
## %bb.1:
	movl	%esi, %r13d
	movq	%rdi, %r15
	movq	8(%rdi), %r12
	movl	4(%rdi), %r14d
	movq	_STK8312_MODE_STANDBY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_stk8312_set_mode
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	_STK8312_REG_SR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_6
## %bb.4:
	movq	_STK8312_SR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
	orl	%r13d, %ebx
	movq	_STK8312_REG_SR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_5
## %bb.8:
	movl	%r13d, (%r15)
	movq	%r15, %rdi
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_stk8312_set_mode               ## TAILCALL
LBB0_2:
	movl	%eax, %ebx
	jmp	LBB0_7
LBB0_5:
	movl	%eax, %ebx
LBB0_6:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_stk8312_set_mode
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STK8312_MODE_STANDBY,4,2       ## @STK8312_MODE_STANDBY
	.comm	_STK8312_REG_SR,4,2             ## @STK8312_REG_SR
	.comm	_STK8312_SR_MASK,4,2            ## @STK8312_SR_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to set sampling rate\n"

	.no_dead_strip	_stk8312_set_sample_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stk8312_set_sample_rate
_stk8312_set_sample_rate:               ; @stk8312_set_sample_rate
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	w8, [x0]
	cmp	w8, w1
	b.ne	LBB0_2
; %bb.1:
	mov	w23, #0
	b	LBB0_9
LBB0_2:
	mov	x22, x1
	mov	x19, x0
	ldr	x21, [x0, #8]
	ldr	w20, [x0, #4]
Lloh0:
	adrp	x8, _STK8312_MODE_STANDBY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STK8312_MODE_STANDBY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_stk8312_set_mode
	tbnz	w0, #31, LBB0_6
; %bb.3:
Lloh3:
	adrp	x24, _STK8312_REG_SR@GOTPAGE
Lloh4:
	ldr	x24, [x24, _STK8312_REG_SR@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x21
	bl	_i2c_smbus_read_byte_data
	mov	x23, x0
	tbnz	w0, #31, LBB0_8
; %bb.4:
Lloh5:
	adrp	x8, _STK8312_SR_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _STK8312_SR_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	bic	w8, w23, w8
	orr	w2, w8, w22
	ldr	w1, [x24]
	mov	x0, x21
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_7
; %bb.5:
	str	w22, [x19]
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_stk8312_set_mode
LBB0_6:
	mov	x23, x0
	b	LBB0_9
LBB0_7:
	mov	x23, x0
LBB0_8:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	mov	x0, x19
	mov	x1, x20
	bl	_stk8312_set_mode
LBB0_9:
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_STK8312_MODE_STANDBY,4,2       ; @STK8312_MODE_STANDBY
	.comm	_STK8312_REG_SR,4,2             ; @STK8312_REG_SR
	.comm	_STK8312_SR_MASK,4,2            ; @STK8312_SR_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to set sampling rate\n"

	.no_dead_strip	_stk8312_set_sample_rate
.subsections_via_symbols
