	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_and_insert_self_id
_find_and_insert_self_id:               ## @find_and_insert_self_id
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_OHCI1394_NodeID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_reg_read
	movl	%eax, %r13d
	movq	_OHCI1394_NodeID_idValid@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_8
## %bb.1:
	leaq	8(%r15), %rbx
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_ohci_read_phy_reg
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_9
## %bb.2:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ohci_read_phy_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_10
## %bb.3:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_get_status_for_port
	testl	%eax, %eax
	js	LBB0_12
## %bb.4:
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_get_status_for_port
	testl	%eax, %eax
	js	LBB0_12
## %bb.5:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	movl	$2, %esi
	callq	_get_status_for_port
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	js	LBB0_13
## %bb.6:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	shll	$4, %edx
	andl	$48, %edx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	shll	$6, %ecx
	movzbl	%cl, %ecx
	andl	$63, %r13d
	shll	$24, %r13d
	andl	$7, %r12d
	shll	$8, %r12d
	orl	%r13d, %r12d
	andl	$63, %ebx
	shll	$16, %ebx
	orl	%r12d, %ebx
	orl	%ecx, %ebx
	orl	%edx, %ebx
	andl	$3, %eax
	leal	(%rbx,%rax,4), %r12d
	movq	%r15, %rdi
	callq	_initiated_reset
	movl	%eax, %ebx
	orl	%r12d, %ebx
	orl	$-2143238144, %ebx              ## imm = 0x8040C800
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_get_self_id_pos
	testl	%eax, %eax
	js	LBB0_14
## %bb.7:
	movq	(%r15), %rcx
	movl	%eax, %r12d
	leaq	(%rcx,%r12,4), %rdi
	addq	$4, %rdi
	leaq	(%rcx,%r12,4), %rsi
	movl	%r14d, %edx
	subl	%eax, %edx
	shll	$2, %edx
	callq	_memmove
	movq	(%r15), %rax
	movl	%ebx, (%rax,%r12,4)
	incl	%r14d
	jmp	LBB0_14
LBB0_8:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_ohci_notice
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_14
LBB0_9:
	movl	%r12d, %r14d
	jmp	LBB0_14
LBB0_10:
	movl	%ebx, %r14d
	jmp	LBB0_14
LBB0_12:
	movl	%eax, %r14d
	jmp	LBB0_14
LBB0_13:
	movl	%eax, %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OHCI1394_NodeID,4,2            ## @OHCI1394_NodeID
	.comm	_OHCI1394_NodeID_idValid,4,2    ## @OHCI1394_NodeID_idValid
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"node ID not valid, new bus reset in progress\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_find_and_insert_self_id
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_and_insert_self_id
_find_and_insert_self_id:               ; @find_and_insert_self_id
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _OHCI1394_NodeID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OHCI1394_NodeID@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_reg_read
Lloh3:
	adrp	x8, _OHCI1394_NodeID_idValid@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OHCI1394_NodeID_idValid@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_8
; %bb.1:
	mov	x21, x0
	add	x23, x20, #8
	mov	x0, x23
	mov	w1, #4
	bl	_ohci_read_phy_reg
	mov	x22, x0
	tbnz	w0, #31, LBB0_9
; %bb.2:
	mov	x0, x23
	mov	w1, #1
	bl	_ohci_read_phy_reg
	mov	x23, x0
	tbnz	w0, #31, LBB0_10
; %bb.3:
	mov	x0, x20
	mov	w1, #0
	bl	_get_status_for_port
	mov	x24, x0
	tbnz	w0, #31, LBB0_11
; %bb.4:
	mov	x0, x20
	mov	w1, #1
	bl	_get_status_for_port
	mov	x25, x0
	tbnz	w0, #31, LBB0_12
; %bb.5:
	mov	x0, x20
	mov	w1, #2
	bl	_get_status_for_port
	tbnz	w0, #31, LBB0_13
; %bb.6:
	ubfiz	w22, w22, #8, #3
	bfi	w22, w21, #24, #6
	bfi	w22, w23, #16, #6
	bfi	w22, w24, #6, #2
	bfi	w22, w25, #4, #2
	bfi	w22, w0, #2, #2
	mov	x0, x20
	bl	_initiated_reset
	orr	w8, w22, w0
	mov	w9, #51200
	movk	w9, #32832, lsl #16
	orr	w21, w8, w9
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_get_self_id_pos
	tbnz	w0, #31, LBB0_14
; %bb.7:
	ldr	x9, [x20]
	add	w8, w0, #1
	add	x8, x9, w8, uxtw #2
	mov	w10, w0
	lsl	x22, x10, #2
	add	x1, x9, x22
	sub	w9, w19, w0
	lsl	w2, w9, #2
	mov	x0, x8
	bl	_memmove
	ldr	x8, [x20]
	str	w21, [x8, x22]
	add	w19, w19, #1
	b	LBB0_14
LBB0_8:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_ohci_notice
Lloh8:
	adrp	x8, _EBUSY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_14
LBB0_9:
	mov	x19, x22
	b	LBB0_14
LBB0_10:
	mov	x19, x23
	b	LBB0_14
LBB0_11:
	mov	x19, x24
	b	LBB0_14
LBB0_12:
	mov	x19, x25
	b	LBB0_14
LBB0_13:
	mov	x19, x0
LBB0_14:
	mov	x0, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_OHCI1394_NodeID,4,2            ; @OHCI1394_NodeID
	.comm	_OHCI1394_NodeID_idValid,4,2    ; @OHCI1394_NodeID_idValid
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"node ID not valid, new bus reset in progress\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_find_and_insert_self_id
.subsections_via_symbols
