	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function modify_config_rom
_modify_config_rom:                     ## @modify_config_rom
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	(%rsi), %r14
	cmpq	$-1, %r14
	je	LBB0_11
## %bb.1:
	movq	%r14, -48(%rbp)
	movq	(%r12), %rax
	movq	(%rax,%r14,8), %rax
	testq	%rax, %rax
	je	LBB0_17
## %bb.2:
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_csr1212_detach_keyval_from_directory
	movq	8(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_3
LBB0_4:
	movq	8(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_18
## %bb.5:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
LBB0_6:
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	callq	_csr1212_rom_cache_malloc
	testq	%rax, %rax
	je	LBB0_19
## %bb.7:
	movq	%rax, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kmalloc
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_25
## %bb.8:
	movq	%rax, 48(%r15)
	movl	40(%r15), %ebx
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movl	20(%r13), %edi
	callq	_int2ptr
	movq	8(%r13), %rdx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_copy_from_user
	testq	%rax, %rax
	je	LBB0_28
## %bb.9:
	movq	(%r12), %rax
	movq	(%rax,%r14,8), %rdi
	callq	_csr1212_release_keyval
	movq	(%r12), %rax
	movq	$0, (%rax,%r14,8)
	movq	_EFAULT@GOTPCREL(%rip), %rax
LBB0_10:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_42
LBB0_11:
	cmpq	$0, 8(%r15)
	je	LBB0_17
## %bb.12:
	movq	_RAW1394_MAX_USER_CSR_DIRS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_20
## %bb.13:
	movq	(%r12), %rcx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rcx,%r14,8)
	je	LBB0_21
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	incq	%r14
	cmpq	%r14, %rax
	jne	LBB0_14
## %bb.16:
	movq	%rax, -48(%rbp)
	jmp	LBB0_26
LBB0_17:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_18:
	movq	(%r12), %rax
	movq	(%rax,%r14,8), %rdi
	callq	_csr1212_release_keyval
	movq	(%r12), %rax
	movq	$0, (%rax,%r14,8)
	movq	8(%r12), %rdi
	callq	_hpsb_update_config_rom_image
	movq	%r15, %rdi
	jmp	LBB0_44
LBB0_19:
	movq	(%r12), %rax
	movq	(%rax,%r14,8), %rdi
	callq	_csr1212_release_keyval
	movq	(%r12), %rax
	movq	$0, (%rax,%r14,8)
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_45
LBB0_20:
	xorl	%r14d, %r14d
LBB0_21:
	movq	%r14, -48(%rbp)
	cmpq	%rax, %r14
	je	LBB0_26
## %bb.22:
	movq	_CSR1212_KV_ID_VENDOR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_csr1212_new_directory
	movq	(%r12), %rcx
	movq	%rax, (%rcx,%r14,8)
	movq	(%r12), %rax
	cmpq	$0, (%rax,%r14,8)
	je	LBB0_26
## %bb.23:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	8(%r15), %rsi
	jmp	LBB0_6
LBB0_25:
	movq	(%r12), %rax
	movq	(%rax,%r14,8), %rdi
	callq	_csr1212_release_keyval
	movq	(%r12), %rax
	movq	$0, (%rax,%r14,8)
	movq	%r15, %rdi
	callq	_CSR1212_FREE
LBB0_26:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_27:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_45
LBB0_28:
	movq	8(%r13), %rax
	movq	%rax, (%r15)
	movq	8(%r15), %rax
	movq	$0, 8(%rax)
	movq	32(%r15), %rcx
	decq	%rcx
	movq	%rcx, (%rax)
	movq	(%r12), %rcx
	movq	-48(%rbp), %rdx
	movq	(%rcx,%rdx,8), %rbx
	movq	%rbx, 24(%r15)
	movq	%rbx, 16(%r15)
	movq	_CSR1212_SUCCESS@GOTPCREL(%rip), %r14
	testq	%rbx, %rbx
	je	LBB0_33
## %bb.29:
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_csr1212_parse_keyval
	movl	%eax, %r13d
	movl	(%r14), %eax
	cmpl	%eax, %r13d
	jne	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_30 Depth=1
	movq	8(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_30
LBB0_32:
	movq	(%r12), %rcx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_34
LBB0_33:
	movl	(%r14), %eax
	movl	%eax, %r13d
LBB0_34:
	cmpl	%eax, %r13d
	sete	%al
	jne	LBB0_38
## %bb.35:
	movq	(%rcx,%rdx,8), %rcx
	movq	(%rcx), %rbx
	testq	%rbx, %rbx
	je	LBB0_38
	.p2align	4, 0x90
LBB0_36:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_csr1212_attach_keyval_to_directory
	movl	%eax, %r13d
	cmpl	(%r14), %eax
	sete	%al
	jne	LBB0_38
## %bb.37:                              ##   in Loop: Header=BB0_36 Depth=1
	movq	8(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_36
LBB0_38:
	testb	%al, %al
	je	LBB0_42
## %bb.39:
	movq	8(%r12), %rdi
	callq	_hpsb_update_config_rom_image
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_42
## %bb.40:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	16(%rax), %edi
	callq	_int2ptr
	leaq	-48(%rbp), %rsi
	movl	%eax, %edi
	movl	$8, %edx
	callq	_copy_to_user
	testq	%rax, %rax
	je	LBB0_42
## %bb.41:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_42:
	movq	8(%r15), %rdi
	callq	_kfree
	movq	%r15, %rdi
	callq	_CSR1212_FREE
	testl	%r13d, %r13d
	js	LBB0_46
## %bb.43:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
LBB0_44:
	callq	_free_pending_request
	xorl	%r13d, %r13d
LBB0_45:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_46:
	movq	(%r12), %rax
	movq	-48(%rbp), %rcx
	movq	(%rax,%rcx,8), %rdi
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_49
	.p2align	4, 0x90
LBB0_47:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_csr1212_detach_keyval_from_directory
	movq	8(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_47
## %bb.48:
	movq	(%r12), %rax
	movq	-48(%rbp), %rcx
	movq	(%rax,%rcx,8), %rdi
LBB0_49:
	callq	_csr1212_release_keyval
	movq	(%r12), %rax
	movq	-48(%rbp), %rcx
	movq	$0, (%rax,%rcx,8)
	jmp	LBB0_45
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RAW1394_MAX_USER_CSR_DIRS,8,3  ## @RAW1394_MAX_USER_CSR_DIRS
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CSR1212_KV_ID_VENDOR,4,2       ## @CSR1212_KV_ID_VENDOR
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_CSR1212_SUCCESS,4,2            ## @CSR1212_SUCCESS
	.no_dead_strip	_modify_config_rom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function modify_config_rom
_modify_config_rom:                     ; @modify_config_rom
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	ldr	x23, [x1]
	cmn	x23, #1
	b.eq	LBB0_10
; %bb.1:
	str	x23, [sp, #8]
	ldr	x8, [x19]
	ldr	x8, [x8, x23, lsl #3]
	cbz	x8, LBB0_16
; %bb.2:
	ldr	x21, [x8]
	cbz	x21, LBB0_4
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w0, [x8]
	ldr	w1, [x21]
	bl	_csr1212_detach_keyval_from_directory
	ldr	x21, [x21, #8]
	cbnz	x21, LBB0_3
LBB0_4:
	ldr	x1, [x20, #8]
	cbz	x1, LBB0_17
LBB0_5:
	mov	w0, #0
	bl	_csr1212_rom_cache_malloc
	cbz	x0, LBB0_18
; %bb.6:
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kmalloc
	str	x0, [x21, #8]
	cbz	x0, LBB0_23
; %bb.7:
	str	x0, [x21, #48]
	ldr	w22, [x21, #40]
	ldr	w0, [x20, #20]
	bl	_int2ptr
	mov	x1, x0
	ldr	x2, [x20, #8]
	mov	x0, x22
	bl	_copy_from_user
	cbz	x0, LBB0_26
; %bb.8:
	ldr	x8, [x19]
	lsl	x22, x23, #3
	ldr	x0, [x8, x22]
	bl	_csr1212_release_keyval
	ldr	x8, [x19]
	str	xzr, [x8, x22]
Lloh3:
	adrp	x8, _EFAULT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_37
LBB0_10:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_16
; %bb.11:
Lloh5:
	adrp	x8, _RAW1394_MAX_USER_CSR_DIRS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RAW1394_MAX_USER_CSR_DIRS@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cbz	x8, LBB0_19
; %bb.12:
	mov	x23, #0
	ldr	x9, [x19]
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9, x23, lsl #3]
	cbz	x10, LBB0_20
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	add	x23, x23, #1
	cmp	x8, x23
	b.ne	LBB0_13
; %bb.15:
	str	x8, [sp, #8]
	b	LBB0_24
LBB0_16:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_25
LBB0_17:
	ldr	x8, [x19]
	lsl	x21, x23, #3
	ldr	x0, [x8, x21]
	bl	_csr1212_release_keyval
	ldr	x8, [x19]
	str	xzr, [x8, x21]
	ldr	x0, [x19, #8]
	bl	_hpsb_update_config_rom_image
	b	LBB0_38
LBB0_18:
	ldr	x8, [x19]
	lsl	x20, x23, #3
	ldr	x0, [x8, x20]
	bl	_csr1212_release_keyval
	ldr	x8, [x19]
	str	xzr, [x8, x20]
	b	LBB0_24
LBB0_19:
	mov	x23, #0
LBB0_20:
	str	x23, [sp, #8]
	cmp	x23, x8
	b.eq	LBB0_24
; %bb.21:
Lloh10:
	adrp	x8, _CSR1212_KV_ID_VENDOR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CSR1212_KV_ID_VENDOR@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_csr1212_new_directory
	ldr	x8, [x19]
	lsl	x9, x23, #3
	str	x0, [x8, x9]
	ldr	x8, [x19]
	ldr	x8, [x8, x9]
	cbz	x8, LBB0_24
; %bb.22:
	ldr	x1, [x20, #8]
	b	LBB0_5
LBB0_23:
	ldr	x8, [x19]
	lsl	x20, x23, #3
	ldr	x0, [x8, x20]
	bl	_csr1212_release_keyval
	ldr	x8, [x19]
	str	xzr, [x8, x20]
	mov	x0, x21
	bl	_CSR1212_FREE
LBB0_24:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_25:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_39
LBB0_26:
	ldr	x8, [x20, #8]
	str	x8, [x21]
	ldr	x8, [x21, #8]
	ldr	x9, [x21, #32]
	sub	x9, x9, #1
	stp	x9, xzr, [x8]
	ldr	x9, [x19]
	ldr	x25, [sp, #8]
	ldr	x23, [x9, x25, lsl #3]
	stp	x23, x23, [x21, #16]
Lloh15:
	adrp	x24, _CSR1212_SUCCESS@GOTPAGE
Lloh16:
	ldr	x24, [x24, _CSR1212_SUCCESS@GOTPAGEOFF]
	cbz	x23, LBB0_29
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x21
	bl	_csr1212_parse_keyval
	ldr	x23, [x23, #8]
	ldr	w8, [x24]
	cmp	w0, w8
	ccmp	x23, #0, #4, eq
	b.ne	LBB0_27
; %bb.28:
	mov	x22, x0
	ldr	x9, [x19]
	b	LBB0_30
LBB0_29:
	ldr	w8, [x24]
	mov	x22, x8
LBB0_30:
	ldr	x9, [x9, x25, lsl #3]
	ldr	x23, [x9]
	cmp	w22, w8
	cset	w8, eq
	ccmp	x23, #0, #4, eq
	b.eq	LBB0_33
LBB0_31:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w0, [x8]
	ldr	w1, [x23]
	bl	_csr1212_attach_keyval_to_directory
	ldr	x23, [x23, #8]
	ldr	w8, [x24]
	cmp	w0, w8
	cset	w8, eq
	ccmp	x23, #0, #4, eq
	b.ne	LBB0_31
; %bb.32:
	mov	x22, x0
LBB0_33:
	cbz	w8, LBB0_37
; %bb.34:
	ldr	x0, [x19, #8]
	bl	_hpsb_update_config_rom_image
	mov	x22, x0
	tbnz	w0, #31, LBB0_37
; %bb.35:
	ldr	w0, [x20, #16]
	bl	_int2ptr
	add	x1, sp, #8
	mov	w2, #8
	bl	_copy_to_user
	cbz	x0, LBB0_37
; %bb.36:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_9
LBB0_37:
	ldr	x0, [x21, #8]
	bl	_kfree
	mov	x0, x21
	bl	_CSR1212_FREE
	tbnz	w22, #31, LBB0_40
LBB0_38:
	mov	x0, x20
	bl	_free_pending_request
	mov	w22, #0
LBB0_39:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_40:
	ldr	x8, [x19]
	ldr	x9, [sp, #8]
	ldr	x0, [x8, x9, lsl #3]
	ldr	x20, [x0]
	cbz	x20, LBB0_43
LBB0_41:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w0, [x8]
	ldr	w1, [x20]
	bl	_csr1212_detach_keyval_from_directory
	ldr	x20, [x20, #8]
	cbnz	x20, LBB0_41
; %bb.42:
	ldr	x8, [x19]
	ldr	x9, [sp, #8]
	ldr	x0, [x8, x9, lsl #3]
LBB0_43:
	bl	_csr1212_release_keyval
	ldr	x8, [x19]
	ldr	x9, [sp, #8]
	str	xzr, [x8, x9, lsl #3]
	b	LBB0_39
	.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
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RAW1394_MAX_USER_CSR_DIRS,8,3  ; @RAW1394_MAX_USER_CSR_DIRS
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CSR1212_KV_ID_VENDOR,4,2       ; @CSR1212_KV_ID_VENDOR
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_CSR1212_SUCCESS,4,2            ; @CSR1212_SUCCESS
	.no_dead_strip	_modify_config_rom
.subsections_via_symbols
