	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_ex_write_with_update_rule ## -- Begin function acpi_ex_write_with_update_rule
	.p2align	4, 0x90
_acpi_ex_write_with_update_rule:        ## @acpi_ex_write_with_update_rule
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	_ex_write_with_update_rule@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ACPI_FUNCTION_TRACE_U32
	movq	%r13, -48(%rbp)
	movq	_ACPI_INTEGER_MAX@GOTPCREL(%rip), %rax
	movq	%r13, %rbx
	cmpq	%r12, (%rax)
	je	LBB0_12
## %bb.1:
	movq	_AML_FIELD_UPDATE_RULE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	(%r15), %edi
	cmpl	$128, %edi
	je	LBB0_10
## %bb.2:
	cmpl	$129, %edi
	je	LBB0_8
## %bb.3:
	cmpl	$130, %edi
	jne	LBB0_11
## %bb.4:
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movq	%r12, %r14
	notq	%r14
	movl	$8, %edi
	callq	_ACPI_MUL_8
	movq	%rax, %rbx
	movl	4(%r15), %edi
	callq	_ACPI_MUL_8
	subl	%eax, %ebx
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rax
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	movl	%ebx, %ecx
	shlq	%cl, %rax
	movq	%r13, %rbx
	testq	%rax, %rax
	je	LBB0_12
## %bb.5:
	movq	_ACPI_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-72(%rbp), %rdx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_acpi_ex_field_datum_io
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%ebx, %edi
	callq	_return_ACPI_STATUS
LBB0_7:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	andq	-72(%rbp), %rbx
	jmp	LBB0_9
LBB0_10:
	movq	%r13, %rbx
	andq	%r12, %rbx
	movq	%rbx, -48(%rbp)
	jmp	LBB0_12
LBB0_8:
	movq	%r12, %rbx
	notq	%rbx
LBB0_9:
	orq	%r13, %rbx
	movq	%rbx, -48(%rbp)
	jmp	LBB0_12
LBB0_11:
	callq	_ACPI_ERROR
	movq	_AE_AML_OPERAND_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_return_ACPI_STATUS
	movq	%r13, %rbx
LBB0_12:
	movq	%r12, %rdi
	callq	_ACPI_FORMAT_UINT64
	movq	%r13, %rdi
	callq	_ACPI_FORMAT_UINT64
	movq	%rbx, %rdi
	callq	_ACPI_FORMAT_UINT64
	movl	%eax, %edi
	callq	_ACPI_DEBUG_PRINT
	movq	_ACPI_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_acpi_ex_field_datum_io
	movl	%eax, %edi
	callq	_return_ACPI_STATUS
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AE_OK,4,2                      ## @AE_OK
	.comm	_ex_write_with_update_rule,4,2  ## @ex_write_with_update_rule
	.comm	_ACPI_INTEGER_MAX,8,3           ## @ACPI_INTEGER_MAX
	.comm	_AML_FIELD_UPDATE_RULE_MASK,4,2 ## @AML_FIELD_UPDATE_RULE_MASK
	.comm	_ACPI_READ,4,2                  ## @ACPI_READ
	.comm	_AE_INFO,4,2                    ## @AE_INFO
	.comm	_AE_AML_OPERAND_VALUE,4,2       ## @AE_AML_OPERAND_VALUE
	.comm	_ACPI_DB_BFIELD,4,2             ## @ACPI_DB_BFIELD
	.comm	_ACPI_WRITE,4,2                 ## @ACPI_WRITE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_ex_write_with_update_rule ; -- Begin function acpi_ex_write_with_update_rule
	.p2align	2
_acpi_ex_write_with_update_rule:        ; @acpi_ex_write_with_update_rule
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x3
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _ex_write_with_update_rule@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ex_write_with_update_rule@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_ACPI_FUNCTION_TRACE_U32
	str	x21, [sp, #8]
Lloh3:
	adrp	x8, _ACPI_INTEGER_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ACPI_INTEGER_MAX@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	mov	x23, x21
	cmp	x8, x22
	b.ne	LBB0_2
LBB0_1:
	mov	x0, x22
	bl	_ACPI_FORMAT_UINT64
	mov	x0, x21
	bl	_ACPI_FORMAT_UINT64
	mov	x0, x23
	bl	_ACPI_FORMAT_UINT64
	bl	_ACPI_DEBUG_PRINT
Lloh6:
	adrp	x8, _ACPI_WRITE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ACPI_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x19
	bl	_acpi_ex_field_datum_io
	bl	_return_ACPI_STATUS
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_2:
	ldr	w8, [x20]
Lloh9:
	adrp	x9, _AML_FIELD_UPDATE_RULE_MASK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AML_FIELD_UPDATE_RULE_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	and	w0, w9, w8
	cmp	w0, #128
	b.eq	LBB0_9
; %bb.3:
	cmp	w0, #129
	b.eq	LBB0_10
; %bb.4:
	cmp	w0, #130
	b.ne	LBB0_11
; %bb.5:
	mvn	x24, x22
	mov	w0, #8
	bl	_ACPI_MUL_8
	mov	x23, x0
	ldr	w0, [x20, #4]
	bl	_ACPI_MUL_8
	sub	x8, x23, x0
	lsl	x8, x24, x8
	mov	x23, x21
	cbz	x8, LBB0_1
; %bb.6:
Lloh12:
	adrp	x8, _ACPI_READ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ACPI_READ@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	mov	x2, sp
	mov	x0, x20
	mov	x1, x19
	bl	_acpi_ex_field_datum_io
	mov	x23, x0
	bl	_ACPI_FAILURE
	cbz	w0, LBB0_8
; %bb.7:
	mov	x0, x23
	bl	_return_ACPI_STATUS
LBB0_8:
	ldr	x8, [sp]
	and	x8, x8, x24
	orr	x23, x8, x21
	str	x23, [sp, #8]
	b	LBB0_1
LBB0_9:
	and	x23, x21, x22
	str	x23, [sp, #8]
	b	LBB0_1
LBB0_10:
	orn	x23, x21, x22
	str	x23, [sp, #8]
	b	LBB0_1
LBB0_11:
	bl	_ACPI_ERROR
Lloh15:
	adrp	x8, _AE_AML_OPERAND_VALUE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AE_AML_OPERAND_VALUE@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_return_ACPI_STATUS
	mov	x23, x21
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_AE_OK,4,2                      ; @AE_OK
	.comm	_ex_write_with_update_rule,4,2  ; @ex_write_with_update_rule
	.comm	_ACPI_INTEGER_MAX,8,3           ; @ACPI_INTEGER_MAX
	.comm	_AML_FIELD_UPDATE_RULE_MASK,4,2 ; @AML_FIELD_UPDATE_RULE_MASK
	.comm	_ACPI_READ,4,2                  ; @ACPI_READ
	.comm	_AE_INFO,4,2                    ; @AE_INFO
	.comm	_AE_AML_OPERAND_VALUE,4,2       ; @AE_AML_OPERAND_VALUE
	.comm	_ACPI_DB_BFIELD,4,2             ; @ACPI_DB_BFIELD
	.comm	_ACPI_WRITE,4,2                 ; @ACPI_WRITE
.subsections_via_symbols
