	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function winbond_gpio_check_chip
_winbond_gpio_check_chip:               ## @winbond_gpio_check_chip
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_winbond_sio_enter
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	_WB_SIO_REG_CHIP_MSB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_winbond_sio_reg_read
	movl	%eax, %ebx
	shll	$8, %ebx
	movq	_WB_SIO_REG_CHIP_LSB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_winbond_sio_reg_read
	movl	%eax, %r15d
	orl	%ebx, %r15d
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_pr_notice
	movq	_WB_SIO_CHIP_ID_W83627UHG_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	movq	_WB_SIO_CHIP_ID_W83627UHG@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpl	(%rax), %r15d
	je	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_3:
	movq	%r14, %rdi
	callq	_winbond_sio_leave
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WB_SIO_REG_CHIP_MSB,4,2        ## @WB_SIO_REG_CHIP_MSB
	.comm	_WB_SIO_REG_CHIP_LSB,4,2        ## @WB_SIO_REG_CHIP_LSB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"chip ID at %lx is %.4x\n"

	.comm	_WB_SIO_CHIP_ID_W83627UHG_MASK,4,2 ## @WB_SIO_CHIP_ID_W83627UHG_MASK
	.comm	_WB_SIO_CHIP_ID_W83627UHG,4,2   ## @WB_SIO_CHIP_ID_W83627UHG
L_.str.1:                               ## @.str.1
	.asciz	"not an our chip\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_winbond_gpio_check_chip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function winbond_gpio_check_chip
_winbond_gpio_check_chip:               ; @winbond_gpio_check_chip
	.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
	bl	_winbond_sio_enter
	mov	x20, x0
	cbnz	w0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _WB_SIO_REG_CHIP_MSB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WB_SIO_REG_CHIP_MSB@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_winbond_sio_reg_read
	mov	x20, x0
Lloh3:
	adrp	x8, _WB_SIO_REG_CHIP_LSB@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WB_SIO_REG_CHIP_LSB@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_winbond_sio_reg_read
	orr	w20, w0, w20, lsl #8
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x20
	bl	_pr_notice
Lloh8:
	adrp	x8, _WB_SIO_CHIP_ID_W83627UHG_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _WB_SIO_CHIP_ID_W83627UHG_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	and	w8, w8, w20
Lloh11:
	adrp	x9, _WB_SIO_CHIP_ID_W83627UHG@GOTPAGE
Lloh12:
	ldr	x9, [x9, _WB_SIO_CHIP_ID_W83627UHG@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.2:
	mov	w20, #0
	b	LBB0_4
LBB0_3:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
Lloh16:
	adrp	x8, _ENODEV@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_4:
	mov	x0, x19
	bl	_winbond_sio_leave
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_WB_SIO_REG_CHIP_MSB,4,2        ; @WB_SIO_REG_CHIP_MSB
	.comm	_WB_SIO_REG_CHIP_LSB,4,2        ; @WB_SIO_REG_CHIP_LSB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"chip ID at %lx is %.4x\n"

	.comm	_WB_SIO_CHIP_ID_W83627UHG_MASK,4,2 ; @WB_SIO_CHIP_ID_W83627UHG_MASK
	.comm	_WB_SIO_CHIP_ID_W83627UHG,4,2   ; @WB_SIO_CHIP_ID_W83627UHG
l_.str.1:                               ; @.str.1
	.asciz	"not an our chip\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_winbond_gpio_check_chip
.subsections_via_symbols
