	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw_stop_master
_ipw_stop_master:                       ## @ipw_stop_master
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_IPW_DEBUG_TRACE
	movq	_IPW_RESET_REG@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_IPW_RESET_REG_STOP_MASTER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_ipw_set_bit
	movl	(%r14), %esi
	movq	_IPW_RESET_REG_MASTER_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$100, %ecx
	callq	_ipw_poll_bit
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_IPW_DEBUG_INFO
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	callq	_IPW_ERROR
	movl	$-1, %ebx
LBB0_3:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	">>\n"

	.comm	_IPW_RESET_REG,4,2              ## @IPW_RESET_REG
	.comm	_IPW_RESET_REG_STOP_MASTER,4,2  ## @IPW_RESET_REG_STOP_MASTER
	.comm	_IPW_RESET_REG_MASTER_DISABLED,4,2 ## @IPW_RESET_REG_MASTER_DISABLED
L_.str.1:                               ## @.str.1
	.asciz	"wait for stop master failed after 100ms\n"

L_.str.2:                               ## @.str.2
	.asciz	"stop master %dms\n"

	.no_dead_strip	_ipw_stop_master
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipw_stop_master
_ipw_stop_master:                       ; @ipw_stop_master
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IPW_DEBUG_TRACE
Lloh2:
	adrp	x20, _IPW_RESET_REG@GOTPAGE
Lloh3:
	ldr	x20, [x20, _IPW_RESET_REG@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh4:
	adrp	x8, _IPW_RESET_REG_STOP_MASTER@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IPW_RESET_REG_STOP_MASTER@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_ipw_set_bit
	ldr	w1, [x20]
Lloh7:
	adrp	x8, _IPW_RESET_REG_MASTER_DISABLED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IPW_RESET_REG_MASTER_DISABLED@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #100
	bl	_ipw_poll_bit
	tbnz	w0, #31, LBB0_2
; %bb.1:
	mov	x19, x0
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_IPW_DEBUG_INFO
	b	LBB0_3
LBB0_2:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_IPW_ERROR
	mov	w19, #-1
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	">>\n"

	.comm	_IPW_RESET_REG,4,2              ; @IPW_RESET_REG
	.comm	_IPW_RESET_REG_STOP_MASTER,4,2  ; @IPW_RESET_REG_STOP_MASTER
	.comm	_IPW_RESET_REG_MASTER_DISABLED,4,2 ; @IPW_RESET_REG_MASTER_DISABLED
l_.str.1:                               ; @.str.1
	.asciz	"wait for stop master failed after 100ms\n"

l_.str.2:                               ; @.str.2
	.asciz	"stop master %dms\n"

	.no_dead_strip	_ipw_stop_master
.subsections_via_symbols
