	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hx711_probe
_hx711_probe:                           ## @hx711_probe
	.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
	movq	%rdi, %rbx
	movq	(%rdi), %r13
	movl	$56, %esi
	callq	_devm_iio_device_alloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_iio_priv
	movq	%rax, %r12
	movq	%rax, %r15
	movq	%rbx, 48(%rax)
	leaq	40(%rax), %rdi
	callq	_mutex_init
	movq	_GPIOD_OUT_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_devm_gpiod_get
	movq	%rax, 32(%r12)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	32(%r15), %rdi
	callq	_PTR_ERR
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	32(%r15), %rdi
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
LBB0_22:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_GPIOD_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_devm_gpiod_get
	movq	%rax, 24(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	24(%r15), %rdi
	callq	_PTR_ERR
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	24(%r15), %rdi
	jmp	LBB0_6
LBB0_7:
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdi
	callq	_devm_regulator_get
	movq	%rax, 16(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	16(%r15), %rdi
	testq	%rax, %rax
	je	LBB0_8
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_8:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	callq	_regulator_enable
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movq	16(%r15), %rdi
	callq	_regulator_get_voltage
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_21
## %bb.11:
	movq	_HX711_GAIN_MAX@GOTPCREL(%rip), %r8
	cmpl	$0, (%r8)
	jle	LBB0_14
## %bb.12:
	imull	$100, %r13d, %ecx
	movq	_hx711_gain_to_scale@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %eax
	cltd
	idivl	4(%rdi,%rsi,8)
	cltq
	imulq	$-1673962223, %rax, %rdx        ## imm = 0x9C395D11
	shrq	$32, %rdx
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	sarl	$10, %eax
	addl	%edx, %eax
	movl	%eax, (%rdi,%rsi,8)
	incq	%rsi
	movslq	(%r8), %rax
	cmpq	%rax, %rsi
	jl	LBB0_13
LBB0_14:
	movabsq	$549755814016, %rax             ## imm = 0x8000000080
	movq	%rax, (%r15)
	addq	$8, %r12
	movl	$400000, 8(%r15)                ## imm = 0x61A80
	leaq	L_.str.6(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rdx
	callq	_of_property_read_u32
	movl	8(%r15), %ecx
	cmpl	$19999, %ecx                    ## imm = 0x4E1F
	jg	LBB0_16
## %bb.15:
	leaq	L_.str.7(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_warn
	movl	$400000, (%r12)                 ## imm = 0x61A80
	movl	$400000, %ecx                   ## imm = 0x61A80
LBB0_16:
	xorl	%r13d, %r13d
	movl	$1000000000, %eax               ## imm = 0x3B9ACA00
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, 12(%r15)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_platform_set_drvdata
	leaq	L_.str.8(%rip), %rax
	movq	%rax, (%r14)
	movq	%rbx, 32(%r14)
	movq	_hx711_iio_info@GOTPCREL(%rip), %rax
	movq	%rax, 24(%r14)
	movq	_INDIO_DIRECT_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	movq	_hx711_chan_spec@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, 12(%r14)
	callq	_ARRAY_SIZE
	movl	%eax, 8(%r14)
	movq	_iio_pollfunc_store_time@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_hx711_trigger@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_iio_triggered_buffer_setup
	testl	%eax, %eax
	js	LBB0_17
## %bb.18:
	movq	%r14, %rdi
	callq	_iio_device_register
	testl	%eax, %eax
	jns	LBB0_22
## %bb.19:
	movl	%eax, %r12d
	leaq	L_.str.10(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	%r14, %rdi
	callq	_iio_triggered_buffer_cleanup
	jmp	LBB0_20
LBB0_9:
	movl	%eax, %r13d
	jmp	LBB0_22
LBB0_17:
	movl	%eax, %r12d
	leaq	L_.str.9(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_20:
	movl	%r12d, %r13d
LBB0_21:
	movq	16(%r15), %rdi
	callq	_regulator_disable
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to allocate IIO device\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"sck"

	.comm	_GPIOD_OUT_LOW,4,2              ## @GPIOD_OUT_LOW
L_.str.2:                               ## @.str.2
	.asciz	"failed to get sck-gpiod: err=%ld\n"

L_.str.3:                               ## @.str.3
	.asciz	"dout"

	.comm	_GPIOD_IN,4,2                   ## @GPIOD_IN
L_.str.4:                               ## @.str.4
	.asciz	"failed to get dout-gpiod: err=%ld\n"

L_.str.5:                               ## @.str.5
	.asciz	"avdd"

	.comm	_HX711_GAIN_MAX,4,2             ## @HX711_GAIN_MAX
	.comm	_hx711_gain_to_scale,8,3        ## @hx711_gain_to_scale
L_.str.6:                               ## @.str.6
	.asciz	"clock-frequency"

L_.str.7:                               ## @.str.7
	.asciz	"clock-frequency too low - assuming 400 kHz\n"

L_.str.8:                               ## @.str.8
	.asciz	"hx711"

	.comm	_hx711_iio_info,4,2             ## @hx711_iio_info
	.comm	_INDIO_DIRECT_MODE,4,2          ## @INDIO_DIRECT_MODE
	.comm	_hx711_chan_spec,4,2            ## @hx711_chan_spec
	.comm	_iio_pollfunc_store_time,4,2    ## @iio_pollfunc_store_time
	.comm	_hx711_trigger,4,2              ## @hx711_trigger
L_.str.9:                               ## @.str.9
	.asciz	"setup of iio triggered buffer failed\n"

L_.str.10:                              ## @.str.10
	.asciz	"Couldn't register the device\n"

	.no_dead_strip	_hx711_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hx711_probe
_hx711_probe:                           ; @hx711_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x0
	ldr	x22, [x0]
	mov	w1, #56
	bl	_devm_iio_device_alloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
	bl	_iio_priv
	mov	x19, x0
	str	x20, [x0, #48]
	add	x0, x0, #40
	bl	_mutex_init
Lloh0:
	adrp	x8, _GPIOD_OUT_LOW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GPIOD_OUT_LOW@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_devm_gpiod_get
	str	x0, [x19, #32]
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x0, [x19, #32]
	bl	_PTR_ERR
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	x0, [x19, #32]
	b	LBB0_8
LBB0_3:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_4:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_5:
Lloh12:
	adrp	x8, _GPIOD_IN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GPIOD_IN@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_devm_gpiod_get
	str	x0, [x19, #24]
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.6:
	ldr	x0, [x19, #24]
	bl	_PTR_ERR
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	x0, [x19, #24]
	b	LBB0_8
LBB0_7:
Lloh19:
	adrp	x1, l_.str.5@PAGE
Lloh20:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_devm_regulator_get
	str	x0, [x19, #16]
	bl	_IS_ERR
	mov	x8, x0
	ldr	x0, [x19, #16]
	cbz	x8, LBB0_9
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_PTR_ERR
LBB0_9:
	bl	_regulator_enable
	tbnz	w0, #31, LBB0_19
; %bb.10:
	ldr	x0, [x19, #16]
	bl	_regulator_get_voltage
	mov	x23, x0
	tbnz	w0, #31, LBB0_22
; %bb.11:
Lloh21:
	adrp	x8, _HX711_GAIN_MAX@GOTPAGE
Lloh22:
	ldr	x8, [x8, _HX711_GAIN_MAX@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_14
; %bb.12:
	mov	x9, #0
	mov	w10, #100
	mul	w10, w23, w10
Lloh23:
	adrp	x11, _hx711_gain_to_scale@GOTPAGE
Lloh24:
	ldr	x11, [x11, _hx711_gain_to_scale@GOTPAGEOFF]
Lloh25:
	ldr	x11, [x11]
	add	x11, x11, #4
	mov	w12, #23825
	movk	w12, #39993, lsl #16
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x11]
	sdiv	w13, w10, w13
	smull	x14, w13, w12
	lsr	x14, x14, #32
	add	w13, w14, w13
	asr	w14, w13, #10
	add	w13, w14, w13, lsr #31
	stur	w13, [x11, #-4]
	add	x9, x9, #1
	ldrsw	x13, [x8]
	add	x11, x11, #8
	cmp	x9, x13
	b.lt	LBB0_13
LBB0_14:
	mov	w24, #6784
	movk	w24, #6, lsl #16
	movi.2s	v0, #128
	str	d0, [x19]
	mov	x23, x19
	str	w24, [x23, #8]!
Lloh26:
	adrp	x1, l_.str.6@PAGE
Lloh27:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x22
	mov	x2, x23
	bl	_of_property_read_u32
	ldr	w8, [x23]
	mov	w9, #19999
	cmp	w8, w9
	b.gt	LBB0_16
; %bb.15:
Lloh28:
	adrp	x1, l_.str.7@PAGE
Lloh29:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
	str	w24, [x23]
	mov	w8, #6784
	movk	w8, #6, lsl #16
LBB0_16:
	mov	w9, #51712
	movk	w9, #15258, lsl #16
	udiv	w8, w9, w8
	str	w8, [x19, #12]
	mov	x0, x20
	mov	x1, x21
	bl	_platform_set_drvdata
Lloh30:
	adrp	x8, l_.str.8@PAGE
Lloh31:
	add	x8, x8, l_.str.8@PAGEOFF
	str	x8, [x21]
Lloh32:
	adrp	x8, _hx711_iio_info@GOTPAGE
Lloh33:
	ldr	x8, [x8, _hx711_iio_info@GOTPAGEOFF]
	stp	x8, x20, [x21, #24]
Lloh34:
	adrp	x8, _INDIO_DIRECT_MODE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _INDIO_DIRECT_MODE@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
Lloh37:
	adrp	x9, _hx711_chan_spec@GOTPAGE
Lloh38:
	ldr	x9, [x9, _hx711_chan_spec@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x9]
	stp	w0, w8, [x21, #12]
	bl	_ARRAY_SIZE
	str	w0, [x21, #8]
Lloh40:
	adrp	x8, _iio_pollfunc_store_time@GOTPAGE
Lloh41:
	ldr	x8, [x8, _iio_pollfunc_store_time@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
Lloh43:
	adrp	x8, _hx711_trigger@GOTPAGE
Lloh44:
	ldr	x8, [x8, _hx711_trigger@GOTPAGEOFF]
Lloh45:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x3, #0
	bl	_iio_triggered_buffer_setup
	tbnz	w0, #31, LBB0_20
; %bb.17:
	mov	x0, x21
	bl	_iio_device_register
	tbnz	w0, #31, LBB0_21
; %bb.18:
	mov	w23, #0
	b	LBB0_4
LBB0_19:
	mov	x23, x0
	b	LBB0_4
LBB0_20:
	mov	x23, x0
Lloh46:
	adrp	x1, l_.str.9@PAGE
Lloh47:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_22
LBB0_21:
	mov	x23, x0
Lloh48:
	adrp	x1, l_.str.10@PAGE
Lloh49:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	mov	x0, x21
	bl	_iio_triggered_buffer_cleanup
LBB0_22:
	ldr	x0, [x19, #16]
	bl	_regulator_disable
	b	LBB0_4
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to allocate IIO device\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"sck"

	.comm	_GPIOD_OUT_LOW,4,2              ; @GPIOD_OUT_LOW
l_.str.2:                               ; @.str.2
	.asciz	"failed to get sck-gpiod: err=%ld\n"

l_.str.3:                               ; @.str.3
	.asciz	"dout"

	.comm	_GPIOD_IN,4,2                   ; @GPIOD_IN
l_.str.4:                               ; @.str.4
	.asciz	"failed to get dout-gpiod: err=%ld\n"

l_.str.5:                               ; @.str.5
	.asciz	"avdd"

	.comm	_HX711_GAIN_MAX,4,2             ; @HX711_GAIN_MAX
	.comm	_hx711_gain_to_scale,8,3        ; @hx711_gain_to_scale
l_.str.6:                               ; @.str.6
	.asciz	"clock-frequency"

l_.str.7:                               ; @.str.7
	.asciz	"clock-frequency too low - assuming 400 kHz\n"

l_.str.8:                               ; @.str.8
	.asciz	"hx711"

	.comm	_hx711_iio_info,4,2             ; @hx711_iio_info
	.comm	_INDIO_DIRECT_MODE,4,2          ; @INDIO_DIRECT_MODE
	.comm	_hx711_chan_spec,4,2            ; @hx711_chan_spec
	.comm	_iio_pollfunc_store_time,4,2    ; @iio_pollfunc_store_time
	.comm	_hx711_trigger,4,2              ; @hx711_trigger
l_.str.9:                               ; @.str.9
	.asciz	"setup of iio triggered buffer failed\n"

l_.str.10:                              ; @.str.10
	.asciz	"Couldn't register the device\n"

	.no_dead_strip	_hx711_probe
.subsections_via_symbols
