	.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	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	cmpl	$2, %edi
	je	LBB0_2
## %bb.1:
	movq	(%rbx), %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	$10, %edi
	callq	_putchar
	leaq	L_str.15(%rip), %rdi
	callq	_puts
LBB0_2:
	movq	8(%rbx), %r14
	movq	_G_FILE_TEST_IS_REGULAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_g_file_test
	testl	%eax, %eax
	je	LBB0_9
## %bb.3:
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	callq	_appimage_type2_digest_md5
	testl	%eax, %eax
	je	LBB0_10
## %bb.4:
	leaq	-48(%rbp), %rdi
	movl	$16, %esi
	callq	_appimage_hexlify
	movq	%rax, %rbx
	leaq	L_.str.5(%rip), %rdi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_printf
	movq	%rbx, %rdi
	callq	_free
	movq	$0, -72(%rbp)
	movq	$0, -80(%rbp)
	leaq	_main.section_name(%rip), %rsi
	leaq	-72(%rbp), %rdx
	leaq	-80(%rbp), %rcx
	movq	%r14, %rdi
	callq	_appimage_get_elf_section_offset_and_length
	testl	%eax, %eax
	je	LBB0_12
## %bb.5:
	cmpq	$0, -72(%rbp)
	je	LBB0_12
## %bb.6:
	movq	-80(%rbp), %r8
	testq	%r8, %r8
	je	LBB0_12
## %bb.7:
	cmpq	$15, %r8
	ja	LBB0_17
## %bb.8:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.7(%rip), %rsi
	leaq	_main.section_name(%rip), %rdx
	movl	$16, %ecx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_14
LBB0_9:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdx
	jmp	LBB0_13
LBB0_10:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
LBB0_11:
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_14
LBB0_12:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	leaq	_main.section_name(%rip), %rdx
LBB0_13:
	xorl	%eax, %eax
	callq	_fprintf
LBB0_14:
	movl	$1, %ebx
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_26
## %bb.16:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	leaq	L_.str.8(%rip), %rsi
	movq	%r14, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_20
## %bb.18:
	movq	%rax, %r14
	movq	-72(%rbp), %rsi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_fseek
	testq	%rax, %rax
	je	LBB0_21
## %bb.19:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.10(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	%r14, %rdi
	callq	_fclose
	jmp	LBB0_14
LBB0_20:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.9(%rip), %rsi
	jmp	LBB0_11
LBB0_21:
	leaq	-64(%rbp), %rdi
	movl	$1, %ebx
	movl	$1, %esi
	movl	$16, %edx
	movq	%r14, %rcx
	callq	_fread
	cmpl	$16, %eax
	jne	LBB0_24
## %bb.22:
	movq	%r14, %rdi
	callq	_fclose
	leaq	-64(%rbp), %r14
	movq	%r14, %rdi
	movl	$16, %esi
	callq	_appimage_hexlify
	movq	%rax, %r15
	leaq	L_.str.12(%rip), %rdi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_printf
	movq	%r15, %rdi
	callq	_free
	leaq	-48(%rbp), %rdi
	movq	%r14, %rsi
	movl	$16, %edx
	callq	_compare_byte_buffers
	testq	%rax, %rax
	je	LBB0_25
## %bb.23:
	leaq	L_str(%rip), %rdi
	callq	_puts
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_24:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.11(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	%r14, %rdi
	callq	_fclose
	jmp	LBB0_15
LBB0_25:
	leaq	L_.str.14(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_15
LBB0_26:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Usage: %s <my.AppImage>\n"

	.comm	_G_FILE_TEST_IS_REGULAR,4,2     ## @G_FILE_TEST_IS_REGULAR
	.comm	_stderr,4,2                     ## @stderr
L_.str.3:                               ## @.str.3
	.asciz	"No such file or directory: %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"Could not calculate MD5 digest\n"

L_.str.5:                               ## @.str.5
	.asciz	"calculated: %s\n"

	.section	__TEXT,__const
_main.section_name:                     ## @main.section_name
	.asciz	".digest_md5"

	.section	__TEXT,__cstring,cstring_literals
L_.str.6:                               ## @.str.6
	.asciz	"Could not find %s section in file\n"

L_.str.7:                               ## @.str.7
	.asciz	"Invalid section length for section %s: expected %d bytes, found %lu bytes\n"

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

L_.str.9:                               ## @.str.9
	.asciz	"Failed to open AppImage for writing"

	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
L_.str.10:                              ## @.str.10
	.asciz	"Failed to read embedded digest: failed to seek to offset\n"

L_.str.11:                              ## @.str.11
	.asciz	"Failed to read embedded digest: read invalid amount of bytes from file\n"

L_.str.12:                              ## @.str.12
	.asciz	"  embedded: %s\n"

L_.str.14:                              ## @.str.14
	.asciz	"Digests don't match!"

L_str:                                  ## @str
	.asciz	"Digests match"

L_str.15:                               ## @str.15
	.asciz	"Calculate AppImage MD5 digest, and compare it to embedded value (if available)"

.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, #112
	.cfi_def_cfa_offset 112
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	cmp	w0, #2
	b.eq	LBB0_2
; %bb.1:
	ldr	x8, [x19]
	str	x8, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	mov	w0, #10
	bl	_putchar
Lloh5:
	adrp	x0, l_str.15@PAGE
Lloh6:
	add	x0, x0, l_str.15@PAGEOFF
	bl	_puts
LBB0_2:
	ldr	x19, [x19, #8]
Lloh7:
	adrp	x8, _G_FILE_TEST_IS_REGULAR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _G_FILE_TEST_IS_REGULAR@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_g_file_test
	cbz	w0, LBB0_9
; %bb.3:
	sub	x1, x29, #40
	mov	x0, x19
	bl	_appimage_type2_digest_md5
	cbz	w0, LBB0_10
; %bb.4:
	sub	x0, x29, #40
	mov	w1, #16
	bl	_appimage_hexlify
	mov	x20, x0
	str	x0, [sp]
Lloh10:
	adrp	x0, l_.str.5@PAGE
Lloh11:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_printf
	mov	x0, x20
	bl	_free
	stp	xzr, xzr, [sp, #24]
Lloh12:
	adrp	x20, _main.section_name@PAGE
Lloh13:
	add	x20, x20, _main.section_name@PAGEOFF
	add	x2, sp, #32
	add	x3, sp, #24
	mov	x0, x19
	mov	x1, x20
	bl	_appimage_get_elf_section_offset_and_length
	cbz	w0, LBB0_11
; %bb.5:
	ldr	x8, [sp, #32]
	cbz	x8, LBB0_11
; %bb.6:
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_11
; %bb.7:
	cmp	x8, #15
	b.hi	LBB0_12
; %bb.8:
Lloh14:
	adrp	x9, _stderr@GOTPAGE
Lloh15:
	ldr	x9, [x9, _stderr@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x9]
	str	x8, [sp, #16]
	mov	w8, #16
	stp	x20, x8, [sp]
Lloh17:
	adrp	x1, l_.str.7@PAGE
Lloh18:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_fprintf
	b	LBB0_21
LBB0_9:
Lloh19:
	adrp	x8, _stderr@GOTPAGE
Lloh20:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_fprintf
	b	LBB0_21
LBB0_10:
Lloh24:
	adrp	x8, _stderr@GOTPAGE
Lloh25:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
Lloh27:
	adrp	x1, l_.str.4@PAGE
Lloh28:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fprintf
	b	LBB0_21
LBB0_11:
Lloh29:
	adrp	x8, _stderr@GOTPAGE
Lloh30:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	str	x20, [sp]
Lloh32:
	adrp	x1, l_.str.6@PAGE
Lloh33:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_fprintf
	b	LBB0_21
LBB0_12:
Lloh34:
	adrp	x1, l_.str.8@PAGE
Lloh35:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x19
	bl	_fopen
	cbz	x0, LBB0_15
; %bb.13:
	mov	x19, x0
	ldr	x1, [sp, #32]
Lloh36:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh37:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x8]
	bl	_fseek
	cbz	x0, LBB0_16
; %bb.14:
Lloh39:
	adrp	x8, _stderr@GOTPAGE
Lloh40:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x8]
Lloh42:
	adrp	x1, l_.str.10@PAGE
Lloh43:
	add	x1, x1, l_.str.10@PAGEOFF
	b	LBB0_20
LBB0_15:
Lloh44:
	adrp	x8, _stderr@GOTPAGE
Lloh45:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh46:
	ldr	w0, [x8]
Lloh47:
	adrp	x1, l_.str.9@PAGE
Lloh48:
	add	x1, x1, l_.str.9@PAGEOFF
	bl	_fprintf
	b	LBB0_21
LBB0_16:
	add	x0, sp, #40
	mov	w1, #1
	mov	w2, #16
	mov	x3, x19
	bl	_fread
	cmp	w0, #16
	b.ne	LBB0_19
; %bb.17:
	mov	x0, x19
	bl	_fclose
	add	x0, sp, #40
	mov	w1, #16
	bl	_appimage_hexlify
	mov	x19, x0
	str	x0, [sp]
Lloh49:
	adrp	x0, l_.str.12@PAGE
Lloh50:
	add	x0, x0, l_.str.12@PAGEOFF
	bl	_printf
	mov	x0, x19
	bl	_free
	sub	x0, x29, #40
	add	x1, sp, #40
	mov	w2, #16
	bl	_compare_byte_buffers
	cbz	x0, LBB0_24
; %bb.18:
Lloh51:
	adrp	x0, l_str@PAGE
Lloh52:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	mov	w0, #0
	b	LBB0_22
LBB0_19:
Lloh53:
	adrp	x8, _stderr@GOTPAGE
Lloh54:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh55:
	ldr	w0, [x8]
Lloh56:
	adrp	x1, l_.str.11@PAGE
Lloh57:
	add	x1, x1, l_.str.11@PAGEOFF
LBB0_20:
	bl	_fprintf
	mov	x0, x19
	bl	_fclose
LBB0_21:
	mov	w0, #1
LBB0_22:
	ldur	x8, [x29, #-24]
Lloh58:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh59:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh60:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.23:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_24:
Lloh61:
	adrp	x0, l_.str.14@PAGE
Lloh62:
	add	x0, x0, l_.str.14@PAGEOFF
	bl	_printf
	b	LBB0_21
LBB0_25:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpAdd	Lloh61, Lloh62
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Usage: %s <my.AppImage>\n"

	.comm	_G_FILE_TEST_IS_REGULAR,4,2     ; @G_FILE_TEST_IS_REGULAR
	.comm	_stderr,4,2                     ; @stderr
l_.str.3:                               ; @.str.3
	.asciz	"No such file or directory: %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"Could not calculate MD5 digest\n"

l_.str.5:                               ; @.str.5
	.asciz	"calculated: %s\n"

	.section	__TEXT,__const
_main.section_name:                     ; @main.section_name
	.asciz	".digest_md5"

	.section	__TEXT,__cstring,cstring_literals
l_.str.6:                               ; @.str.6
	.asciz	"Could not find %s section in file\n"

l_.str.7:                               ; @.str.7
	.asciz	"Invalid section length for section %s: expected %d bytes, found %lu bytes\n"

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

l_.str.9:                               ; @.str.9
	.asciz	"Failed to open AppImage for writing"

	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
l_.str.10:                              ; @.str.10
	.asciz	"Failed to read embedded digest: failed to seek to offset\n"

l_.str.11:                              ; @.str.11
	.asciz	"Failed to read embedded digest: read invalid amount of bytes from file\n"

l_.str.12:                              ; @.str.12
	.asciz	"  embedded: %s\n"

l_.str.14:                              ; @.str.14
	.asciz	"Digests don't match!"

l_str:                                  ; @str
	.asciz	"Digests match"

l_str.15:                               ; @str.15
	.asciz	"Calculate AppImage MD5 digest, and compare it to embedded value (if available)"

.subsections_via_symbols
