	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_Image_LoadRawImage        ## -- Begin function HPDF_Image_LoadRawImage
	.p2align	4, 0x90
_HPDF_Image_LoadRawImage:               ## @HPDF_Image_LoadRawImage
	.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	%r9, %rbx
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r14d
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movq	_HPDF_OK@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	leaq	L_.str(%rip), %rdi
	callq	_HPDF_PTRACE
	movq	_HPDF_CS_DEVICE_GRAY@GOTPCREL(%rip), %r12
	movq	_HPDF_CS_DEVICE_CMYK@GOTPCREL(%rip), %rcx
	cmpq	%rbx, (%r12)
	je	LBB0_5
## %bb.1:
	movq	_HPDF_CS_DEVICE_RGB@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	je	LBB0_5
## %bb.2:
	cmpq	%rbx, (%rcx)
	je	LBB0_5
## %bb.3:
	movq	_HPDF_INVALID_COLOR_SPACE@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%r13), %edi
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_HPDF_SetError
	jmp	LBB0_25
LBB0_5:
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_HPDF_DictStream_New
	testq	%rax, %rax
	je	LBB0_24
## %bb.6:
	movq	%rax, %r13
	movq	_HPDF_OSUBCLASS_XOBJECT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%r13)
	leaq	L_.str.1(%rip), %rsi
	leaq	L_.str.2(%rip), %rdx
	movq	%r13, %rdi
	callq	_HPDF_Dict_AddName
	movq	%rax, %r14
	addq	%r15, %r14
	leaq	L_.str.3(%rip), %rsi
	leaq	L_.str.4(%rip), %rdx
	movq	%r13, %rdi
	callq	_HPDF_Dict_AddName
	addq	%r14, %rax
	movq	_HPDF_OK@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_24
## %bb.7:
	cmpq	%rbx, (%r12)
	jne	LBB0_11
## %bb.8:
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %r14d
	imull	-44(%rbp), %r14d                ## 4-byte Folded Reload
	movq	_COL_GRAY@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_11:
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %r14d
	imull	-44(%rbp), %r14d                ## 4-byte Folded Reload
	movq	_HPDF_CS_DEVICE_CMYK@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jne	LBB0_13
## %bb.12:
	shll	$2, %r14d
	movq	_COL_CMYK@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_13:
	leal	(%r14,%r14,2), %r14d
	movq	_COL_RGB@GOTPCREL(%rip), %rax
LBB0_14:
	movq	(%rax), %rdx
	leaq	L_.str.5(%rip), %rsi
	movq	%r13, %rdi
	callq	_HPDF_Dict_AddName
	cmpq	(%r15), %rax
	jne	LBB0_24
## %bb.15:
	leaq	L_.str.6(%rip), %rsi
	movq	%r13, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_HPDF_Dict_AddNumber
	cmpq	(%r15), %rax
	jne	LBB0_24
## %bb.16:
	leaq	L_.str.7(%rip), %rsi
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	_HPDF_Dict_AddNumber
	cmpq	(%r15), %rax
	jne	LBB0_24
## %bb.17:
	leaq	L_.str.8(%rip), %rsi
	movq	%r13, %rdi
	movl	$8, %edx
	callq	_HPDF_Dict_AddNumber
	cmpq	(%r15), %rax
	jne	LBB0_24
## %bb.18:
	movq	8(%r13), %rsi
	xorl	%ebx, %ebx
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_HPDF_Stream_WriteToStream
	cmpq	(%r15), %rax
	jne	LBB0_25
## %bb.19:
	movq	8(%r13), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_26
## %bb.20:
	movq	%r13, %rbx
	jmp	LBB0_25
LBB0_24:
	xorl	%ebx, %ebx
LBB0_25:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	movq	_HPDF_INVALID_IMAGE@GOTPCREL(%rip), %rax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_HPDF_OK,8,3                    ## @HPDF_OK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" HPDF_Image_LoadRawImage\n"

	.comm	_HPDF_CS_DEVICE_GRAY,8,3        ## @HPDF_CS_DEVICE_GRAY
	.comm	_HPDF_CS_DEVICE_RGB,8,3         ## @HPDF_CS_DEVICE_RGB
	.comm	_HPDF_CS_DEVICE_CMYK,8,3        ## @HPDF_CS_DEVICE_CMYK
	.comm	_HPDF_INVALID_COLOR_SPACE,4,2   ## @HPDF_INVALID_COLOR_SPACE
	.comm	_HPDF_OSUBCLASS_XOBJECT,4,2     ## @HPDF_OSUBCLASS_XOBJECT
L_.str.1:                               ## @.str.1
	.asciz	"Type"

L_.str.2:                               ## @.str.2
	.asciz	"XObject"

L_.str.3:                               ## @.str.3
	.asciz	"Subtype"

L_.str.4:                               ## @.str.4
	.asciz	"Image"

L_.str.5:                               ## @.str.5
	.asciz	"ColorSpace"

	.comm	_COL_GRAY,8,3                   ## @COL_GRAY
	.comm	_COL_CMYK,8,3                   ## @COL_CMYK
	.comm	_COL_RGB,8,3                    ## @COL_RGB
L_.str.6:                               ## @.str.6
	.asciz	"Width"

L_.str.7:                               ## @.str.7
	.asciz	"Height"

L_.str.8:                               ## @.str.8
	.asciz	"BitsPerComponent"

	.comm	_HPDF_INVALID_IMAGE,4,2         ## @HPDF_INVALID_IMAGE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HPDF_Image_LoadRawImage        ; -- Begin function HPDF_Image_LoadRawImage
	.p2align	2
_HPDF_Image_LoadRawImage:               ; @HPDF_Image_LoadRawImage
	.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	x23, x5
	mov	x21, x4
	mov	x22, x3
	mov	x24, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x25, _HPDF_OK@GOTPAGE
Lloh1:
	ldr	x25, [x25, _HPDF_OK@GOTPAGEOFF]
	ldr	x28, [x25]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_HPDF_PTRACE
Lloh4:
	adrp	x27, _HPDF_CS_DEVICE_GRAY@GOTPAGE
Lloh5:
	ldr	x27, [x27, _HPDF_CS_DEVICE_GRAY@GOTPAGEOFF]
	ldr	x8, [x27]
Lloh6:
	adrp	x9, _HPDF_CS_DEVICE_RGB@GOTPAGE
Lloh7:
	ldr	x9, [x9, _HPDF_CS_DEVICE_RGB@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x26, _HPDF_CS_DEVICE_CMYK@GOTPAGE
Lloh10:
	ldr	x26, [x26, _HPDF_CS_DEVICE_CMYK@GOTPAGEOFF]
	ldr	x10, [x26]
	cmp	x8, x23
	ccmp	x9, x23, #4, ne
	ccmp	x10, x23, #4, ne
	b.ne	LBB0_5
; %bb.1:
	mov	x0, x19
	mov	x1, x24
	bl	_HPDF_DictStream_New
	cbz	x0, LBB0_8
; %bb.2:
	mov	x19, x0
Lloh11:
	adrp	x8, _HPDF_OSUBCLASS_XOBJECT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HPDF_OSUBCLASS_XOBJECT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	w9, [x0, #16]
	orr	w8, w9, w8
	str	w8, [x0, #16]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh16:
	adrp	x2, l_.str.2@PAGE
Lloh17:
	add	x2, x2, l_.str.2@PAGEOFF
	bl	_HPDF_Dict_AddName
	add	x24, x0, x28
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
Lloh20:
	adrp	x2, l_.str.4@PAGE
Lloh21:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_HPDF_Dict_AddName
	ldr	x8, [x25]
	add	x9, x24, x0
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.3:
	ldr	x8, [x27]
	cmp	x8, x23
	b.ne	LBB0_9
; %bb.4:
	mul	w23, w21, w22
Lloh22:
	adrp	x8, _COL_GRAY@GOTPAGE
Lloh23:
	ldr	x8, [x8, _COL_GRAY@GOTPAGEOFF]
	b	LBB0_10
LBB0_5:
Lloh24:
	adrp	x8, _HPDF_INVALID_COLOR_SPACE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _HPDF_INVALID_COLOR_SPACE@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x19]
	ldr	w1, [x8]
	mov	w2, #0
	bl	_HPDF_SetError
LBB0_7:
	mov	x0, #0
LBB0_8:
	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
LBB0_9:
	ldr	x8, [x26]
	mul	w9, w21, w22
	add	w10, w9, w9, lsl #1
Lloh26:
	adrp	x11, _COL_RGB@GOTPAGE
Lloh27:
	ldr	x11, [x11, _COL_RGB@GOTPAGEOFF]
	lsl	w9, w9, #2
Lloh28:
	adrp	x12, _COL_CMYK@GOTPAGE
Lloh29:
	ldr	x12, [x12, _COL_CMYK@GOTPAGEOFF]
	cmp	x8, x23
	csel	x8, x11, x12, ne
	csel	w23, w10, w9, ne
LBB0_10:
	ldr	x2, [x8]
Lloh30:
	adrp	x1, l_.str.5@PAGE
Lloh31:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_HPDF_Dict_AddName
	ldr	x8, [x25]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.11:
Lloh32:
	adrp	x1, l_.str.6@PAGE
Lloh33:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_HPDF_Dict_AddNumber
	ldr	x8, [x25]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.12:
Lloh34:
	adrp	x1, l_.str.7@PAGE
Lloh35:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_HPDF_Dict_AddNumber
	ldr	x8, [x25]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.13:
Lloh36:
	adrp	x1, l_.str.8@PAGE
Lloh37:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x19
	mov	w2, #8
	bl	_HPDF_Dict_AddNumber
	ldr	x8, [x25]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.14:
	ldr	x1, [x19, #8]
	mov	x0, x20
	mov	w2, #0
	mov	x3, #0
	bl	_HPDF_Stream_WriteToStream
	mov	x8, x0
	mov	x0, #0
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.15:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	cmp	w8, w23
	b.ne	LBB0_17
; %bb.16:
	mov	x0, x19
	b	LBB0_8
LBB0_17:
Lloh38:
	adrp	x8, _HPDF_INVALID_IMAGE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _HPDF_INVALID_IMAGE@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_HPDF_OK,8,3                    ; @HPDF_OK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" HPDF_Image_LoadRawImage\n"

	.comm	_HPDF_CS_DEVICE_GRAY,8,3        ; @HPDF_CS_DEVICE_GRAY
	.comm	_HPDF_CS_DEVICE_RGB,8,3         ; @HPDF_CS_DEVICE_RGB
	.comm	_HPDF_CS_DEVICE_CMYK,8,3        ; @HPDF_CS_DEVICE_CMYK
	.comm	_HPDF_INVALID_COLOR_SPACE,4,2   ; @HPDF_INVALID_COLOR_SPACE
	.comm	_HPDF_OSUBCLASS_XOBJECT,4,2     ; @HPDF_OSUBCLASS_XOBJECT
l_.str.1:                               ; @.str.1
	.asciz	"Type"

l_.str.2:                               ; @.str.2
	.asciz	"XObject"

l_.str.3:                               ; @.str.3
	.asciz	"Subtype"

l_.str.4:                               ; @.str.4
	.asciz	"Image"

l_.str.5:                               ; @.str.5
	.asciz	"ColorSpace"

	.comm	_COL_GRAY,8,3                   ; @COL_GRAY
	.comm	_COL_CMYK,8,3                   ; @COL_CMYK
	.comm	_COL_RGB,8,3                    ; @COL_RGB
l_.str.6:                               ; @.str.6
	.asciz	"Width"

l_.str.7:                               ; @.str.7
	.asciz	"Height"

l_.str.8:                               ; @.str.8
	.asciz	"BitsPerComponent"

	.comm	_HPDF_INVALID_IMAGE,4,2         ; @HPDF_INVALID_IMAGE
.subsections_via_symbols
