	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function abituguru_update_device
_abituguru_update_device:               ## @abituguru_update_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_dev_get_drvdata
	movq	%rax, %r15
	leaq	8(%rax), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_jiffies@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	movq	_HZ@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r15), %rsi
	callq	_time_after
	testq	%rax, %rax
	je	LBB0_22
## %bb.1:
	movq	_ABIT_UGURU_ALARM_BANK@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	48(%r15), %rcx
	movq	%r15, %rdi
	xorl	%edx, %edx
	movl	$3, %r8d
	xorl	%r9d, %r9d
	callq	_abituguru_read
	cmpl	$3, %eax
	jne	LBB0_6
## %bb.2:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_ABIT_UGURU_MAX_BANK1_SENSORS@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_11
## %bb.3:
	xorl	%r12d, %r12d
	movq	_ABIT_UGURU_SENSOR_BANK1@GOTPCREL(%rip), %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rsi
	movq	40(%r15), %rcx
	addq	%r12, %rcx
	movq	%r15, %rdi
	movl	%ebx, %edx
	movl	$1, %r8d
	xorl	%r9d, %r9d
	callq	_abituguru_read
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r14), %rsi
	incq	%rsi
	movq	32(%r15), %rax
	movq	(%rax,%rbx,8), %rcx
	movq	%r15, %rdi
	movl	%ebx, %edx
	movl	$3, %r8d
	xorl	%r9d, %r9d
	callq	_abituguru_read
	cmpl	$3, %eax
	jne	LBB0_5
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	movslq	(%r13), %rax
	addq	$4, %r12
	cmpq	%rax, %rbx
	jl	LBB0_4
LBB0_11:
	cmpl	$0, (%r15)
	jle	LBB0_20
## %bb.12:
	xorl	%r14d, %r14d
	movq	_ABIT_UGURU_SENSOR_BANK2@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rsi
	movq	24(%r15), %rcx
	addq	%r14, %rcx
	movq	%r15, %rdi
	movl	%ebx, %edx
	movl	$1, %r8d
	xorl	%r9d, %r9d
	callq	_abituguru_read
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.13:                              ##   in Loop: Header=BB0_14 Depth=1
	incq	%rbx
	movslq	(%r15), %rax
	addq	$4, %r14
	cmpq	%rax, %rbx
	jl	LBB0_14
LBB0_20:
	movl	$0, 4(%r15)
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	_jiffies@GOTPCREL(%rip), %rbx
	jmp	LBB0_21
LBB0_5:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	_jiffies@GOTPCREL(%rip), %rbx
LBB0_6:
	testl	%eax, %eax
	jns	LBB0_15
## %bb.7:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	subl	(%rcx), %edx
	cmpl	%edx, %eax
	je	LBB0_15
## %bb.8:
	xorl	%r15d, %r15d
	jmp	LBB0_22
LBB0_15:
	movl	4(%r15), %edx
	cmpl	$254, %edx
	ja	LBB0_17
## %bb.16:
	incl	%edx
	movl	%edx, 4(%r15)
LBB0_17:
	movq	_ABIT_UGURU_MAX_TIMEOUTS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jbe	LBB0_18
## %bb.19:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_ABIT_UGURU_DEBUG
	jmp	LBB0_22
LBB0_18:
	leaq	L_.str(%rip), %rsi
	movl	$3, %edi
	xorl	%eax, %eax
	callq	_ABIT_UGURU_DEBUG
LBB0_21:
	movq	(%rbx), %rax
	movq	%rax, 16(%r15)
LBB0_22:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_HZ,8,3                         ## @HZ
	.comm	_ABIT_UGURU_ALARM_BANK,8,3      ## @ABIT_UGURU_ALARM_BANK
	.comm	_ABIT_UGURU_MAX_BANK1_SENSORS,4,2 ## @ABIT_UGURU_MAX_BANK1_SENSORS
	.comm	_ABIT_UGURU_SENSOR_BANK1,8,3    ## @ABIT_UGURU_SENSOR_BANK1
	.comm	_ABIT_UGURU_SENSOR_BANK2,8,3    ## @ABIT_UGURU_SENSOR_BANK2
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_ABIT_UGURU_MAX_TIMEOUTS,4,2    ## @ABIT_UGURU_MAX_TIMEOUTS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout exceeded, will try again next update\n"

L_.str.1:                               ## @.str.1
	.asciz	"timeout exceeded %d times waiting for more input state\n"

	.no_dead_strip	_abituguru_update_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function abituguru_update_device
_abituguru_update_device:               ; @abituguru_update_device
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	bl	_dev_get_drvdata
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x22, _jiffies@GOTPAGE
Lloh1:
	ldr	x22, [x22, _jiffies@GOTPAGEOFF]
	ldr	x0, [x22]
	ldr	x8, [x20, #16]
Lloh2:
	adrp	x9, _HZ@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_time_after
	cbz	x0, LBB0_21
; %bb.1:
Lloh5:
	adrp	x8, _ABIT_UGURU_ALARM_BANK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ABIT_UGURU_ALARM_BANK@GOTPAGEOFF]
Lloh7:
	ldr	x1, [x8]
	ldr	x3, [x20, #48]
	mov	x0, x20
	mov	w2, #0
	mov	w4, #3
	mov	w5, #0
	bl	_abituguru_read
	cmp	w0, #3
	b.ne	LBB0_12
; %bb.2:
Lloh8:
	adrp	x23, _ABIT_UGURU_MAX_BANK1_SENSORS@GOTPAGE
Lloh9:
	ldr	x23, [x23, _ABIT_UGURU_MAX_BANK1_SENSORS@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x24, #0
	mov	x21, #0
Lloh10:
	adrp	x25, _ABIT_UGURU_SENSOR_BANK1@GOTPAGE
Lloh11:
	ldr	x25, [x25, _ABIT_UGURU_SENSOR_BANK1@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x25]
	ldr	x8, [x20, #40]
	add	x3, x8, x24
	mov	x0, x20
	mov	x2, x21
	mov	w4, #1
	mov	w5, #0
	bl	_abituguru_read
	cmp	w0, #1
	b.ne	LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x25]
	add	x1, x8, #1
	ldr	x8, [x20, #32]
	ldr	x3, [x8, x21, lsl #3]
	mov	x0, x20
	mov	x2, x21
	mov	w4, #3
	mov	w5, #0
	bl	_abituguru_read
	cmp	w0, #3
	b.ne	LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x23]
	add	x24, x24, #4
	cmp	x21, x8
	b.lt	LBB0_4
LBB0_7:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.8:
	mov	x23, #0
	mov	x21, #0
Lloh12:
	adrp	x24, _ABIT_UGURU_SENSOR_BANK2@GOTPAGE
Lloh13:
	ldr	x24, [x24, _ABIT_UGURU_SENSOR_BANK2@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x24]
	ldr	x8, [x20, #24]
	add	x3, x8, x23
	mov	x0, x20
	mov	x2, x21
	mov	w4, #1
	mov	w5, #0
	bl	_abituguru_read
	cmp	w0, #1
	b.ne	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x20]
	add	x23, x23, #4
	cmp	x21, x8
	b.lt	LBB0_9
LBB0_11:
	str	wzr, [x20, #4]
	b	LBB0_20
LBB0_12:
	tbz	w0, #31, LBB0_15
; %bb.13:
Lloh14:
	adrp	x8, _EBUSY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w8, w8
	cmp	w0, w8
	b.eq	LBB0_15
; %bb.14:
	mov	x20, #0
	b	LBB0_21
LBB0_15:
	ldr	w8, [x20, #4]
	cmp	w8, #254
	b.hi	LBB0_17
; %bb.16:
	add	w8, w8, #1
	str	w8, [x20, #4]
LBB0_17:
Lloh17:
	adrp	x9, _ABIT_UGURU_MAX_TIMEOUTS@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ABIT_UGURU_MAX_TIMEOUTS@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ls	LBB0_19
; %bb.18:
	str	x8, [sp]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_ABIT_UGURU_DEBUG
	mov	x20, #0
	b	LBB0_21
LBB0_19:
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #3
	bl	_ABIT_UGURU_DEBUG
LBB0_20:
	ldr	x8, [x22]
	str	x8, [x20, #16]
LBB0_21:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_HZ,8,3                         ; @HZ
	.comm	_ABIT_UGURU_ALARM_BANK,8,3      ; @ABIT_UGURU_ALARM_BANK
	.comm	_ABIT_UGURU_MAX_BANK1_SENSORS,4,2 ; @ABIT_UGURU_MAX_BANK1_SENSORS
	.comm	_ABIT_UGURU_SENSOR_BANK1,8,3    ; @ABIT_UGURU_SENSOR_BANK1
	.comm	_ABIT_UGURU_SENSOR_BANK2,8,3    ; @ABIT_UGURU_SENSOR_BANK2
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_ABIT_UGURU_MAX_TIMEOUTS,4,2    ; @ABIT_UGURU_MAX_TIMEOUTS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout exceeded, will try again next update\n"

l_.str.1:                               ; @.str.1
	.asciz	"timeout exceeded %d times waiting for more input state\n"

	.no_dead_strip	_abituguru_update_device
.subsections_via_symbols
