	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw2100_wait_for_card_state
_ipw2100_wait_for_card_state:           ## @ipw2100_wait_for_card_state
	.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, %ebx
	movl	$4, -44(%rbp)
	movq	_IPW_CARD_DISABLE_COMPLETE_WAIT@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	js	LBB0_8
## %bb.1:
	movq	%rdi, %r14
	xorl	%r15d, %r15d
	leaq	-44(%rbp), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_IPW_ORD_CARD_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	leaq	-48(%rbp), %rdx
	movq	%r12, %rcx
	callq	_ipw2100_get_ordinal
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%ebx, -48(%rbp)
	je	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_STATUS_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IPW_HW_STATE_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	testl	%edx, (%r14)
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_IPW_HW_STATE_DISABLED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%ebx, %ecx
	je	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$50, %edi
	callq	_udelay
	addl	$50, %r15d
	imull	$1000, (%r13), %eax             ## imm = 0x3E8
	cmpl	%eax, %r15d
	jle	LBB0_2
LBB0_8:
	testl	%ebx, %ebx
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.2(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_IPW_DEBUG_INFO
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_9:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_IPW_DEBUG_INFO
	jmp	LBB0_15
LBB0_10:
	movq	_IPW_HW_STATE_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_11:
	movq	_STATUS_ENABLED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ebx, %eax
	jne	LBB0_13
## %bb.12:
	orl	%ecx, (%r14)
	jmp	LBB0_14
LBB0_13:
	notl	%ecx
	andl	%ecx, (%r14)
LBB0_14:
	xorl	%ebx, %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IPW_CARD_DISABLE_COMPLETE_WAIT,4,2 ## @IPW_CARD_DISABLE_COMPLETE_WAIT
	.comm	_IPW_ORD_CARD_DISABLED,4,2      ## @IPW_ORD_CARD_DISABLED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Query of CARD_DISABLED ordinal failed.\n"

	.comm	_STATUS_ENABLED,4,2             ## @STATUS_ENABLED
	.comm	_IPW_HW_STATE_ENABLED,4,2       ## @IPW_HW_STATE_ENABLED
	.comm	_IPW_HW_STATE_DISABLED,4,2      ## @IPW_HW_STATE_DISABLED
L_.str.1:                               ## @.str.1
	.asciz	"ipw2100_wait_for_card_state to %s state timed out\n"

L_.str.2:                               ## @.str.2
	.asciz	"DISABLED"

L_.str.3:                               ## @.str.3
	.asciz	"ENABLED"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_ipw2100_wait_for_card_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipw2100_wait_for_card_state
_ipw2100_wait_for_card_state:           ; @ipw2100_wait_for_card_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	w8, #4
	str	w8, [sp, #8]
Lloh0:
	adrp	x22, _IPW_CARD_DISABLE_COMPLETE_WAIT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _IPW_CARD_DISABLE_COMPLETE_WAIT@GOTPAGEOFF]
	ldr	w8, [x22]
	tbnz	w8, #31, LBB0_6
; %bb.1:
	mov	x19, x0
	mov	w23, #0
Lloh2:
	adrp	x24, _IPW_ORD_CARD_DISABLED@GOTPAGE
Lloh3:
	ldr	x24, [x24, _IPW_ORD_CARD_DISABLED@GOTPAGEOFF]
Lloh4:
	adrp	x21, _STATUS_ENABLED@GOTPAGE
Lloh5:
	ldr	x21, [x21, _STATUS_ENABLED@GOTPAGEOFF]
Lloh6:
	adrp	x25, _IPW_HW_STATE_ENABLED@GOTPAGE
Lloh7:
	ldr	x25, [x25, _IPW_HW_STATE_ENABLED@GOTPAGEOFF]
	mov	w26, #1000
Lloh8:
	adrp	x27, _IPW_HW_STATE_DISABLED@GOTPAGE
Lloh9:
	ldr	x27, [x27, _IPW_HW_STATE_DISABLED@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	add	x2, sp, #12
	add	x3, sp, #8
	mov	x0, x19
	bl	_ipw2100_get_ordinal
	cbnz	w0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [sp, #12]
	cmp	w8, w20
	b.eq	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w9, [x19]
	ldr	w10, [x21]
	ldr	w8, [x25]
	ldr	w11, [x27]
	tst	w10, w9
	csel	w9, w11, w8, eq
	cmp	w9, w20
	b.eq	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #50
	bl	_udelay
	add	w23, w23, #50
	ldr	w8, [x22]
	mul	w8, w8, w26
	cmp	w23, w8
	b.le	LBB0_2
LBB0_6:
Lloh10:
	adrp	x8, l_.str.2@PAGE
Lloh11:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh12:
	adrp	x9, l_.str.3@PAGE
Lloh13:
	add	x9, x9, l_.str.3@PAGEOFF
	cmp	w20, #0
	csel	x8, x9, x8, eq
	str	x8, [sp]
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_IPW_DEBUG_INFO
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_7:
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IPW_DEBUG_INFO
	mov	w0, #0
	b	LBB0_13
LBB0_8:
	ldr	w8, [x25]
LBB0_9:
	ldr	w9, [x21]
	cmp	w8, w20
	b.ne	LBB0_11
; %bb.10:
	mov	w0, #0
	ldr	w8, [x19]
	orr	w8, w8, w9
	b	LBB0_12
LBB0_11:
	mov	w0, #0
	ldr	w8, [x19]
	bic	w8, w8, w9
LBB0_12:
	str	w8, [x19]
LBB0_13:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_IPW_CARD_DISABLE_COMPLETE_WAIT,4,2 ; @IPW_CARD_DISABLE_COMPLETE_WAIT
	.comm	_IPW_ORD_CARD_DISABLED,4,2      ; @IPW_ORD_CARD_DISABLED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Query of CARD_DISABLED ordinal failed.\n"

	.comm	_STATUS_ENABLED,4,2             ; @STATUS_ENABLED
	.comm	_IPW_HW_STATE_ENABLED,4,2       ; @IPW_HW_STATE_ENABLED
	.comm	_IPW_HW_STATE_DISABLED,4,2      ; @IPW_HW_STATE_DISABLED
l_.str.1:                               ; @.str.1
	.asciz	"ipw2100_wait_for_card_state to %s state timed out\n"

l_.str.2:                               ; @.str.2
	.asciz	"DISABLED"

l_.str.3:                               ; @.str.3
	.asciz	"ENABLED"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_ipw2100_wait_for_card_state
.subsections_via_symbols
