	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bh1750_read
_bh1750_read:                           ## @bh1750_read
	.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, %r14
	movq	%rdi, %r15
	movq	16(%rdi), %rax
	movq	(%rax), %r12
	movq	(%rdi), %rbx
	movl	8(%rdi), %edi
	movq	_BH1750_ONE_TIME_H_RES_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_write_byte
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	imulq	%r12, %rbx
	leaq	15000(%rbx), %rdi
	addq	$40000, %rbx                    ## imm = 0x9C40
	movq	%rbx, %rsi
	callq	_usleep_range
	movl	8(%r15), %edi
	leaq	-36(%rbp), %rsi
	movl	$2, %edx
	callq	_i2c_master_recv
	testl	%eax, %eax
	js	LBB0_3
## %bb.2:
	movl	-36(%rbp), %edi
	callq	_be16_to_cpu
	movl	%eax, (%r14)
	xorl	%eax, %eax
LBB0_3:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BH1750_ONE_TIME_H_RES_MODE,4,2 ## @BH1750_ONE_TIME_H_RES_MODE
	.no_dead_strip	_bh1750_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bh1750_read
_bh1750_read:                           ; @bh1750_read
	.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, x1
	mov	x20, x0
	ldr	x8, [x0, #16]
	ldr	x21, [x8]
	ldr	x22, [x0]
	ldr	w0, [x0, #8]
Lloh0:
	adrp	x8, _BH1750_ONE_TIME_H_RES_MODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BH1750_ONE_TIME_H_RES_MODE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_i2c_smbus_write_byte
	tbnz	w0, #31, LBB0_3
; %bb.1:
	mul	x8, x22, x21
	mov	w9, #15000
	add	x0, x8, x9
	mov	w9, #40000
	add	x1, x8, x9
	bl	_usleep_range
	ldr	w0, [x20, #8]
	add	x1, sp, #12
	mov	w2, #2
	bl	_i2c_master_recv
	tbnz	w0, #31, LBB0_3
; %bb.2:
	ldr	w0, [sp, #12]
	bl	_be16_to_cpu
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
LBB0_3:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BH1750_ONE_TIME_H_RES_MODE,4,2 ; @BH1750_ONE_TIME_H_RES_MODE
	.no_dead_strip	_bh1750_read
.subsections_via_symbols
