	.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	%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
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_dev_get_drvdata
	movq	%rax, %r13
	leaq	24(%rax), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movb	8(%r13), %cl
	shll	%cl, %ebx
	movq	_MAX1111_CTRL_PD0@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_MAX1111_CTRL_PD1@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_MAX1111_CTRL_SGL@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_MAX1111_CTRL_UNI@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_MAX1111_CTRL_STR@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	(%r13), %rax
	movl	%ebx, (%rax)
	movl	32(%r13), %edi
	leaq	28(%r13), %rsi
	callq	_spi_sync
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	16(%r13), %rax
	movl	(%rax), %ebx
	movl	4(%rax), %r12d
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	andl	$192, %eax
	movl	%r12d, %ecx
	andl	$63, %ecx
	orl	%eax, %ecx
	jne	LBB0_3
## %bb.4:
	shll	$2, %ebx
	sarl	$6, %r12d
	orl	%ebx, %r12d
	jmp	LBB0_5
LBB0_1:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_err
	movq	%r15, %rdi
	callq	_mutex_unlock
	jmp	LBB0_5
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_5:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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	x22, x1
	mov	x20, x0
	bl	_dev_get_drvdata
	mov	x21, x0
	add	x19, x0, #24
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x21, #8]
	lsl	w8, w22, w8
Lloh0:
	adrp	x9, _MAX1111_CTRL_PD0@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX1111_CTRL_PD0@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh3:
	adrp	x9, _MAX1111_CTRL_PD1@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MAX1111_CTRL_PD1@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh6:
	adrp	x9, _MAX1111_CTRL_SGL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MAX1111_CTRL_SGL@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh9:
	adrp	x9, _MAX1111_CTRL_UNI@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MAX1111_CTRL_UNI@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _MAX1111_CTRL_STR@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MAX1111_CTRL_STR@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	x9, [x21]
	str	w8, [x9]
	ldr	w0, [x21, #32]
	add	x1, x21, #28
	bl	_spi_sync
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	x8, [x21, #16]
	ldp	w20, w21, [x8]
	mov	x0, x19
	bl	_mutex_unlock
	and	w8, w20, #0xc0
	bfxil	w8, w21, #0, #6
	cbnz	w8, LBB0_4
; %bb.2:
	asr	w8, w21, #6
	orr	w22, w8, w20, lsl #2
	b	LBB0_5
LBB0_3:
	mov	x22, x0
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x22
	bl	_dev_err
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_5
LBB0_4:
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_5:
	mov	x0, x22
	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	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	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.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
