	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pb0100_probe
_pb0100_probe:                          ## @pb0100_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, %r14
	movq	_PB_IDENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	callq	_stv06xx_read_sensor
	testl	%eax, %eax
	js	LBB0_8
## %bb.1:
	movl	$-256, %eax
	andl	-28(%rbp), %eax
	cmpl	$25600, %eax                    ## imm = 0x6400
	jne	LBB0_8
## %bb.2:
	movq	_pb0100_ctrl@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
                                        ## kill: def $eax killed $eax def $rax
	leal	(,%rax,4), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_info
	movq	_pb0100_mode@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rdi, 32(%r14)
	callq	_ARRAY_SIZE
	movl	%eax, 24(%r14)
	movq	(%r15), %rdi
	movq	%rdi, 16(%r14)
	callq	_ARRAY_SIZE
	movl	%eax, 8(%r14)
	testl	%eax, %eax
	jle	LBB0_7
## %bb.5:
	movq	(%r15), %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rax,%rcx,4), %edx
	movl	%edx, (%rbx,%rcx,4)
	incq	%rcx
	movslq	8(%r14), %rdx
	cmpq	%rdx, %rcx
	jl	LBB0_6
LBB0_7:
	movq	%rbx, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_8:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
LBB0_9:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_PB_IDENT,4,2                   ## @PB_IDENT
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_pb0100_ctrl,8,3                ## @pb0100_ctrl
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Photobit pb0100 sensor detected"

	.comm	_pb0100_mode,8,3                ## @pb0100_mode
	.no_dead_strip	_pb0100_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pb0100_probe
_pb0100_probe:                          ; @pb0100_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
Lloh0:
	adrp	x8, _PB_IDENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PB_IDENT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_stv06xx_read_sensor
	tbnz	w0, #31, LBB0_7
; %bb.1:
	ldr	w8, [sp, #12]
	lsr	w8, w8, #8
	cmp	w8, #100
	b.ne	LBB0_7
; %bb.2:
Lloh3:
	adrp	x21, _pb0100_ctrl@GOTPAGE
Lloh4:
	ldr	x21, [x21, _pb0100_ctrl@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	lsl	w0, w0, #2
Lloh5:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_kmalloc
	cbz	x0, LBB0_10
; %bb.3:
	mov	x20, x0
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_info
Lloh10:
	adrp	x8, _pb0100_mode@GOTPAGE
Lloh11:
	ldr	x8, [x8, _pb0100_mode@GOTPAGEOFF]
Lloh12:
	ldr	x0, [x8]
	str	x0, [x19, #32]
	bl	_ARRAY_SIZE
	str	w0, [x19, #24]
	ldr	x0, [x21]
	str	x0, [x19, #16]
	bl	_ARRAY_SIZE
	str	w0, [x19, #8]
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x8, #0
	ldr	x9, [x21]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x10, x8, #2
	ldr	w11, [x9, x10]
	str	w11, [x20, x10]
	add	x8, x8, #1
	ldrsw	x10, [x19, #8]
	cmp	x8, x10
	b.lt	LBB0_5
LBB0_6:
	mov	w0, #0
	str	x20, [x19]
	b	LBB0_9
LBB0_7:
Lloh13:
	adrp	x8, _ENODEV@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_10:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_PB_IDENT,4,2                   ; @PB_IDENT
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_pb0100_ctrl,8,3                ; @pb0100_ctrl
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Photobit pb0100 sensor detected"

	.comm	_pb0100_mode,8,3                ; @pb0100_mode
	.no_dead_strip	_pb0100_probe
.subsections_via_symbols
