	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_FileWriter_New            ## -- Begin function HPDF_FileWriter_New
	.p2align	4, 0x90
_HPDF_FileWriter_New:                   ## @HPDF_FileWriter_New
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rax
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	callq	_HPDF_FOPEN
	movq	%rax, %r14
	leaq	L_.str.1(%rip), %rdi
	callq	_HPDF_PTRACE
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	movq	%r15, %rdi
	movl	$4, %esi
	callq	_HPDF_GetMem
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_HPDF_MemSet
	movq	_HPDF_STREAM_SIG_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movl	(%r15), %eax
	movl	%eax, 40(%rbx)
	movq	%r15, 32(%rbx)
	movq	_HPDF_FileWriter_WriteFunc@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_HPDF_FileStream_FreeFunc@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_HPDF_FileStream_TellFunc@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	%r14, 8(%rbx)
	movq	_HPDF_STREAM_FILE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	jmp	LBB0_4
LBB0_1:
	movl	(%r15), %edi
	movq	_HPDF_FILE_OPEN_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_HPDF_SetError
	xorl	%ebx, %ebx
LBB0_4:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wb"

L_.str.1:                               ## @.str.1
	.asciz	" HPDF_FileWriter_New\n"

	.comm	_HPDF_FILE_OPEN_ERROR,4,2       ## @HPDF_FILE_OPEN_ERROR
	.comm	_errno,4,2                      ## @errno
	.comm	_HPDF_STREAM_SIG_BYTES,4,2      ## @HPDF_STREAM_SIG_BYTES
	.comm	_HPDF_FileWriter_WriteFunc,4,2  ## @HPDF_FileWriter_WriteFunc
	.comm	_HPDF_FileStream_FreeFunc,4,2   ## @HPDF_FileStream_FreeFunc
	.comm	_HPDF_FileStream_TellFunc,4,2   ## @HPDF_FileStream_TellFunc
	.comm	_HPDF_STREAM_FILE,4,2           ## @HPDF_STREAM_FILE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_FileWriter_New            ; -- Begin function HPDF_FileWriter_New
	.p2align	2
_HPDF_FileWriter_New:                   ; @HPDF_FileWriter_New
	.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	x8, x1
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	bl	_HPDF_FOPEN
	mov	x19, x0
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_HPDF_PTRACE
	cbz	x19, LBB0_3
; %bb.1:
	mov	x0, x20
	mov	w1, #4
	bl	_HPDF_GetMem
	mov	x21, x0
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x21
	mov	w1, #0
	mov	w2, #4
	bl	_HPDF_MemSet
Lloh4:
	adrp	x8, _HPDF_STREAM_SIG_BYTES@GOTPAGE
Lloh5:
	ldr	x8, [x8, _HPDF_STREAM_SIG_BYTES@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [x20]
	stp	w9, w8, [x21, #40]
	str	x20, [x21, #32]
Lloh7:
	adrp	x8, _HPDF_FileWriter_WriteFunc@GOTPAGE
Lloh8:
	ldr	x8, [x8, _HPDF_FileWriter_WriteFunc@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _HPDF_FileStream_FreeFunc@GOTPAGE
Lloh11:
	ldr	x9, [x9, _HPDF_FileStream_FreeFunc@GOTPAGEOFF]
	str	w8, [x21, #24]
Lloh12:
	ldr	w8, [x9]
Lloh13:
	adrp	x9, _HPDF_FileStream_TellFunc@GOTPAGE
Lloh14:
	ldr	x9, [x9, _HPDF_FileStream_TellFunc@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #16]
	str	x19, [x21, #8]
Lloh16:
	adrp	x8, _HPDF_STREAM_FILE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _HPDF_STREAM_FILE@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x21]
	b	LBB0_4
LBB0_3:
	ldr	w0, [x20]
Lloh19:
	adrp	x8, _HPDF_FILE_OPEN_ERROR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _HPDF_FILE_OPEN_ERROR@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x8, _errno@GOTPAGE
Lloh23:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	bl	_HPDF_SetError
	mov	x21, #0
LBB0_4:
	mov	x0, x21
	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
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wb"

l_.str.1:                               ; @.str.1
	.asciz	" HPDF_FileWriter_New\n"

	.comm	_HPDF_FILE_OPEN_ERROR,4,2       ; @HPDF_FILE_OPEN_ERROR
	.comm	_errno,4,2                      ; @errno
	.comm	_HPDF_STREAM_SIG_BYTES,4,2      ; @HPDF_STREAM_SIG_BYTES
	.comm	_HPDF_FileWriter_WriteFunc,4,2  ; @HPDF_FileWriter_WriteFunc
	.comm	_HPDF_FileStream_FreeFunc,4,2   ; @HPDF_FileStream_FreeFunc
	.comm	_HPDF_FileStream_TellFunc,4,2   ; @HPDF_FileStream_TellFunc
	.comm	_HPDF_STREAM_FILE,4,2           ; @HPDF_STREAM_FILE
.subsections_via_symbols
