	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gl520_init_client
_gl520_init_client:                     ## @gl520_init_client
	.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
	movq	%rdi, %r14
	callq	_i2c_get_clientdata
	movq	%rax, %rbx
	movq	_GL520_REG_CONF@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_gl520_read_value
	movl	%eax, %r15d
	movl	$255, (%rbx)
	xorl	%eax, %eax
	callq	_vid_which_vrm
	movl	%eax, 20(%rbx)
	movq	_extra_sensor_type@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r15d, %eax
	cmpl	$2, %ecx
	je	LBB0_3
## %bb.1:
	cmpl	$1, %ecx
	jne	LBB0_4
## %bb.2:
	movl	%r15d, %eax
	andl	$-17, %eax
	jmp	LBB0_4
LBB0_3:
	orl	$16, %eax
LBB0_4:
	xorl	%ecx, %ecx
	testb	$16, %al
	sete	%cl
	movl	%ecx, 4(%rbx)
	movl	%eax, %edx
	andl	$183, %edx
	testb	$32, %al
	cmovnel	%eax, %edx
	orl	$64, %edx
	cmpl	%r15d, %edx
	je	LBB0_6
## %bb.5:
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_gl520_write_value
LBB0_6:
	movq	%r14, %rdi
	callq	_gl520_update_device
	movq	8(%rbx), %rax
	cmpq	$0, (%rax)
	jne	LBB0_8
## %bb.7:
	andb	$-33, (%rbx)
LBB0_8:
	cmpq	$0, 8(%rax)
	movl	(%rbx), %edx
	jne	LBB0_10
## %bb.9:
	andl	$-65, %edx
	movl	%edx, (%rbx)
LBB0_10:
	andl	16(%rbx), %edx
	movl	%edx, 16(%rbx)
	movq	_GL520_REG_BEEP_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gl520_write_value              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GL520_REG_CONF,4,2             ## @GL520_REG_CONF
	.comm	_extra_sensor_type,4,2          ## @extra_sensor_type
	.comm	_GL520_REG_BEEP_MASK,4,2        ## @GL520_REG_BEEP_MASK
	.no_dead_strip	_gl520_init_client
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gl520_init_client
_gl520_init_client:                     ; @gl520_init_client
	.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, x0
	bl	_i2c_get_clientdata
	mov	x20, x0
Lloh0:
	adrp	x22, _GL520_REG_CONF@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GL520_REG_CONF@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_gl520_read_value
	mov	x21, x0
	mov	w8, #255
	str	w8, [x20]
	bl	_vid_which_vrm
	str	w0, [x20, #20]
Lloh2:
	adrp	x8, _extra_sensor_type@GOTPAGE
Lloh3:
	ldr	x8, [x8, _extra_sensor_type@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	orr	w9, w21, #0x10
	and	w10, w21, #0xffffffef
	cmp	w8, #1
	csel	w10, w21, w10, ne
	cmp	w8, #2
	csel	w8, w9, w10, eq
	mov	w9, #1
	bic	w9, w9, w8, lsr #4
	str	w9, [x20, #4]
	mov	w9, #183
	and	w9, w8, w9
	tst	w8, #0x20
	csel	w8, w9, w8, eq
	orr	w2, w8, #0x40
	cmp	w2, w21
	b.eq	LBB0_2
; %bb.1:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_gl520_write_value
LBB0_2:
	mov	x0, x19
	bl	_gl520_update_device
	ldr	x8, [x20, #8]
	ldr	x9, [x8]
	cbnz	x9, LBB0_4
; %bb.3:
	ldr	w9, [x20]
	and	w9, w9, #0xffffffdf
	str	w9, [x20]
LBB0_4:
	ldr	x9, [x8, #8]
	ldr	w8, [x20]
	cbnz	x9, LBB0_6
; %bb.5:
	and	w8, w8, #0xffffffbf
	str	w8, [x20]
LBB0_6:
	ldr	w9, [x20, #16]
	and	w2, w9, w8
	str	w2, [x20, #16]
Lloh5:
	adrp	x8, _GL520_REG_BEEP_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GL520_REG_BEEP_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	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
	b	_gl520_write_value
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GL520_REG_CONF,4,2             ; @GL520_REG_CONF
	.comm	_extra_sensor_type,4,2          ; @extra_sensor_type
	.comm	_GL520_REG_BEEP_MASK,4,2        ; @GL520_REG_BEEP_MASK
	.no_dead_strip	_gl520_init_client
.subsections_via_symbols
