	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read16_flags
_read16_flags:                          ## @read16_flags
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movl	%esi, %r13d
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	(%rdi), %r15d
	movl	%ecx, %ebx
	orl	$192, %ebx
	cmpq	$0, 8(%rdi)
	cmovel	%ecx, %ebx
	movl	%esi, %edi
	callq	_DRXDAP_FASI_LONG_FORMAT
	leal	(%r13,%r13), %ecx
	movzbl	%cl, %ecx
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	testl	%ebx, %ebx
	jne	LBB0_2
## %bb.3:
	movl	%r13d, %edx
	shrl	$16, %edx
	andl	$15, %edx
	movl	%r13d, %eax
	shrl	$18, %eax
	andl	$240, %eax
	orl	%edx, %eax
	movl	$2, %r14d
	jmp	LBB0_4
LBB0_2:
	orl	$1, %ecx
	movl	%r13d, %eax
	shrl	$16, %eax
	movzbl	%al, %eax
	movl	%r13d, %edx
	shrl	$24, %edx
	orl	%ebx, %edx
	movl	%edx, -56(%rbp)
	movl	%r13d, %edx
	shrl	$7, %edx
	movzbl	%dl, %edx
	movl	%edx, -52(%rbp)
	movl	$4, %r14d
LBB0_4:
	movl	%ecx, -64(%rbp)
	movl	%eax, -60(%rbp)
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	movl	%r13d, %edx
	movl	%ebx, %ecx
	callq	_dprintk
	leaq	-64(%rbp), %rdx
	leaq	-72(%rbp), %r8
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%r14d, %ecx
	movl	$2, %r9d
	callq	_i2c_read
	testl	%eax, %eax
	js	LBB0_7
## %bb.5:
	xorl	%eax, %eax
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.6:
	movl	-68(%rbp), %ecx
	shll	$8, %ecx
	orl	-72(%rbp), %ecx
	movl	%ecx, (%rdx)
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_9
## %bb.8:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(0x%08x, 0x%02x)\n"

	.no_dead_strip	_read16_flags
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read16_flags
_read16_flags:                          ; @read16_flags
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	w21, [x0]
	ldr	x8, [x0, #8]
	orr	w9, w3, #0xc0
	cmp	x8, #0
	csel	w23, w3, w9, eq
	mov	x0, x1
	bl	_DRXDAP_FASI_LONG_FORMAT
	ubfiz	w8, w22, #1, #7
	cbnz	x0, LBB0_3
; %bb.1:
	cbnz	w23, LBB0_3
; %bb.2:
	lsr	w9, w22, #18
	and	w9, w9, #0xf0
	bfxil	w9, w22, #16, #4
	mov	w24, #2
	b	LBB0_4
LBB0_3:
	orr	w8, w8, #0x1
	ubfx	w9, w22, #16, #8
	orr	w10, w23, w22, lsr #24
	ubfx	w11, w22, #7, #8
	stp	w10, w11, [sp, #16]
	mov	w24, #4
LBB0_4:
	stp	w8, w9, [sp, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	mov	x2, x22
	mov	x3, x23
	bl	_dprintk
	add	x2, sp, #8
	mov	x4, sp
	mov	x0, x20
	mov	x1, x21
	mov	x3, x24
	mov	w5, #2
	bl	_i2c_read
	tbnz	w0, #31, LBB0_7
; %bb.5:
	mov	w0, #0
	cbz	x19, LBB0_7
; %bb.6:
	ldp	w8, w9, [sp]
	orr	w8, w8, w9, lsl #8
	str	w8, [x19]
LBB0_7:
	ldr	x8, [sp, #24]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(0x%08x, 0x%02x)\n"

	.no_dead_strip	_read16_flags
.subsections_via_symbols
