	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sis5595_setup
_sis5595_setup:                         ## @sis5595_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, %r15
	movq	_blacklist@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movl	(%rbx), %esi
	testl	%esi, %esi
	je	LBB0_5
## %bb.1:
	addq	$4, %rbx
	movq	_PCI_VENDOR_ID_SI@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	xorl	%edx, %edx
	callq	_pci_get_device
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %esi
	addq	$4, %rbx
	testl	%esi, %esi
	jne	LBB0_2
LBB0_5:
	movq	_ACPI_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_sis5595_base@GOTPCREL(%rip), %rbx
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_pci_read_config_word
	movl	(%rbx), %edx
	movq	_force_addr@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%edx, %ecx
	orl	%eax, %ecx
	jne	LBB0_8
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_7
LBB0_8:
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movq	_SIS5595_EXTENT@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	subl	(%rcx), %edx
	andl	%edx, %eax
	movl	%eax, (%rbx)
	movl	%eax, %edx
LBB0_10:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
	movq	_SMB_INDEX@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	addl	(%rbx), %edi
	movq	_sis5595_driver@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movl	$2, %esi
	callq	_acpi_check_region
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_26
## %bb.11:
	movl	(%r14), %edi
	addl	(%rbx), %edi
	movl	(%r13), %edx
	movl	$2, %esi
	callq	_request_region
	testl	%eax, %eax
	movq	%rbx, %r12
	je	LBB0_12
## %bb.13:
	movq	_force_addr@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_18
## %bb.14:
	movl	(%r12), %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_info
	movq	_ACPI_BASE@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	(%r12), %edx
	movq	%r15, %rdi
	callq	_pci_write_config_word
	movq	_PCIBIOS_SUCCESSFUL@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jne	LBB0_25
## %bb.15:
	movl	(%r13), %esi
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	callq	_pci_read_config_word
	cmpq	(%rbx), %rax
	jne	LBB0_25
## %bb.16:
	movq	_SIS5595_EXTENT@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	andl	-48(%rbp), %ecx
	cmpl	(%r12), %ecx
	jne	LBB0_17
LBB0_18:
	movq	_SIS5595_ENABLE_REG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_pci_read_config_byte
	movq	_PCIBIOS_SUCCESSFUL@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_25
## %bb.19:
	movq	%r12, %rax
	xorl	%r12d, %r12d
	testb	$-128, -44(%rbp)
	jne	LBB0_26
## %bb.20:
	leaq	L_.str.6(%rip), %rsi
	movq	%r15, %rdi
	movq	%rax, %r12
	xorl	%eax, %eax
	callq	_dev_info
	movl	(%rbx), %esi
	movl	$128, %edx
	orl	-44(%rbp), %edx
	movq	%r15, %rdi
	callq	_pci_write_config_byte
	cmpq	(%r13), %rax
	jne	LBB0_25
## %bb.21:
	movl	(%rbx), %esi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_pci_read_config_byte
	cmpq	(%r13), %rax
	jne	LBB0_25
## %bb.22:
	movq	%r12, %rax
	xorl	%r12d, %r12d
	testb	$-128, -44(%rbp)
	jne	LBB0_26
## %bb.23:
	leaq	L_.str.7(%rip), %rsi
	movq	%rax, %r12
	jmp	LBB0_24
LBB0_3:
	movq	%rax, %r14
	movl	-4(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	%r14, %rdi
	callq	_pci_dev_put
LBB0_7:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_26:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	(%r12), %eax
	movl	(%r14), %ecx
	leal	(%rcx,%rax), %edx
	addl	%eax, %ecx
	incl	%ecx
	leaq	L_.str.3(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_7
LBB0_17:
	leaq	L_.str.5(%rip), %rsi
LBB0_24:
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_25:
	movl	(%r14), %edi
	addl	(%r12), %edi
	movl	$2, %esi
	callq	_release_region
	xorl	%r12d, %r12d
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_blacklist,8,3                  ## @blacklist
	.comm	_PCI_VENDOR_ID_SI,4,2           ## @PCI_VENDOR_ID_SI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Looked for SIS5595 but found unsupported device %.4x\n"

	.comm	_ACPI_BASE,4,2                  ## @ACPI_BASE
	.comm	_sis5595_base,4,2               ## @sis5595_base
	.comm	_force_addr,4,2                 ## @force_addr
L_.str.1:                               ## @.str.1
	.asciz	"ACPI base address uninitialized - upgrade BIOS or use force_addr=0xaddr\n"

	.comm	_SIS5595_EXTENT,4,2             ## @SIS5595_EXTENT
L_.str.2:                               ## @.str.2
	.asciz	"ACPI Base address: %04x\n"

	.comm	_SMB_INDEX,4,2                  ## @SMB_INDEX
	.comm	_sis5595_driver,4,2             ## @sis5595_driver
L_.str.3:                               ## @.str.3
	.asciz	"SMBus registers 0x%04x-0x%04x already in use!\n"

L_.str.4:                               ## @.str.4
	.asciz	"forcing ISA address 0x%04X\n"

	.comm	_PCIBIOS_SUCCESSFUL,8,3         ## @PCIBIOS_SUCCESSFUL
L_.str.5:                               ## @.str.5
	.asciz	"force address failed - not supported?\n"

	.comm	_SIS5595_ENABLE_REG,4,2         ## @SIS5595_ENABLE_REG
L_.str.6:                               ## @.str.6
	.asciz	"enabling ACPI\n"

L_.str.7:                               ## @.str.7
	.asciz	"ACPI enable failed - not supported?\n"

	.no_dead_strip	_sis5595_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sis5595_setup
_sis5595_setup:                         ; @sis5595_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x0
Lloh0:
	adrp	x8, _blacklist@GOTPAGE
Lloh1:
	ldr	x8, [x8, _blacklist@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w1, [x8]
	cbz	w1, LBB0_4
; %bb.1:
	add	x21, x8, #4
Lloh3:
	adrp	x22, _PCI_VENDOR_ID_SI@GOTPAGE
Lloh4:
	ldr	x22, [x22, _PCI_VENDOR_ID_SI@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	mov	x2, #0
	bl	_pci_get_device
	cbnz	x0, LBB0_21
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x21], #4
	cbnz	w1, LBB0_2
LBB0_4:
Lloh5:
	adrp	x22, _ACPI_BASE@GOTPAGE
Lloh6:
	ldr	x22, [x22, _ACPI_BASE@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh7:
	adrp	x20, _sis5595_base@GOTPAGE
Lloh8:
	ldr	x20, [x20, _sis5595_base@GOTPAGEOFF]
	mov	x0, x19
	mov	x2, x20
	bl	_pci_read_config_word
	ldr	w2, [x20]
Lloh9:
	adrp	x23, _force_addr@GOTPAGE
Lloh10:
	ldr	x23, [x23, _force_addr@GOTPAGEOFF]
	ldr	w8, [x23]
	orr	w9, w2, w8
	cbnz	w9, LBB0_7
; %bb.5:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	mov	x0, x19
	bl	_dev_err
	b	LBB0_22
LBB0_7:
	cbz	w8, LBB0_9
; %bb.8:
Lloh13:
	adrp	x9, _SIS5595_EXTENT@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SIS5595_EXTENT@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	neg	w9, w9
	and	w2, w8, w9
	str	w2, [x20]
LBB0_9:
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
Lloh18:
	adrp	x21, _SMB_INDEX@GOTPAGE
Lloh19:
	ldr	x21, [x21, _SMB_INDEX@GOTPAGEOFF]
	ldr	w8, [x20]
	ldr	w9, [x21]
	add	w0, w9, w8
Lloh20:
	adrp	x24, _sis5595_driver@GOTPAGE
Lloh21:
	ldr	x24, [x24, _sis5595_driver@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	w1, #2
	bl	_acpi_check_region
	cbnz	w0, LBB0_23
; %bb.10:
	ldr	w8, [x20]
	ldr	w9, [x21]
	add	w0, w9, w8
	ldr	w2, [x24]
	mov	w1, #2
	bl	_request_region
	cbz	w0, LBB0_24
; %bb.11:
	ldr	w8, [x23]
Lloh22:
	adrp	x23, _PCIBIOS_SUCCESSFUL@GOTPAGE
Lloh23:
	ldr	x23, [x23, _PCIBIOS_SUCCESSFUL@GOTPAGEOFF]
	cbz	w8, LBB0_15
; %bb.12:
	ldr	w8, [x20]
	str	x8, [sp]
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	ldr	w1, [x22]
	ldr	w2, [x20]
	mov	x0, x19
	bl	_pci_write_config_word
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_27
; %bb.13:
	ldr	w1, [x22]
	add	x2, sp, #28
	mov	x0, x19
	bl	_pci_read_config_word
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_27
; %bb.14:
Lloh26:
	adrp	x8, _SIS5595_EXTENT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SIS5595_EXTENT@GOTPAGEOFF]
	ldr	w9, [sp, #28]
Lloh28:
	ldr	w8, [x8]
	neg	w8, w8
	and	w8, w9, w8
	ldr	w9, [x20]
	cmp	w8, w9
	b.ne	LBB0_25
LBB0_15:
Lloh29:
	adrp	x22, _SIS5595_ENABLE_REG@GOTPAGE
Lloh30:
	ldr	x22, [x22, _SIS5595_ENABLE_REG@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #24
	mov	x0, x19
	bl	_pci_read_config_byte
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_27
; %bb.16:
	ldrb	w8, [sp, #24]
	tbnz	w8, #7, LBB0_28
; %bb.17:
Lloh31:
	adrp	x1, l_.str.6@PAGE
Lloh32:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	ldr	w1, [x22]
	ldr	w8, [sp, #24]
	orr	w2, w8, #0x80
	mov	x0, x19
	bl	_pci_write_config_byte
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_27
; %bb.18:
	ldr	w1, [x22]
	add	x2, sp, #24
	mov	x0, x19
	bl	_pci_read_config_byte
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_27
; %bb.19:
	ldrb	w8, [sp, #24]
	tbnz	w8, #7, LBB0_28
; %bb.20:
Lloh33:
	adrp	x1, l_.str.7@PAGE
Lloh34:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_26
LBB0_21:
	mov	x20, x0
	ldur	w8, [x21, #-4]
	str	x8, [sp]
Lloh35:
	adrp	x1, l_.str@PAGE
Lloh36:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x0, x20
	bl	_pci_dev_put
LBB0_22:
Lloh37:
	adrp	x8, _ENODEV@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_23:
	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
	add	sp, sp, #96
	ret
LBB0_24:
	ldr	w8, [x20]
	ldr	w9, [x21]
	add	w8, w9, w8
	add	w9, w8, #1
	stp	x8, x9, [sp]
Lloh40:
	adrp	x1, l_.str.3@PAGE
Lloh41:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_6
LBB0_25:
Lloh42:
	adrp	x1, l_.str.5@PAGE
Lloh43:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_26:
	mov	x0, x19
	bl	_dev_err
LBB0_27:
	ldr	w8, [x20]
	ldr	w9, [x21]
	add	w0, w9, w8
	mov	w1, #2
	bl	_release_region
LBB0_28:
	mov	w0, #0
	b	LBB0_23
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_blacklist,8,3                  ; @blacklist
	.comm	_PCI_VENDOR_ID_SI,4,2           ; @PCI_VENDOR_ID_SI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Looked for SIS5595 but found unsupported device %.4x\n"

	.comm	_ACPI_BASE,4,2                  ; @ACPI_BASE
	.comm	_sis5595_base,4,2               ; @sis5595_base
	.comm	_force_addr,4,2                 ; @force_addr
l_.str.1:                               ; @.str.1
	.asciz	"ACPI base address uninitialized - upgrade BIOS or use force_addr=0xaddr\n"

	.comm	_SIS5595_EXTENT,4,2             ; @SIS5595_EXTENT
l_.str.2:                               ; @.str.2
	.asciz	"ACPI Base address: %04x\n"

	.comm	_SMB_INDEX,4,2                  ; @SMB_INDEX
	.comm	_sis5595_driver,4,2             ; @sis5595_driver
l_.str.3:                               ; @.str.3
	.asciz	"SMBus registers 0x%04x-0x%04x already in use!\n"

l_.str.4:                               ; @.str.4
	.asciz	"forcing ISA address 0x%04X\n"

	.comm	_PCIBIOS_SUCCESSFUL,8,3         ; @PCIBIOS_SUCCESSFUL
l_.str.5:                               ; @.str.5
	.asciz	"force address failed - not supported?\n"

	.comm	_SIS5595_ENABLE_REG,4,2         ; @SIS5595_ENABLE_REG
l_.str.6:                               ; @.str.6
	.asciz	"enabling ACPI\n"

l_.str.7:                               ; @.str.7
	.asciz	"ACPI enable failed - not supported?\n"

	.no_dead_strip	_sis5595_setup
.subsections_via_symbols
