	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fw_core_add_address_handler    ## -- Begin function fw_core_add_address_handler
	.p2align	4, 0x90
_fw_core_add_address_handler:           ## @fw_core_add_address_handler
	.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
	movabsq	$-281474976710653, %rcx         ## imm = 0xFFFF000000000003
	xorl	%r14d, %r14d
	movslq	(%rsi), %rax
	testq	%rcx, %rax
	je	LBB0_1
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_12:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rsi, %r15
	movslq	4(%rsi), %rdx
	testq	%rcx, %rdx
	jne	LBB0_5
## %bb.2:
	cmpl	%edx, %eax
	jge	LBB0_5
## %bb.3:
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	andl	$3, %eax
	jne	LBB0_5
## %bb.6:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	movq	_address_handler_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movl	(%r15), %esi
	movl	%esi, 4(%rbx)
	movl	(%rbx), %edx
	leal	(%rdx,%rsi), %eax
	cmpl	4(%r15), %eax
	jg	LBB0_11
## %bb.7:
	movq	_address_handler_list@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_lookup_overlapping_address_handler
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	addl	(%rax), %esi
	movl	%esi, 4(%rbx)
	leal	(%rdx,%rsi), %eax
	cmpl	4(%r15), %eax
	jle	LBB0_8
	jmp	LBB0_11
LBB0_10:
	addq	$8, %rbx
	movq	_address_handler_list@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_list_add_tail
	xorl	%r14d, %r14d
LBB0_11:
	movq	_address_handler_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_address_handler_lock,4,2       ## @address_handler_lock
	.comm	_address_handler_list,4,2       ## @address_handler_list
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fw_core_add_address_handler    ; -- Begin function fw_core_add_address_handler
	.p2align	2
_fw_core_add_address_handler:           ; @fw_core_add_address_handler
	.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
	ldrsw	x8, [x1]
	tst	x8, #0xffff000000000003
	b.ne	LBB0_3
; %bb.1:
	mov	x20, x1
	ldrsw	x9, [x1, #4]
	and	x10, x9, #0xffff000000000003
	cmp	x10, #0
	ccmp	w8, w9, #0, eq
	b.ge	LBB0_3
; %bb.2:
	mov	x19, x0
	ldr	w8, [x0]
	and	w9, w8, #0x3
	cmp	w8, #0
	ccmp	w9, #0, #0, ne
	b.eq	LBB0_5
LBB0_3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_4:
	mov	x0, x21
	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
LBB0_5:
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w21, w8
Lloh6:
	adrp	x0, _address_handler_lock@GOTPAGE
Lloh7:
	ldr	x0, [x0, _address_handler_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
	ldp	w1, w8, [x20]
	str	w1, [x19, #4]
	ldr	w2, [x19]
	add	w9, w2, w1
	cmp	w9, w8
	b.gt	LBB0_10
; %bb.6:
Lloh8:
	adrp	x22, _address_handler_list@GOTPAGE
Lloh9:
	ldr	x22, [x22, _address_handler_list@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_lookup_overlapping_address_handler
	cbz	x0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x0]
	ldp	w2, w9, [x19]
	add	w1, w9, w8
	add	w8, w2, w1
	str	w1, [x19, #4]
	ldr	w9, [x20, #4]
	cmp	w8, w9
	b.le	LBB0_7
	b	LBB0_10
LBB0_9:
	add	x0, x19, #8
Lloh10:
	adrp	x1, _address_handler_list@GOTPAGE
Lloh11:
	ldr	x1, [x1, _address_handler_list@GOTPAGEOFF]
	bl	_list_add_tail
	mov	w21, #0
LBB0_10:
Lloh12:
	adrp	x0, _address_handler_lock@GOTPAGE
Lloh13:
	ldr	x0, [x0, _address_handler_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_address_handler_lock,4,2       ; @address_handler_lock
	.comm	_address_handler_list,4,2       ; @address_handler_list
.subsections_via_symbols
