	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movl	%edi, %r14d
	movq	_MAXSIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_MODE_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%edi, %edi
	callq	_assert
	xorl	%edi, %edi
	callq	_assert
	xorl	%eax, %eax
	callq	_set_source_date_epoch
	leaq	L_.str(%rip), %r12
	leaq	LJTI0_0(%rip), %rbx
	xorl	%eax, %eax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_optarg@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r14d, %edi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	_getopt
                                        ## kill: def $eax killed $eax def $rax
	leal	-102(%rax), %ecx
	cmpl	$16, %ecx
	ja	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=2
	movslq	(%rbx,%rcx,4), %rax
	addq	%rbx, %rax
	jmpq	*%rax
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=2
	movq	_MODE_UIMAGE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=2
	movl	$1, %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_errx
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=2
	movq	_MODE_KR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_optarg@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=2
	movq	_MODE_UIMAGE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	$1, %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_errx
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=2
	movq	_MODE_KR@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=2
	movq	_optarg@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.18:                              ##   in Loop: Header=BB0_2 Depth=2
	leaq	-136(%rbp), %rsi
	movl	$10, %edx
	callq	_strtoimax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=2
	movq	_MODE_KR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=2
	movl	$1, %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_errx
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=2
	movq	_MODE_UIMAGE@GOTPCREL(%rip), %rax
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=2
	movl	(%rax), %r15d
	movq	_optarg@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
LBB0_19:                                ##   in Loop: Header=BB0_2 Depth=2
	movq	_optarg@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	jmp	LBB0_2
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=2
	cmpl	$-1, %eax
	je	LBB0_20
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=2
	xorl	%eax, %eax
	callq	_usage
	jmp	LBB0_2
LBB0_20:
	movq	_optind@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpl	%r14d, %eax
	je	LBB0_22
## %bb.21:
	movq	(%r13,%rax,8), %rdx
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_22:
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	testq	%r14, %r14
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_24
## %bb.23:
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_24:
	movq	_MODE_UNKNOWN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_26
## %bb.25:
	leaq	L_.str.6(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_26:
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
	movq	_MODE_KR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_31
## %bb.27:
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_29
## %bb.28:
	testq	%rbx, %rbx
	jne	LBB0_30
LBB0_29:
	leaq	L_.str.7(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_30:
	leaq	-72(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_opensize
	movl	%eax, -92(%rbp)                 ## 4-byte Spill
LBB0_31:
	leaq	-80(%rbp), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_opensize
	movl	%eax, -96(%rbp)                 ## 4-byte Spill
	movq	-80(%rbp), %r12
	movq	_MODE_UIMAGE@GOTPCREL(%rip), %rax
	movl	%r15d, -100(%rbp)               ## 4-byte Spill
	cmpl	(%rax), %r15d
	jne	LBB0_33
## %bb.32:
	leaq	4(%r12), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	addq	$8, %r12
	movl	$4, %r15d
                                        ## implicit-def: $rax
                                        ## kill: killed $rax
	jmp	LBB0_34
LBB0_33:
	leaq	8(%r12), %rax
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	movq	-72(%rbp), %rax
	leaq	(%r12,%rax), %rcx
	addq	$4, %rcx
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	addq	%rax, %r12
	addq	$8, %r12
	movl	$8, %r15d
LBB0_34:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	cmpq	%rcx, %r12
	jbe	LBB0_36
## %bb.35:
	leaq	L_.str.8(%rip), %rsi
	movl	$1, %edi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_errx
LBB0_36:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_O_TRUNC@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%r14, %rdi
	movl	$420, %edx                      ## imm = 0x1A4
	callq	_open
	movl	%eax, %r13d
	testl	%eax, %eax
	jns	LBB0_38
## %bb.37:
	leaq	L_.str.9(%rip), %rsi
	movl	$1, %edi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_err
LBB0_38:
	movl	%r13d, %edi
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_ftruncate
	cmpl	$-1, %eax
	jne	LBB0_40
## %bb.39:
	leaq	L_.str.10(%rip), %rsi
	movl	$1, %edi
	movq	%r14, %rdx
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_err
LBB0_40:
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movq	_PROT_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_MAP_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%edi, %edi
	movq	%r12, %rsi
	movl	%r13d, %r8d
	xorl	%r9d, %r9d
	callq	_mmap
	movq	%rax, %r14
	movq	_MAP_FAILED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_42
## %bb.41:
	leaq	L_.str.11(%rip), %rsi
	movl	$1, %edi
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_err
LBB0_42:
	addq	%r14, %r15
	movq	-80(%rbp), %rdx
	movl	-96(%rbp), %edi                 ## 4-byte Reload
	movq	%r15, %rsi
	callq	_read
	cmpq	-80(%rbp), %rax
	movl	-92(%rbp), %ebx                 ## 4-byte Reload
	je	LBB0_44
## %bb.43:
	leaq	L_.str.12(%rip), %rsi
	movl	$1, %edi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_err
LBB0_44:
	movq	_MODE_KR@GOTPCREL(%rip), %rax
	movl	-100(%rbp), %ecx                ## 4-byte Reload
	cmpl	(%rax), %ecx
	movq	-112(%rbp), %r12                ## 8-byte Reload
	jne	LBB0_48
## %bb.45:
	leaq	4(%r14), %r15
	movq	-128(%rbp), %rsi                ## 8-byte Reload
	addq	%r14, %rsi
	movq	-72(%rbp), %rdx
	movl	%ebx, %edi
	callq	_read
	cmpq	-72(%rbp), %rax
	je	LBB0_47
## %bb.46:
	leaq	L_.str.12(%rip), %rsi
	movl	$1, %edi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_err
	movq	-72(%rbp), %rax
LBB0_47:
	movq	-80(%rbp), %rsi
	movq	%r15, %rdi
	movq	%rax, %rdx
	callq	_mkuheader
	jmp	LBB0_50
LBB0_48:
	movq	_MODE_UIMAGE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_50
## %bb.49:
	movl	4(%r14), %edi
	callq	_ntohl
	movq	%r14, %rsi
	addq	$8, %rsi
	leaq	-4(%r12), %rdx
	movl	%eax, %edi
	callq	_craftcrc
LBB0_50:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	-120(%rbp), %rdx                ## 8-byte Reload
	callq	_mkjcgheader
	movq	%r14, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_munmap
	movl	%r13d, %edi
	callq	_close
	xorl	%eax, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
LJTI0_0:
	.long	L0_0_set_11
	.long	L0_0_set_4
	.long	L0_0_set_4
	.long	L0_0_set_4
	.long	L0_0_set_4
	.long	L0_0_set_7
	.long	L0_0_set_4
	.long	L0_0_set_17
	.long	L0_0_set_4
	.long	L0_0_set_6
	.long	L0_0_set_4
	.long	L0_0_set_4
	.long	L0_0_set_4
	.long	L0_0_set_4
	.long	L0_0_set_4
	.long	L0_0_set_14
	.long	L0_0_set_19
	.end_data_region
                                        ## -- End function
	.comm	_MAXSIZE,8,3                    ## @MAXSIZE
	.comm	_MODE_UNKNOWN,4,2               ## @MODE_UNKNOWN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"o:k:f:u:v:m:h"

	.comm	_optarg,8,3                     ## @optarg
	.comm	_MODE_UIMAGE,4,2                ## @MODE_UIMAGE
L_.str.1:                               ## @.str.1
	.asciz	"-k cannot be combined with -u"

	.comm	_MODE_KR,4,2                    ## @MODE_KR
L_.str.2:                               ## @.str.2
	.asciz	"-f cannot be combined with -u"

L_.str.3:                               ## @.str.3
	.asciz	"-u cannot be combined with -k and -r"

	.comm	_optind,4,2                     ## @optind
L_.str.4:                               ## @.str.4
	.asciz	"illegal arg \"%s\""

L_.str.5:                               ## @.str.5
	.asciz	"no output file specified"

L_.str.6:                               ## @.str.6
	.asciz	"specify either -u or -k and -r"

L_.str.7:                               ## @.str.7
	.asciz	"need -k and -r"

L_.str.8:                               ## @.str.8
	.asciz	"payload too large: %zd > %zd\n"

	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
L_.str.9:                               ## @.str.9
	.asciz	"cannot open \"%s\""

L_.str.10:                              ## @.str.10
	.asciz	"cannot grow \"%s\" to %zd bytes"

	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_MAP_SHARED,4,2                 ## @MAP_SHARED
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
L_.str.11:                              ## @.str.11
	.asciz	"cannot mmap \"%s\""

L_.str.12:                              ## @.str.12
	.asciz	"cannot copy %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x24, x1
	mov	x25, x0
Lloh0:
	adrp	x8, _MAXSIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAXSIZE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #32]                   ; 8-byte Folded Spill
Lloh3:
	adrp	x8, _MODE_UNKNOWN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MODE_UNKNOWN@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	mov	w0, #0
	bl	_assert
	mov	w0, #0
	bl	_assert
	bl	_set_source_date_epoch
	stp	xzr, xzr, [sp, #40]             ; 16-byte Folded Spill
	mov	x22, #0
	mov	x21, #0
Lloh6:
	adrp	x26, l_.str@PAGE
Lloh7:
	add	x26, x26, l_.str@PAGEOFF
Lloh8:
	adrp	x19, lJTI0_0@PAGE
Lloh9:
	add	x19, x19, lJTI0_0@PAGEOFF
Lloh10:
	adrp	x28, _MODE_UIMAGE@GOTPAGE
Lloh11:
	ldr	x28, [x28, _MODE_UIMAGE@GOTPAGEOFF]
Lloh12:
	adrp	x27, _MODE_KR@GOTPAGE
Lloh13:
	ldr	x27, [x27, _MODE_KR@GOTPAGEOFF]
Lloh14:
	adrp	x20, _optarg@GOTPAGE
Lloh15:
	ldr	x20, [x20, _optarg@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x20]
	str	x8, [sp, #40]                   ; 8-byte Folded Spill
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x25
	mov	x1, x24
	mov	x2, x26
	bl	_getopt
	sub	w8, w0, #102
	cmp	w8, #16
	b.hi	LBB0_16
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	adr	x9, LBB0_1
	ldrb	w10, [x19, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x28]
	cmp	w23, w8
	b.ne	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_errx
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w23, [x27]
	ldr	x8, [x20]
	str	x8, [sp, #48]                   ; 8-byte Folded Spill
	b	LBB0_2
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x28]
	cmp	w23, w8
	b.ne	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_errx
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w23, [x27]
	ldr	x22, [x20]
	b	LBB0_2
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x20]
	cbz	x0, LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	add	x1, sp, #72
	mov	w2, #10
	bl	_strtoimax
	str	x0, [sp, #32]                   ; 8-byte Folded Spill
	b	LBB0_2
LBB0_12:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x21, [x20]
	b	LBB0_2
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x27]
	cmp	w23, w8
	b.ne	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_errx
LBB0_15:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w23, [x28]
	ldr	x22, [x20]
	b	LBB0_2
LBB0_16:                                ;   in Loop: Header=BB0_2 Depth=1
	cmn	w0, #1
	b.eq	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_usage
	b	LBB0_2
LBB0_18:
Lloh22:
	adrp	x8, _optind@GOTPAGE
Lloh23:
	ldr	x8, [x8, _optind@GOTPAGEOFF]
Lloh24:
	ldrsw	x8, [x8]
	cmp	w8, w25
	b.eq	LBB0_20
; %bb.19:
	ldr	x8, [x24, x8, lsl #3]
	str	x8, [sp]
Lloh25:
	adrp	x1, l_.str.4@PAGE
Lloh26:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_20:
	cbnz	x21, LBB0_22
; %bb.21:
Lloh27:
	adrp	x1, l_.str.5@PAGE
Lloh28:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_22:
Lloh29:
	adrp	x8, _MODE_UNKNOWN@GOTPAGE
Lloh30:
	ldr	x8, [x8, _MODE_UNKNOWN@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	cmp	w23, w8
	b.ne	LBB0_24
; %bb.23:
Lloh32:
	adrp	x1, l_.str.6@PAGE
Lloh33:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_24:
	ldr	w8, [x27]
                                        ; implicit-def: $w0
                                        ; kill: killed $w0
	cmp	w23, w8
	b.ne	LBB0_29
; %bb.25:
	cbz	x22, LBB0_27
; %bb.26:
	ldr	x8, [sp, #48]                   ; 8-byte Folded Reload
	cbnz	x8, LBB0_28
LBB0_27:
Lloh34:
	adrp	x1, l_.str.7@PAGE
Lloh35:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_28:
	add	x1, sp, #56
	ldr	x0, [sp, #48]                   ; 8-byte Folded Reload
	bl	_opensize
	str	w0, [sp, #24]                   ; 4-byte Folded Spill
LBB0_29:
	add	x1, sp, #64
	mov	x0, x22
	bl	_opensize
	str	w0, [sp, #28]                   ; 4-byte Folded Spill
	ldr	w9, [x28]
	ldr	x8, [sp, #64]
	cmp	w23, w9
	b.ne	LBB0_31
; %bb.30:
	add	x19, x8, #4
	add	x24, x8, #8
	mov	w20, #4
                                        ; implicit-def: $x8
                                        ; kill: killed $x8
	b	LBB0_32
LBB0_31:
	add	x9, x8, #8
	str	x9, [sp, #16]                   ; 8-byte Folded Spill
	ldr	x9, [sp, #56]
	add	x8, x8, x9
	add	x19, x8, #4
	add	x24, x8, #8
	mov	w20, #8
LBB0_32:
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	cmp	x24, x8
	b.ls	LBB0_34
; %bb.33:
	stp	x24, x8, [sp]
Lloh36:
	adrp	x1, l_.str.8@PAGE
Lloh37:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_34:
Lloh38:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh39:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
Lloh41:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh42:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh44:
	adrp	x9, _O_TRUNC@GOTPAGE
Lloh45:
	ldr	x9, [x9, _O_TRUNC@GOTPAGEOFF]
Lloh46:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	x0, x21
	mov	w2, #420
	bl	_open
	mov	x25, x0
	tbz	w0, #31, LBB0_36
; %bb.35:
Lloh47:
	adrp	x1, l_.str.9@PAGE
Lloh48:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	w0, #1
	mov	x2, x21
	bl	_err
LBB0_36:
	mov	x0, x25
	mov	x1, x24
	bl	_ftruncate
	cmn	w0, #1
	b.ne	LBB0_38
; %bb.37:
	str	x24, [sp]
Lloh49:
	adrp	x1, l_.str.10@PAGE
Lloh50:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	w0, #1
	mov	x2, x21
	bl	_err
LBB0_38:
Lloh51:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh52:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh53:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh54:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
Lloh55:
	ldr	w8, [x8]
Lloh56:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh57:
	adrp	x8, _MAP_SHARED@GOTPAGE
Lloh58:
	ldr	x8, [x8, _MAP_SHARED@GOTPAGEOFF]
Lloh59:
	ldr	w3, [x8]
	mov	x0, #0
	mov	x1, x24
	mov	x4, x25
	mov	w5, #0
	bl	_mmap
	mov	x26, x0
Lloh60:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh61:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh62:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_40
; %bb.39:
Lloh63:
	adrp	x1, l_.str.11@PAGE
Lloh64:
	add	x1, x1, l_.str.11@PAGEOFF
	mov	w0, #1
	mov	x2, x21
	bl	_err
LBB0_40:
	add	x1, x26, x20
	ldr	x2, [sp, #64]
	ldr	w0, [sp, #28]                   ; 4-byte Folded Reload
	bl	_read
	ldr	x8, [sp, #64]
	cmp	x0, x8
	b.eq	LBB0_42
; %bb.41:
Lloh65:
	adrp	x1, l_.str.12@PAGE
Lloh66:
	add	x1, x1, l_.str.12@PAGEOFF
	mov	w0, #1
	mov	x2, x22
	bl	_err
LBB0_42:
	ldr	w8, [x27]
	cmp	w23, w8
	b.ne	LBB0_46
; %bb.43:
	add	x21, x26, #4
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	add	x1, x26, x8
	ldr	x2, [sp, #56]
	ldr	w0, [sp, #24]                   ; 4-byte Folded Reload
	bl	_read
	mov	x2, x0
	ldr	x8, [sp, #56]
	cmp	x0, x8
	b.eq	LBB0_45
; %bb.44:
Lloh67:
	adrp	x1, l_.str.12@PAGE
Lloh68:
	add	x1, x1, l_.str.12@PAGEOFF
	mov	w0, #1
	ldr	x2, [sp, #48]                   ; 8-byte Folded Reload
	bl	_err
	ldr	x2, [sp, #56]
LBB0_45:
	ldr	x1, [sp, #64]
	mov	x0, x21
	bl	_mkuheader
	b	LBB0_48
LBB0_46:
	ldr	w8, [x28]
	cmp	w23, w8
	b.ne	LBB0_48
; %bb.47:
	ldr	w0, [x26, #4]
	bl	_ntohl
	add	x1, x26, #8
	sub	x2, x19, #4
	bl	_craftcrc
LBB0_48:
	mov	x0, x26
	mov	x1, x19
	ldr	x2, [sp, #40]                   ; 8-byte Folded Reload
	bl	_mkjcgheader
	mov	x0, x26
	mov	x1, x24
	bl	_munmap
	mov	x0, x25
	bl	_close
	mov	w0, #0
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh55
	.loh AdrpAdd	Lloh63, Lloh64
	.loh AdrpAdd	Lloh65, Lloh66
	.loh AdrpAdd	Lloh67, Lloh68
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_1)>>2
	.byte	(LBB0_17-LBB0_1)>>2
	.byte	(LBB0_17-LBB0_1)>>2
	.byte	(LBB0_17-LBB0_1)>>2
	.byte	(LBB0_17-LBB0_1)>>2
	.byte	(LBB0_7-LBB0_1)>>2
	.byte	(LBB0_17-LBB0_1)>>2
	.byte	(LBB0_10-LBB0_1)>>2
	.byte	(LBB0_17-LBB0_1)>>2
	.byte	(LBB0_12-LBB0_1)>>2
	.byte	(LBB0_17-LBB0_1)>>2
	.byte	(LBB0_17-LBB0_1)>>2
	.byte	(LBB0_17-LBB0_1)>>2
	.byte	(LBB0_17-LBB0_1)>>2
	.byte	(LBB0_17-LBB0_1)>>2
	.byte	(LBB0_13-LBB0_1)>>2
	.byte	(LBB0_1-LBB0_1)>>2
                                        ; -- End function
	.comm	_MAXSIZE,8,3                    ; @MAXSIZE
	.comm	_MODE_UNKNOWN,4,2               ; @MODE_UNKNOWN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"o:k:f:u:v:m:h"

	.comm	_optarg,8,3                     ; @optarg
	.comm	_MODE_UIMAGE,4,2                ; @MODE_UIMAGE
l_.str.1:                               ; @.str.1
	.asciz	"-k cannot be combined with -u"

	.comm	_MODE_KR,4,2                    ; @MODE_KR
l_.str.2:                               ; @.str.2
	.asciz	"-f cannot be combined with -u"

l_.str.3:                               ; @.str.3
	.asciz	"-u cannot be combined with -k and -r"

	.comm	_optind,4,2                     ; @optind
l_.str.4:                               ; @.str.4
	.asciz	"illegal arg \"%s\""

l_.str.5:                               ; @.str.5
	.asciz	"no output file specified"

l_.str.6:                               ; @.str.6
	.asciz	"specify either -u or -k and -r"

l_.str.7:                               ; @.str.7
	.asciz	"need -k and -r"

l_.str.8:                               ; @.str.8
	.asciz	"payload too large: %zd > %zd\n"

	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
l_.str.9:                               ; @.str.9
	.asciz	"cannot open \"%s\""

l_.str.10:                              ; @.str.10
	.asciz	"cannot grow \"%s\" to %zd bytes"

	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_MAP_SHARED,4,2                 ; @MAP_SHARED
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
l_.str.11:                              ; @.str.11
	.asciz	"cannot mmap \"%s\""

l_.str.12:                              ; @.str.12
	.asciz	"cannot copy %s"

.subsections_via_symbols
