	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcf8591_read_channel
_pcf8591_read_channel:                  ## @pcf8591_read_channel
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	callq	_to_i2c_client
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_i2c_get_clientdata
	movq	%rax, %rbx
	leaq	4(%rax), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movl	(%rbx), %esi
	movq	_PCF8591_CONTROL_AICH_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	andl	%esi, %ecx
	cmpl	%r14d, %ecx
	je	LBB0_2
## %bb.1:
	notl	%eax
	andl	%eax, %esi
	orl	%r14d, %esi
	movl	%esi, (%rbx)
	movq	%r12, %rdi
	callq	_i2c_smbus_write_byte
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte
LBB0_2:
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	_input_mode@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$2, %r14d
	jne	LBB0_4
## %bb.3:
	cmpl	$2, %eax
	je	LBB0_6
LBB0_4:
	cmpl	$3, %r14d
	je	LBB0_7
## %bb.5:
	andl	$-3, %eax
	cmpl	$1, %eax
	jne	LBB0_7
LBB0_6:
	movl	%ebx, %edi
	callq	_REG_TO_SIGNED
	movl	%eax, %ebx
LBB0_7:
	addl	%ebx, %ebx
	leal	(%rbx,%rbx,4), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCF8591_CONTROL_AICH_MASK,4,2  ## @PCF8591_CONTROL_AICH_MASK
	.comm	_input_mode,4,2                 ## @input_mode
	.no_dead_strip	_pcf8591_read_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcf8591_read_channel
_pcf8591_read_channel:                  ; @pcf8591_read_channel
	.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, x1
	bl	_to_i2c_client
	mov	x20, x0
	bl	_i2c_get_clientdata
	mov	x22, x0
	add	x21, x0, #4
	mov	x0, x21
	bl	_mutex_lock
	ldr	w8, [x22]
Lloh0:
	adrp	x9, _PCF8591_CONTROL_AICH_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PCF8591_CONTROL_AICH_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w10, w9, w8
	cmp	w10, w19
	b.eq	LBB0_2
; %bb.1:
	bic	w8, w8, w9
	orr	w1, w8, w19
	str	w1, [x22]
	mov	x0, x20
	bl	_i2c_smbus_write_byte
	mov	x0, x20
	bl	_i2c_smbus_read_byte
LBB0_2:
	mov	x0, x20
	bl	_i2c_smbus_read_byte
	mov	x20, x0
	mov	x0, x21
	bl	_mutex_unlock
Lloh3:
	adrp	x8, _input_mode@GOTPAGE
Lloh4:
	ldr	x8, [x8, _input_mode@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w19, #2
	b.ne	LBB0_4
; %bb.3:
	cmp	w8, #2
	b.eq	LBB0_6
LBB0_4:
	cmp	w19, #3
	b.eq	LBB0_7
; %bb.5:
	and	w8, w8, #0xfffffffd
	cmp	w8, #1
	b.ne	LBB0_7
LBB0_6:
	mov	x0, x20
	bl	_REG_TO_SIGNED
	mov	x20, x0
LBB0_7:
	add	w8, w20, w20, lsl #2
	lsl	w0, w8, #1
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PCF8591_CONTROL_AICH_MASK,4,2  ; @PCF8591_CONTROL_AICH_MASK
	.comm	_input_mode,4,2                 ; @input_mode
	.no_dead_strip	_pcf8591_read_channel
.subsections_via_symbols
