	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function emc6w201_detect
_emc6w201_detect:                       ## @emc6w201_detect
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	movq	_I2C_FUNC_SMBUS_BYTE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_check_functionality
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_EMC6W201_REG_COMPANY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_i2c_smbus_read_byte_data
	cmpl	$92, %eax
	jne	LBB0_1
## %bb.3:
	movq	_EMC6W201_REG_VERSTEP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ecx
	andl	$-2147483408, %ecx              ## imm = 0x800000F0
	cmpl	$176, %ecx
	jne	LBB0_1
## %bb.4:
	andl	$15, %eax
	cmpl	$3, %eax
	jb	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_dev_dbg
	jmp	LBB0_1
LBB0_6:
	movq	_EMC6W201_REG_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ecx
	andl	$-2147483404, %ecx              ## imm = 0x800000F4
	cmpl	$4, %ecx
	jne	LBB0_1
## %bb.7:
	testb	$1, %al
	jne	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_9:
	movl	(%r14), %edi
	movq	_I2C_NAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	callq	_strlcpy
	xorl	%eax, %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ## @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EMC6W201_REG_COMPANY,4,2       ## @EMC6W201_REG_COMPANY
	.comm	_EMC6W201_REG_VERSTEP,4,2       ## @EMC6W201_REG_VERSTEP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown EMC6W201 stepping %d\n"

	.comm	_EMC6W201_REG_CONFIG,4,2        ## @EMC6W201_REG_CONFIG
L_.str.1:                               ## @.str.1
	.asciz	"Monitoring not enabled\n"

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

	.comm	_I2C_NAME_SIZE,4,2              ## @I2C_NAME_SIZE
	.no_dead_strip	_emc6w201_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function emc6w201_detect
_emc6w201_detect:                       ; @emc6w201_detect
	.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, x1
	mov	x19, x0
	ldr	x0, [x0, #8]
Lloh0:
	adrp	x8, _I2C_FUNC_SMBUS_BYTE_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_FUNC_SMBUS_BYTE_DATA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_i2c_check_functionality
	cbz	w0, LBB0_8
; %bb.1:
Lloh3:
	adrp	x8, _EMC6W201_REG_COMPANY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EMC6W201_REG_COMPANY@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_i2c_smbus_read_byte_data
	cmp	w0, #92
	b.ne	LBB0_8
; %bb.2:
	mov	w21, #240
	movk	w21, #32768, lsl #16
Lloh6:
	adrp	x8, _EMC6W201_REG_VERSTEP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EMC6W201_REG_VERSTEP@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_i2c_smbus_read_byte_data
	and	w8, w0, w21
	cmp	w8, #176
	b.ne	LBB0_8
; %bb.3:
	and	w2, w0, #0xf
	cmp	w2, #3
	b.lo	LBB0_5
; %bb.4:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	b	LBB0_8
LBB0_5:
Lloh11:
	adrp	x8, _EMC6W201_REG_CONFIG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EMC6W201_REG_CONFIG@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_i2c_smbus_read_byte_data
	add	w8, w21, #4
	and	w8, w0, w8
	cmp	w8, #4
	b.ne	LBB0_8
; %bb.6:
	tbnz	w0, #0, LBB0_10
; %bb.7:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_8:
Lloh16:
	adrp	x8, _ENODEV@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
LBB0_10:
	ldr	w0, [x20]
Lloh19:
	adrp	x8, _I2C_NAME_SIZE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _I2C_NAME_SIZE@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strlcpy
	mov	w0, #0
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ; @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EMC6W201_REG_COMPANY,4,2       ; @EMC6W201_REG_COMPANY
	.comm	_EMC6W201_REG_VERSTEP,4,2       ; @EMC6W201_REG_VERSTEP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown EMC6W201 stepping %d\n"

	.comm	_EMC6W201_REG_CONFIG,4,2        ; @EMC6W201_REG_CONFIG
l_.str.1:                               ; @.str.1
	.asciz	"Monitoring not enabled\n"

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

	.comm	_I2C_NAME_SIZE,4,2              ; @I2C_NAME_SIZE
	.no_dead_strip	_emc6w201_detect
.subsections_via_symbols
