	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wbsd_chip_validate
_wbsd_chip_validate:                    ## @wbsd_chip_validate
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_wbsd_unlock_config
	movq	_WBSD_CONF_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DEVICE_SD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_wbsd_write_config
	movq	_WBSD_CONF_PORT_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_wbsd_read_config
	movl	%eax, %r14d
	shll	$8, %r14d
	movq	_WBSD_CONF_PORT_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_wbsd_read_config
	movl	%eax, %r12d
	orl	%r14d, %r12d
	movq	_WBSD_CONF_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_wbsd_read_config
	movl	%eax, %r14d
	movq	_WBSD_CONF_DRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_wbsd_read_config
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_wbsd_lock_config
	xorl	%eax, %eax
	cmpl	(%rbx), %r12d
	jne	LBB0_3
## %bb.1:
	cmpl	4(%rbx), %r14d
	jne	LBB0_3
## %bb.2:
	movl	8(%rbx), %eax
	cmpl	%eax, %r15d
	sete	%cl
	cmpl	$-1, %eax
	sete	%al
	orb	%cl, %al
	movzbl	%al, %eax
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WBSD_CONF_DEVICE,4,2           ## @WBSD_CONF_DEVICE
	.comm	_DEVICE_SD,4,2                  ## @DEVICE_SD
	.comm	_WBSD_CONF_PORT_HI,4,2          ## @WBSD_CONF_PORT_HI
	.comm	_WBSD_CONF_PORT_LO,4,2          ## @WBSD_CONF_PORT_LO
	.comm	_WBSD_CONF_IRQ,4,2              ## @WBSD_CONF_IRQ
	.comm	_WBSD_CONF_DRQ,4,2              ## @WBSD_CONF_DRQ
	.no_dead_strip	_wbsd_chip_validate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wbsd_chip_validate
_wbsd_chip_validate:                    ; @wbsd_chip_validate
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_wbsd_unlock_config
Lloh0:
	adrp	x8, _WBSD_CONF_DEVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WBSD_CONF_DEVICE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _DEVICE_SD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DEVICE_SD@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_wbsd_write_config
Lloh6:
	adrp	x8, _WBSD_CONF_PORT_HI@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WBSD_CONF_PORT_HI@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_wbsd_read_config
	mov	x20, x0
Lloh9:
	adrp	x8, _WBSD_CONF_PORT_LO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WBSD_CONF_PORT_LO@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_wbsd_read_config
	orr	w22, w0, w20, lsl #8
Lloh12:
	adrp	x8, _WBSD_CONF_IRQ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _WBSD_CONF_IRQ@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_wbsd_read_config
	mov	x20, x0
Lloh15:
	adrp	x8, _WBSD_CONF_DRQ@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WBSD_CONF_DRQ@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_wbsd_read_config
	mov	x21, x0
	mov	x0, x19
	bl	_wbsd_lock_config
	ldr	w8, [x19]
	cmp	w22, w8
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x19, #4]
	cmp	w20, w8
	b.ne	LBB0_3
; %bb.2:
	ldr	w8, [x19, #8]
	cmp	w21, w8
	mov	w9, #-1
	ccmp	w8, w9, #4, ne
	cset	w0, eq
	b	LBB0_4
LBB0_3:
	mov	w0, #0
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_WBSD_CONF_DEVICE,4,2           ; @WBSD_CONF_DEVICE
	.comm	_DEVICE_SD,4,2                  ; @DEVICE_SD
	.comm	_WBSD_CONF_PORT_HI,4,2          ; @WBSD_CONF_PORT_HI
	.comm	_WBSD_CONF_PORT_LO,4,2          ; @WBSD_CONF_PORT_LO
	.comm	_WBSD_CONF_IRQ,4,2              ; @WBSD_CONF_IRQ
	.comm	_WBSD_CONF_DRQ,4,2              ; @WBSD_CONF_DRQ
	.no_dead_strip	_wbsd_chip_validate
.subsections_via_symbols
