	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ab8500_gpadc_sw_hw_convert     ## -- Begin function ab8500_gpadc_sw_hw_convert
	.p2align	4, 0x90
_ab8500_gpadc_sw_hw_convert:            ## @ab8500_gpadc_sw_hw_convert
	.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	%ecx, %r14d
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %r15
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	callq	_ab8500_gpadc_read_raw
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_3
## %bb.1:
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	movl	%r14d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	callq	_ab8500_gpadc_read_raw
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_6
## %bb.2:
	movl	%r12d, %ebx
LBB0_3:
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%ebx, %edx
	callq	_ab8500_gpadc_ad_to_voltage
	movl	%eax, %r12d
	testl	%eax, %eax
	jns	LBB0_5
## %bb.4:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r13d, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_5
LBB0_6:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_5:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GPADC raw value failed ch: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"GPADC to voltage conversion failed ch: %d AD: 0x%x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ab8500_gpadc_sw_hw_convert     ; -- Begin function ab8500_gpadc_sw_hw_convert
	.p2align	2
_ab8500_gpadc_sw_hw_convert:            ; @ab8500_gpadc_sw_hw_convert
	.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
	mov	x21, x5
	mov	x22, x4
	mov	x23, x3
	mov	x25, x2
	mov	x19, x1
	mov	x20, x0
	bl	_ab8500_gpadc_read_raw
	mov	x24, x0
	tbz	w0, #31, LBB0_3
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x25
	mov	x3, x23
	mov	x4, x22
	mov	x5, x21
	bl	_ab8500_gpadc_read_raw
	mov	x21, x0
	tbnz	w0, #31, LBB0_5
; %bb.2:
	mov	x24, x21
LBB0_3:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x24
	bl	_ab8500_gpadc_ad_to_voltage
	mov	x21, x0
	tbz	w0, #31, LBB0_7
; %bb.4:
	ldr	w0, [x20]
	str	x24, [sp]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_5:
	ldr	w0, [x20]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
LBB0_6:
	mov	x2, x19
	bl	_dev_err
LBB0_7:
	mov	x0, x21
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GPADC raw value failed ch: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"GPADC to voltage conversion failed ch: %d AD: 0x%x\n"

.subsections_via_symbols
