	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function asb100_detect
_asb100_detect:                         ## @asb100_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	movq	_I2C_FUNC_SMBUS_BYTE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_check_functionality
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movq	_ASB100_REG_BANK@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %r15d
	movq	_ASB100_REG_CHIPMAN@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_i2c_smbus_read_byte_data
	testb	$7, %r15b
	je	LBB0_6
LBB0_2:
	movl	(%r13), %r15d
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_i2c_smbus_read_byte_data
                                        ## kill: def $eax killed $eax def $rax
	andl	$120, %eax
	leal	128(%rax), %edx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_i2c_smbus_write_byte_data
	movq	_ASB100_REG_WCHIPID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %r15d
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_i2c_smbus_read_byte_data
	cmpl	$49, %r15d
	jne	LBB0_12
## %bb.3:
	cmpl	$6, %eax
	jne	LBB0_12
## %bb.4:
	movl	(%r14), %edi
	movq	_I2C_NAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	callq	_strlcpy
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_5:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_debug
	jmp	LBB0_11
LBB0_6:
	testb	$-128, %r15b
	jne	LBB0_8
## %bb.7:
	cmpl	$148, %eax
	jne	LBB0_10
LBB0_8:
	testb	$-128, %r15b
	je	LBB0_2
## %bb.9:
	cmpl	$6, %eax
	je	LBB0_2
LBB0_10:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_debug
LBB0_11:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_12:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_13:
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ## @I2C_FUNC_SMBUS_BYTE_DATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"detect failed, smbus byte data not supported!\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ASB100_REG_BANK,4,2            ## @ASB100_REG_BANK
	.comm	_ASB100_REG_CHIPMAN,4,2         ## @ASB100_REG_CHIPMAN
L_.str.1:                               ## @.str.1
	.asciz	"detect failed, bad chip id 0x%02x!\n"

	.comm	_ASB100_REG_WCHIPID,4,2         ## @ASB100_REG_WCHIPID
L_.str.2:                               ## @.str.2
	.asciz	"asb100"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function asb100_detect
_asb100_detect:                         ; @asb100_detect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	ldr	x0, [x0]
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_4
; %bb.1:
Lloh3:
	adrp	x23, _ASB100_REG_BANK@GOTPAGE
Lloh4:
	ldr	x23, [x23, _ASB100_REG_BANK@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	mov	x21, x0
Lloh5:
	adrp	x22, _ASB100_REG_CHIPMAN@GOTPAGE
Lloh6:
	ldr	x22, [x22, _ASB100_REG_CHIPMAN@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
                                        ; kill: def $w0 killed $w0 def $x0
	tst	w21, #0x7
	b.eq	LBB0_5
LBB0_2:
	ldr	w21, [x23]
	mov	x0, x20
	mov	x1, x21
	bl	_i2c_smbus_read_byte_data
	and	w8, w0, #0x78
	orr	w2, w8, #0x80
	mov	x0, x20
	mov	x1, x21
	bl	_i2c_smbus_write_byte_data
Lloh7:
	adrp	x8, _ASB100_REG_WCHIPID@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ASB100_REG_WCHIPID@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	mov	x21, x0
	ldr	w1, [x22]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	cmp	w21, #49
	ccmp	w0, #6, #0, eq
	b.ne	LBB0_11
; %bb.3:
	ldr	w0, [x19]
Lloh10:
	adrp	x8, _I2C_NAME_SIZE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _I2C_NAME_SIZE@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strlcpy
	mov	w0, #0
	b	LBB0_12
LBB0_4:
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_10
LBB0_5:
	tbnz	w21, #7, LBB0_7
; %bb.6:
	cmp	w0, #148
	b.ne	LBB0_9
LBB0_7:
	tbz	w21, #7, LBB0_2
; %bb.8:
	cmp	w0, #6
	b.eq	LBB0_2
LBB0_9:
	str	x0, [sp]
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_10:
	bl	_pr_debug
LBB0_11:
Lloh19:
	adrp	x8, _ENODEV@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ; @I2C_FUNC_SMBUS_BYTE_DATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"detect failed, smbus byte data not supported!\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ASB100_REG_BANK,4,2            ; @ASB100_REG_BANK
	.comm	_ASB100_REG_CHIPMAN,4,2         ; @ASB100_REG_CHIPMAN
l_.str.1:                               ; @.str.1
	.asciz	"detect failed, bad chip id 0x%02x!\n"

	.comm	_ASB100_REG_WCHIPID,4,2         ; @ASB100_REG_WCHIPID
l_.str.2:                               ; @.str.2
	.asciz	"asb100"

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