	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ams_pmu_set_irq
_ams_pmu_set_irq:                       ## @ams_pmu_set_irq
	.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
	movl	%esi, %r14d
	movl	%edi, %ebx
	movq	_AMS_IRQ_FREEFALL@GOTPCREL(%rip), %rax
	testl	%edi, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_AMS_FF_ENABLE@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_ams_pmu_get_register
	xorl	%esi, %esi
	testb	%r14b, %r14b
	setne	%sil
	andl	$-129, %eax
	shll	$7, %esi
	orl	%eax, %esi
	movl	(%r15), %edi
	callq	_ams_pmu_set_register
LBB0_2:
	movq	_AMS_IRQ_SHOCK@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_AMS_SHOCK_ENABLE@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_ams_pmu_get_register
	xorl	%esi, %esi
	testb	%r14b, %r14b
	setne	%sil
	andl	$-129, %eax
	shll	$7, %esi
	orl	%eax, %esi
	movl	(%r15), %edi
	callq	_ams_pmu_set_register
LBB0_4:
	movq	_AMS_IRQ_GLOBAL@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_5
## %bb.6:
	movq	_AMS_CONTROL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_ams_pmu_get_register
	xorl	%esi, %esi
	testb	%r14b, %r14b
	setne	%sil
	andl	$-129, %eax
	shll	$7, %esi
	orl	%eax, %esi
	movl	(%rbx), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ams_pmu_set_register           ## TAILCALL
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMS_IRQ_FREEFALL,4,2           ## @AMS_IRQ_FREEFALL
	.comm	_AMS_FF_ENABLE,4,2              ## @AMS_FF_ENABLE
	.comm	_AMS_IRQ_SHOCK,4,2              ## @AMS_IRQ_SHOCK
	.comm	_AMS_SHOCK_ENABLE,4,2           ## @AMS_SHOCK_ENABLE
	.comm	_AMS_IRQ_GLOBAL,4,2             ## @AMS_IRQ_GLOBAL
	.comm	_AMS_CONTROL,4,2                ## @AMS_CONTROL
	.no_dead_strip	_ams_pmu_set_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ams_pmu_set_irq
_ams_pmu_set_irq:                       ; @ams_pmu_set_irq
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _AMS_IRQ_FREEFALL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AMS_IRQ_FREEFALL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x21, _AMS_FF_ENABLE@GOTPAGE
Lloh4:
	ldr	x21, [x21, _AMS_FF_ENABLE@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_ams_pmu_get_register
	mov	x1, x0
	cmp	w19, #0
	cset	w8, ne
	bfi	w1, w8, #7, #1
	ldr	w0, [x21]
	bl	_ams_pmu_set_register
LBB0_2:
Lloh5:
	adrp	x8, _AMS_IRQ_SHOCK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AMS_IRQ_SHOCK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_4
; %bb.3:
Lloh8:
	adrp	x21, _AMS_SHOCK_ENABLE@GOTPAGE
Lloh9:
	ldr	x21, [x21, _AMS_SHOCK_ENABLE@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_ams_pmu_get_register
	mov	x1, x0
	cmp	w19, #0
	cset	w8, ne
	bfi	w1, w8, #7, #1
	ldr	w0, [x21]
	bl	_ams_pmu_set_register
LBB0_4:
Lloh10:
	adrp	x8, _AMS_IRQ_GLOBAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AMS_IRQ_GLOBAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_6
; %bb.5:
Lloh13:
	adrp	x20, _AMS_CONTROL@GOTPAGE
Lloh14:
	ldr	x20, [x20, _AMS_CONTROL@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_ams_pmu_get_register
	mov	x1, x0
	cmp	w19, #0
	cset	w8, ne
	bfi	w1, w8, #7, #1
	ldr	w0, [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	_ams_pmu_set_register
LBB0_6:
	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
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_AMS_IRQ_FREEFALL,4,2           ; @AMS_IRQ_FREEFALL
	.comm	_AMS_FF_ENABLE,4,2              ; @AMS_FF_ENABLE
	.comm	_AMS_IRQ_SHOCK,4,2              ; @AMS_IRQ_SHOCK
	.comm	_AMS_SHOCK_ENABLE,4,2           ; @AMS_SHOCK_ENABLE
	.comm	_AMS_IRQ_GLOBAL,4,2             ; @AMS_IRQ_GLOBAL
	.comm	_AMS_CONTROL,4,2                ; @AMS_CONTROL
	.no_dead_strip	_ams_pmu_set_irq
.subsections_via_symbols
