	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function modify_bar_registration
_modify_bar_registration:               ## @modify_bar_registration
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rdi, %r15
	movq	(%rdi), %r13
	movslq	%esi, %rax
	leaq	(%rax,%rax,2), %rbx
	movl	(%r13,%rbx,4), %eax
	leal	-128(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_1
## %bb.5:
	movl	%esi, %r12d
	leaq	-96(%rbp), %rdi
	movl	$56, %esi
	callq	_bzero
	movl	8(%r15), %eax
	movl	%eax, -64(%rbp)
	movl	8(%r13,%rbx,4), %eax
	movl	%eax, -68(%rbp)
	movl	4(%r13,%rbx,4), %eax
	movl	%eax, -72(%rbp)
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.6:
	movq	_MEM_F_RW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)
	movq	_pci_emul_mem_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	movq	%r15, -88(%rbp)
	movl	%r12d, -96(%rbp)
	leaq	-96(%rbp), %rdi
	callq	_register_mem
	jmp	LBB0_9
LBB0_1:
	cmpl	$130, %eax
	jne	LBB0_8
## %bb.2:
	leaq	-96(%rbp), %rdi
	movl	$56, %esi
	callq	_bzero
	movl	8(%r15), %eax
	movl	%eax, -64(%rbp)
	movl	8(%r13,%rbx,4), %eax
	movl	%eax, -48(%rbp)
	movl	4(%r13,%rbx,4), %eax
	movl	%eax, -72(%rbp)
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.3:
	movq	_IOPORT_F_INOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)
	movq	_pci_emul_io_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	movq	%r15, -56(%rbp)
	leaq	-96(%rbp), %rdi
	callq	_register_inout
	jmp	LBB0_9
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_9
LBB0_7:
	leaq	-96(%rbp), %rdi
	callq	_unregister_mem
	jmp	LBB0_9
LBB0_4:
	leaq	-96(%rbp), %rdi
	callq	_unregister_inout
LBB0_9:
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IOPORT_F_INOUT,4,2             ## @IOPORT_F_INOUT
	.comm	_pci_emul_io_handler,4,2        ## @pci_emul_io_handler
	.comm	_MEM_F_RW,4,2                   ## @MEM_F_RW
	.comm	_pci_emul_mem_handler,4,2       ## @pci_emul_mem_handler
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_modify_bar_registration
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function modify_bar_registration
_modify_bar_registration:               ; @modify_bar_registration
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x22, [x0]
	sxtw	x23, w21
	mov	w8, #12
	smull	x8, w1, w8
	ldr	w8, [x22, x8]
	sub	w9, w8, #128
	cmp	w9, #2
	b.hs	LBB0_3
; %bb.1:
	add	x0, sp, #8
	mov	w1, #56
	bl	_bzero
	ldr	w8, [x19, #8]
	str	w8, [sp, #40]
	mov	w8, #12
	madd	x8, x23, x8, x22
	ldur	d0, [x8, #4]
	str	d0, [sp, #32]
	cbz	w20, LBB0_7
; %bb.2:
Lloh0:
	adrp	x8, _MEM_F_RW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MEM_F_RW@GOTPAGEOFF]
Lloh2:
	adrp	x9, _pci_emul_mem_handler@GOTPAGE
Lloh3:
	ldr	x9, [x9, _pci_emul_mem_handler@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #24]
	str	x19, [sp, #16]
	str	w21, [sp, #8]
	add	x0, sp, #8
	bl	_register_mem
	b	LBB0_9
LBB0_3:
	cmp	w8, #130
	b.ne	LBB0_6
; %bb.4:
	add	x0, sp, #8
	mov	w1, #56
	bl	_bzero
	ldr	w8, [x19, #8]
	str	w8, [sp, #40]
	mov	w8, #12
	madd	x8, x23, x8, x22
	ldr	w9, [x8, #8]
	str	w9, [sp, #56]
	ldr	w8, [x8, #4]
	str	w8, [sp, #32]
	cbz	w20, LBB0_8
; %bb.5:
Lloh6:
	adrp	x8, _IOPORT_F_INOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IOPORT_F_INOUT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _pci_emul_io_handler@GOTPAGE
Lloh10:
	ldr	x9, [x9, _pci_emul_io_handler@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #24]
	str	x19, [sp, #48]
	add	x0, sp, #8
	bl	_register_inout
	b	LBB0_9
LBB0_6:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	b	LBB0_9
LBB0_7:
	add	x0, sp, #8
	bl	_unregister_mem
	b	LBB0_9
LBB0_8:
	add	x0, sp, #8
	bl	_unregister_inout
LBB0_9:
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_IOPORT_F_INOUT,4,2             ; @IOPORT_F_INOUT
	.comm	_pci_emul_io_handler,4,2        ; @pci_emul_io_handler
	.comm	_MEM_F_RW,4,2                   ; @MEM_F_RW
	.comm	_pci_emul_mem_handler,4,2       ; @pci_emul_mem_handler
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_modify_bar_registration
.subsections_via_symbols
