	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max1668_detect
_max1668_detect:                        ## @max1668_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	(%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	_MAX1668_REG_MAN_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_i2c_smbus_read_byte_data
	movq	_MAN_ID_MAXIM@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_1
## %bb.3:
	movq	_MAX1668_REG_DEV_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_i2c_smbus_read_byte_data
	testl	%eax, %eax
	js	LBB0_1
## %bb.4:
	movq	_DEV_ID_MAX1668@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_10
LBB0_6:
	movq	_DEV_ID_MAX1805@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_10
LBB0_8:
	movq	_DEV_ID_MAX1989@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_1
## %bb.9:
	leaq	L_.str.2(%rip), %rsi
LBB0_10:
	movl	(%r14), %edi
	movq	_I2C_NAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_strlcpy
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ## @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_MAX1668_REG_MAN_ID,4,2         ## @MAX1668_REG_MAN_ID
	.comm	_MAN_ID_MAXIM,4,2               ## @MAN_ID_MAXIM
	.comm	_MAX1668_REG_DEV_ID,4,2         ## @MAX1668_REG_DEV_ID
	.comm	_DEV_ID_MAX1668,4,2             ## @DEV_ID_MAX1668
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"max1668"

	.comm	_DEV_ID_MAX1805,4,2             ## @DEV_ID_MAX1805
L_.str.1:                               ## @.str.1
	.asciz	"max1805"

	.comm	_DEV_ID_MAX1989,4,2             ## @DEV_ID_MAX1989
L_.str.2:                               ## @.str.2
	.asciz	"max1989"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max1668_detect
_max1668_detect:                        ; @max1668_detect
	.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, 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_10
; %bb.1:
Lloh3:
	adrp	x8, _MAX1668_REG_MAN_ID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX1668_REG_MAN_ID@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
Lloh6:
	adrp	x8, _MAN_ID_MAXIM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MAN_ID_MAXIM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_10
; %bb.2:
Lloh9:
	adrp	x8, _MAX1668_REG_DEV_ID@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAX1668_REG_DEV_ID@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	tbnz	w0, #31, LBB0_10
; %bb.3:
Lloh12:
	adrp	x8, _DEV_ID_MAX1668@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DEV_ID_MAX1668@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.4:
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_9
LBB0_5:
Lloh17:
	adrp	x8, _DEV_ID_MAX1805@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DEV_ID_MAX1805@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_7
; %bb.6:
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_7:
Lloh22:
	adrp	x8, _DEV_ID_MAX1989@GOTPAGE
Lloh23:
	ldr	x8, [x8, _DEV_ID_MAX1989@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_10
; %bb.8:
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_9:
	ldr	w0, [x19]
Lloh27:
	adrp	x8, _I2C_NAME_SIZE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _I2C_NAME_SIZE@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	bl	_strlcpy
	mov	w0, #0
	b	LBB0_11
LBB0_10:
Lloh30:
	adrp	x8, _ENODEV@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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 AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ; @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_MAX1668_REG_MAN_ID,4,2         ; @MAX1668_REG_MAN_ID
	.comm	_MAN_ID_MAXIM,4,2               ; @MAN_ID_MAXIM
	.comm	_MAX1668_REG_DEV_ID,4,2         ; @MAX1668_REG_DEV_ID
	.comm	_DEV_ID_MAX1668,4,2             ; @DEV_ID_MAX1668
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"max1668"

	.comm	_DEV_ID_MAX1805,4,2             ; @DEV_ID_MAX1805
l_.str.1:                               ; @.str.1
	.asciz	"max1805"

	.comm	_DEV_ID_MAX1989,4,2             ; @DEV_ID_MAX1989
l_.str.2:                               ; @.str.2
	.asciz	"max1989"

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