	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sis5595_pci_probe
_sis5595_pci_probe:                     ## @sis5595_pci_probe
	.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, %r14
	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	_SIS5595_EXTENT@GOTPCREL(%rip), %r12
	xorl	%edx, %edx
	subl	(%r12), %edx
	movq	_force_addr@GOTPCREL(%rip), %r13
	andl	(%r13), %edx
	movl	%edx, (%r13)
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
	movq	_SIS5595_BASE_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	movq	%r14, %rdi
	callq	_pci_write_config_word
LBB0_7:
	movq	_PCIBIOS_SUCCESSFUL@GOTPCREL(%rip), %r15
	movq	(%r15), %rbx
	movq	_SIS5595_BASE_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pci_read_config_word
	cmpq	%rax, %rbx
	jne	LBB0_8
## %bb.10:
	xorl	%eax, %eax
	subl	(%r12), %eax
	andl	-48(%rbp), %eax
	movl	%eax, -48(%rbp)
	je	LBB0_11
## %bb.12:
	movl	(%r13), %ecx
	testl	%ecx, %ecx
	je	LBB0_15
## %bb.13:
	cmpl	%ecx, %eax
	je	LBB0_15
## %bb.14:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_9
LBB0_3:
	movq	%rax, %r15
	movl	-4(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	%r15, %rdi
	callq	_pci_dev_put
	jmp	LBB0_26
LBB0_11:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_9
LBB0_15:
	movq	(%r15), %rbx
	movq	_SIS5595_ENABLE_REG@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pci_read_config_byte
	cmpq	%rax, %rbx
	jne	LBB0_16
## %bb.17:
	movl	-44(%rbp), %edx
	testb	$-128, %dl
	jne	LBB0_22
## %bb.18:
	movq	(%r15), %rbx
	movl	(%r12), %esi
	orl	$128, %edx
	movq	%r14, %rdi
	callq	_pci_write_config_byte
	cmpq	%rax, %rbx
	jne	LBB0_21
## %bb.19:
	movq	(%r15), %rbx
	movl	(%r12), %esi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pci_read_config_byte
	cmpq	%rax, %rbx
	jne	LBB0_21
## %bb.20:
	testb	$-128, -44(%rbp)
	jne	LBB0_22
LBB0_21:
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_9
LBB0_16:
	leaq	L_.str.5(%rip), %rsi
LBB0_9:
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_26:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movq	_sis5595_driver@GOTPCREL(%rip), %rdi
	callq	_platform_driver_register
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:
	leaq	L_.str.7(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_dbg
	jmp	LBB0_26
LBB0_24:
	movq	%r14, %rdi
	callq	_pci_dev_get
	movq	_s_bridge@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	-48(%rbp), %edi
	callq	_sis5595_device_add
	testq	%rax, %rax
	je	LBB0_26
## %bb.25:
	movq	%r14, %rdi
	callq	_pci_dev_put
	movq	_sis5595_driver@GOTPCREL(%rip), %rdi
	callq	_platform_driver_unregister
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.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	_ENODEV,4,2                     ## @ENODEV
	.comm	_SIS5595_EXTENT,4,2             ## @SIS5595_EXTENT
	.comm	_force_addr,4,2                 ## @force_addr
L_.str.1:                               ## @.str.1
	.asciz	"Forcing ISA address 0x%x\n"

	.comm	_SIS5595_BASE_REG,4,2           ## @SIS5595_BASE_REG
	.comm	_PCIBIOS_SUCCESSFUL,8,3         ## @PCIBIOS_SUCCESSFUL
L_.str.2:                               ## @.str.2
	.asciz	"Failed to read ISA address\n"

L_.str.3:                               ## @.str.3
	.asciz	"Base address not set - upgrade BIOS or use force_addr=0xaddr\n"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to force ISA address\n"

	.comm	_SIS5595_ENABLE_REG,4,2         ## @SIS5595_ENABLE_REG
L_.str.5:                               ## @.str.5
	.asciz	"Failed to read enable register\n"

L_.str.6:                               ## @.str.6
	.asciz	"Failed to enable HWM device\n"

	.comm	_sis5595_driver,4,2             ## @sis5595_driver
L_.str.7:                               ## @.str.7
	.asciz	"Failed to register sis5595 driver\n"

	.comm	_s_bridge,4,2                   ## @s_bridge
	.no_dead_strip	_sis5595_pci_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sis5595_pci_probe
_sis5595_pci_probe:                     ; @sis5595_pci_probe
	.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	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_16
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x21], #4
	cbnz	w1, LBB0_2
LBB0_4:
Lloh5:
	adrp	x22, _SIS5595_EXTENT@GOTPAGE
Lloh6:
	ldr	x22, [x22, _SIS5595_EXTENT@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh7:
	adrp	x21, _force_addr@GOTPAGE
Lloh8:
	ldr	x21, [x21, _force_addr@GOTPAGEOFF]
	neg	w8, w8
	ldr	w9, [x21]
Lloh9:
	adrp	x23, _SIS5595_BASE_REG@GOTPAGE
Lloh10:
	ldr	x23, [x23, _SIS5595_BASE_REG@GOTPAGEOFF]
	ands	w2, w9, w8
	str	w2, [x21]
	b.eq	LBB0_6
; %bb.5:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	ldr	w1, [x23]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_pci_write_config_word
LBB0_6:
Lloh13:
	adrp	x20, _PCIBIOS_SUCCESSFUL@GOTPAGE
Lloh14:
	ldr	x20, [x20, _PCIBIOS_SUCCESSFUL@GOTPAGEOFF]
	ldr	x24, [x20]
	ldr	w1, [x23]
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_word
	cmp	x24, x0
	b.ne	LBB0_15
; %bb.7:
	ldr	w8, [x22]
	neg	w8, w8
	ldr	w9, [sp, #12]
	ands	w8, w9, w8
	str	w8, [sp, #12]
	b.eq	LBB0_17
; %bb.8:
	ldr	w9, [x21]
	cmp	w9, #0
	ccmp	w8, w9, #4, ne
	b.ne	LBB0_18
; %bb.9:
	ldr	x22, [x20]
Lloh15:
	adrp	x21, _SIS5595_ENABLE_REG@GOTPAGE
Lloh16:
	ldr	x21, [x21, _SIS5595_ENABLE_REG@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #8
	mov	x0, x19
	bl	_pci_read_config_byte
	cmp	x22, x0
	b.ne	LBB0_19
; %bb.10:
	ldr	w8, [sp, #8]
	tbnz	w8, #7, LBB0_22
; %bb.11:
	ldr	x22, [x20]
	ldr	w1, [x21]
	orr	w2, w8, #0x80
	mov	x0, x19
	bl	_pci_write_config_byte
	cmp	x22, x0
	b.ne	LBB0_14
; %bb.12:
	ldr	x20, [x20]
	ldr	w1, [x21]
	add	x2, sp, #8
	mov	x0, x19
	bl	_pci_read_config_byte
	cmp	x20, x0
	b.ne	LBB0_14
; %bb.13:
	ldrb	w8, [sp, #8]
	tbnz	w8, #7, LBB0_22
LBB0_14:
Lloh17:
	adrp	x1, l_.str.6@PAGE
Lloh18:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_20
LBB0_15:
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_20
LBB0_16:
	mov	x20, x0
	ldur	w8, [x21, #-4]
	str	x8, [sp]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	x0, x20
	bl	_pci_dev_put
	b	LBB0_21
LBB0_17:
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_20
LBB0_18:
Lloh25:
	adrp	x1, l_.str.4@PAGE
Lloh26:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_20
LBB0_19:
Lloh27:
	adrp	x1, l_.str.5@PAGE
Lloh28:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_20:
	mov	x0, x19
	bl	_dev_err
LBB0_21:
Lloh29:
	adrp	x8, _ENODEV@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w0, w8
	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_22:
Lloh32:
	adrp	x0, _sis5595_driver@GOTPAGE
Lloh33:
	ldr	x0, [x0, _sis5595_driver@GOTPAGEOFF]
	bl	_platform_driver_register
	cbz	x0, LBB0_24
; %bb.23:
Lloh34:
	adrp	x1, l_.str.7@PAGE
Lloh35:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	b	LBB0_21
LBB0_24:
	mov	x0, x19
	bl	_pci_dev_get
Lloh36:
	adrp	x8, _s_bridge@GOTPAGE
Lloh37:
	ldr	x8, [x8, _s_bridge@GOTPAGEOFF]
Lloh38:
	str	w0, [x8]
	ldr	w0, [sp, #12]
	bl	_sis5595_device_add
	cbz	x0, LBB0_21
; %bb.25:
	mov	x0, x19
	bl	_pci_dev_put
Lloh39:
	adrp	x0, _sis5595_driver@GOTPAGE
Lloh40:
	ldr	x0, [x0, _sis5595_driver@GOTPAGEOFF]
	bl	_platform_driver_unregister
	b	LBB0_21
	.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 AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotStr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.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	_ENODEV,4,2                     ; @ENODEV
	.comm	_SIS5595_EXTENT,4,2             ; @SIS5595_EXTENT
	.comm	_force_addr,4,2                 ; @force_addr
l_.str.1:                               ; @.str.1
	.asciz	"Forcing ISA address 0x%x\n"

	.comm	_SIS5595_BASE_REG,4,2           ; @SIS5595_BASE_REG
	.comm	_PCIBIOS_SUCCESSFUL,8,3         ; @PCIBIOS_SUCCESSFUL
l_.str.2:                               ; @.str.2
	.asciz	"Failed to read ISA address\n"

l_.str.3:                               ; @.str.3
	.asciz	"Base address not set - upgrade BIOS or use force_addr=0xaddr\n"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to force ISA address\n"

	.comm	_SIS5595_ENABLE_REG,4,2         ; @SIS5595_ENABLE_REG
l_.str.5:                               ; @.str.5
	.asciz	"Failed to read enable register\n"

l_.str.6:                               ; @.str.6
	.asciz	"Failed to enable HWM device\n"

	.comm	_sis5595_driver,4,2             ; @sis5595_driver
l_.str.7:                               ; @.str.7
	.asciz	"Failed to register sis5595 driver\n"

	.comm	_s_bridge,4,2                   ; @s_bridge
	.no_dead_strip	_sis5595_pci_probe
.subsections_via_symbols
