	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_phy_reg
_set_phy_reg:                           ## @set_phy_reg
	.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	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_spin_lock_irqsave
	movq	_OHCI1394_PhyControl@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	shll	$8, %ebx
	orl	%r15d, %ebx
	orl	$16384, %ebx                    ## imm = 0x4000
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_reg_write
	movq	_OHCI_LOOP_COUNT@GOTPCREL(%rip), %r13
	movl	(%r13), %r8d
	xorl	%ebx, %ebx
	testl	%r8d, %r8d
	jle	LBB0_1
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_reg_read
	movl	%eax, %r15d
	testl	$16384, %eax                    ## imm = 0x4000
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	callq	_mdelay
	incl	%ebx
	movl	(%r13), %r8d
	cmpl	%r8d, %ebx
	jl	LBB0_2
	jmp	LBB0_5
LBB0_1:
	xorl	%r15d, %r15d
LBB0_5:
	cmpl	%r8d, %ebx
	jne	LBB0_7
LBB0_6:
	movq	_KERN_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %ecx
	andl	$16384, %ecx                    ## imm = 0x4000
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_PRINT
LBB0_7:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_3:
	movl	(%r13), %r8d
	cmpl	%r8d, %ebx
	je	LBB0_6
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_OHCI1394_PhyControl,4,2        ## @OHCI1394_PhyControl
	.comm	_OHCI_LOOP_COUNT,4,2            ## @OHCI_LOOP_COUNT
	.comm	_KERN_ERR,4,2                   ## @KERN_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set PHY Reg timeout [0x%08x/0x%08x/%d]"

	.no_dead_strip	_set_phy_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_phy_reg
_set_phy_reg:                           ; @set_phy_reg
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x22, _OHCI1394_PhyControl@GOTPAGE
Lloh1:
	ldr	x22, [x22, _OHCI1394_PhyControl@GOTPAGEOFF]
	ldr	w1, [x22]
	orr	w8, w20, w21, lsl #8
	orr	w2, w8, #0x4000
	mov	x0, x19
	bl	_reg_write
Lloh2:
	adrp	x23, _OHCI_LOOP_COUNT@GOTPAGE
Lloh3:
	ldr	x23, [x23, _OHCI_LOOP_COUNT@GOTPAGEOFF]
	ldr	w4, [x23]
	cmp	w4, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_reg_read
	mov	x20, x0
	tbz	w0, #14, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1
	bl	_mdelay
	add	w21, w21, #1
	ldr	w4, [x23]
	cmp	w21, w4
	b.lt	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	w21, #0
	mov	w20, #0
LBB0_5:
	cmp	w21, w4
	b.ne	LBB0_7
LBB0_6:
Lloh4:
	adrp	x8, _KERN_ERR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _KERN_ERR@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	and	w3, w20, #0x4000
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_PRINT
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
LBB0_8:
	ldr	w4, [x23]
	cmp	w21, w4
	b.eq	LBB0_6
	b	LBB0_7
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_OHCI1394_PhyControl,4,2        ; @OHCI1394_PhyControl
	.comm	_OHCI_LOOP_COUNT,4,2            ; @OHCI_LOOP_COUNT
	.comm	_KERN_ERR,4,2                   ; @KERN_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set PHY Reg timeout [0x%08x/0x%08x/%d]"

	.no_dead_strip	_set_phy_reg
.subsections_via_symbols
