	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max6650_detect
_max6650_detect:                        ## @max6650_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, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	8(%rdi), %r13
	movl	(%rdi), %r14d
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_I2C_FUNC_SMBUS_BYTE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_i2c_check_functionality
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	testl	%r15d, %r15d
	js	LBB0_4
LBB0_10:
	leaq	L_.str.3(%rip), %rsi
	movq	%r13, %rdi
	movl	%r14d, %edx
	callq	_dev_info
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	_I2C_NAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.4(%rip), %rsi
	callq	_strlcpy
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_2
LBB0_4:
	movq	_MAX6650_REG_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	testb	$-64, %al
	jne	LBB0_9
## %bb.5:
	movq	_MAX6650_REG_GPIO_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	testb	$-32, %al
	jne	LBB0_9
## %bb.6:
	movq	_MAX6650_REG_ALARM_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	testb	$-32, %al
	jne	LBB0_9
## %bb.7:
	movq	_MAX6650_REG_ALARM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	testb	$-32, %al
	jne	LBB0_9
## %bb.8:
	movq	_MAX6650_REG_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	testb	$-4, %al
	je	LBB0_10
LBB0_9:
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_2:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"max6650_detect called, kind = %d\n"

	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ## @I2C_FUNC_SMBUS_BYTE_DATA
L_.str.1:                               ## @.str.1
	.asciz	"max6650: I2C bus doesn't support byte read mode, skipping.\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_MAX6650_REG_CONFIG,4,2         ## @MAX6650_REG_CONFIG
	.comm	_MAX6650_REG_GPIO_STAT,4,2      ## @MAX6650_REG_GPIO_STAT
	.comm	_MAX6650_REG_ALARM_EN,4,2       ## @MAX6650_REG_ALARM_EN
	.comm	_MAX6650_REG_ALARM,4,2          ## @MAX6650_REG_ALARM
	.comm	_MAX6650_REG_COUNT,4,2          ## @MAX6650_REG_COUNT
L_.str.2:                               ## @.str.2
	.asciz	"max6650: detection failed at 0x%02x.\n"

L_.str.3:                               ## @.str.3
	.asciz	"max6650: chip found at 0x%02x.\n"

L_.str.4:                               ## @.str.4
	.asciz	"max6650"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max6650_detect
_max6650_detect:                        ; @max6650_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	x20, x2
	mov	x23, x1
	mov	x22, x0
	ldr	x19, [x0, #8]
	ldr	w21, [x0]
	str	x23, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
Lloh2:
	adrp	x8, _I2C_FUNC_SMBUS_BYTE_DATA@GOTPAGE
Lloh3:
	ldr	x8, [x8, _I2C_FUNC_SMBUS_BYTE_DATA@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_i2c_check_functionality
	cbz	w0, LBB0_3
; %bb.1:
	tbnz	w23, #31, LBB0_4
LBB0_2:
Lloh5:
	adrp	x1, l_.str.3@PAGE
Lloh6:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_info
	ldr	w0, [x20]
Lloh7:
	adrp	x8, _I2C_NAME_SIZE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _I2C_NAME_SIZE@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
Lloh10:
	adrp	x1, l_.str.4@PAGE
Lloh11:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_strlcpy
	mov	w0, #0
	b	LBB0_11
LBB0_3:
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_4:
Lloh14:
	adrp	x8, _MAX6650_REG_CONFIG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MAX6650_REG_CONFIG@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_i2c_smbus_read_byte_data
	tst	w0, #0xc0
	b.ne	LBB0_9
; %bb.5:
Lloh17:
	adrp	x8, _MAX6650_REG_GPIO_STAT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MAX6650_REG_GPIO_STAT@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_i2c_smbus_read_byte_data
	tst	w0, #0xe0
	b.ne	LBB0_9
; %bb.6:
Lloh20:
	adrp	x8, _MAX6650_REG_ALARM_EN@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MAX6650_REG_ALARM_EN@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_i2c_smbus_read_byte_data
	tst	w0, #0xe0
	b.ne	LBB0_9
; %bb.7:
Lloh23:
	adrp	x8, _MAX6650_REG_ALARM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MAX6650_REG_ALARM@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_i2c_smbus_read_byte_data
	tst	w0, #0xe0
	b.ne	LBB0_9
; %bb.8:
Lloh26:
	adrp	x8, _MAX6650_REG_COUNT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MAX6650_REG_COUNT@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_i2c_smbus_read_byte_data
	tst	w0, #0xfc
	b.eq	LBB0_2
LBB0_9:
	str	x21, [sp]
Lloh29:
	adrp	x1, l_.str.2@PAGE
Lloh30:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_10:
	mov	x0, x19
	bl	_dev_dbg
Lloh31:
	adrp	x8, _ENODEV@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh33:
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"max6650_detect called, kind = %d\n"

	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ; @I2C_FUNC_SMBUS_BYTE_DATA
l_.str.1:                               ; @.str.1
	.asciz	"max6650: I2C bus doesn't support byte read mode, skipping.\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_MAX6650_REG_CONFIG,4,2         ; @MAX6650_REG_CONFIG
	.comm	_MAX6650_REG_GPIO_STAT,4,2      ; @MAX6650_REG_GPIO_STAT
	.comm	_MAX6650_REG_ALARM_EN,4,2       ; @MAX6650_REG_ALARM_EN
	.comm	_MAX6650_REG_ALARM,4,2          ; @MAX6650_REG_ALARM
	.comm	_MAX6650_REG_COUNT,4,2          ; @MAX6650_REG_COUNT
l_.str.2:                               ; @.str.2
	.asciz	"max6650: detection failed at 0x%02x.\n"

l_.str.3:                               ; @.str.3
	.asciz	"max6650: chip found at 0x%02x.\n"

l_.str.4:                               ; @.str.4
	.asciz	"max6650"

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