	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sm501_pci_probe
_sm501_pci_probe:                       ## @sm501_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$64, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r14
	movq	_sm501_pci_platdata@GOTPCREL(%rip), %rax
	movq	%rax, 56(%r14)
	movq	%rax, (%r15)
	movq	24(%r15), %rax
	addq	$32, %rax
	movq	%rax, 48(%r14)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_pci_set_drvdata
	movq	%r15, %rdi
	callq	_pci_enable_device
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_14
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_4:
	movq	%r15, 40(%r14)
	movl	16(%r15), %eax
	movl	%eax, 32(%r14)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_pci_resource_flags
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rbx
	testl	%eax, (%rbx)
	je	LBB0_9
## %bb.5:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_pci_resource_flags
	testl	%eax, (%rbx)
	je	LBB0_10
## %bb.6:
	movq	8(%r15), %rax
	leaq	4(%rax), %rcx
	movq	%rcx, 16(%r14)
	movq	%rax, 24(%r14)
	movl	4(%rax), %edi
	leaq	L_.str.3(%rip), %rdx
	movl	$256, %esi                      ## imm = 0x100
	callq	_request_mem_region
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_16
## %bb.7:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_pci_ioremap_bar
	movl	%eax, 8(%r14)
	testl	%eax, %eax
	je	LBB0_17
## %bb.8:
	movq	%r14, %rdi
	callq	_sm501_init_dev
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_9:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_11
LBB0_10:
	leaq	L_.str.2(%rip), %rsi
LBB0_11:
	movq	%r15, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %ebx
LBB0_13:
	negl	%ebx
	movq	%r15, %rdi
	callq	_pci_disable_device
LBB0_14:
	movq	%r14, %rdi
	callq	_kfree
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_17:
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	(%r14), %rdi
	callq	_release_resource
	movq	(%r14), %rdi
	callq	_kfree
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_sm501_pci_platdata,4,2         ## @sm501_pci_platdata
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot enable device\n"

	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
L_.str.1:                               ## @.str.1
	.asciz	"region #0 is not memory?\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"region #1 is not memory?\n"

L_.str.3:                               ## @.str.3
	.asciz	"sm501"

L_.str.4:                               ## @.str.4
	.asciz	"cannot claim registers\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.5:                               ## @.str.5
	.asciz	"cannot remap registers\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_SM501_FBPD_SWAP_FB_ENDIAN,4,2  ## @SM501_FBPD_SWAP_FB_ENDIAN
	.comm	_sm501_fb_pdata,4,2             ## @sm501_fb_pdata
	.no_dead_strip	_sm501_pci_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sm501_pci_probe
_sm501_pci_probe:                       ; @sm501_pci_probe
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #64
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _sm501_pci_platdata@GOTPAGE
Lloh4:
	ldr	x8, [x8, _sm501_pci_platdata@GOTPAGEOFF]
	str	x8, [x20]
	ldr	x9, [x20, #24]
	add	x9, x9, #32
	stp	x9, x8, [x0, #48]
	mov	x0, x20
	mov	x1, x19
	bl	_pci_set_drvdata
	mov	x0, x20
	bl	_pci_enable_device
	cbz	w0, LBB0_4
; %bb.2:
	mov	x21, x0
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_14
LBB0_3:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_15
LBB0_4:
	str	x20, [x19, #40]
	ldr	w8, [x20, #16]
	str	w8, [x19, #32]
	mov	x0, x20
	mov	w1, #0
	bl	_pci_resource_flags
Lloh10:
	adrp	x21, _IORESOURCE_MEM@GOTPAGE
Lloh11:
	ldr	x21, [x21, _IORESOURCE_MEM@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_9
; %bb.5:
	mov	x0, x20
	mov	w1, #1
	bl	_pci_resource_flags
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_10
; %bb.6:
	ldr	x8, [x20, #8]
	str	x8, [x19, #24]
	ldr	w0, [x8, #4]!
	str	x8, [x19, #16]
Lloh12:
	adrp	x2, l_.str.3@PAGE
Lloh13:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	w1, #256
	bl	_request_mem_region
	str	x0, [x19]
	cbz	x0, LBB0_16
; %bb.7:
	mov	x0, x20
	mov	w1, #1
	bl	_pci_ioremap_bar
	str	w0, [x19, #8]
	cbz	w0, LBB0_17
; %bb.8:
	mov	x0, x19
	bl	_sm501_init_dev
	mov	w21, #0
	b	LBB0_15
LBB0_9:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_10:
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_11:
	mov	x0, x20
	bl	_dev_err
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_12:
	ldr	w21, [x8]
LBB0_13:
	neg	w21, w21
	mov	x0, x20
	bl	_pci_disable_device
LBB0_14:
	mov	x0, x19
	bl	_kfree
LBB0_15:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_16:
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh22:
	adrp	x8, _EBUSY@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_12
LBB0_17:
Lloh24:
	adrp	x1, l_.str.5@PAGE
Lloh25:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh26:
	adrp	x8, _EIO@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh28:
	ldr	w21, [x8]
	ldr	x0, [x19]
	bl	_release_resource
	ldr	x0, [x19]
	bl	_kfree
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_sm501_pci_platdata,4,2         ; @sm501_pci_platdata
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot enable device\n"

	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
l_.str.1:                               ; @.str.1
	.asciz	"region #0 is not memory?\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"region #1 is not memory?\n"

l_.str.3:                               ; @.str.3
	.asciz	"sm501"

l_.str.4:                               ; @.str.4
	.asciz	"cannot claim registers\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.5:                               ; @.str.5
	.asciz	"cannot remap registers\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_SM501_FBPD_SWAP_FB_ENDIAN,4,2  ; @SM501_FBPD_SWAP_FB_ENDIAN
	.comm	_sm501_fb_pdata,4,2             ; @sm501_fb_pdata
	.no_dead_strip	_sm501_pci_probe
.subsections_via_symbols
