	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_atl1e_reset_hw                 ## -- Begin function atl1e_reset_hw
	.p2align	4, 0x90
_atl1e_reset_hw:                        ## @atl1e_reset_hw
	.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	%rdi, %r13
	movq	(%rdi), %rax
	movq	(%rax), %rbx
	movl	$0, -44(%rbp)
	movq	_PCI_REG_COMMAND@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pci_read_config_word
	movl	-44(%rbp), %eax
	movq	_CMD_IO_SPACE@GOTPCREL(%rip), %rcx
	movq	_CMD_MEMORY_SPACE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_CMD_BUS_MASTER@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movl	%eax, %ecx
	notl	%ecx
	testl	%ecx, %edx
	je	LBB0_2
## %bb.1:
	orl	%eax, %edx
	movl	%edx, -44(%rbp)
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_pci_write_config_word
LBB0_2:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	_REG_MASTER_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MASTER_CTRL_LED_MODE@GOTPCREL(%rip), %rax
	movq	_MASTER_CTRL_SOFT_RST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r13, %rdi
	callq	_AT_WRITE_REG
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_wmb
	movl	$1, %edi
	callq	_msleep
	movq	_AT_HW_MAX_IDLE_DELAY@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movl	$0, %ebx
	testl	%eax, %eax
	jle	LBB0_7
## %bb.3:
	movq	_REG_IDLE_STATUS@GOTPCREL(%rip), %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_AT_READ_REG
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %edi
	callq	_msleep
	xorl	%eax, %eax
	callq	_cpu_relax
	incl	%ebx
	movl	(%r12), %eax
	cmpl	%eax, %ebx
	jl	LBB0_4
LBB0_7:
	cmpl	%eax, %ebx
	jl	LBB0_9
LBB0_8:
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	movq	_AT_ERR_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_9:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	(%r12), %eax
	cmpl	%eax, %ebx
	jge	LBB0_8
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_REG_COMMAND,4,2            ## @PCI_REG_COMMAND
	.comm	_CMD_IO_SPACE,4,2               ## @CMD_IO_SPACE
	.comm	_CMD_MEMORY_SPACE,4,2           ## @CMD_MEMORY_SPACE
	.comm	_CMD_BUS_MASTER,4,2             ## @CMD_BUS_MASTER
	.comm	_REG_MASTER_CTRL,4,2            ## @REG_MASTER_CTRL
	.comm	_MASTER_CTRL_LED_MODE,4,2       ## @MASTER_CTRL_LED_MODE
	.comm	_MASTER_CTRL_SOFT_RST,4,2       ## @MASTER_CTRL_SOFT_RST
	.comm	_AT_HW_MAX_IDLE_DELAY,4,2       ## @AT_HW_MAX_IDLE_DELAY
	.comm	_REG_IDLE_STATUS,4,2            ## @REG_IDLE_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MAC state machine cann't be idle since disabled for 10ms second\n"

	.comm	_AT_ERR_TIMEOUT,4,2             ## @AT_ERR_TIMEOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_atl1e_reset_hw                 ; -- Begin function atl1e_reset_hw
	.p2align	2
_atl1e_reset_hw:                        ; @atl1e_reset_hw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x19, [x8]
	str	wzr, [sp, #12]
Lloh0:
	adrp	x21, _PCI_REG_COMMAND@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PCI_REG_COMMAND@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_word
	ldr	w8, [sp, #12]
Lloh2:
	adrp	x9, _CMD_IO_SPACE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CMD_IO_SPACE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x10, _CMD_MEMORY_SPACE@GOTPAGE
Lloh6:
	ldr	x10, [x10, _CMD_MEMORY_SPACE@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh8:
	adrp	x10, _CMD_BUS_MASTER@GOTPAGE
Lloh9:
	ldr	x10, [x10, _CMD_BUS_MASTER@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	orr	w9, w9, w10
	bics	wzr, w9, w8
	b.eq	LBB0_2
; %bb.1:
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_pci_write_config_word
LBB0_2:
Lloh11:
	adrp	x8, _REG_MASTER_CTRL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _REG_MASTER_CTRL@GOTPAGEOFF]
Lloh13:
	adrp	x9, _MASTER_CTRL_LED_MODE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _MASTER_CTRL_LED_MODE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	ldr	w8, [x9]
Lloh17:
	adrp	x9, _MASTER_CTRL_SOFT_RST@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MASTER_CTRL_SOFT_RST@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x20
	bl	_AT_WRITE_REG
	bl	_wmb
	mov	w0, #1
	bl	_msleep
Lloh20:
	adrp	x22, _AT_HW_MAX_IDLE_DELAY@GOTPAGE
Lloh21:
	ldr	x22, [x22, _AT_HW_MAX_IDLE_DELAY@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	mov	w21, #0
Lloh22:
	adrp	x23, _REG_IDLE_STATUS@GOTPAGE
Lloh23:
	ldr	x23, [x23, _REG_IDLE_STATUS@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x20
	bl	_AT_READ_REG
	cbz	x0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #1
	bl	_msleep
	bl	_cpu_relax
	add	w21, w21, #1
	ldr	w8, [x22]
	cmp	w21, w8
	b.lt	LBB0_4
	b	LBB0_7
LBB0_6:
	mov	w21, #0
LBB0_7:
	cmp	w21, w8
	b.ge	LBB0_10
LBB0_8:
	mov	w0, #0
	b	LBB0_11
LBB0_9:
	ldr	w8, [x22]
	cmp	w21, w8
	b.lt	LBB0_8
LBB0_10:
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh26:
	adrp	x8, _AT_ERR_TIMEOUT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AT_ERR_TIMEOUT@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
LBB0_11:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh15
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_REG_COMMAND,4,2            ; @PCI_REG_COMMAND
	.comm	_CMD_IO_SPACE,4,2               ; @CMD_IO_SPACE
	.comm	_CMD_MEMORY_SPACE,4,2           ; @CMD_MEMORY_SPACE
	.comm	_CMD_BUS_MASTER,4,2             ; @CMD_BUS_MASTER
	.comm	_REG_MASTER_CTRL,4,2            ; @REG_MASTER_CTRL
	.comm	_MASTER_CTRL_LED_MODE,4,2       ; @MASTER_CTRL_LED_MODE
	.comm	_MASTER_CTRL_SOFT_RST,4,2       ; @MASTER_CTRL_SOFT_RST
	.comm	_AT_HW_MAX_IDLE_DELAY,4,2       ; @AT_HW_MAX_IDLE_DELAY
	.comm	_REG_IDLE_STATUS,4,2            ; @REG_IDLE_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MAC state machine cann't be idle since disabled for 10ms second\n"

	.comm	_AT_ERR_TIMEOUT,4,2             ; @AT_ERR_TIMEOUT
.subsections_via_symbols
