	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ali1563_setup
_ali1563_setup:                         ## @ali1563_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	%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
	movq	%rdi, %rbx
	movq	_ALI1563_SMBBA@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-44(%rbp), %rdx
	callq	_pci_read_config_word
	movl	-44(%rbp), %eax
	movq	_ALI1563_SMB_IOSIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	%esi, %edi
	negl	%edi
	movq	_ali1563_smba@GOTPCREL(%rip), %r14
	andl	%eax, %edi
	movl	%edi, (%r14)
	je	LBB0_1
## %bb.3:
	movq	_ALI1563_SMB_HOSTEN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.5:
	movq	_ALI1563_SMB_IOEN@GOTPCREL(%rip), %r13
	testl	%eax, (%r13)
	jne	LBB0_8
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_warn
	movl	(%r12), %esi
	movl	(%r13), %edx
	orl	-44(%rbp), %edx
	movq	%rbx, %rdi
	callq	_pci_write_config_word
	movl	(%r12), %esi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pci_read_config_word
	movl	(%r13), %eax
	testl	%eax, -44(%rbp)
	je	LBB0_12
## %bb.7:
	movl	(%r14), %edi
	movl	(%r15), %esi
LBB0_8:
	movq	_ali1563_pci_driver@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	callq	_acpi_check_region
	testq	%rax, %rax
	jne	LBB0_13
## %bb.9:
	movl	(%r14), %edi
	movl	(%r15), %esi
	movl	(%r12), %edx
	callq	_request_region
	movl	(%r14), %edx
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_info
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movq	%rbx, %rdi
	callq	_dev_warn
LBB0_13:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_13
LBB0_10:
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_ALI1563_SMBBA,4,2              ## @ALI1563_SMBBA
	.comm	_ALI1563_SMB_IOSIZE,4,2         ## @ALI1563_SMB_IOSIZE
	.comm	_ali1563_smba,4,2               ## @ali1563_smba
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ali1563_smba Uninitialized\n"

	.comm	_ALI1563_SMB_HOSTEN,4,2         ## @ALI1563_SMB_HOSTEN
L_.str.1:                               ## @.str.1
	.asciz	"Host Controller not enabled\n"

	.comm	_ALI1563_SMB_IOEN,4,2           ## @ALI1563_SMB_IOEN
L_.str.2:                               ## @.str.2
	.asciz	"I/O space not enabled, trying manually\n"

L_.str.3:                               ## @.str.3
	.asciz	"I/O space still not enabled, giving up\n"

	.comm	_ali1563_pci_driver,4,2         ## @ali1563_pci_driver
L_.str.4:                               ## @.str.4
	.asciz	"Could not allocate I/O space at 0x%04x\n"

L_.str.5:                               ## @.str.5
	.asciz	"Found ALi1563 SMBus at 0x%04x\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_ali1563_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ali1563_setup
_ali1563_setup:                         ; @ali1563_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
Lloh0:
	adrp	x22, _ALI1563_SMBBA@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ALI1563_SMBBA@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #12
	bl	_pci_read_config_word
	ldr	w8, [sp, #12]
Lloh2:
	adrp	x21, _ALI1563_SMB_IOSIZE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _ALI1563_SMB_IOSIZE@GOTPAGEOFF]
	ldr	w1, [x21]
	neg	w9, w1
Lloh4:
	adrp	x20, _ali1563_smba@GOTPAGE
Lloh5:
	ldr	x20, [x20, _ali1563_smba@GOTPAGEOFF]
	ands	w0, w8, w9
	str	w0, [x20]
	b.eq	LBB0_8
; %bb.1:
Lloh6:
	adrp	x9, _ALI1563_SMB_HOSTEN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ALI1563_SMB_HOSTEN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.2:
Lloh9:
	adrp	x23, _ALI1563_SMB_IOEN@GOTPAGE
Lloh10:
	ldr	x23, [x23, _ALI1563_SMB_IOEN@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.3:
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	ldr	w1, [x22]
	ldr	w8, [sp, #12]
	ldr	w9, [x23]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_pci_write_config_word
	ldr	w1, [x22]
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_word
	ldr	w8, [sp, #12]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.4:
	ldr	w0, [x20]
	ldr	w1, [x21]
LBB0_5:
Lloh13:
	adrp	x22, _ali1563_pci_driver@GOTPAGE
Lloh14:
	ldr	x22, [x22, _ali1563_pci_driver@GOTPAGEOFF]
	ldr	w2, [x22]
	bl	_acpi_check_region
	cbnz	x0, LBB0_11
; %bb.6:
	ldr	w0, [x20]
	ldr	w1, [x21]
	ldr	w2, [x22]
	bl	_request_region
	ldr	w2, [x20]
	cbz	w0, LBB0_14
; %bb.7:
Lloh15:
	adrp	x1, l_.str.5@PAGE
Lloh16:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_dev_info
	mov	w0, #0
	b	LBB0_12
LBB0_8:
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_10:
	mov	x0, x19
	bl	_dev_warn
LBB0_11:
Lloh21:
	adrp	x8, _ENODEV@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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
	add	sp, sp, #80
	ret
LBB0_13:
Lloh24:
	adrp	x1, l_.str.3@PAGE
Lloh25:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_15
LBB0_14:
	str	x2, [sp]
Lloh26:
	adrp	x1, l_.str.4@PAGE
Lloh27:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_15:
	mov	x0, x19
	bl	_dev_err
	b	LBB0_11
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_ALI1563_SMBBA,4,2              ; @ALI1563_SMBBA
	.comm	_ALI1563_SMB_IOSIZE,4,2         ; @ALI1563_SMB_IOSIZE
	.comm	_ali1563_smba,4,2               ; @ali1563_smba
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ali1563_smba Uninitialized\n"

	.comm	_ALI1563_SMB_HOSTEN,4,2         ; @ALI1563_SMB_HOSTEN
l_.str.1:                               ; @.str.1
	.asciz	"Host Controller not enabled\n"

	.comm	_ALI1563_SMB_IOEN,4,2           ; @ALI1563_SMB_IOEN
l_.str.2:                               ; @.str.2
	.asciz	"I/O space not enabled, trying manually\n"

l_.str.3:                               ; @.str.3
	.asciz	"I/O space still not enabled, giving up\n"

	.comm	_ali1563_pci_driver,4,2         ; @ali1563_pci_driver
l_.str.4:                               ; @.str.4
	.asciz	"Could not allocate I/O space at 0x%04x\n"

l_.str.5:                               ; @.str.5
	.asciz	"Found ALi1563 SMBus at 0x%04x\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_ali1563_setup
.subsections_via_symbols
