	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bmc150_accel_set_interrupt
_bmc150_accel_set_interrupt:            ## @bmc150_accel_set_interrupt
	.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
	movl	%edx, %r12d
	movl	%esi, %ebx
	movq	%rdi, %r15
	movl	(%rdi), %edi
	callq	_regmap_get_device
	movq	%rax, %r14
	movq	8(%r15), %rax
	movslq	%ebx, %rcx
	shlq	$4, %rcx
	leaq	(%rax,%rcx), %rdi
	movq	8(%rax,%rcx), %r13
	testl	%r12d, %r12d
	je	LBB0_2
## %bb.1:
	callq	_atomic_inc_return
	xorl	%ebx, %ebx
	cmpl	$1, %eax
	jle	LBB0_3
	jmp	LBB0_10
LBB0_2:
	callq	_atomic_dec_return
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jg	LBB0_10
LBB0_3:
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_bmc150_accel_set_power_state
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	testl	%r12d, %r12d
	movl	(%r15), %edi
	movl	8(%r13), %edx
	movl	12(%r13), %esi
	movl	%edx, %ecx
	cmovel	%r12d, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	testl	%r12d, %r12d
	movl	(%r15), %edi
	movl	(%r13), %edx
	movl	4(%r13), %esi
	cmovnel	%edx, %r12d
	movl	%r12d, %ecx
	callq	_regmap_update_bits
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jns	LBB0_10
## %bb.8:
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %ebx
	jmp	LBB0_9
LBB0_4:
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_6:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
LBB0_9:
	movq	%r14, %rdi
	callq	_dev_err
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_bmc150_accel_set_power_state
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error updating reg_int_map\n"

L_.str.1:                               ## @.str.1
	.asciz	"Error updating reg_int_en\n"

	.no_dead_strip	_bmc150_accel_set_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bmc150_accel_set_interrupt
_bmc150_accel_set_interrupt:            ; @bmc150_accel_set_interrupt
	.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
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	w0, [x0]
	bl	_regmap_get_device
	mov	x20, x0
	ldr	x8, [x19, #8]
	add	x0, x8, w22, sxtw #4
	ldr	x23, [x0, #8]
	cbz	w21, LBB0_6
; %bb.1:
	bl	_atomic_inc_return
	cmp	w0, #1
	b.gt	LBB0_7
LBB0_2:
	mov	x0, x19
	mov	x1, x21
	bl	_bmc150_accel_set_power_state
	tbnz	w0, #31, LBB0_8
; %bb.3:
	ldr	w0, [x19]
	ldp	w2, w1, [x23, #8]
	cmp	w21, #0
	csel	w3, wzr, w2, eq
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_9
; %bb.4:
	ldr	w0, [x19]
	ldp	w2, w1, [x23]
	cmp	w21, #0
	csel	w3, wzr, w2, eq
	bl	_regmap_update_bits
	mov	w22, #0
	tbz	w0, #31, LBB0_11
; %bb.5:
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x22, x0
	b	LBB0_10
LBB0_6:
	bl	_atomic_dec_return
	cmp	x0, #0
	b.le	LBB0_2
LBB0_7:
	mov	w22, #0
	b	LBB0_11
LBB0_8:
	mov	x22, x0
	b	LBB0_11
LBB0_9:
	mov	x22, x0
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
LBB0_10:
	mov	x0, x20
	bl	_dev_err
	mov	x0, x19
	mov	w1, #0
	bl	_bmc150_accel_set_power_state
LBB0_11:
	mov	x0, x22
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error updating reg_int_map\n"

l_.str.1:                               ; @.str.1
	.asciz	"Error updating reg_int_en\n"

	.no_dead_strip	_bmc150_accel_set_interrupt
.subsections_via_symbols
