	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sx9500_init_device
_sx9500_init_device:                    ## @sx9500_init_device
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_iio_priv
	movq	%rax, %r12
	movq	8(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	xorl	%esi, %esi
	callq	_gpiod_set_value_cansleep
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movq	8(%r12), %rdi
	movl	$1, %esi
	callq	_gpiod_set_value_cansleep
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
LBB0_2:
	movl	(%r12), %edi
	movq	_SX9500_REG_IRQ_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_regmap_write
	testl	%eax, %eax
	js	LBB0_10
## %bb.3:
	movl	(%r12), %edi
	movq	_SX9500_REG_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SX9500_SOFT_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_regmap_write
	testl	%eax, %eax
	js	LBB0_10
## %bb.4:
	movl	(%r12), %edi
	movq	_SX9500_REG_IRQ_SRC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_10
## %bb.5:
	movq	_sx9500_default_regs@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_9
## %bb.6:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movq	(%r15), %rax
	movl	(%rax,%rbx,8), %edx
	movl	4(%rax,%rbx,8), %esi
	callq	_regmap_write
	testl	%eax, %eax
	js	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_8
LBB0_9:
	movq	%r14, %rdi
	callq	_sx9500_init_compensation
LBB0_10:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SX9500_REG_IRQ_MSK,4,2         ## @SX9500_REG_IRQ_MSK
	.comm	_SX9500_REG_RESET,4,2           ## @SX9500_REG_RESET
	.comm	_SX9500_SOFT_RESET,4,2          ## @SX9500_SOFT_RESET
	.comm	_SX9500_REG_IRQ_SRC,4,2         ## @SX9500_REG_IRQ_SRC
	.comm	_sx9500_default_regs,8,3        ## @sx9500_default_regs
	.no_dead_strip	_sx9500_init_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sx9500_init_device
_sx9500_init_device:                    ; @sx9500_init_device
	.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	x19, x0
	bl	_iio_priv
	mov	x20, x0
	ldr	x0, [x0, #8]
	cbz	x0, LBB0_2
; %bb.1:
	mov	w1, #0
	bl	_gpiod_set_value_cansleep
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	x0, [x20, #8]
	mov	w1, #1
	bl	_gpiod_set_value_cansleep
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
LBB0_2:
	ldr	w0, [x20]
Lloh0:
	adrp	x8, _SX9500_REG_IRQ_MSK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SX9500_REG_IRQ_MSK@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_regmap_write
	tbnz	w0, #31, LBB0_10
; %bb.3:
	ldr	w0, [x20]
Lloh3:
	adrp	x8, _SX9500_REG_RESET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SX9500_REG_RESET@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _SX9500_SOFT_RESET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SX9500_SOFT_RESET@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	bl	_regmap_write
	tbnz	w0, #31, LBB0_10
; %bb.4:
	ldr	w0, [x20]
Lloh9:
	adrp	x8, _SX9500_REG_IRQ_SRC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SX9500_REG_IRQ_SRC@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_10
; %bb.5:
Lloh12:
	adrp	x21, _sx9500_default_regs@GOTPAGE
Lloh13:
	ldr	x21, [x21, _sx9500_default_regs@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.6:
	mov	x22, #0
	mov	x23, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	ldr	x8, [x21]
	add	x8, x8, x22
	ldp	w2, w1, [x8]
	bl	_regmap_write
	tbnz	w0, #31, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x23, x23, #1
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	add	x22, x22, #8
	cmp	x23, w0, sxtw
	b.lt	LBB0_7
LBB0_9:
	mov	x0, x19
	bl	_sx9500_init_compensation
LBB0_10:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_SX9500_REG_IRQ_MSK,4,2         ; @SX9500_REG_IRQ_MSK
	.comm	_SX9500_REG_RESET,4,2           ; @SX9500_REG_RESET
	.comm	_SX9500_SOFT_RESET,4,2          ; @SX9500_SOFT_RESET
	.comm	_SX9500_REG_IRQ_SRC,4,2         ; @SX9500_REG_IRQ_SRC
	.comm	_sx9500_default_regs,8,3        ; @sx9500_default_regs
	.no_dead_strip	_sx9500_init_device
.subsections_via_symbols
