	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tifm_ms_read_data
_tifm_ms_read_data:                     ## @tifm_ms_read_data
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	8(%rdi), %rsi
	cmpl	$0, (%rdi)
	je	LBB0_7
## %bb.1:
	testl	%r12d, %r12d
	je	LBB0_7
## %bb.2:
	movl	4(%r14), %eax
	movl	%r12d, %r12d
	leaq	-1(%r12), %rcx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdx
	incq	%rbx
	movb	%al, (%r15,%rdx)
	movl	4(%r14), %eax
	sarl	$8, %eax
	movl	%eax, 4(%r14)
	decl	(%r14)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%edx, %ecx
	jne	LBB0_3
LBB0_5:
	cmpl	%edx, %ecx
	je	LBB0_20
## %bb.6:
	subq	%rbx, %r12
	jmp	LBB0_8
LBB0_7:
	xorl	%ebx, %ebx
	testl	%r12d, %r12d
	je	LBB0_20
LBB0_8:
	movq	_TIFM_MS_STAT_EMP@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_SOCK_MS_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	addq	(%rsi), %rdi
	callq	_readl
	testl	%r13d, %eax
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	jne	LBB0_14
## %bb.9:
	cmpl	$4, %r12d
	jb	LBB0_14
## %bb.10:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	_SOCK_MS_DATA@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r14), %rdi
	callq	___raw_readl
	movl	%ebx, %ecx
	movq	%r15, %r13
	movl	%eax, (%r15,%rcx)
	addl	$-4, %r12d
	addl	$4, %ebx
	movq	_TIFM_MS_STAT_EMP@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_SOCK_MS_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r14), %rdi
	callq	_readl
	testl	%r15d, %eax
	jne	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpl	$3, %r12d
	movq	%r13, %r15
	ja	LBB0_11
LBB0_14:
	testl	%r12d, %r12d
	je	LBB0_20
LBB0_15:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	_TIFM_MS_STAT_EMP@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_SOCK_MS_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	addq	(%r13), %rdi
	callq	_readl
	testl	%r14d, %eax
	jne	LBB0_20
## %bb.16:
	movq	_SOCK_MS_DATA@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r13), %rdi
	callq	_readl
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, 4(%rdi)
	movl	$4, (%rdi)
	decl	%r12d
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %ecx
	movl	%ebx, %edx
	movb	%al, (%rsi,%rdx)
	movl	4(%rdi), %eax
	sarl	$8, %eax
	movl	%eax, 4(%rdi)
	subl	$1, %r12d
	jb	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	leal	1(%rcx), %ebx
	decl	(%rdi)
	jne	LBB0_17
LBB0_19:
	incl	%ecx
	movl	%ecx, %ebx
	jmp	LBB0_20
LBB0_12:
	movq	%r13, %r15
	testl	%r12d, %r12d
	jne	LBB0_15
LBB0_20:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TIFM_MS_STAT_EMP,4,2           ## @TIFM_MS_STAT_EMP
	.comm	_SOCK_MS_STATUS,8,3             ## @SOCK_MS_STATUS
	.comm	_SOCK_MS_DATA,8,3               ## @SOCK_MS_DATA
	.no_dead_strip	_tifm_ms_read_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tifm_ms_read_data
_tifm_ms_read_data:                     ; @tifm_ms_read_data
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x23, [x0, #8]
	ldr	w8, [x0]
	cmp	w8, #0
	ccmp	w2, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
	mov	w21, #0
	cbnz	w22, LBB0_6
	b	LBB0_15
LBB0_2:
	mov	x21, #0
	ldr	w10, [x20, #4]
	mov	w8, w22
	sub	x9, x8, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x11, x21
	add	x21, x21, #1
	strb	w10, [x19, x11]
	ldp	w12, w10, [x20]
	asr	w10, w10, #8
	sub	w12, w12, #1
	stp	w12, w10, [x20]
	cmp	w12, #0
	ccmp	w9, w11, #4, ne
	b.ne	LBB0_3
; %bb.4:
	cmp	w9, w11
	b.eq	LBB0_15
; %bb.5:
	sub	x22, x8, x21
LBB0_6:
Lloh0:
	adrp	x24, _TIFM_MS_STAT_EMP@GOTPAGE
Lloh1:
	ldr	x24, [x24, _TIFM_MS_STAT_EMP@GOTPAGEOFF]
	ldr	w26, [x24]
	ldr	x8, [x23]
Lloh2:
	adrp	x25, _SOCK_MS_STATUS@GOTPAGE
Lloh3:
	ldr	x25, [x25, _SOCK_MS_STATUS@GOTPAGEOFF]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readl
	and	w8, w0, w26
	cmp	w8, #0
	ccmp	w22, #4, #0, eq
	b.lo	LBB0_9
; %bb.7:
Lloh4:
	adrp	x26, _SOCK_MS_DATA@GOTPAGE
Lloh5:
	ldr	x26, [x26, _SOCK_MS_DATA@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	ldr	x9, [x26]
	add	x0, x9, x8
	bl	___raw_readl
	str	w0, [x19, w21, uxtw]
	sub	w22, w22, #4
	add	w21, w21, #4
	ldr	w27, [x24]
	ldr	x8, [x23]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readl
	and	w8, w0, w27
	cmp	w8, #0
	ccmp	w22, #3, #0, eq
	b.hi	LBB0_8
LBB0_9:
	cbz	w22, LBB0_15
; %bb.10:
	ldr	w24, [x24]
	ldr	x8, [x23]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readl
	tst	w0, w24
	b.ne	LBB0_15
; %bb.11:
	ldr	x8, [x23]
Lloh6:
	adrp	x9, _SOCK_MS_DATA@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SOCK_MS_DATA@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	w8, #4
	stp	w8, w0, [x20]
	sub	w8, w22, #1
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x9, x21
	strb	w0, [x19, w21, uxtw]
	ldr	w10, [x20, #4]
	asr	w0, w10, #8
	str	w0, [x20, #4]
	cbz	w8, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w10, [x20]
	sub	w8, w8, #1
	add	w21, w9, #1
	sub	w10, w10, #1
	str	w10, [x20]
	cbnz	w10, LBB0_12
LBB0_14:
	add	w21, w9, #1
LBB0_15:
	mov	x0, x21
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_TIFM_MS_STAT_EMP,4,2           ; @TIFM_MS_STAT_EMP
	.comm	_SOCK_MS_STATUS,8,3             ; @SOCK_MS_STATUS
	.comm	_SOCK_MS_DATA,8,3               ; @SOCK_MS_DATA
	.no_dead_strip	_tifm_ms_read_data
.subsections_via_symbols
