	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bmc150_accel_buffer_postenable
_bmc150_accel_buffer_postenable:        ## @bmc150_accel_buffer_postenable
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_iio_priv
	movq	%rax, %r14
	movq	(%rbx), %rax
	movq	_INDIO_BUFFER_TRIGGERED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.6:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_iio_triggered_buffer_postenable ## TAILCALL
LBB0_1:
	movq	%r14, %rdi
	callq	_mutex_lock
	xorl	%ebx, %ebx
	cmpl	$0, 16(%r14)
	je	LBB0_5
## %bb.2:
	movq	_BMC150_ACCEL_INT_WATERMARK@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_bmc150_accel_set_interrupt
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movq	_BMC150_ACCEL_FIFO_MODE_FIFO@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
	movq	%r14, %rdi
	callq	_bmc150_accel_fifo_set_mode
	movl	$0, %ebx
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r15d
	movq	$0, 8(%r14)
	movl	(%r12), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_bmc150_accel_set_interrupt
	movl	%r15d, %ebx
LBB0_5:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INDIO_BUFFER_TRIGGERED,8,3     ## @INDIO_BUFFER_TRIGGERED
	.comm	_BMC150_ACCEL_INT_WATERMARK,4,2 ## @BMC150_ACCEL_INT_WATERMARK
	.comm	_BMC150_ACCEL_FIFO_MODE_FIFO,8,3 ## @BMC150_ACCEL_FIFO_MODE_FIFO
	.no_dead_strip	_bmc150_accel_buffer_postenable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bmc150_accel_buffer_postenable
_bmc150_accel_buffer_postenable:        ; @bmc150_accel_buffer_postenable
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
	bl	_iio_priv
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _INDIO_BUFFER_TRIGGERED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _INDIO_BUFFER_TRIGGERED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_iio_triggered_buffer_postenable
LBB0_2:
	mov	x19, x0
	bl	_mutex_lock
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_6
; %bb.3:
Lloh3:
	adrp	x21, _BMC150_ACCEL_INT_WATERMARK@GOTPAGE
Lloh4:
	ldr	x21, [x21, _BMC150_ACCEL_INT_WATERMARK@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #1
	bl	_bmc150_accel_set_interrupt
	mov	x20, x0
	cbnz	w0, LBB0_7
; %bb.4:
Lloh5:
	adrp	x8, _BMC150_ACCEL_FIFO_MODE_FIFO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BMC150_ACCEL_FIFO_MODE_FIFO@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	mov	x0, x19
	bl	_bmc150_accel_fifo_set_mode
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.5:
	str	xzr, [x19, #8]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_bmc150_accel_set_interrupt
	b	LBB0_7
LBB0_6:
	mov	w20, #0
LBB0_7:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_INDIO_BUFFER_TRIGGERED,8,3     ; @INDIO_BUFFER_TRIGGERED
	.comm	_BMC150_ACCEL_INT_WATERMARK,4,2 ; @BMC150_ACCEL_INT_WATERMARK
	.comm	_BMC150_ACCEL_FIFO_MODE_FIFO,8,3 ; @BMC150_ACCEL_FIFO_MODE_FIFO
	.no_dead_strip	_bmc150_accel_buffer_postenable
.subsections_via_symbols
