	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max14577_print_dev_type
_max14577_print_dev_type:               ## @max14577_print_dev_type
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	8(%rdi), %edi
	movq	_MAX14577_REG_DEVICEID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	callq	_max14577_read_reg
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_3
LBB0_2:
	movl	-12(%rbp), %eax
	movq	_DEVID_VENDORID_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	andl	%eax, %r8d
	movq	_DEVID_VENDORID_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %r8d
	movq	_DEVID_DEVICEID_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_DEVID_DEVICEID_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movl	(%rbx), %edx
	movl	4(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %ecx
	callq	_dev_info
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX14577_REG_DEVICEID,4,2      ## @MAX14577_REG_DEVICEID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read DEVICEID register: %d\n"

	.comm	_DEVID_VENDORID_MASK,4,2        ## @DEVID_VENDORID_MASK
	.comm	_DEVID_VENDORID_SHIFT,4,2       ## @DEVID_VENDORID_SHIFT
	.comm	_DEVID_DEVICEID_MASK,4,2        ## @DEVID_DEVICEID_MASK
	.comm	_DEVID_DEVICEID_SHIFT,4,2       ## @DEVID_DEVICEID_SHIFT
L_.str.1:                               ## @.str.1
	.asciz	"Device type: %u (ID: 0x%x, vendor: 0x%x)\n"

	.no_dead_strip	_max14577_print_dev_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max14577_print_dev_type
_max14577_print_dev_type:               ; @max14577_print_dev_type
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	w0, [x0, #8]
Lloh0:
	adrp	x8, _MAX14577_REG_DEVICEID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX14577_REG_DEVICEID@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_max14577_read_reg
	cbz	w0, LBB0_2
; %bb.1:
	mov	x2, x0
	ldr	w0, [x19, #4]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_3
LBB0_2:
	ldr	w8, [sp, #12]
Lloh5:
	adrp	x9, _DEVID_VENDORID_MASK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DEVID_VENDORID_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	and	w9, w9, w8
Lloh8:
	adrp	x10, _DEVID_VENDORID_SHIFT@GOTPAGE
Lloh9:
	ldr	x10, [x10, _DEVID_VENDORID_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	asr	w4, w9, w10
Lloh11:
	adrp	x9, _DEVID_DEVICEID_MASK@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DEVID_DEVICEID_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh14:
	adrp	x9, _DEVID_DEVICEID_SHIFT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DEVID_DEVICEID_SHIFT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	asr	w3, w8, w9
	ldp	w2, w0, [x19]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_info
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX14577_REG_DEVICEID,4,2      ; @MAX14577_REG_DEVICEID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read DEVICEID register: %d\n"

	.comm	_DEVID_VENDORID_MASK,4,2        ; @DEVID_VENDORID_MASK
	.comm	_DEVID_VENDORID_SHIFT,4,2       ; @DEVID_VENDORID_SHIFT
	.comm	_DEVID_DEVICEID_MASK,4,2        ; @DEVID_DEVICEID_MASK
	.comm	_DEVID_DEVICEID_SHIFT,4,2       ; @DEVID_DEVICEID_SHIFT
l_.str.1:                               ; @.str.1
	.asciz	"Device type: %u (ID: 0x%x, vendor: 0x%x)\n"

	.no_dead_strip	_max14577_print_dev_type
.subsections_via_symbols
