	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function as3645a_setup
_as3645a_setup:                         ## @as3645a_setup
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	movl	$0, -28(%rbp)
	movq	_AS_FAULT_INFO_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_as3645a_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_9
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_dev_dbg
	movq	%r15, %rdi
	callq	_as3645a_set_current
	testl	%eax, %eax
	js	LBB0_8
## %bb.2:
	movq	%r15, %rdi
	callq	_as3645a_set_timeout
	testl	%eax, %eax
	js	LBB0_8
## %bb.3:
	movq	_AS_MODE_INDICATOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_as3645a_set_control
	testl	%eax, %eax
	js	LBB0_8
## %bb.4:
	leaq	-28(%rbp), %rsi
	movq	%r15, %rdi
	callq	_as3645a_get_fault
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_9
## %bb.5:
	movq	_AS_INDICATOR_AND_TIMER_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_as3645a_read
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_dbg
	movq	_AS_CURRENT_SET_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_as3645a_read
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_dbg
	movq	_AS_CONTROL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_as3645a_read
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_dbg
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movq	_AS_FAULT_INFO_LED_AMOUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
	testl	%ebx, %ebx
	cmovnel	%ecx, %ebx
	jmp	LBB0_9
LBB0_8:
	movl	%eax, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AS_FAULT_INFO_REG,4,2          ## @AS_FAULT_INFO_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Fault info: %02x\n"

	.comm	_AS_MODE_INDICATOR,4,2          ## @AS_MODE_INDICATOR
L_.str.1:                               ## @.str.1
	.asciz	"AS_INDICATOR_AND_TIMER_REG: %02x\n"

	.comm	_AS_INDICATOR_AND_TIMER_REG,4,2 ## @AS_INDICATOR_AND_TIMER_REG
L_.str.2:                               ## @.str.2
	.asciz	"AS_CURRENT_SET_REG: %02x\n"

	.comm	_AS_CURRENT_SET_REG,4,2         ## @AS_CURRENT_SET_REG
L_.str.3:                               ## @.str.3
	.asciz	"AS_CONTROL_REG: %02x\n"

	.comm	_AS_CONTROL_REG,4,2             ## @AS_CONTROL_REG
	.comm	_AS_FAULT_INFO_LED_AMOUNT,4,2   ## @AS_FAULT_INFO_LED_AMOUNT
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_as3645a_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function as3645a_setup
_as3645a_setup:                         ; @as3645a_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
	ldr	x19, [x0, #8]
	str	wzr, [sp, #12]
Lloh0:
	adrp	x8, _AS_FAULT_INFO_REG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AS_FAULT_INFO_REG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_as3645a_read
	mov	x21, x0
	tbnz	w0, #31, LBB0_7
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_dbg
	mov	x0, x20
	bl	_as3645a_set_current
	tbnz	w0, #31, LBB0_6
; %bb.2:
	mov	x0, x20
	bl	_as3645a_set_timeout
	tbnz	w0, #31, LBB0_6
; %bb.3:
Lloh5:
	adrp	x8, _AS_MODE_INDICATOR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AS_MODE_INDICATOR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_as3645a_set_control
	tbnz	w0, #31, LBB0_6
; %bb.4:
	add	x1, sp, #12
	mov	x0, x20
	bl	_as3645a_get_fault
	mov	x21, x0
	tbnz	w0, #31, LBB0_7
; %bb.5:
Lloh8:
	adrp	x8, _AS_INDICATOR_AND_TIMER_REG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AS_INDICATOR_AND_TIMER_REG@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_as3645a_read
	mov	x2, x0
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
Lloh13:
	adrp	x8, _AS_CURRENT_SET_REG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AS_CURRENT_SET_REG@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_as3645a_read
	mov	x2, x0
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
Lloh18:
	adrp	x8, _AS_CONTROL_REG@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AS_CONTROL_REG@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_as3645a_read
	mov	x2, x0
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
Lloh23:
	adrp	x8, _AS_FAULT_INFO_LED_AMOUNT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AS_FAULT_INFO_LED_AMOUNT@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _EIO@GOTPAGE
Lloh27:
	ldr	x9, [x9, _EIO@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	bics	wzr, w21, w8
	csneg	w21, wzr, w9, eq
	b	LBB0_7
LBB0_6:
	mov	x21, x0
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_AS_FAULT_INFO_REG,4,2          ; @AS_FAULT_INFO_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Fault info: %02x\n"

	.comm	_AS_MODE_INDICATOR,4,2          ; @AS_MODE_INDICATOR
l_.str.1:                               ; @.str.1
	.asciz	"AS_INDICATOR_AND_TIMER_REG: %02x\n"

	.comm	_AS_INDICATOR_AND_TIMER_REG,4,2 ; @AS_INDICATOR_AND_TIMER_REG
l_.str.2:                               ; @.str.2
	.asciz	"AS_CURRENT_SET_REG: %02x\n"

	.comm	_AS_CURRENT_SET_REG,4,2         ; @AS_CURRENT_SET_REG
l_.str.3:                               ; @.str.3
	.asciz	"AS_CONTROL_REG: %02x\n"

	.comm	_AS_CONTROL_REG,4,2             ; @AS_CONTROL_REG
	.comm	_AS_FAULT_INFO_LED_AMOUNT,4,2   ; @AS_FAULT_INFO_LED_AMOUNT
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_as3645a_setup
.subsections_via_symbols
