	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apds9960_probe
_apds9960_probe:                        ## @apds9960_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
	leaq	8(%rdi), %r12
	movq	%r12, %rdi
	movl	$32, %esi
	callq	_devm_iio_device_alloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_devm_iio_kfifo_allocate
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_iio_device_attach_buffer
	movq	%r12, 40(%rbx)
	movq	_apds9960_info@GOTPCREL(%rip), %rax
	movq	%rax, 32(%rbx)
	movq	_APDS9960_DRV_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	_apds9960_channels@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, 24(%rbx)
	callq	_ARRAY_SIZE
	movl	%eax, 20(%rbx)
	movq	_apds9960_scan_masks@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_INDIO_BUFFER_SOFTWARE@GOTPCREL(%rip), %rax
	movq	_INDIO_DIRECT_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%rbx)
	movq	_apds9960_buffer_setup_ops@GOTPCREL(%rip), %rax
	movq	%rax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_iio_priv
	movq	%rax, %r15
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_i2c_set_clientdata
	movq	_apds9960_regmap_config@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_regmap_init_i2c
	movl	%eax, 24(%r15)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.15:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	24(%r15), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_14:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r14, 16(%r15)
	movq	%rbx, 8(%r15)
	movq	%r15, %rdi
	callq	_mutex_init
	movq	%r12, %rdi
	callq	_pm_runtime_set_active
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.5:
	movq	%r12, %rdi
	callq	_pm_runtime_enable
	movq	%r12, %rdi
	movl	$5000, %esi                     ## imm = 0x1388
	callq	_pm_runtime_set_autosuspend_delay
	movq	%r12, %rdi
	callq	_pm_runtime_use_autosuspend
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_apds9960_set_power_state
	movq	%r15, %rdi
	callq	_apds9960_regfield_init
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.6:
	movq	%r15, %rdi
	callq	_apds9960_chip_init
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_7
LBB0_13:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_apds9960_set_power_state
	jmp	LBB0_14
LBB0_7:
	movq	(%r14), %rsi
	testq	%rsi, %rsi
	jle	LBB0_8
## %bb.9:
	movq	_apds9960_interrupt_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_IRQF_TRIGGER_FALLING@GOTPCREL(%rip), %rax
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	orl	(%rax), %r8d
	movq	%rbx, (%rsp)
	leaq	L_.str.2(%rip), %r9
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_devm_request_threaded_irq
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %r13d
	movq	(%r14), %rdx
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_13
LBB0_8:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_13
LBB0_11:
	movq	%rbx, %rdi
	callq	_iio_device_register
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.12:
	xorl	%r13d, %r13d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_apds9960_info,4,2              ## @apds9960_info
	.comm	_APDS9960_DRV_NAME,4,2          ## @APDS9960_DRV_NAME
	.comm	_apds9960_channels,4,2          ## @apds9960_channels
	.comm	_apds9960_scan_masks,4,2        ## @apds9960_scan_masks
	.comm	_INDIO_BUFFER_SOFTWARE,4,2      ## @INDIO_BUFFER_SOFTWARE
	.comm	_INDIO_DIRECT_MODE,4,2          ## @INDIO_DIRECT_MODE
	.comm	_apds9960_buffer_setup_ops,4,2  ## @apds9960_buffer_setup_ops
	.comm	_apds9960_regmap_config,4,2     ## @apds9960_regmap_config
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"regmap initialization failed.\n"

L_.str.1:                               ## @.str.1
	.asciz	"no valid irq defined\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_apds9960_interrupt_handler,4,2 ## @apds9960_interrupt_handler
	.comm	_IRQF_TRIGGER_FALLING,4,2       ## @IRQF_TRIGGER_FALLING
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
L_.str.2:                               ## @.str.2
	.asciz	"apds9960_event"

L_.str.3:                               ## @.str.3
	.asciz	"request irq (%d) failed\n"

	.no_dead_strip	_apds9960_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apds9960_probe
_apds9960_probe:                        ; @apds9960_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	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	mov	w1, #32
	bl	_devm_iio_device_alloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
	mov	x0, x19
	bl	_devm_iio_kfifo_allocate
	cbz	x0, LBB0_4
; %bb.2:
	mov	x1, x0
	mov	x0, x21
	bl	_iio_device_attach_buffer
Lloh0:
	adrp	x8, _apds9960_info@GOTPAGE
Lloh1:
	ldr	x8, [x8, _apds9960_info@GOTPAGEOFF]
	stp	x8, x19, [x21, #32]
Lloh2:
	adrp	x8, _APDS9960_DRV_NAME@GOTPAGE
Lloh3:
	ldr	x8, [x8, _APDS9960_DRV_NAME@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _apds9960_channels@GOTPAGE
Lloh6:
	ldr	x9, [x9, _apds9960_channels@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x9]
	stp	w0, w8, [x21, #24]
	bl	_ARRAY_SIZE
Lloh8:
	adrp	x8, _apds9960_scan_masks@GOTPAGE
Lloh9:
	ldr	x8, [x8, _apds9960_scan_masks@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	stp	w8, w0, [x21, #16]
Lloh11:
	adrp	x8, _INDIO_BUFFER_SOFTWARE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _INDIO_BUFFER_SOFTWARE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _INDIO_DIRECT_MODE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _INDIO_DIRECT_MODE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x21]
Lloh17:
	adrp	x8, _apds9960_buffer_setup_ops@GOTPAGE
Lloh18:
	ldr	x8, [x8, _apds9960_buffer_setup_ops@GOTPAGEOFF]
	str	x8, [x21, #8]
	mov	x0, x21
	bl	_iio_priv
	mov	x22, x0
	mov	x0, x20
	mov	x1, x21
	bl	_i2c_set_clientdata
Lloh19:
	adrp	x1, _apds9960_regmap_config@GOTPAGE
Lloh20:
	ldr	x1, [x1, _apds9960_regmap_config@GOTPAGEOFF]
	mov	x0, x20
	bl	_devm_regmap_init_i2c
	str	w0, [x22, #24]
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.3:
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w0, [x22, #24]
	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
	b	_PTR_ERR
LBB0_4:
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_5:
	mov	x0, x23
	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_6:
	stp	x21, x20, [x22, #8]
	mov	x0, x22
	bl	_mutex_init
	mov	x0, x19
	bl	_pm_runtime_set_active
	mov	x23, x0
	cbnz	w0, LBB0_9
; %bb.7:
	mov	x0, x19
	bl	_pm_runtime_enable
	mov	x0, x19
	mov	w1, #5000
	bl	_pm_runtime_set_autosuspend_delay
	mov	x0, x19
	bl	_pm_runtime_use_autosuspend
	mov	x0, x22
	mov	w1, #1
	bl	_apds9960_set_power_state
	mov	x0, x22
	bl	_apds9960_regfield_init
	mov	x23, x0
	cbnz	w0, LBB0_9
; %bb.8:
	mov	x0, x22
	bl	_apds9960_chip_init
	mov	x23, x0
	cbz	w0, LBB0_10
LBB0_9:
	mov	x0, x22
	mov	w1, #0
	bl	_apds9960_set_power_state
	b	LBB0_5
LBB0_10:
	ldr	x1, [x20]
	cmp	x1, #0
	b.le	LBB0_13
; %bb.11:
Lloh26:
	adrp	x8, _apds9960_interrupt_handler@GOTPAGE
Lloh27:
	ldr	x8, [x8, _apds9960_interrupt_handler@GOTPAGEOFF]
Lloh28:
	adrp	x9, _IRQF_TRIGGER_FALLING@GOTPAGE
Lloh29:
	ldr	x9, [x9, _IRQF_TRIGGER_FALLING@GOTPAGEOFF]
Lloh30:
	ldr	w3, [x8]
Lloh31:
	ldr	w8, [x9]
Lloh32:
	adrp	x9, _IRQF_ONESHOT@GOTPAGE
Lloh33:
	ldr	x9, [x9, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	orr	w4, w9, w8
Lloh35:
	adrp	x5, l_.str.2@PAGE
Lloh36:
	add	x5, x5, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, #0
	mov	x6, x21
	bl	_devm_request_threaded_irq
	cbz	w0, LBB0_14
; %bb.12:
	mov	x23, x0
	ldr	x8, [x20]
	str	x8, [sp]
Lloh37:
	adrp	x1, l_.str.3@PAGE
Lloh38:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_9
LBB0_13:
Lloh39:
	adrp	x1, l_.str.1@PAGE
Lloh40:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh41:
	adrp	x8, _EINVAL@GOTPAGE
Lloh42:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_9
LBB0_14:
	mov	x0, x21
	bl	_iio_device_register
	mov	x23, x0
	b	LBB0_9
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh30
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_apds9960_info,4,2              ; @apds9960_info
	.comm	_APDS9960_DRV_NAME,4,2          ; @APDS9960_DRV_NAME
	.comm	_apds9960_channels,4,2          ; @apds9960_channels
	.comm	_apds9960_scan_masks,4,2        ; @apds9960_scan_masks
	.comm	_INDIO_BUFFER_SOFTWARE,4,2      ; @INDIO_BUFFER_SOFTWARE
	.comm	_INDIO_DIRECT_MODE,4,2          ; @INDIO_DIRECT_MODE
	.comm	_apds9960_buffer_setup_ops,4,2  ; @apds9960_buffer_setup_ops
	.comm	_apds9960_regmap_config,4,2     ; @apds9960_regmap_config
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"regmap initialization failed.\n"

l_.str.1:                               ; @.str.1
	.asciz	"no valid irq defined\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_apds9960_interrupt_handler,4,2 ; @apds9960_interrupt_handler
	.comm	_IRQF_TRIGGER_FALLING,4,2       ; @IRQF_TRIGGER_FALLING
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
l_.str.2:                               ; @.str.2
	.asciz	"apds9960_event"

l_.str.3:                               ; @.str.3
	.asciz	"request irq (%d) failed\n"

	.no_dead_strip	_apds9960_probe
.subsections_via_symbols
