	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___fread                        ## -- Begin function __fread
	.p2align	4, 0x90
___fread:                               ## @__fread
	.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
	xorl	%eax, %eax
	testq	%rsi, %rsi
	je	LBB0_18
## %bb.1:
	movq	%rdx, %r13
	testq	%rdx, %rdx
	je	LBB0_18
## %bb.2:
	movq	%rcx, %r12
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	%r13, %rax
	orq	%rsi, %rax
	cmpq	$65536, %rax                    ## imm = 0x10000
	jb	LBB0_8
## %bb.3:
	movq	_SIZE_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, %rcx
	orq	%r14, %rcx
	shrq	$32, %rcx
	je	LBB0_4
## %bb.5:
	xorl	%edx, %edx
	divq	%r14
	cmpq	%r13, %rax
	jae	LBB0_8
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	___SERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%r12)
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_4:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r14d
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%r13, %rax
	jb	LBB0_7
LBB0_8:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	imulq	%r14, %r13
	movq	%r12, %rdi
	movl	$-1, %esi
	callq	_ORIENT
	movl	(%r12), %eax
	testl	%eax, %eax
	jns	LBB0_10
## %bb.9:
	movl	$0, (%r12)
	xorl	%eax, %eax
LBB0_10:
	movslq	%eax, %r15
	cmpq	%r15, %r13
	jbe	LBB0_14
## %bb.11:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_memcpy
	addq	%r15, 8(%r12)
	subq	%r15, %r13
	movq	%r12, %rdi
	callq	___srefill
	testq	%rax, %rax
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	addq	%r15, %rbx
	movslq	(%r12), %r15
	cmpq	%r15, %r13
	ja	LBB0_12
LBB0_14:
	movq	8(%r12), %rsi
	movq	%rbx, %rdi
	movq	%r13, %rdx
	callq	_memcpy
	subl	%r13d, (%r12)
	addq	%r13, 8(%r12)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	subq	%r13, %rax
	movq	%rax, %rcx
	orq	%r14, %rcx
	shrq	$32, %rcx
	je	LBB0_16
## %bb.17:
	xorl	%edx, %edx
	divq	%r14
	jmp	LBB0_18
LBB0_16:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r14d
                                        ## kill: def $eax killed $eax def $rax
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_SIZE_MAX,8,3                   ## @SIZE_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	___SERR,4,2                     ## @__SERR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___fread                        ; -- Begin function __fread
	.p2align	2
___fread:                               ; @__fread
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x0
	mov	x0, #0
	cbz	x1, LBB0_14
; %bb.1:
	mov	x20, x2
	cbz	x2, LBB0_14
; %bb.2:
	mov	x19, x3
	mov	x22, x1
	orr	x8, x20, x1
	cmp	x8, #16, lsl #12                ; =65536
	b.lo	LBB0_5
; %bb.3:
Lloh0:
	adrp	x8, _SIZE_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIZE_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	udiv	x8, x8, x22
	cmp	x8, x20
	b.hs	LBB0_5
; %bb.4:
	mov	x0, #0
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _errno@GOTPAGE
Lloh7:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh8:
	str	w8, [x9]
Lloh9:
	adrp	x8, ___SERR@GOTPAGE
Lloh10:
	ldr	x8, [x8, ___SERR@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	str	w8, [x19, #16]
	b	LBB0_14
LBB0_5:
	mul	x25, x20, x22
	mov	x0, x19
	mov	w1, #-1
	bl	_ORIENT
	ldr	w8, [x19]
	tbz	w8, #31, LBB0_7
; %bb.6:
	mov	w8, #0
	str	wzr, [x19]
LBB0_7:
	sxtw	x24, w8
	cmp	x25, x24
	b.ls	LBB0_11
; %bb.8:
	mov	x23, x25
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x19, #8]
	mov	x0, x21
	mov	x2, x24
	bl	_memcpy
	ldr	x8, [x19, #8]
	add	x8, x8, x24
	str	x8, [x19, #8]
	sub	x23, x23, x24
	mov	x0, x19
	bl	___srefill
	cbnz	x0, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x21, x21, x24
	ldrsw	x24, [x19]
	cmp	x23, x24
	b.hi	LBB0_9
	b	LBB0_12
LBB0_11:
	mov	x23, x25
LBB0_12:
	ldr	x1, [x19, #8]
	mov	x0, x21
	mov	x2, x23
	bl	_memcpy
	ldr	w8, [x19]
	sub	w8, w8, w23
	str	w8, [x19]
	ldr	x8, [x19, #8]
	add	x8, x8, x23
	str	x8, [x19, #8]
	mov	x0, x20
	b	LBB0_14
LBB0_13:
	sub	x8, x25, x23
	udiv	x0, x8, x22
LBB0_14:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SIZE_MAX,8,3                   ; @SIZE_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	___SERR,4,2                     ; @__SERR
.subsections_via_symbols
