	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw2100_power_cycle_adapter
_ipw2100_power_cycle_adapter:           ## @ipw2100_power_cycle_adapter
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_IPW_DEBUG_INFO
	movq	%rbx, %rdi
	callq	_ipw2100_hw_set_gpio
	movl	4(%rbx), %edi
	movq	_IPW_REG_RESET_REG@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_IPW_AUX_HOST_RESET_REG_STOP_MASTER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_write_register
	movq	_IPW_WAIT_RESET_MASTER_ASSERT_COMPLETE_DELAY@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_udelay
	movl	4(%rbx), %edi
	movl	(%r14), %esi
	leaq	-36(%rbp), %rdx
	callq	_read_register
	movq	_IPW_AUX_HOST_RESET_REG_MASTER_DISABLED@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, -36(%rbp)
	jne	LBB0_6
## %bb.1:
	movl	(%r15), %edi
	callq	_udelay
	movl	4(%rbx), %edi
	movl	(%r14), %esi
	leaq	-36(%rbp), %rdx
	callq	_read_register
	movl	(%r12), %eax
	testl	%eax, -36(%rbp)
	jne	LBB0_6
## %bb.2:
	movl	(%r15), %edi
	callq	_udelay
	movl	4(%rbx), %edi
	movl	(%r14), %esi
	leaq	-36(%rbp), %rdx
	callq	_read_register
	movl	(%r12), %eax
	testl	%eax, -36(%rbp)
	jne	LBB0_6
## %bb.3:
	movl	(%r15), %edi
	callq	_udelay
	movl	4(%rbx), %edi
	movl	(%r14), %esi
	leaq	-36(%rbp), %rdx
	callq	_read_register
	movl	(%r12), %eax
	testl	%eax, -36(%rbp)
	jne	LBB0_6
## %bb.4:
	movl	(%r15), %edi
	callq	_udelay
	movl	4(%rbx), %edi
	movl	(%r14), %esi
	leaq	-36(%rbp), %rdx
	callq	_read_register
	movl	(%r12), %eax
	testl	%eax, -36(%rbp)
	je	LBB0_5
LBB0_6:
	movq	_STATUS_RESET_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%rbx)
	movl	4(%rbx), %edi
	movl	(%r14), %esi
	movq	_IPW_AUX_HOST_RESET_REG_SW_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_write_register
	movq	%rbx, %rdi
	callq	_ipw2100_reset_fatalerror
	movq	_STATUS_RUNNING@GOTPCREL(%rip), %rax
	movq	_STATUS_ASSOCIATING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_STATUS_ASSOCIATED@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_STATUS_ENABLED@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	notl	%ecx
	andl	%ecx, (%rbx)
	xorl	%eax, %eax
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_STATUS_RESET_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%rbx)
	leaq	L_.str.1(%rip), %rdi
	callq	_IPW_DEBUG_INFO
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Power cycling the hardware.\n"

	.comm	_IPW_REG_RESET_REG,4,2          ## @IPW_REG_RESET_REG
	.comm	_IPW_AUX_HOST_RESET_REG_STOP_MASTER,4,2 ## @IPW_AUX_HOST_RESET_REG_STOP_MASTER
	.comm	_IPW_WAIT_RESET_MASTER_ASSERT_COMPLETE_DELAY,4,2 ## @IPW_WAIT_RESET_MASTER_ASSERT_COMPLETE_DELAY
	.comm	_IPW_AUX_HOST_RESET_REG_MASTER_DISABLED,4,2 ## @IPW_AUX_HOST_RESET_REG_MASTER_DISABLED
	.comm	_STATUS_RESET_PENDING,4,2       ## @STATUS_RESET_PENDING
L_.str.1:                               ## @.str.1
	.asciz	"exit - waited too long for master assert stop\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_IPW_AUX_HOST_RESET_REG_SW_RESET,4,2 ## @IPW_AUX_HOST_RESET_REG_SW_RESET
	.comm	_STATUS_RUNNING,4,2             ## @STATUS_RUNNING
	.comm	_STATUS_ASSOCIATING,4,2         ## @STATUS_ASSOCIATING
	.comm	_STATUS_ASSOCIATED,4,2          ## @STATUS_ASSOCIATED
	.comm	_STATUS_ENABLED,4,2             ## @STATUS_ENABLED
	.no_dead_strip	_ipw2100_power_cycle_adapter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipw2100_power_cycle_adapter
_ipw2100_power_cycle_adapter:           ; @ipw2100_power_cycle_adapter
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IPW_DEBUG_INFO
	mov	x0, x19
	bl	_ipw2100_hw_set_gpio
	ldr	w0, [x19, #4]
Lloh2:
	adrp	x20, _IPW_REG_RESET_REG@GOTPAGE
Lloh3:
	ldr	x20, [x20, _IPW_REG_RESET_REG@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh4:
	adrp	x8, _IPW_AUX_HOST_RESET_REG_STOP_MASTER@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IPW_AUX_HOST_RESET_REG_STOP_MASTER@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	bl	_write_register
Lloh7:
	adrp	x21, _IPW_WAIT_RESET_MASTER_ASSERT_COMPLETE_DELAY@GOTPAGE
Lloh8:
	ldr	x21, [x21, _IPW_WAIT_RESET_MASTER_ASSERT_COMPLETE_DELAY@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_udelay
	ldr	w0, [x19, #4]
	ldr	w1, [x20]
	add	x2, sp, #12
	bl	_read_register
	ldr	w8, [sp, #12]
Lloh9:
	adrp	x22, _IPW_AUX_HOST_RESET_REG_MASTER_DISABLED@GOTPAGE
Lloh10:
	ldr	x22, [x22, _IPW_AUX_HOST_RESET_REG_MASTER_DISABLED@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.1:
	ldr	w0, [x21]
	bl	_udelay
	ldr	w0, [x19, #4]
	ldr	w1, [x20]
	add	x2, sp, #12
	bl	_read_register
	ldr	w8, [sp, #12]
	ldr	w9, [x22]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.2:
	ldr	w0, [x21]
	bl	_udelay
	ldr	w0, [x19, #4]
	ldr	w1, [x20]
	add	x2, sp, #12
	bl	_read_register
	ldr	w8, [sp, #12]
	ldr	w9, [x22]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.3:
	ldr	w0, [x21]
	bl	_udelay
	ldr	w0, [x19, #4]
	ldr	w1, [x20]
	add	x2, sp, #12
	bl	_read_register
	ldr	w8, [sp, #12]
	ldr	w9, [x22]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.4:
	ldr	w0, [x21]
	bl	_udelay
	ldr	w0, [x19, #4]
	ldr	w1, [x20]
	add	x2, sp, #12
	bl	_read_register
	ldr	w8, [sp, #12]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_7
LBB0_5:
Lloh11:
	adrp	x8, _STATUS_RESET_PENDING@GOTPAGE
Lloh12:
	ldr	x8, [x8, _STATUS_RESET_PENDING@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldp	w9, w0, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
	ldr	w1, [x20]
Lloh14:
	adrp	x8, _IPW_AUX_HOST_RESET_REG_SW_RESET@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IPW_AUX_HOST_RESET_REG_SW_RESET@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	bl	_write_register
	mov	x0, x19
	bl	_ipw2100_reset_fatalerror
	mov	w0, #0
Lloh17:
	adrp	x8, _STATUS_RUNNING@GOTPAGE
Lloh18:
	ldr	x8, [x8, _STATUS_RUNNING@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _STATUS_ASSOCIATING@GOTPAGE
Lloh21:
	ldr	x9, [x9, _STATUS_ASSOCIATING@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh23:
	adrp	x9, _STATUS_ASSOCIATED@GOTPAGE
Lloh24:
	ldr	x9, [x9, _STATUS_ASSOCIATED@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
Lloh26:
	adrp	x10, _STATUS_ENABLED@GOTPAGE
Lloh27:
	ldr	x10, [x10, _STATUS_ENABLED@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh28:
	ldr	w9, [x10]
	orr	w8, w8, w9
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
LBB0_6:
	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
	add	sp, sp, #64
	ret
LBB0_7:
Lloh29:
	adrp	x8, _STATUS_RESET_PENDING@GOTPAGE
Lloh30:
	ldr	x8, [x8, _STATUS_RESET_PENDING@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
Lloh32:
	adrp	x0, l_.str.1@PAGE
Lloh33:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_IPW_DEBUG_INFO
Lloh34:
	adrp	x8, _EIO@GOTPAGE
Lloh35:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Power cycling the hardware.\n"

	.comm	_IPW_REG_RESET_REG,4,2          ; @IPW_REG_RESET_REG
	.comm	_IPW_AUX_HOST_RESET_REG_STOP_MASTER,4,2 ; @IPW_AUX_HOST_RESET_REG_STOP_MASTER
	.comm	_IPW_WAIT_RESET_MASTER_ASSERT_COMPLETE_DELAY,4,2 ; @IPW_WAIT_RESET_MASTER_ASSERT_COMPLETE_DELAY
	.comm	_IPW_AUX_HOST_RESET_REG_MASTER_DISABLED,4,2 ; @IPW_AUX_HOST_RESET_REG_MASTER_DISABLED
	.comm	_STATUS_RESET_PENDING,4,2       ; @STATUS_RESET_PENDING
l_.str.1:                               ; @.str.1
	.asciz	"exit - waited too long for master assert stop\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_IPW_AUX_HOST_RESET_REG_SW_RESET,4,2 ; @IPW_AUX_HOST_RESET_REG_SW_RESET
	.comm	_STATUS_RUNNING,4,2             ; @STATUS_RUNNING
	.comm	_STATUS_ASSOCIATING,4,2         ; @STATUS_ASSOCIATING
	.comm	_STATUS_ASSOCIATED,4,2          ; @STATUS_ASSOCIATED
	.comm	_STATUS_ENABLED,4,2             ; @STATUS_ENABLED
	.no_dead_strip	_ipw2100_power_cycle_adapter
.subsections_via_symbols
