	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function opt3001_remove
_opt3001_remove:                        ## @opt3001_remove
	.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, %r15
	callq	_i2c_get_clientdata
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_iio_priv
	movq	%rax, %r14
	cmpq	$0, 8(%rax)
	je	LBB0_2
## %bb.1:
	movl	(%r15), %edi
	movq	%rbx, %rsi
	callq	_free_irq
LBB0_2:
	movl	4(%r14), %edi
	movq	_OPT3001_CONFIGURATION@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_i2c_smbus_read_word_swapped
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	%ebx, -36(%rbp)
	movq	_OPT3001_CONFIGURATION_M_SHUTDOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-36(%rbp), %rsi
	movq	%r14, %rdi
	callq	_opt3001_set_mode
	movl	4(%r14), %edi
	movl	(%r12), %esi
	movl	-36(%rbp), %edx
	callq	_i2c_smbus_write_word_swapped
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jns	LBB0_6
## %bb.5:
	movl	%eax, %r15d
	movl	(%r14), %edi
	movl	(%r12), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movl	%r15d, %ebx
	jmp	LBB0_6
LBB0_3:
	movl	(%r14), %edi
	movl	(%r12), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_6:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OPT3001_CONFIGURATION,4,2      ## @OPT3001_CONFIGURATION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to read register %02x\n"

	.comm	_OPT3001_CONFIGURATION_M_SHUTDOWN,4,2 ## @OPT3001_CONFIGURATION_M_SHUTDOWN
L_.str.1:                               ## @.str.1
	.asciz	"failed to write register %02x\n"

	.no_dead_strip	_opt3001_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function opt3001_remove
_opt3001_remove:                        ; @opt3001_remove
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	bl	_i2c_get_clientdata
	mov	x21, x0
	bl	_iio_priv
	mov	x19, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x20]
	mov	x1, x21
	bl	_free_irq
LBB0_2:
	ldr	w0, [x19, #4]
Lloh0:
	adrp	x21, _OPT3001_CONFIGURATION@GOTPAGE
Lloh1:
	ldr	x21, [x21, _OPT3001_CONFIGURATION@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_i2c_smbus_read_word_swapped
	mov	x20, x0
	tbnz	w0, #31, LBB0_5
; %bb.3:
	str	w20, [sp, #12]
Lloh2:
	adrp	x8, _OPT3001_CONFIGURATION_M_SHUTDOWN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _OPT3001_CONFIGURATION_M_SHUTDOWN@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	add	x1, sp, #12
	mov	x0, x19
	bl	_opt3001_set_mode
	ldr	w0, [x19, #4]
	ldr	w1, [x21]
	ldr	w2, [sp, #12]
	bl	_i2c_smbus_write_word_swapped
	tbnz	w0, #31, LBB0_6
; %bb.4:
	mov	w20, #0
	b	LBB0_8
LBB0_5:
	ldr	w0, [x19]
	ldr	w2, [x21]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_6:
	mov	x20, x0
	ldr	w0, [x19]
	ldr	w2, [x21]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	bl	_dev_err
LBB0_8:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_OPT3001_CONFIGURATION,4,2      ; @OPT3001_CONFIGURATION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to read register %02x\n"

	.comm	_OPT3001_CONFIGURATION_M_SHUTDOWN,4,2 ; @OPT3001_CONFIGURATION_M_SHUTDOWN
l_.str.1:                               ; @.str.1
	.asciz	"failed to write register %02x\n"

	.no_dead_strip	_opt3001_remove
.subsections_via_symbols
