	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max3191x_get_multiple
_max3191x_get_multiple:                 ## @max3191x_get_multiple
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	callq	_gpiochip_get_data
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_max3191x_wordlen
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%r15, %rdi
	callq	_max3191x_readout_locked
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	(%r12), %esi
	xorl	%ebx, %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%edx, %edx
	callq	_find_next_bit
	movq	%r12, %rcx
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	cmpl	(%r12), %eax
	je	LBB0_7
## %bb.2:
	movl	%eax, %r12d
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	_MAX3191X_NGPIO@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %eax
	cltd
	idivl	(%rbx)
	movl	%eax, %r13d
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_max3191x_chip_is_faulting
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r15), %rax
	movl	%r13d, %ecx
	imull	-44(%rbp), %ecx                 ## 4-byte Folded Reload
	movq	(%rax,%rcx,8), %r14
	movl	%r12d, %eax
	cltd
	movq	_BITS_PER_LONG@GOTPCREL(%rip), %rcx
	idivl	(%rcx)
	movl	%edx, %edi
	movl	(%rbx), %esi
	callq	_round_down
	movq	%rax, %rcx
	movl	%r12d, %eax
	cltd
	movq	_BITS_PER_LONG@GOTPCREL(%rip), %rsi
	idivl	(%rsi)
	movl	$255, %edx
	shll	%cl, %edx
	cltq
	movslq	%edx, %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	andq	(%rdi,%rax,8), %rdx
	notq	%rdx
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	andq	(%rsi,%rax,8), %rdx
	movq	%rdx, (%rsi,%rax,8)
                                        ## kill: def $cl killed $cl killed $rcx
	shlq	%cl, %r14
	andq	(%rdi,%rax,8), %r14
	orq	%rdx, %r14
	movq	%r14, (%rsi,%rax,8)
	incl	%r13d
	imull	(%rbx), %r13d
	movq	%rbx, %r14
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %esi
	movl	%r13d, %edx
	callq	_find_next_bit
	movl	%eax, %r12d
	cmpl	(%rbx), %eax
	movq	%r14, %rbx
	jne	LBB0_3
## %bb.6:
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_4:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX3191X_NGPIO,4,2             ## @MAX3191X_NGPIO
	.comm	_EIO,4,2                        ## @EIO
	.comm	_BITS_PER_LONG,4,2              ## @BITS_PER_LONG
	.no_dead_strip	_max3191x_get_multiple
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max3191x_get_multiple
_max3191x_get_multiple:                 ; @max3191x_get_multiple
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_gpiochip_get_data
	mov	x19, x0
	bl	_max3191x_wordlen
	mov	x23, x0
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x19
	bl	_max3191x_readout_locked
	mov	x25, x0
	cbnz	w0, LBB0_7
; %bb.1:
	ldr	w1, [x22]
	mov	x0, x21
	mov	w2, #0
	bl	_find_next_bit
	ldr	w8, [x22]
	cmp	w0, w8
	b.eq	LBB0_7
; %bb.2:
	mov	x24, x0
Lloh0:
	adrp	x26, _MAX3191X_NGPIO@GOTPAGE
Lloh1:
	ldr	x26, [x26, _MAX3191X_NGPIO@GOTPAGEOFF]
Lloh2:
	adrp	x27, _BITS_PER_LONG@GOTPAGE
Lloh3:
	ldr	x27, [x27, _BITS_PER_LONG@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x26]
	sdiv	w25, w24, w8
	mov	x0, x19
	mov	x1, x25
	bl	_max3191x_chip_is_faulting
	cbnz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	mul	w9, w25, w23
	ldr	x28, [x8, w9, uxtw #3]
	ldr	w8, [x27]
	sdiv	w9, w24, w8
	msub	w0, w9, w8, w24
	ldr	w1, [x26]
	bl	_round_down
	ldr	w8, [x27]
	sdiv	w8, w24, w8
	sbfiz	x8, x8, #3, #32
	ldr	x9, [x21, x8]
	mov	w10, #255
	lsl	w10, w10, w0
	sxtw	x10, w10
	and	x9, x9, x10
	ldr	x10, [x20, x8]
	bic	x9, x10, x9
	str	x9, [x20, x8]
	ldr	x10, [x21, x8]
	lsl	x11, x28, x0
	and	x10, x10, x11
	orr	x9, x10, x9
	str	x9, [x20, x8]
	ldr	w8, [x26]
	madd	w2, w8, w25, w8
	ldr	w1, [x22]
	mov	x0, x21
	bl	_find_next_bit
	mov	x24, x0
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.5:
	mov	w25, #0
	b	LBB0_7
LBB0_6:
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w25, w8
LBB0_7:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x25
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX3191X_NGPIO,4,2             ; @MAX3191X_NGPIO
	.comm	_EIO,4,2                        ; @EIO
	.comm	_BITS_PER_LONG,4,2              ; @BITS_PER_LONG
	.no_dead_strip	_max3191x_get_multiple
.subsections_via_symbols
