	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max1111_read
_max1111_read:                          ## @max1111_read
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_dev_get_drvdata
	movq	_MAX1111_CTRL_SEL_SH@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %ebx
	movq	_MAX1111_CTRL_PD0@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	movq	_MAX1111_CTRL_PD1@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	movq	_MAX1111_CTRL_SGL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	movq	_MAX1111_CTRL_UNI@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	movq	%rax, %r15
	movq	_MAX1111_CTRL_STR@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	(%r15), %rax
	movl	%ebx, (%rax)
	movl	20(%r15), %edi
	leaq	16(%r15), %rsi
	callq	_spi_sync
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	8(%r15), %rcx
	movl	(%rcx), %eax
	movl	4(%rcx), %ebx
	movl	%eax, %ecx
	andl	$192, %ecx
	movl	%ebx, %edx
	andl	$63, %edx
	orl	%ecx, %edx
	jne	LBB0_3
## %bb.4:
	shll	$2, %eax
	sarl	$6, %ebx
	orl	%eax, %ebx
	jmp	LBB0_5
LBB0_1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_5
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX1111_CTRL_SEL_SH,4,2        ## @MAX1111_CTRL_SEL_SH
	.comm	_MAX1111_CTRL_PD0,4,2           ## @MAX1111_CTRL_PD0
	.comm	_MAX1111_CTRL_PD1,4,2           ## @MAX1111_CTRL_PD1
	.comm	_MAX1111_CTRL_SGL,4,2           ## @MAX1111_CTRL_SGL
	.comm	_MAX1111_CTRL_UNI,4,2           ## @MAX1111_CTRL_UNI
	.comm	_MAX1111_CTRL_STR,4,2           ## @MAX1111_CTRL_STR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"spi_sync failed with %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_max1111_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max1111_read
_max1111_read:                          ; @max1111_read
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x1
	mov	x19, x0
	bl	_dev_get_drvdata
	mov	x20, x0
Lloh0:
	adrp	x8, _MAX1111_CTRL_SEL_SH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX1111_CTRL_SEL_SH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	lsl	w8, w21, w8
Lloh3:
	adrp	x9, _MAX1111_CTRL_PD0@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MAX1111_CTRL_PD0@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh6:
	adrp	x9, _MAX1111_CTRL_PD1@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MAX1111_CTRL_PD1@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh9:
	adrp	x9, _MAX1111_CTRL_SGL@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MAX1111_CTRL_SGL@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _MAX1111_CTRL_UNI@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MAX1111_CTRL_UNI@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh15:
	adrp	x9, _MAX1111_CTRL_STR@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MAX1111_CTRL_STR@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	x9, [x0]
	str	w8, [x9]
	ldr	w0, [x0, #20]
	add	x1, x20, #16
	bl	_spi_sync
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	x9, [x20, #8]
	ldp	w8, w9, [x9]
	and	w10, w8, #0xc0
	bfxil	w10, w9, #0, #6
	cbnz	w10, LBB0_4
; %bb.2:
	asr	w9, w9, #6
	orr	w21, w9, w8, lsl #2
	b	LBB0_5
LBB0_3:
	mov	x21, x0
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
	b	LBB0_5
LBB0_4:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX1111_CTRL_SEL_SH,4,2        ; @MAX1111_CTRL_SEL_SH
	.comm	_MAX1111_CTRL_PD0,4,2           ; @MAX1111_CTRL_PD0
	.comm	_MAX1111_CTRL_PD1,4,2           ; @MAX1111_CTRL_PD1
	.comm	_MAX1111_CTRL_SGL,4,2           ; @MAX1111_CTRL_SGL
	.comm	_MAX1111_CTRL_UNI,4,2           ; @MAX1111_CTRL_UNI
	.comm	_MAX1111_CTRL_STR,4,2           ; @MAX1111_CTRL_STR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"spi_sync failed with %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_max1111_read
.subsections_via_symbols
