	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bq27xxx_battery_hdq_read
_bq27xxx_battery_hdq_read:              ## @bq27xxx_battery_hdq_read
	.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
	movl	%edx, %ebx
	movq	%rsi, %r14
	movl	(%rdi), %edi
	callq	_dev_to_w1_slave
	movq	%rax, %r15
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_w1_bq27000_read                ## TAILCALL
LBB0_2:
	leaq	1(%r14), %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_w1_bq27000_read
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_15
## %bb.3:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_w1_bq27000_read
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_14
## %bb.4:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_w1_bq27000_read
	cmpl	%eax, %r12d
	jne	LBB0_7
LBB0_5:
	shll	$8, %r12d
	orl	%r13d, %r12d
	jmp	LBB0_15
LBB0_7:
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_15
## %bb.8:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_w1_bq27000_read
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_14
## %bb.9:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_w1_bq27000_read
	movl	%r12d, %ecx
	cmpl	%eax, %r12d
	je	LBB0_5
## %bb.10:
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_15
## %bb.11:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_w1_bq27000_read
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_14
## %bb.12:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_w1_bq27000_read
	movl	%r12d, %ecx
	cmpl	%eax, %r12d
	je	LBB0_5
## %bb.13:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_15
LBB0_14:
	movl	%r13d, %r12d
LBB0_15:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_bq27xxx_battery_hdq_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bq27xxx_battery_hdq_read
_bq27xxx_battery_hdq_read:              ; @bq27xxx_battery_hdq_read
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x2
	mov	x20, x1
	ldr	w0, [x0]
	bl	_dev_to_w1_slave
	mov	x19, x0
	cbz	w21, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_w1_bq27000_read
LBB0_2:
	add	x21, x20, #1
	mov	x0, x19
	mov	x1, x21
	bl	_w1_bq27000_read
	mov	x22, x0
	tbnz	w0, #31, LBB0_15
; %bb.3:
	mov	x0, x19
	mov	x1, x20
	bl	_w1_bq27000_read
	mov	x23, x0
	tbnz	w0, #31, LBB0_13
; %bb.4:
	mov	x0, x19
	mov	x1, x21
	bl	_w1_bq27000_read
	cmp	w22, w0
	b.ne	LBB0_6
LBB0_5:
	orr	w22, w23, w22, lsl #8
	b	LBB0_15
LBB0_6:
	mov	x24, x0
	tbnz	w0, #31, LBB0_14
; %bb.7:
	mov	x0, x19
	mov	x1, x20
	bl	_w1_bq27000_read
	mov	x23, x0
	tbnz	w0, #31, LBB0_13
; %bb.8:
	mov	x0, x19
	mov	x1, x21
	bl	_w1_bq27000_read
	mov	x22, x24
	cmp	w24, w0
	b.eq	LBB0_5
; %bb.9:
	mov	x25, x0
	tbnz	w0, #31, LBB0_16
; %bb.10:
	mov	x0, x19
	mov	x1, x20
	bl	_w1_bq27000_read
	mov	x23, x0
	tbnz	w0, #31, LBB0_13
; %bb.11:
	mov	x0, x19
	mov	x1, x21
	bl	_w1_bq27000_read
	mov	x22, x25
	cmp	w25, w0
	b.eq	LBB0_5
; %bb.12:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_15
LBB0_13:
	mov	x22, x23
	b	LBB0_15
LBB0_14:
	mov	x22, x24
LBB0_15:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_16:
	mov	x22, x25
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_bq27xxx_battery_hdq_read
.subsections_via_symbols
