	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max3191x_get
_max3191x_get:                          ## @max3191x_get
	.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, %r14d
	callq	_gpiochip_get_data
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_max3191x_wordlen
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%r15, %rdi
	callq	_max3191x_readout_locked
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	_MAX3191X_NGPIO@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	(%rcx)
	movl	%eax, %r13d
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_max3191x_chip_is_faulting
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_4
LBB0_3:
	movq	8(%r15), %rax
	imull	%r12d, %r13d
	movslq	%r13d, %rcx
	movl	(%rax,%rcx,4), %ecx
	movl	%r14d, %eax
	xorl	%edx, %edx
	movq	_MAX3191X_NGPIO@GOTPCREL(%rip), %rsi
	divl	(%rsi)
	xorl	%ebx, %ebx
	btl	%edx, %ecx
	setb	%bl
LBB0_4:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %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
	.no_dead_strip	_max3191x_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max3191x_get
_max3191x_get:                          ; @max3191x_get
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	bl	_gpiochip_get_data
	mov	x19, x0
	bl	_max3191x_wordlen
	mov	x21, x0
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x19
	bl	_max3191x_readout_locked
	mov	x22, x0
	cbnz	w0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x23, _MAX3191X_NGPIO@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MAX3191X_NGPIO@GOTPAGEOFF]
	ldr	w8, [x23]
	udiv	w22, w20, w8
	mov	x0, x19
	mov	x1, x22
	bl	_max3191x_chip_is_faulting
	cbz	x0, LBB0_3
; %bb.2:
Lloh2:
	adrp	x8, _EIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_4
LBB0_3:
	ldr	x8, [x19, #8]
	mul	w9, w22, w21
	ldr	w8, [x8, w9, sxtw #2]
	ldr	w9, [x23]
	udiv	w10, w20, w9
	msub	w9, w10, w9, w20
	lsr	w8, w8, w9
	and	w22, w8, #0x1
LBB0_4:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX3191X_NGPIO,4,2             ; @MAX3191X_NGPIO
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_max3191x_get
.subsections_via_symbols
