	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cobalt_probe
_cobalt_probe:                          ## @cobalt_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	%rsi, %r13
	movq	%rdi, %r15
	movq	_cobalt_instance@GOTPCREL(%rip), %rdi
	callq	_atomic_inc_return
	movl	%eax, %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	decl	%ebx
	movq	%r15, 24(%rax)
	movl	%ebx, (%rax)
	leaq	4(%rax), %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_v4l2_device_register
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r12d
	movl	(%r14), %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_20
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_21
LBB0_4:
	movl	(%r14), %ecx
	movl	4(%r14), %edi
	leaq	L_.str.1(%rip), %rdx
	movl	$4, %esi
	callq	_snprintf
	movq	_cobalt_notify@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movl	(%r14), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_cobalt_info
	movl	4(%r14), %edi
	callq	_create_singlethread_workqueue
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%r14, %rdi
	addq	$36, %rdi
	movq	_cobalt_irq_work_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_cobalt_setup_pci
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_18
## %bb.7:
	movq	%r14, %rdi
	callq	_cobalt_hdl_info_get
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_cobalt_info
	jmp	LBB0_10
LBB0_5:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_cobalt_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_19
LBB0_9:
	movl	32(%r14), %esi
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_cobalt_info
LBB0_10:
	movq	%r14, %rdi
	callq	_cobalt_i2c_init
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_17
## %bb.11:
	movq	%r14, %rdi
	callq	_cobalt_stream_struct_init
	movq	%r14, %rdi
	callq	_cobalt_subdevs_init
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_16
## %bb.12:
	movq	_COBALT_SYS_STAT_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_cobalt_read_bar1
	movq	_COBALT_SYSSTAT_HSMA_PRSNTN_MSK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_13
LBB0_14:
	movq	%r14, %rdi
	callq	_cobalt_nodes_register
	testl	%eax, %eax
	je	LBB0_22
## %bb.15:
	movl	%eax, %r12d
	leaq	L_.str.6(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_cobalt_err
	jmp	LBB0_16
LBB0_13:
	movq	%r14, %rdi
	callq	_cobalt_subdevs_hsma_init
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_14
LBB0_16:
	movq	%r14, %rdi
	callq	_cobalt_i2c_exit
	movq	_COBALT_SYS_CTRL_HSMA_TX_ENABLE_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_cobalt_s_bit_sysctrl
LBB0_17:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_cobalt_free_msi
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_cobalt_pci_iounmap
	movq	24(%r14), %rdi
	callq	_pci_release_regions
	movq	24(%r14), %rdi
	callq	_pci_disable_device
LBB0_18:
	movq	16(%r14), %rdi
	callq	_destroy_workqueue
LBB0_19:
	leaq	L_.str.8(%rip), %rdi
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_cobalt_err
	movq	%rbx, %rdi
	callq	_v4l2_device_unregister
LBB0_20:
	movq	%r14, %rdi
	callq	_kfree
LBB0_21:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_cobalt_set_interrupt
	movq	_core@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_interrupt_service_routine@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_v4l2_device_call_all
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_cobalt_info
	movq	%r14, %rdi
	callq	_cobalt_flash_probe
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_cobalt_instance,4,2            ## @cobalt_instance
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cobalt: v4l2_device_register of card %d failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"cobalt-%d"

	.comm	_cobalt_notify,4,2              ## @cobalt_notify
L_.str.2:                               ## @.str.2
	.asciz	"Initializing card %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Could not create workqueue\n"

	.comm	_cobalt_irq_work_handler,4,2    ## @cobalt_irq_work_handler
L_.str.4:                               ## @.str.4
	.asciz	"Not able to read the HDL info\n"

L_.str.5:                               ## @.str.5
	.asciz	"%s"

	.comm	_COBALT_SYS_STAT_BASE,4,2       ## @COBALT_SYS_STAT_BASE
	.comm	_COBALT_SYSSTAT_HSMA_PRSNTN_MSK,4,2 ## @COBALT_SYSSTAT_HSMA_PRSNTN_MSK
L_.str.6:                               ## @.str.6
	.asciz	"Error %d registering device nodes\n"

	.comm	_core,4,2                       ## @core
	.comm	_interrupt_service_routine,4,2  ## @interrupt_service_routine
L_.str.7:                               ## @.str.7
	.asciz	"Initialized cobalt card\n"

	.comm	_COBALT_SYS_CTRL_HSMA_TX_ENABLE_BIT,4,2 ## @COBALT_SYS_CTRL_HSMA_TX_ENABLE_BIT
L_.str.8:                               ## @.str.8
	.asciz	"error %d on initialization\n"

	.no_dead_strip	_cobalt_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cobalt_probe
_cobalt_probe:                          ; @cobalt_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	x23, x1
	mov	x21, x0
Lloh0:
	adrp	x0, _cobalt_instance@GOTPAGE
Lloh1:
	ldr	x0, [x0, _cobalt_instance@GOTPAGEOFF]
	bl	_atomic_inc_return
	mov	x20, x0
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	sub	w8, w20, #1
	str	x21, [x0, #24]
	str	w8, [x0]
	add	x20, x0, #4
	mov	x0, x21
	mov	x1, x20
	bl	_v4l2_device_register
	cbz	w0, LBB0_4
; %bb.2:
	mov	x22, x0
	ldr	w1, [x19]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_20
LBB0_3:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_21
LBB0_4:
	ldp	w3, w0, [x19]
Lloh10:
	adrp	x2, l_.str.1@PAGE
Lloh11:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #4
	bl	_snprintf
Lloh12:
	adrp	x8, _cobalt_notify@GOTPAGE
Lloh13:
	ldr	x8, [x8, _cobalt_notify@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	ldr	w8, [x19]
	str	x8, [sp]
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_cobalt_info
	ldr	w0, [x19, #4]
	bl	_create_singlethread_workqueue
	str	x0, [x19, #16]
	cbz	x0, LBB0_8
; %bb.5:
	add	x0, x19, #36
Lloh17:
	adrp	x8, _cobalt_irq_work_handler@GOTPAGE
Lloh18:
	ldr	x8, [x8, _cobalt_irq_work_handler@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	bl	_INIT_WORK
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	bl	_cobalt_setup_pci
	mov	x22, x0
	cbnz	w0, LBB0_18
; %bb.6:
	mov	x0, x19
	bl	_cobalt_hdl_info_get
	cbz	x0, LBB0_9
; %bb.7:
Lloh20:
	adrp	x0, l_.str.4@PAGE
Lloh21:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_10
LBB0_8:
Lloh22:
	adrp	x0, l_.str.3@PAGE
Lloh23:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_cobalt_err
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_19
LBB0_9:
	ldr	w8, [x19, #32]
	str	x8, [sp]
Lloh27:
	adrp	x0, l_.str.5@PAGE
Lloh28:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_10:
	bl	_cobalt_info
	mov	x0, x19
	bl	_cobalt_i2c_init
	mov	x22, x0
	cbnz	w0, LBB0_17
; %bb.11:
	mov	x0, x19
	bl	_cobalt_stream_struct_init
	mov	x0, x19
	bl	_cobalt_subdevs_init
	mov	x22, x0
	cbnz	w0, LBB0_16
; %bb.12:
Lloh29:
	adrp	x8, _COBALT_SYS_STAT_BASE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _COBALT_SYS_STAT_BASE@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_cobalt_read_bar1
Lloh32:
	adrp	x8, _COBALT_SYSSTAT_HSMA_PRSNTN_MSK@GOTPAGE
Lloh33:
	ldr	x8, [x8, _COBALT_SYSSTAT_HSMA_PRSNTN_MSK@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_15
LBB0_13:
	mov	x0, x19
	bl	_cobalt_nodes_register
	mov	x22, x0
	cbz	w0, LBB0_22
; %bb.14:
	str	x22, [sp]
Lloh35:
	adrp	x0, l_.str.6@PAGE
Lloh36:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_cobalt_err
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	b	LBB0_16
LBB0_15:
	mov	x0, x19
	bl	_cobalt_subdevs_hsma_init
	mov	x22, x0
	cbz	w0, LBB0_13
LBB0_16:
	mov	x0, x19
	bl	_cobalt_i2c_exit
Lloh37:
	adrp	x8, _COBALT_SYS_CTRL_HSMA_TX_ENABLE_BIT@GOTPAGE
Lloh38:
	ldr	x8, [x8, _COBALT_SYS_CTRL_HSMA_TX_ENABLE_BIT@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_cobalt_s_bit_sysctrl
LBB0_17:
	mov	x0, x19
	mov	x1, x21
	bl	_cobalt_free_msi
	mov	x0, x19
	mov	x1, x21
	bl	_cobalt_pci_iounmap
	ldr	x0, [x19, #24]
	bl	_pci_release_regions
	ldr	x0, [x19, #24]
	bl	_pci_disable_device
LBB0_18:
	ldr	x0, [x19, #16]
	bl	_destroy_workqueue
LBB0_19:
	str	x22, [sp]
Lloh40:
	adrp	x0, l_.str.8@PAGE
Lloh41:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_cobalt_err
	mov	x0, x20
	bl	_v4l2_device_unregister
LBB0_20:
	mov	x0, x19
	bl	_kfree
LBB0_21:
	mov	x0, x22
	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:
	mov	x0, x19
	mov	w1, #1
	bl	_cobalt_set_interrupt
Lloh42:
	adrp	x8, _core@GOTPAGE
Lloh43:
	ldr	x8, [x8, _core@GOTPAGEOFF]
Lloh44:
	ldr	w2, [x8]
Lloh45:
	adrp	x8, _interrupt_service_routine@GOTPAGE
Lloh46:
	ldr	x8, [x8, _interrupt_service_routine@GOTPAGEOFF]
Lloh47:
	ldr	w3, [x8]
	mov	x0, x20
	mov	w1, #0
	mov	w4, #0
	mov	x5, #0
	bl	_v4l2_device_call_all
Lloh48:
	adrp	x0, l_.str.7@PAGE
Lloh49:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_cobalt_info
	mov	x0, x19
	bl	_cobalt_flash_probe
	b	LBB0_21
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_cobalt_instance,4,2            ; @cobalt_instance
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cobalt: v4l2_device_register of card %d failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"cobalt-%d"

	.comm	_cobalt_notify,4,2              ; @cobalt_notify
l_.str.2:                               ; @.str.2
	.asciz	"Initializing card %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Could not create workqueue\n"

	.comm	_cobalt_irq_work_handler,4,2    ; @cobalt_irq_work_handler
l_.str.4:                               ; @.str.4
	.asciz	"Not able to read the HDL info\n"

l_.str.5:                               ; @.str.5
	.asciz	"%s"

	.comm	_COBALT_SYS_STAT_BASE,4,2       ; @COBALT_SYS_STAT_BASE
	.comm	_COBALT_SYSSTAT_HSMA_PRSNTN_MSK,4,2 ; @COBALT_SYSSTAT_HSMA_PRSNTN_MSK
l_.str.6:                               ; @.str.6
	.asciz	"Error %d registering device nodes\n"

	.comm	_core,4,2                       ; @core
	.comm	_interrupt_service_routine,4,2  ; @interrupt_service_routine
l_.str.7:                               ; @.str.7
	.asciz	"Initialized cobalt card\n"

	.comm	_COBALT_SYS_CTRL_HSMA_TX_ENABLE_BIT,4,2 ; @COBALT_SYS_CTRL_HSMA_TX_ENABLE_BIT
l_.str.8:                               ; @.str.8
	.asciz	"error %d on initialization\n"

	.no_dead_strip	_cobalt_probe
.subsections_via_symbols
