	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function w83627thf_read_gpio5
_w83627thf_read_gpio5:                  ## @w83627thf_read_gpio5
	.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, %r15
	callq	_dev_get_platdata
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_superio_enter
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_warn
	movl	$255, %ebx
	jmp	LBB0_9
LBB0_2:
	movq	_W83627HF_LD_GPIO5@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_superio_select
	movq	_W83627THF_GPIO5_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_superio_inb
	testb	$8, %al
	jne	LBB0_5
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_4
LBB0_5:
	movq	_W83627THF_GPIO5_IOSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_superio_inb
	movl	%eax, %ebx
	notl	%eax
	testb	$31, %al
	jne	LBB0_6
## %bb.7:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_info
	movq	_W83627THF_GPIO5_DR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_superio_inb
	andl	%eax, %ebx
	andl	$63, %ebx
	jmp	LBB0_8
LBB0_6:
	leaq	L_.str.2(%rip), %rsi
LBB0_4:
	movq	%r15, %rdi
	callq	_dev_dbg
	movl	$255, %ebx
LBB0_8:
	movq	%r14, %rdi
	callq	_superio_exit
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can not read VID data: Failed to enable SuperIO access\n"

	.comm	_W83627HF_LD_GPIO5,4,2          ## @W83627HF_LD_GPIO5
	.comm	_W83627THF_GPIO5_EN,4,2         ## @W83627THF_GPIO5_EN
L_.str.1:                               ## @.str.1
	.asciz	"GPIO5 disabled, no VID function\n"

	.comm	_W83627THF_GPIO5_IOSR,4,2       ## @W83627THF_GPIO5_IOSR
L_.str.2:                               ## @.str.2
	.asciz	"GPIO5 not configured for VID function\n"

L_.str.3:                               ## @.str.3
	.asciz	"Reading VID from GPIO5\n"

	.comm	_W83627THF_GPIO5_DR,4,2         ## @W83627THF_GPIO5_DR
	.no_dead_strip	_w83627thf_read_gpio5
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function w83627thf_read_gpio5
_w83627thf_read_gpio5:                  ; @w83627thf_read_gpio5
	.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	x20, x0
	bl	_dev_get_platdata
	mov	x19, x0
	bl	_superio_enter
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
	mov	w20, #255
	b	LBB0_9
LBB0_2:
Lloh2:
	adrp	x8, _W83627HF_LD_GPIO5@GOTPAGE
Lloh3:
	ldr	x8, [x8, _W83627HF_LD_GPIO5@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_superio_select
Lloh5:
	adrp	x8, _W83627THF_GPIO5_EN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _W83627THF_GPIO5_EN@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_superio_inb
	tbnz	w0, #3, LBB0_4
; %bb.3:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_4:
Lloh10:
	adrp	x8, _W83627THF_GPIO5_IOSR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _W83627THF_GPIO5_IOSR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_superio_inb
	mvn	w8, w0
	tst	w8, #0x1f
	b.ne	LBB0_6
; %bb.5:
	mov	x21, x0
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_info
Lloh15:
	adrp	x8, _W83627THF_GPIO5_DR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _W83627THF_GPIO5_DR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_superio_inb
	and	w8, w21, w0
	and	w20, w8, #0x3f
	b	LBB0_8
LBB0_6:
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_7:
	mov	x0, x20
	bl	_dev_dbg
	mov	w20, #255
LBB0_8:
	mov	x0, x19
	bl	_superio_exit
LBB0_9:
	mov	x0, x20
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can not read VID data: Failed to enable SuperIO access\n"

	.comm	_W83627HF_LD_GPIO5,4,2          ; @W83627HF_LD_GPIO5
	.comm	_W83627THF_GPIO5_EN,4,2         ; @W83627THF_GPIO5_EN
l_.str.1:                               ; @.str.1
	.asciz	"GPIO5 disabled, no VID function\n"

	.comm	_W83627THF_GPIO5_IOSR,4,2       ; @W83627THF_GPIO5_IOSR
l_.str.2:                               ; @.str.2
	.asciz	"GPIO5 not configured for VID function\n"

l_.str.3:                               ; @.str.3
	.asciz	"Reading VID from GPIO5\n"

	.comm	_W83627THF_GPIO5_DR,4,2         ; @W83627THF_GPIO5_DR
	.no_dead_strip	_w83627thf_read_gpio5
.subsections_via_symbols
