	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bh1780_probe
_bh1780_probe:                          ## @bh1780_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %rdi
	movq	_I2C_FUNC_SMBUS_BYTE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_check_functionality
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	%r15, %rdi
	movl	$8, %esi
	callq	_devm_iio_device_alloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_iio_priv
	movq	%rax, %r12
	movq	%r15, (%rax)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_i2c_set_clientdata
	movq	_BH1780_REG_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BH1780_PON@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_bh1780_write
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	_BH1780_PON_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msleep
	movq	%r15, %rdi
	callq	_pm_runtime_get_noresume
	movq	%r15, %rdi
	callq	_pm_runtime_set_active
	movq	%r15, %rdi
	callq	_pm_runtime_enable
	movq	_BH1780_REG_PARTID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_bh1780_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_10
## %bb.8:
	movq	_BH1780_REVMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	%ebx, %edx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_info
	movq	%r15, %rdi
	movl	$5000, %esi                     ## imm = 0x1388
	callq	_pm_runtime_set_autosuspend_delay
	movq	%r15, %rdi
	callq	_pm_runtime_use_autosuspend
	movq	%r15, %rdi
	callq	_pm_runtime_put
	movq	%r15, 32(%r14)
	movq	_bh1780_info@GOTPCREL(%rip), %rax
	movq	%rax, 24(%r14)
	leaq	L_.str.1(%rip), %rax
	movq	%rax, (%r14)
	movq	_bh1780_channels@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, 16(%r14)
	callq	_ARRAY_SIZE
	movl	%eax, 12(%r14)
	movq	_INDIO_DIRECT_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movq	%r14, %rdi
	callq	_iio_device_register
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_9
LBB0_10:
	movq	%r15, %rdi
	callq	_pm_runtime_put_noidle
	movq	%r15, %rdi
	callq	_pm_runtime_disable
	jmp	LBB0_11
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	%eax, %ebx
	jmp	LBB0_11
LBB0_9:
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE,4,2        ## @I2C_FUNC_SMBUS_BYTE
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_BH1780_REG_CONTROL,4,2         ## @BH1780_REG_CONTROL
	.comm	_BH1780_PON,4,2                 ## @BH1780_PON
	.comm	_BH1780_PON_DELAY,4,2           ## @BH1780_PON_DELAY
	.comm	_BH1780_REG_PARTID,4,2          ## @BH1780_REG_PARTID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Ambient Light Sensor, Rev : %lu\n"

	.comm	_BH1780_REVMASK,4,2             ## @BH1780_REVMASK
	.comm	_bh1780_info,4,2                ## @bh1780_info
L_.str.1:                               ## @.str.1
	.asciz	"bh1780"

	.comm	_bh1780_channels,4,2            ## @bh1780_channels
	.comm	_INDIO_DIRECT_MODE,4,2          ## @INDIO_DIRECT_MODE
	.no_dead_strip	_bh1780_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bh1780_probe
_bh1780_probe:                          ; @bh1780_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	x19, x0
	ldr	x0, [x0, #8]
Lloh0:
	adrp	x8, _I2C_FUNC_SMBUS_BYTE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_FUNC_SMBUS_BYTE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_i2c_check_functionality
	cbz	w0, LBB0_6
; %bb.1:
	mov	x0, x19
	mov	w1, #8
	bl	_devm_iio_device_alloc
	cbz	x0, LBB0_7
; %bb.2:
	mov	x20, x0
	bl	_iio_priv
	mov	x21, x0
	str	x19, [x0]
	mov	x0, x19
	mov	x1, x20
	bl	_i2c_set_clientdata
Lloh3:
	adrp	x8, _BH1780_REG_CONTROL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BH1780_REG_CONTROL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _BH1780_PON@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BH1780_PON@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_bh1780_write
	tbnz	w0, #31, LBB0_9
; %bb.3:
Lloh9:
	adrp	x8, _BH1780_PON_DELAY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BH1780_PON_DELAY@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_msleep
	mov	x0, x19
	bl	_pm_runtime_get_noresume
	mov	x0, x19
	bl	_pm_runtime_set_active
	mov	x0, x19
	bl	_pm_runtime_enable
Lloh12:
	adrp	x8, _BH1780_REG_PARTID@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BH1780_REG_PARTID@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_bh1780_read
	mov	x22, x0
	tbnz	w0, #31, LBB0_5
; %bb.4:
Lloh15:
	adrp	x8, _BH1780_REVMASK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BH1780_REVMASK@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	and	w2, w8, w22
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	mov	x0, x19
	mov	w1, #5000
	bl	_pm_runtime_set_autosuspend_delay
	mov	x0, x19
	bl	_pm_runtime_use_autosuspend
	mov	x0, x19
	bl	_pm_runtime_put
Lloh20:
	adrp	x8, _bh1780_info@GOTPAGE
Lloh21:
	ldr	x8, [x8, _bh1780_info@GOTPAGEOFF]
Lloh22:
	adrp	x9, l_.str.1@PAGE
Lloh23:
	add	x9, x9, l_.str.1@PAGEOFF
	stp	x8, x19, [x20, #24]
	str	x9, [x20]
Lloh24:
	adrp	x8, _bh1780_channels@GOTPAGE
Lloh25:
	ldr	x8, [x8, _bh1780_channels@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	str	w0, [x20, #16]
	bl	_ARRAY_SIZE
Lloh27:
	adrp	x8, _INDIO_DIRECT_MODE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _INDIO_DIRECT_MODE@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	stp	w8, w0, [x20, #8]
	mov	x0, x20
	bl	_iio_device_register
	mov	x22, x0
	cbz	w0, LBB0_10
LBB0_5:
	mov	x0, x19
	bl	_pm_runtime_put_noidle
	mov	x0, x19
	bl	_pm_runtime_disable
	b	LBB0_10
LBB0_6:
Lloh30:
	adrp	x8, _EIO@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh32:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_10
LBB0_9:
	mov	x22, x0
LBB0_10:
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE,4,2        ; @I2C_FUNC_SMBUS_BYTE
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_BH1780_REG_CONTROL,4,2         ; @BH1780_REG_CONTROL
	.comm	_BH1780_PON,4,2                 ; @BH1780_PON
	.comm	_BH1780_PON_DELAY,4,2           ; @BH1780_PON_DELAY
	.comm	_BH1780_REG_PARTID,4,2          ; @BH1780_REG_PARTID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Ambient Light Sensor, Rev : %lu\n"

	.comm	_BH1780_REVMASK,4,2             ; @BH1780_REVMASK
	.comm	_bh1780_info,4,2                ; @bh1780_info
l_.str.1:                               ; @.str.1
	.asciz	"bh1780"

	.comm	_bh1780_channels,4,2            ; @bh1780_channels
	.comm	_INDIO_DIRECT_MODE,4,2          ; @INDIO_DIRECT_MODE
	.no_dead_strip	_bh1780_probe
.subsections_via_symbols
