	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stm32_counter_write_raw
_stm32_counter_write_raw:               ## @stm32_counter_write_raw
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movl	%edx, %r15d
	callq	_iio_priv
	cmpq	$128, %rbx
	je	LBB0_10
## %bb.1:
	movq	%rax, %r14
	cmpq	$130, %rbx
	je	LBB0_4
## %bb.2:
	cmpq	$129, %rbx
	jne	LBB0_10
## %bb.3:
	movl	4(%r14), %edi
	movq	_TIM_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_regmap_write                   ## TAILCALL
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_4:
	movl	4(%r14), %edi
	movq	_TIM_CR1@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-28(%rbp), %rdx
	callq	_regmap_read
	testl	%r15d, %r15d
	je	LBB0_8
## %bb.5:
	movq	_TIM_CR1_CEN@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	testl	%ecx, -28(%rbp)
	jne	LBB0_7
## %bb.6:
	movl	(%r14), %edi
	callq	_clk_enable
	movl	(%r15), %ecx
LBB0_7:
	movl	4(%r14), %edi
	movl	(%rbx), %esi
	movl	%ecx, %edx
	callq	_regmap_update_bits
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_8:
	movl	4(%r14), %edi
	movl	(%rbx), %esi
	movq	_TIM_CR1_CEN@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	xorl	%ebx, %ebx
	xorl	%ecx, %ecx
	callq	_regmap_update_bits
	movl	(%r15), %eax
	testl	%eax, -28(%rbp)
	je	LBB0_11
## %bb.9:
	movl	(%r14), %edi
	callq	_clk_disable
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TIM_CNT,4,2                    ## @TIM_CNT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TIM_CR1,4,2                    ## @TIM_CR1
	.comm	_TIM_CR1_CEN,4,2                ## @TIM_CR1_CEN
	.no_dead_strip	_stm32_counter_write_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stm32_counter_write_raw
_stm32_counter_write_raw:               ; @stm32_counter_write_raw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x4
	mov	x20, x2
	bl	_iio_priv
	cmp	x21, #128
	b.eq	LBB0_4
; %bb.1:
	mov	x19, x0
	cmp	x21, #130
	b.eq	LBB0_5
; %bb.2:
	cmp	x21, #129
	b.ne	LBB0_4
; %bb.3:
	ldr	w0, [x19, #4]
Lloh0:
	adrp	x8, _TIM_CNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TIM_CNT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, 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
	add	sp, sp, #64
	b	_regmap_write
LBB0_4:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_5:
	ldr	w0, [x19, #4]
Lloh6:
	adrp	x21, _TIM_CR1@GOTPAGE
Lloh7:
	ldr	x21, [x21, _TIM_CR1@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	bl	_regmap_read
	cbz	w20, LBB0_9
; %bb.6:
	ldr	w8, [sp, #12]
Lloh8:
	adrp	x20, _TIM_CR1_CEN@GOTPAGE
Lloh9:
	ldr	x20, [x20, _TIM_CR1_CEN@GOTPAGEOFF]
	ldr	w2, [x20]
	tst	w2, w8
	b.ne	LBB0_8
; %bb.7:
	ldr	w0, [x19]
	bl	_clk_enable
	ldr	w2, [x20]
LBB0_8:
	ldr	w0, [x19, #4]
	ldr	w1, [x21]
	mov	x3, x2
	bl	_regmap_update_bits
	b	LBB0_11
LBB0_9:
	ldr	w0, [x19, #4]
	ldr	w1, [x21]
Lloh10:
	adrp	x20, _TIM_CR1_CEN@GOTPAGE
Lloh11:
	ldr	x20, [x20, _TIM_CR1_CEN@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	w3, #0
	bl	_regmap_update_bits
	ldr	w8, [sp, #12]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
	ldr	w0, [x19]
	bl	_clk_disable
LBB0_11:
	mov	w0, #0
LBB0_12:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_TIM_CNT,4,2                    ; @TIM_CNT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TIM_CR1,4,2                    ; @TIM_CR1
	.comm	_TIM_CR1_CEN,4,2                ; @TIM_CR1_CEN
	.no_dead_strip	_stm32_counter_write_raw
.subsections_via_symbols
