	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mcp3911_config
_mcp3911_config:                        ## @mcp3911_config
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rax
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	movq	%rbx, %rdx
	callq	_of_property_read_u32
	movl	(%rbx), %edx
	movq	8(%rbx), %rdi
	cmpl	$4, %edx
	jl	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_2:
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_MCP3911_REG_CONFIG@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	_mcp3911_read
	testl	%eax, %eax
	jne	LBB0_10
## %bb.3:
	cmpq	$0, 24(%rbx)
	movq	8(%rbx), %rdi
	je	LBB0_5
## %bb.4:
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_MCP3911_CONFIG_VREFEXT@GOTPCREL(%rip), %rcx
	movl	-20(%rbp), %eax
	orl	(%rcx), %eax
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_MCP3911_CONFIG_VREFEXT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	-20(%rbp), %eax
LBB0_6:
	movl	%eax, -20(%rbp)
	cmpq	$0, 16(%rbx)
	movq	8(%rbx), %rdi
	je	LBB0_8
## %bb.7:
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_MCP3911_CONFIG_CLKEXT@GOTPCREL(%rip), %rax
	movl	-20(%rbp), %edx
	orl	(%rax), %edx
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_MCP3911_CONFIG_CLKEXT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-20(%rbp), %edx
LBB0_9:
	movl	%edx, -20(%rbp)
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	_mcp3911_write
LBB0_10:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"device-addr"

L_.str.1:                               ## @.str.1
	.asciz	"invalid device address (%i). Must be in range 0-3.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"use device address %i\n"

	.comm	_MCP3911_REG_CONFIG,4,2         ## @MCP3911_REG_CONFIG
L_.str.3:                               ## @.str.3
	.asciz	"use external voltage reference\n"

	.comm	_MCP3911_CONFIG_VREFEXT,4,2     ## @MCP3911_CONFIG_VREFEXT
L_.str.4:                               ## @.str.4
	.asciz	"use internal voltage reference (1.2V)\n"

L_.str.5:                               ## @.str.5
	.asciz	"use external clock as clocksource\n"

	.comm	_MCP3911_CONFIG_CLKEXT,4,2      ## @MCP3911_CONFIG_CLKEXT
L_.str.6:                               ## @.str.6
	.asciz	"use crystal oscillator as clocksource\n"

	.no_dead_strip	_mcp3911_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mcp3911_config
_mcp3911_config:                        ; @mcp3911_config
	.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	x8, x1
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	mov	x2, x19
	bl	_of_property_read_u32
	ldr	w2, [x19]
	ldr	x0, [x19, #8]
	cmp	w2, #4
	b.lt	LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_dev_err
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_2:
	str	x2, [sp]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
Lloh9:
	adrp	x20, _MCP3911_REG_CONFIG@GOTPAGE
Lloh10:
	ldr	x20, [x20, _MCP3911_REG_CONFIG@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	mov	w3, #2
	bl	_mcp3911_read
	cbnz	w0, LBB0_10
; %bb.3:
	ldr	x8, [x19, #24]
	ldr	x0, [x19, #8]
	cbz	x8, LBB0_5
; %bb.4:
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_dbg
Lloh13:
	adrp	x8, _MCP3911_CONFIG_VREFEXT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MCP3911_CONFIG_VREFEXT@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	orr	w8, w9, w8
	b	LBB0_6
LBB0_5:
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_dbg
Lloh18:
	adrp	x8, _MCP3911_CONFIG_VREFEXT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MCP3911_CONFIG_VREFEXT@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
LBB0_6:
	str	w8, [sp, #12]
	ldp	x0, x8, [x19, #8]
	cbz	x8, LBB0_8
; %bb.7:
Lloh21:
	adrp	x1, l_.str.5@PAGE
Lloh22:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_dbg
Lloh23:
	adrp	x8, _MCP3911_CONFIG_CLKEXT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MCP3911_CONFIG_CLKEXT@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	orr	w2, w9, w8
	b	LBB0_9
LBB0_8:
Lloh26:
	adrp	x1, l_.str.6@PAGE
Lloh27:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_dbg
Lloh28:
	adrp	x8, _MCP3911_CONFIG_CLKEXT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MCP3911_CONFIG_CLKEXT@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w2, w9, w8
LBB0_9:
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w3, #2
	bl	_mcp3911_write
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"device-addr"

l_.str.1:                               ; @.str.1
	.asciz	"invalid device address (%i). Must be in range 0-3.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"use device address %i\n"

	.comm	_MCP3911_REG_CONFIG,4,2         ; @MCP3911_REG_CONFIG
l_.str.3:                               ; @.str.3
	.asciz	"use external voltage reference\n"

	.comm	_MCP3911_CONFIG_VREFEXT,4,2     ; @MCP3911_CONFIG_VREFEXT
l_.str.4:                               ; @.str.4
	.asciz	"use internal voltage reference (1.2V)\n"

l_.str.5:                               ; @.str.5
	.asciz	"use external clock as clocksource\n"

	.comm	_MCP3911_CONFIG_CLKEXT,4,2      ; @MCP3911_CONFIG_CLKEXT
l_.str.6:                               ; @.str.6
	.asciz	"use crystal oscillator as clocksource\n"

	.no_dead_strip	_mcp3911_config
.subsections_via_symbols
