	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function realtek_smi_read_bits
_realtek_smi_read_bits:                 ## @realtek_smi_read_bits
	.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	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	movl	(%rdi), %edi
	callq	_gpiod_direction_input
	movq	$0, (%r14)
	testq	%r12, %r12
	jle	LBB0_3
## %bb.1:
	incq	%r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_realtek_smi_clk_delay
	movl	4(%r15), %edi
	movl	$1, %esi
	callq	_gpiod_set_value
	movq	%r15, %rdi
	callq	_realtek_smi_clk_delay
	movl	(%r15), %edi
	callq	_gpiod_get_value
	xorl	%ebx, %ebx
	testl	%eax, %eax
	setne	%bl
	movl	4(%r15), %edi
	xorl	%esi, %esi
	callq	_gpiod_set_value
	leal	-2(%r12), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shlq	%cl, %rbx
	orq	%rbx, (%r14)
	decq	%r12
	cmpq	$1, %r12
	ja	LBB0_2
LBB0_3:
	movl	(%r15), %edi
	xorl	%esi, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gpiod_direction_output         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_realtek_smi_read_bits
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function realtek_smi_read_bits
_realtek_smi_read_bits:                 ; @realtek_smi_read_bits
	.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, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w0, [x0]
	bl	_gpiod_direction_input
	str	xzr, [x19]
	cmp	x21, #1
	b.lt	LBB0_3
; %bb.1:
	add	x21, x21, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_realtek_smi_clk_delay
	ldr	w0, [x20, #4]
	mov	w1, #1
	bl	_gpiod_set_value
	mov	x0, x20
	bl	_realtek_smi_clk_delay
	ldr	w0, [x20]
	bl	_gpiod_get_value
	cmp	w0, #0
	cset	w22, ne
	ldr	w0, [x20, #4]
	mov	w1, #0
	bl	_gpiod_set_value
	sub	x8, x21, #2
	lsl	x8, x22, x8
	ldr	x9, [x19]
	orr	x8, x9, x8
	str	x8, [x19]
	sub	x21, x21, #1
	cmp	x21, #1
	b.hi	LBB0_2
LBB0_3:
	ldr	w0, [x20]
	mov	w1, #0
	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
	b	_gpiod_direction_output
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_realtek_smi_read_bits
.subsections_via_symbols
