	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_Stream_ReadLn             ## -- Begin function HPDF_Stream_ReadLn
	.p2align	4, 0x90
_HPDF_Stream_ReadLn:                    ## @HPDF_Stream_ReadLn
	.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
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_HPDF_STREAM_BUF_SIZ@GOTPCREL(%rip), %rax
	movslq	(%rax), %r12
	movl	%r12d, %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	(%r15), %r13
	movq	%r12, -56(%rbp)
	leaq	L_.str(%rip), %rdi
	callq	_HPDF_PTRACE
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.3:
	cmpq	$0, (%r15)
	je	LBB0_4
## %bb.7:
	cmpl	$0, 8(%r14)
	je	LBB0_9
## %bb.8:
	cmpl	$0, 4(%r14)
	je	LBB0_9
## %bb.11:
	movq	_HPDF_STREAM_BUF_SIZ@GOTPCREL(%rip), %r12
	movslq	(%r12), %rax
	cmpq	%rax, %r13
	jge	LBB0_13
## %bb.12:
	movq	%r13, -56(%rbp)
LBB0_13:
	movq	$0, (%r15)
	jmp	LBB0_14
LBB0_4:
	movl	(%r14), %edi
	movq	_HPDF_INVALID_PARAMETER@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movq	_HPDF_INVALID_PARAMETER@GOTPCREL(%rip), %rax
LBB0_32:
	movq	(%rax), %rcx
LBB0_33:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.34:
	movq	%rcx, %rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	(%r14), %edi
	movq	_HPDF_INVALID_OPERATION@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %rsi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.6:
	xorl	%edx, %edx
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_HPDF_SetError                  ## TAILCALL
LBB0_30:                                ##   in Loop: Header=BB0_14 Depth=1
	subq	%rsi, %r13
	movslq	(%r12), %rcx
	cmpq	%rcx, %r13
	cmovlq	%r13, %rcx
	movq	%rcx, -56(%rbp)
	movq	_HPDF_STREAM_EOF@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	je	LBB0_33
LBB0_14:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_20 Depth 2
	cmpq	$2, %r13
	jl	LBB0_31
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%r14, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	leaq	-56(%rbp), %rdx
	callq	_HPDF_Stream_Read
	movq	-56(%rbp), %rsi
	movq	_HPDF_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	testq	%rsi, %rsi
	je	LBB0_17
LBB0_18:                                ##   in Loop: Header=BB0_14 Depth=1
	testq	%rsi, %rsi
	jle	LBB0_30
## %bb.19:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_14 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	(%rdx), %ecx
	cmpb	$13, %cl
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=2
	cmpb	$10, %cl
	je	LBB0_22
## %bb.29:                              ##   in Loop: Header=BB0_20 Depth=2
	incq	%rdx
	movb	%cl, (%rbx)
	incq	%rbx
	movq	-56(%rbp), %rcx
	leaq	-1(%rcx), %rdi
	movq	%rdi, -56(%rbp)
	incq	(%r15)
	cmpq	$1, %rcx
	jg	LBB0_20
	jmp	LBB0_30
LBB0_22:
	movb	$0, (%rbx)
	movq	-56(%rbp), %rax
	leaq	-1(%rax), %rsi
	movq	%rsi, -56(%rbp)
	cmpb	$13, (%rdx)
	je	LBB0_24
## %bb.23:
	cmpq	$3, %rax
	jl	LBB0_26
LBB0_24:
	cmpb	$10, 1(%rdx)
	jne	LBB0_26
## %bb.25:
	addq	$-2, %rax
	movq	%rax, -56(%rbp)
	movq	%rax, %rsi
LBB0_26:
	testq	%rsi, %rsi
	jle	LBB0_28
## %bb.27:
	negq	%rsi
	movq	_HPDF_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_HPDF_Stream_Seek
	movq	%rax, %rcx
	jmp	LBB0_33
LBB0_28:
	movq	_HPDF_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_32
LBB0_31:
	movb	$0, (%rbx)
	movq	_HPDF_STREAM_READLN_CONTINUE@GOTPCREL(%rip), %rax
	jmp	LBB0_32
LBB0_17:
	movq	%rax, %rcx
	jmp	LBB0_33
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_HPDF_STREAM_BUF_SIZ,4,2        ## @HPDF_STREAM_BUF_SIZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" HPDF_Stream_ReadLn\n"

	.comm	_HPDF_INVALID_PARAMETER,8,3     ## @HPDF_INVALID_PARAMETER
	.comm	_HPDF_INVALID_OPERATION,8,3     ## @HPDF_INVALID_OPERATION
	.comm	_HPDF_OK,8,3                    ## @HPDF_OK
	.comm	_HPDF_SEEK_CUR,4,2              ## @HPDF_SEEK_CUR
	.comm	_HPDF_STREAM_EOF,8,3            ## @HPDF_STREAM_EOF
	.comm	_HPDF_STREAM_READLN_CONTINUE,8,3 ## @HPDF_STREAM_READLN_CONTINUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_Stream_ReadLn             ; -- Begin function HPDF_Stream_ReadLn
	.p2align	2
_HPDF_Stream_ReadLn:                    ; @HPDF_Stream_ReadLn
	.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
	sub	sp, sp, #16
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x23, _HPDF_STREAM_BUF_SIZ@GOTPAGE
Lloh4:
	ldr	x23, [x23, _HPDF_STREAM_BUF_SIZ@GOTPAGEOFF]
	ldrsw	x12, [x23]
	and	x8, x12, #0xffffffff
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	ldr	x24, [x2]
	stur	x12, [x29, #-80]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_HPDF_PTRACE
	cbz	x19, LBB0_9
; %bb.1:
	cbz	x20, LBB0_8
; %bb.2:
	ldr	x8, [x21]
	cbz	x8, LBB0_8
; %bb.3:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_13
; %bb.4:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_13
; %bb.5:
	ldrsw	x8, [x23]
	cmp	x24, x8
	b.ge	LBB0_7
; %bb.6:
	stur	x24, [x29, #-80]
LBB0_7:
	str	xzr, [x21]
Lloh9:
	adrp	x25, _HPDF_OK@GOTPAGE
Lloh10:
	ldr	x25, [x25, _HPDF_OK@GOTPAGEOFF]
Lloh11:
	adrp	x26, _HPDF_STREAM_EOF@GOTPAGE
Lloh12:
	ldr	x26, [x26, _HPDF_STREAM_EOF@GOTPAGEOFF]
	b	LBB0_17
LBB0_8:
	ldr	w0, [x19]
Lloh13:
	adrp	x8, _HPDF_INVALID_PARAMETER@GOTPAGE
Lloh14:
	ldr	x8, [x8, _HPDF_INVALID_PARAMETER@GOTPAGEOFF]
	b	LBB0_14
LBB0_9:
Lloh15:
	adrp	x8, _HPDF_INVALID_PARAMETER@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HPDF_INVALID_PARAMETER@GOTPAGEOFF]
LBB0_10:
	ldr	x8, [x8]
LBB0_11:
	ldur	x9, [x29, #-72]
Lloh17:
	adrp	x10, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x10, [x10, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x10, [x10]
	cmp	x10, x9
	b.ne	LBB0_31
; %bb.12:
	mov	x0, x8
	sub	sp, x29, #64
	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
LBB0_13:
	ldr	w0, [x19]
Lloh20:
	adrp	x8, _HPDF_INVALID_OPERATION@GOTPAGE
Lloh21:
	ldr	x8, [x8, _HPDF_INVALID_OPERATION@GOTPAGEOFF]
LBB0_14:
	ldr	x1, [x8]
	ldur	x8, [x29, #-72]
Lloh22:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh23:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_31
; %bb.15:
	mov	w2, #0
	sub	sp, x29, #64
	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
	b	_HPDF_SetError
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	ldrsw	x9, [x23]
	sub	x24, x24, x8
	cmp	x24, x9
	csel	x8, x24, x9, lt
	stur	x8, [x29, #-80]
	ldr	x8, [x26]
	cmp	x0, x8
	b.eq	LBB0_11
LBB0_17:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_21 Depth 2
	cmp	x24, #2
	b.lt	LBB0_29
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	sub	x2, x29, #80
	mov	x0, x19
	mov	x1, x22
	bl	_HPDF_Stream_Read
	ldr	x9, [x25]
	ldur	x8, [x29, #-80]
	cmp	x0, x9
	ccmp	x8, #0, #0, ne
	b.eq	LBB0_30
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=1
	cmp	x8, #1
	b.lt	LBB0_16
; %bb.20:                               ;   in Loop: Header=BB0_17 Depth=1
	mov	x9, x22
LBB0_21:                                ;   Parent Loop BB0_17 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w10, [x9]
	cmp	w10, #13
	ccmp	w10, #10, #4, ne
	b.eq	LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=2
	add	x9, x9, #1
	strb	w10, [x20], #1
	ldur	x10, [x29, #-80]
	ldr	x11, [x21]
	add	x11, x11, #1
	str	x11, [x21]
	subs	x10, x10, #1
	stur	x10, [x29, #-80]
	b.gt	LBB0_21
	b	LBB0_16
LBB0_23:
	strb	wzr, [x20]
	ldur	x10, [x29, #-80]
	sub	x8, x10, #1
	stur	x8, [x29, #-80]
	ldrb	w11, [x9]
	cmp	w11, #13
	ccmp	x10, #3, #0, ne
	b.lt	LBB0_26
; %bb.24:
	ldrb	w9, [x9, #1]
	cmp	w9, #10
	b.ne	LBB0_26
; %bb.25:
	sub	x8, x10, #2
	stur	x8, [x29, #-80]
LBB0_26:
	cmp	x8, #1
	b.lt	LBB0_28
; %bb.27:
	neg	x1, x8
Lloh25:
	adrp	x8, _HPDF_SEEK_CUR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _HPDF_SEEK_CUR@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_HPDF_Stream_Seek
	mov	x8, x0
	b	LBB0_11
LBB0_28:
	ldr	x8, [x25]
	b	LBB0_11
LBB0_29:
	strb	wzr, [x20]
Lloh28:
	adrp	x8, _HPDF_STREAM_READLN_CONTINUE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _HPDF_STREAM_READLN_CONTINUE@GOTPAGEOFF]
	b	LBB0_10
LBB0_30:
	mov	x8, x0
	b	LBB0_11
LBB0_31:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_HPDF_STREAM_BUF_SIZ,4,2        ; @HPDF_STREAM_BUF_SIZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" HPDF_Stream_ReadLn\n"

	.comm	_HPDF_INVALID_PARAMETER,8,3     ; @HPDF_INVALID_PARAMETER
	.comm	_HPDF_INVALID_OPERATION,8,3     ; @HPDF_INVALID_OPERATION
	.comm	_HPDF_OK,8,3                    ; @HPDF_OK
	.comm	_HPDF_SEEK_CUR,4,2              ; @HPDF_SEEK_CUR
	.comm	_HPDF_STREAM_EOF,8,3            ; @HPDF_STREAM_EOF
	.comm	_HPDF_STREAM_READLN_CONTINUE,8,3 ; @HPDF_STREAM_READLN_CONTINUE
.subsections_via_symbols
