	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bmg160_write_event
_bmg160_write_event:                    ## @bmg160_write_event
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%r9d, %r14d
	movl	%r8d, %ebx
	callq	_iio_priv
	cmpl	$128, %ebx
	jne	LBB0_4
## %bb.1:
	cmpl	$0, 4(%rax)
	je	LBB0_3
## %bb.2:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_3:
	movq	_BMG160_SLOPE_THRES_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	(%rax), %edx
	movl	%edx, (%rax)
	andl	(%rcx), %r14d
	orl	%edx, %r14d
	movl	%r14d, (%rax)
	xorl	%eax, %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_BMG160_SLOPE_THRES_MASK,4,2    ## @BMG160_SLOPE_THRES_MASK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_bmg160_write_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bmg160_write_event
_bmg160_write_event:                    ; @bmg160_write_event
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x5
	mov	x20, x4
	bl	_iio_priv
	cmp	w20, #128
	b.ne	LBB0_3
; %bb.1:
	mov	x8, x0
	ldr	w9, [x0, #4]
	cbz	w9, LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	mov	w0, #0
Lloh4:
	adrp	x9, _BMG160_SLOPE_THRES_MASK@GOTPAGE
Lloh5:
	ldr	x9, [x9, _BMG160_SLOPE_THRES_MASK@GOTPAGEOFF]
	ldr	w10, [x9]
	ldr	w11, [x8]
	bic	w10, w11, w10
	str	w10, [x8]
	ldr	w9, [x9]
	and	w9, w9, w19
	orr	w9, w9, w10
	str	w9, [x8]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_BMG160_SLOPE_THRES_MASK,4,2    ; @BMG160_SLOPE_THRES_MASK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_bmg160_write_event
.subsections_via_symbols
