	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ns2501_init
_ns2501_init:                           ## @ns2501_init
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kzalloc
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %rbx
	movq	%r12, 16(%r15)
	movq	%rax, 8(%r15)
	movl	$1, (%rax)
	movq	_NS2501_VID_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-33(%rbp), %rdx
	movq	%r15, %rdi
	callq	_ns2501_readb
	testl	%eax, %eax
	je	LBB0_7
## %bb.2:
	movzbl	-33(%rbp), %esi
	movq	_NS2501_VID@GOTPCREL(%rip), %rax
	movzbl	(%rax), %eax
	cmpl	%esi, %eax
	jne	LBB0_6
## %bb.3:
	movq	_NS2501_DID_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-33(%rbp), %rdx
	movq	%r15, %rdi
	callq	_ns2501_readb
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:
	movzbl	-33(%rbp), %esi
	movq	_NS2501_DID@GOTPCREL(%rip), %rax
	movzbl	(%rax), %eax
	cmpl	%esi, %eax
	jne	LBB0_6
## %bb.5:
	movl	$0, (%rbx)
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movl	$1, %r14d
	jmp	LBB0_8
LBB0_6:
	movl	(%r12), %edx
	movl	(%r15), %ecx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
LBB0_7:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_8:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_NS2501_VID_LO,4,2              ## @NS2501_VID_LO
	.comm	_NS2501_VID,4,2                 ## @NS2501_VID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ns2501 not detected got %d: from %s Slave %d.\n"

	.comm	_NS2501_DID_LO,4,2              ## @NS2501_DID_LO
	.comm	_NS2501_DID,4,2                 ## @NS2501_DID
L_.str.1:                               ## @.str.1
	.asciz	"init ns2501 dvo controller successfully!\n"

	.no_dead_strip	_ns2501_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ns2501_init
_ns2501_init:                           ; @ns2501_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kzalloc
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
	stp	x0, x21, [x20, #8]
	mov	w8, #1
	str	w8, [x0]
Lloh3:
	adrp	x8, _NS2501_VID_LO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NS2501_VID_LO@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #31
	mov	x0, x20
	bl	_ns2501_readb
	cbz	w0, LBB0_7
; %bb.2:
	ldrb	w8, [sp, #31]
Lloh6:
	adrp	x9, _NS2501_VID@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NS2501_VID@GOTPAGEOFF]
	ldrb	w9, [x9]
	cmp	w9, w8
	b.ne	LBB0_6
; %bb.3:
Lloh8:
	adrp	x8, _NS2501_DID_LO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NS2501_DID_LO@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x2, sp, #31
	mov	x0, x20
	bl	_ns2501_readb
	cbz	w0, LBB0_7
; %bb.4:
	ldrb	w8, [sp, #31]
Lloh11:
	adrp	x9, _NS2501_DID@GOTPAGE
Lloh12:
	ldr	x9, [x9, _NS2501_DID@GOTPAGEOFF]
	ldrb	w9, [x9]
	cmp	w9, w8
	b.ne	LBB0_6
; %bb.5:
	str	wzr, [x19]
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	w0, #1
	b	LBB0_8
LBB0_6:
	ldr	w9, [x21]
	ldr	w10, [x20]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
LBB0_7:
	mov	x0, x19
	bl	_kfree
	mov	w0, #0
LBB0_8:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_NS2501_VID_LO,4,2              ; @NS2501_VID_LO
	.comm	_NS2501_VID,4,2                 ; @NS2501_VID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ns2501 not detected got %d: from %s Slave %d.\n"

	.comm	_NS2501_DID_LO,4,2              ; @NS2501_DID_LO
	.comm	_NS2501_DID,4,2                 ; @NS2501_DID
l_.str.1:                               ; @.str.1
	.asciz	"init ns2501 dvo controller successfully!\n"

	.no_dead_strip	_ns2501_init
.subsections_via_symbols
