	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mpr121_phys_init
_mpr121_phys_init:                      ## @mpr121_phys_init
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r12
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	_MPR121_MAX_KEY_COUNT@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	js	LBB0_7
## %bb.1:
	movl	$-1, %r14d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_ELE0_TOUCH_THRESHOLD_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	leal	(%r15,%r13), %esi
	movq	_TOUCH_THRESHOLD@GOTPCREL(%rip), %rax
	movzbl	(%rax), %edx
	movq	%r12, %rdi
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	leal	(%r15,%r13), %esi
	incl	%esi
	movq	_RELEASE_THRESHOLD@GOTPCREL(%rip), %rax
	movzbl	(%rax), %edx
	movq	%r12, %rdi
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%r14d
	addl	$2, %r15d
	movq	_MPR121_MAX_KEY_COUNT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jl	LBB0_2
LBB0_7:
	movq	_init_reg_table@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_11
## %bb.8:
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movl	(%rax,%r15,8), %esi
	movzbl	4(%rax,%r15,8), %edx
	movq	%r12, %rdi
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_3
## %bb.9:                               ##   in Loop: Header=BB0_10 Depth=1
	incq	%r15
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %r15
	jl	LBB0_10
LBB0_11:
	movslq	-44(%rbp), %rax                 ## 4-byte Folded Reload
	imulq	$274877907, %rax, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rax
	shrq	$63, %rax
	sarq	$38, %rcx
	addl	%eax, %ecx
	movl	%ecx, %eax
	shll	$8, %eax
	addl	$-179200, %eax                  ## imm = 0xFFFD4400
	cltd
	idivl	%ecx
	movzbl	%al, %edx
	movl	%edx, %eax
	shll	$6, %eax
	addl	%edx, %eax
	shrl	$2, %eax
	imull	$5243, %eax, %ebx               ## imm = 0x147B
	shrl	$17, %ebx
	imull	$90, %edx, %eax
	shrl	$2, %eax
	imull	$5243, %eax, %r14d              ## imm = 0x147B
	shrl	$17, %r14d
	movq	_AUTO_CONFIG_USL_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %r15d
	movq	_AUTO_CONFIG_LSL_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%bl, %edx
	movq	%r12, %rdi
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %ebx
	orl	%r15d, %ebx
	movq	_AUTO_CONFIG_TL_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%r14b, %edx
	movq	%r12, %rdi
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %r15d
	movq	_ELECTRODE_CONF_QUICK_CHARGE@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	orb	(%r14), %al
	orl	%ebx, %r15d
	movq	_ELECTRODE_CONF_ADDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movzbl	%al, %edx
	movq	%r12, %rdi
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %ebx
	orl	%r15d, %ebx
	jne	LBB0_4
## %bb.12:
	movzbl	(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_dbg
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_3:
	movl	%eax, %ebx
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_dev_err
LBB0_13:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MPR121_MAX_KEY_COUNT,4,2       ## @MPR121_MAX_KEY_COUNT
	.comm	_ELE0_TOUCH_THRESHOLD_ADDR,4,2  ## @ELE0_TOUCH_THRESHOLD_ADDR
	.comm	_TOUCH_THRESHOLD,1,0            ## @TOUCH_THRESHOLD
	.comm	_RELEASE_THRESHOLD,1,0          ## @RELEASE_THRESHOLD
	.comm	_init_reg_table,8,3             ## @init_reg_table
	.comm	_AUTO_CONFIG_USL_ADDR,4,2       ## @AUTO_CONFIG_USL_ADDR
	.comm	_AUTO_CONFIG_LSL_ADDR,4,2       ## @AUTO_CONFIG_LSL_ADDR
	.comm	_AUTO_CONFIG_TL_ADDR,4,2        ## @AUTO_CONFIG_TL_ADDR
	.comm	_ELECTRODE_CONF_QUICK_CHARGE,1,0 ## @ELECTRODE_CONF_QUICK_CHARGE
	.comm	_ELECTRODE_CONF_ADDR,4,2        ## @ELECTRODE_CONF_ADDR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set up with %x keys.\n"

L_.str.1:                               ## @.str.1
	.asciz	"i2c write error: %d\n"

	.no_dead_strip	_mpr121_phys_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mpr121_phys_init
_mpr121_phys_init:                      ; @mpr121_phys_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x19, x1
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
Lloh0:
	adrp	x24, _MPR121_MAX_KEY_COUNT@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MPR121_MAX_KEY_COUNT@GOTPAGEOFF]
	ldr	w8, [x24]
	tbnz	w8, #31, LBB0_5
; %bb.1:
	mov	w25, #0
	mov	w26, #-1
Lloh2:
	adrp	x27, _ELE0_TOUCH_THRESHOLD_ADDR@GOTPAGE
Lloh3:
	ldr	x27, [x27, _ELE0_TOUCH_THRESHOLD_ADDR@GOTPAGEOFF]
Lloh4:
	adrp	x28, _TOUCH_THRESHOLD@GOTPAGE
Lloh5:
	ldr	x28, [x28, _TOUCH_THRESHOLD@GOTPAGEOFF]
Lloh6:
	adrp	x20, _RELEASE_THRESHOLD@GOTPAGE
Lloh7:
	ldr	x20, [x20, _RELEASE_THRESHOLD@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x27]
	add	w23, w25, w8
	ldrb	w2, [x28]
	mov	x0, x19
	mov	x1, x23
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_11
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w1, w23, #1
	ldrb	w2, [x20]
	mov	x0, x19
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x24]
	add	w26, w26, #1
	add	w25, w25, #2
	cmp	w26, w8
	b.lt	LBB0_2
LBB0_5:
Lloh8:
	adrp	x23, _init_reg_table@GOTPAGE
Lloh9:
	ldr	x23, [x23, _init_reg_table@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.6:
	mov	x20, #0
	mov	x24, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	add	x8, x8, x20
	ldr	w1, [x8]
	ldrb	w2, [x8, #4]
	mov	x0, x19
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x24, x24, #1
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	add	x20, x20, #8
	cmp	x24, w0, sxtw
	b.lt	LBB0_7
LBB0_9:
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	smull	x8, w21, w8
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	mov	w9, #17408
	movk	w9, #65533, lsl #16
	add	w9, w9, w8, lsl #8
	sdiv	w8, w9, w8
	and	w2, w8, #0xff
	add	w8, w2, w2, lsl #6
	lsr	w8, w8, #2
	mov	w9, #5243
	mul	w20, w8, w9
	mov	w8, #90
	mul	w8, w2, w8
	lsr	w8, w8, #2
	mul	w22, w8, w9
Lloh10:
	adrp	x8, _AUTO_CONFIG_USL_ADDR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AUTO_CONFIG_USL_ADDR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_i2c_smbus_write_byte_data
	mov	x21, x0
Lloh13:
	adrp	x8, _AUTO_CONFIG_LSL_ADDR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AUTO_CONFIG_LSL_ADDR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	ubfx	w2, w20, #17, #8
	mov	x0, x19
	bl	_i2c_smbus_write_byte_data
	orr	w20, w0, w21
Lloh16:
	adrp	x8, _AUTO_CONFIG_TL_ADDR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AUTO_CONFIG_TL_ADDR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	ubfx	w2, w22, #17, #8
	mov	x0, x19
	bl	_i2c_smbus_write_byte_data
	orr	w20, w20, w0
Lloh19:
	adrp	x8, _ELECTRODE_CONF_QUICK_CHARGE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ELECTRODE_CONF_QUICK_CHARGE@GOTPAGEOFF]
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
	ldrb	w9, [x21]
	ldrb	w8, [x8]
	orr	w2, w8, w9
Lloh21:
	adrp	x8, _ELECTRODE_CONF_ADDR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ELECTRODE_CONF_ADDR@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_i2c_smbus_write_byte_data
	orr	w22, w20, w0
	cbnz	w22, LBB0_12
; %bb.10:
	ldrb	w2, [x21]
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	b	LBB0_13
LBB0_11:
	mov	x22, x0
LBB0_12:
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_dev_err
LBB0_13:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_MPR121_MAX_KEY_COUNT,4,2       ; @MPR121_MAX_KEY_COUNT
	.comm	_ELE0_TOUCH_THRESHOLD_ADDR,4,2  ; @ELE0_TOUCH_THRESHOLD_ADDR
	.comm	_TOUCH_THRESHOLD,1,0            ; @TOUCH_THRESHOLD
	.comm	_RELEASE_THRESHOLD,1,0          ; @RELEASE_THRESHOLD
	.comm	_init_reg_table,8,3             ; @init_reg_table
	.comm	_AUTO_CONFIG_USL_ADDR,4,2       ; @AUTO_CONFIG_USL_ADDR
	.comm	_AUTO_CONFIG_LSL_ADDR,4,2       ; @AUTO_CONFIG_LSL_ADDR
	.comm	_AUTO_CONFIG_TL_ADDR,4,2        ; @AUTO_CONFIG_TL_ADDR
	.comm	_ELECTRODE_CONF_QUICK_CHARGE,1,0 ; @ELECTRODE_CONF_QUICK_CHARGE
	.comm	_ELECTRODE_CONF_ADDR,4,2        ; @ELECTRODE_CONF_ADDR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set up with %x keys.\n"

l_.str.1:                               ; @.str.1
	.asciz	"i2c write error: %d\n"

	.no_dead_strip	_mpr121_phys_init
.subsections_via_symbols
