	.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	%rdx, %rbx
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	movq	_I2C_FUNC_SMBUS_BYTE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_i2c_check_functionality
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	testl	%r12d, %r12d
	jns	LBB0_3
## %bb.2:
	movq	_ASB100_REG_BANK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %r13d
	movq	_ASB100_REG_CHIPMAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_i2c_smbus_read_byte_data
	testb	$7, %r13b
	je	LBB0_14
LBB0_3:
	movq	%rbx, %r13
	movq	_ASB100_REG_BANK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_i2c_smbus_read_byte_data
                                        ## kill: def $eax killed $eax def $rax
	andl	$120, %eax
	leal	128(%rax), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_i2c_smbus_write_byte_data
	testl	%r12d, %r12d
	jg	LBB0_6
## %bb.4:
	movq	_ASB100_REG_WCHIPID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	movq	_ASB100_REG_CHIPMAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_i2c_smbus_read_byte_data
	cmpl	$49, %ebx
	jne	LBB0_11
## %bb.5:
	cmpl	$6, %eax
	jne	LBB0_11
LBB0_6:
	movl	(%r13), %edi
	movq	_I2C_NAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rsi
	callq	_strlcpy
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_7:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_debug
LBB0_8:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_9:
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	testl	%r12d, %r12d
	jne	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	callq	_i2c_adapter_id
	movl	(%r15), %ecx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_warn
LBB0_13:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_14:
	testb	$-128, %r13b
	jne	LBB0_16
## %bb.15:
	cmpl	$148, %eax
	jne	LBB0_18
LBB0_16:
	testb	$-128, %r13b
	je	LBB0_3
## %bb.17:
	cmpl	$6, %eax
	je	LBB0_3
LBB0_18:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_debug
	jmp	LBB0_8
	.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	"asb100.o: 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	"asb100.o: detect failed, bad chip id 0x%02x!\n"

	.comm	_ASB100_REG_WCHIPID,4,2         ## @ASB100_REG_WCHIPID
	.comm	_asb100,4,2                     ## @asb100
L_.str.2:                               ## @.str.2
	.asciz	"ignoring 'force' parameter for unknown chip at adapter %d, address 0x%02x.\n"

L_.str.3:                               ## @.str.3
	.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	x21, x2
	mov	x22, x1
	mov	x20, x0
	ldr	x19, [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]
	mov	x0, x19
	bl	_i2c_check_functionality
	cbz	w0, LBB0_8
; %bb.1:
Lloh3:
	adrp	x24, _ASB100_REG_BANK@GOTPAGE
Lloh4:
	ldr	x24, [x24, _ASB100_REG_BANK@GOTPAGEOFF]
	tbz	w22, #31, LBB0_3
; %bb.2:
	ldr	w1, [x24]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	mov	x23, x0
Lloh5:
	adrp	x8, _ASB100_REG_CHIPMAN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ASB100_REG_CHIPMAN@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
                                        ; kill: def $w0 killed $w0 def $x0
	tst	w23, #0x7
	b.eq	LBB0_12
LBB0_3:
	ldr	w23, [x24]
	mov	x0, x20
	mov	x1, x23
	bl	_i2c_smbus_read_byte_data
	and	w8, w0, #0x78
	orr	w2, w8, #0x80
	mov	x0, x20
	mov	x1, x23
	bl	_i2c_smbus_write_byte_data
	cmp	w22, #0
	b.gt	LBB0_7
; %bb.4:
Lloh8:
	adrp	x8, _ASB100_REG_WCHIPID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ASB100_REG_WCHIPID@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	mov	x23, x0
Lloh11:
	adrp	x8, _ASB100_REG_CHIPMAN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ASB100_REG_CHIPMAN@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	cmp	w23, #49
	ccmp	w0, #6, #0, eq
	b.eq	LBB0_7
; %bb.5:
	cbnz	w22, LBB0_10
; %bb.6:
	mov	x0, x19
	bl	_i2c_adapter_id
	mov	x2, x0
	ldr	w3, [x20]
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	b	LBB0_10
LBB0_7:
	ldr	w0, [x21]
Lloh16:
	adrp	x8, _I2C_NAME_SIZE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _I2C_NAME_SIZE@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_strlcpy
	mov	w0, #0
	b	LBB0_11
LBB0_8:
Lloh21:
	adrp	x0, l_.str@PAGE
Lloh22:
	add	x0, x0, l_.str@PAGEOFF
LBB0_9:
	bl	_pr_debug
LBB0_10:
Lloh23:
	adrp	x8, _ENODEV@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
LBB0_12:
	tbnz	w23, #7, LBB0_14
; %bb.13:
	cmp	w0, #148
	b.ne	LBB0_16
LBB0_14:
	tbz	w23, #7, LBB0_3
; %bb.15:
	cmp	w0, #6
	b.eq	LBB0_3
LBB0_16:
	str	x0, [sp]
Lloh26:
	adrp	x0, l_.str.1@PAGE
Lloh27:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.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	"asb100.o: 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	"asb100.o: detect failed, bad chip id 0x%02x!\n"

	.comm	_ASB100_REG_WCHIPID,4,2         ; @ASB100_REG_WCHIPID
	.comm	_asb100,4,2                     ; @asb100
l_.str.2:                               ; @.str.2
	.asciz	"ignoring 'force' parameter for unknown chip at adapter %d, address 0x%02x.\n"

l_.str.3:                               ; @.str.3
	.asciz	"asb100"

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