	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hx711_read
_hx711_read:                            ## @hx711_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
	movq	%rdi, %r14
	movl	4(%rdi), %edi
	callq	_gpiod_get_value
	testl	%eax, %eax
	je	LBB0_1
## %bb.7:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_6
LBB0_1:
	xorl	%r15d, %r15d
	movl	$24, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_hx711_cycle
	xorl	%ecx, %ecx
	testl	%eax, %eax
	setne	%cl
	leal	(%rcx,%r15,2), %r15d
	decl	%ebx
	jne	LBB0_2
## %bb.3:
	xorl	$8388608, %r15d                 ## imm = 0x800000
	movl	(%r14), %edi
	callq	_hx711_get_gain_to_pulse
	testl	%eax, %eax
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_hx711_cycle
	incl	%ebx
	movl	(%r14), %edi
	callq	_hx711_get_gain_to_pulse
	cmpl	%eax, %ebx
	jl	LBB0_5
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_hx711_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hx711_read
_hx711_read:                            ; @hx711_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	x19, x0
	ldr	w0, [x0, #4]
	bl	_gpiod_get_value
	cbz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_7
LBB0_2:
	mov	w21, #0
	mov	w20, #24
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_hx711_cycle
	cmp	w0, #0
	cset	w8, ne
	bfi	w8, w21, #1, #31
	mov	x21, x8
	subs	w20, w20, #1
	b.ne	LBB0_3
; %bb.4:
	eor	w20, w8, #0x800000
	ldr	w0, [x19]
	bl	_hx711_get_gain_to_pulse
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.5:
	mov	w21, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_hx711_cycle
	add	w21, w21, #1
	ldr	w0, [x19]
	bl	_hx711_get_gain_to_pulse
	cmp	w21, w0
	b.lt	LBB0_6
LBB0_7:
	mov	x0, x20
	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	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_hx711_read
.subsections_via_symbols
