	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sfe4001_check_hw
_sfe4001_check_hw:                      ## @sfe4001_check_hw
	.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
	movq	8(%rdi), %r14
	callq	_EF4_WORKAROUND_7884
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	cmpl	$0, (%r14)
	je	LBB0_2
LBB0_3:
	movq	%rbx, %rdi
	callq	_falcon_board
	movl	(%rax), %edi
	movq	_P1_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_5
## %bb.4:
	movq	_P1_AFE_PWD_LBN@GOTPCREL(%rip), %rax
	movq	_P1_DSP_PWD25_LBN@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$1, %edx
	shll	%cl, %edx
	movb	(%rax), %al
	btsl	%eax, %edx
	xorl	%eax, %eax
	testl	%r14d, %edx
	jne	LBB0_9
LBB0_5:
	movq	%rbx, %rdi
	callq	_sfe4001_poweroff
	movq	_PHY_MODE_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	testl	%r14d, %r14d
	jns	LBB0_6
## %bb.7:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_2:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_6:
	movq	_ERANGE@GOTPCREL(%rip), %rcx
LBB0_8:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_P1_IN,4,2                      ## @P1_IN
	.comm	_P1_AFE_PWD_LBN,4,2             ## @P1_AFE_PWD_LBN
	.comm	_P1_DSP_PWD25_LBN,4,2           ## @P1_DSP_PWD25_LBN
	.comm	_PHY_MODE_OFF,4,2               ## @PHY_MODE_OFF
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ERANGE,4,2                     ## @ERANGE
	.no_dead_strip	_sfe4001_check_hw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sfe4001_check_hw
_sfe4001_check_hw:                      ; @sfe4001_check_hw
	.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
	ldr	x20, [x0, #8]
	bl	_EF4_WORKAROUND_7884
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w8, [x20]
	cbz	w8, LBB0_4
LBB0_2:
	mov	x0, x19
	bl	_falcon_board
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _P1_IN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _P1_IN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_i2c_smbus_read_byte_data
	mov	x20, x0
	tbnz	w0, #31, LBB0_5
; %bb.3:
Lloh3:
	adrp	x8, _P1_AFE_PWD_LBN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _P1_AFE_PWD_LBN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w8, w9, w8
Lloh6:
	adrp	x10, _P1_DSP_PWD25_LBN@GOTPAGE
Lloh7:
	ldr	x10, [x10, _P1_DSP_PWD25_LBN@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w9, w8
	tst	w8, w20
	b.eq	LBB0_5
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	mov	x0, x19
	bl	_sfe4001_poweroff
Lloh9:
	adrp	x8, _PHY_MODE_OFF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PHY_MODE_OFF@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x19]
Lloh12:
	adrp	x8, _EIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh14:
	adrp	x9, _ERANGE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ERANGE@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x8, x9, lt
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_P1_IN,4,2                      ; @P1_IN
	.comm	_P1_AFE_PWD_LBN,4,2             ; @P1_AFE_PWD_LBN
	.comm	_P1_DSP_PWD25_LBN,4,2           ; @P1_DSP_PWD25_LBN
	.comm	_PHY_MODE_OFF,4,2               ; @PHY_MODE_OFF
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ERANGE,4,2                     ; @ERANGE
	.no_dead_strip	_sfe4001_check_hw
.subsections_via_symbols
