	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wrgg_fix_md5                   ## -- Begin function wrgg_fix_md5
	.p2align	4, 0x90
_wrgg_fix_md5:                          ## @wrgg_fix_md5
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movq	%rdx, %r12
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rcx, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movl	%ebx, %edi
	movq	%rax, %rsi
	movq	%r13, %rdx
	movq	%r12, %rcx
	callq	_pread
	cmpq	%r13, %rax
	jne	LBB0_3
## %bb.4:
	leaq	-68(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_MD5_Init
	leaq	16(%r15), %rsi
	movl	$4, %edx
	movq	%rbx, %rdi
	callq	_MD5_Update
	leaq	12(%r15), %rsi
	movl	$4, %edx
	movq	%rbx, %rdi
	callq	_MD5_Update
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_MD5_Update
	leaq	-64(%rbp), %r12
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_MD5_Final
	movl	8(%r15), %esi
	movq	%r12, %rdi
	movl	$16, %edx
	callq	_memcmp
	movq	_quiet@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %eax
	je	LBB0_5
## %bb.7:
	cmpl	$1, %ecx
	jg	LBB0_9
## %bb.8:
	movq	_stderr@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	movzbl	-64(%rbp), %edx
	leaq	L_.str.3(%rip), %r12
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	movzbl	-63(%rbp), %edx
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	movzbl	-62(%rbp), %edx
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	movzbl	-61(%rbp), %edx
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	movzbl	-60(%rbp), %edx
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	movzbl	-59(%rbp), %edx
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	movzbl	-58(%rbp), %edx
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	movzbl	-57(%rbp), %edx
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	movzbl	-56(%rbp), %edx
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	movzbl	-55(%rbp), %edx
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	movzbl	-54(%rbp), %edx
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	movzbl	-53(%rbp), %edx
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	movzbl	-52(%rbp), %edx
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	movzbl	-51(%rbp), %edx
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	movzbl	-50(%rbp), %edx
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	movzbl	-49(%rbp), %edx
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_9:
	movq	%r13, (%r15)
	movl	8(%r15), %edi
	leaq	-64(%rbp), %rsi
	movl	$16, %edx
	callq	_memcpy
	xorl	%ebx, %ebx
LBB0_10:
	movq	%r14, %rdi
	callq	_free
	jmp	LBB0_11
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_5:
	movl	$-1, %ebx
	cmpl	$1, %ecx
	jg	LBB0_11
## %bb.6:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	_perror
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pread"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_quiet,4,2                      ## @quiet
	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"the header is fixed already\n"

L_.str.2:                               ## @.str.2
	.asciz	"new size:%u, new MD5: "

L_.str.3:                               ## @.str.3
	.asciz	"%02x"

L_.str.4:                               ## @.str.4
	.asciz	"\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wrgg_fix_md5                   ; -- Begin function wrgg_fix_md5
	.p2align	2
_wrgg_fix_md5:                          ; @wrgg_fix_md5
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x3
	mov	x22, x2
	mov	x23, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	mov	x0, x3
	bl	_malloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	mov	x0, x23
	mov	x1, x19
	mov	x2, x20
	mov	x3, x22
	bl	_pread
	cmp	x0, x20
	b.ne	LBB0_13
; %bb.2:
	add	x0, sp, #20
	bl	_MD5_Init
	add	x1, x21, #16
	add	x0, sp, #20
	mov	w2, #4
	bl	_MD5_Update
	add	x1, x21, #12
	add	x0, sp, #20
	mov	w2, #4
	bl	_MD5_Update
	add	x0, sp, #20
	mov	x1, x19
	mov	x2, x20
	bl	_MD5_Update
	add	x0, sp, #24
	add	x1, sp, #20
	bl	_MD5_Final
	ldr	w1, [x21, #8]
	add	x0, sp, #24
	mov	w2, #16
	bl	_memcmp
Lloh3:
	adrp	x8, _quiet@GOTPAGE
Lloh4:
	ldr	x8, [x8, _quiet@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, #1
	cbz	w0, LBB0_8
; %bb.3:
	b.gt	LBB0_5
; %bb.4:
Lloh6:
	adrp	x23, _stderr@GOTPAGE
Lloh7:
	ldr	x23, [x23, _stderr@GOTPAGEOFF]
	ldr	w0, [x23]
	str	x20, [sp]
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fprintf
	ldr	w0, [x23]
	ldrb	w8, [sp, #24]
	str	x8, [sp]
Lloh10:
	adrp	x22, l_.str.3@PAGE
Lloh11:
	add	x22, x22, l_.str.3@PAGEOFF
	mov	x1, x22
	bl	_fprintf
	ldr	w0, [x23]
	ldrb	w8, [sp, #25]
	str	x8, [sp]
	mov	x1, x22
	bl	_fprintf
	ldr	w0, [x23]
	ldrb	w8, [sp, #26]
	str	x8, [sp]
	mov	x1, x22
	bl	_fprintf
	ldr	w0, [x23]
	ldrb	w8, [sp, #27]
	str	x8, [sp]
	mov	x1, x22
	bl	_fprintf
	ldr	w0, [x23]
	ldrb	w8, [sp, #28]
	str	x8, [sp]
	mov	x1, x22
	bl	_fprintf
	ldr	w0, [x23]
	ldrb	w8, [sp, #29]
	str	x8, [sp]
	mov	x1, x22
	bl	_fprintf
	ldr	w0, [x23]
	ldrb	w8, [sp, #30]
	str	x8, [sp]
	mov	x1, x22
	bl	_fprintf
	ldr	w0, [x23]
	ldrb	w8, [sp, #31]
	str	x8, [sp]
	mov	x1, x22
	bl	_fprintf
	ldr	w0, [x23]
	ldrb	w8, [sp, #32]
	str	x8, [sp]
	mov	x1, x22
	bl	_fprintf
	ldr	w0, [x23]
	ldrb	w8, [sp, #33]
	str	x8, [sp]
	mov	x1, x22
	bl	_fprintf
	ldr	w0, [x23]
	ldrb	w8, [sp, #34]
	str	x8, [sp]
	mov	x1, x22
	bl	_fprintf
	ldr	w0, [x23]
	ldrb	w8, [sp, #35]
	str	x8, [sp]
	mov	x1, x22
	bl	_fprintf
	ldr	w0, [x23]
	ldrb	w8, [sp, #36]
	str	x8, [sp]
	mov	x1, x22
	bl	_fprintf
	ldr	w0, [x23]
	ldrb	w8, [sp, #37]
	str	x8, [sp]
	mov	x1, x22
	bl	_fprintf
	ldr	w0, [x23]
	ldrb	w8, [sp, #38]
	str	x8, [sp]
	mov	x1, x22
	bl	_fprintf
	ldr	w0, [x23]
	ldrb	w8, [sp, #39]
	str	x8, [sp]
	mov	x1, x22
	bl	_fprintf
	ldr	w0, [x23]
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fprintf
LBB0_5:
	str	x20, [x21]
	ldr	w0, [x21, #8]
	add	x1, sp, #24
	mov	w2, #16
	bl	_memcpy
	mov	w20, #0
LBB0_6:
	mov	x0, x19
	bl	_free
	b	LBB0_11
LBB0_7:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_11
LBB0_8:
	b.gt	LBB0_10
; %bb.9:
Lloh17:
	adrp	x8, _stderr@GOTPAGE
Lloh18:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
LBB0_10:
	mov	w20, #-1
LBB0_11:
	ldr	x8, [sp, #40]
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_14
; %bb.12:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_13:
Lloh25:
	adrp	x0, l_.str@PAGE
Lloh26:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror
Lloh27:
	adrp	x8, _EIO@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_6
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pread"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_quiet,4,2                      ; @quiet
	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"the header is fixed already\n"

l_.str.2:                               ; @.str.2
	.asciz	"new size:%u, new MD5: "

l_.str.3:                               ; @.str.3
	.asciz	"%02x"

l_.str.4:                               ; @.str.4
	.asciz	"\n"

.subsections_via_symbols
