	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_prga                       ## -- Begin function set_prga
	.p2align	4, 0x90
_set_prga:                              ## @set_prga
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	_prgainfo@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	je	LBB0_2
## %bb.1:
	movq	8(%r13), %rdi
	callq	_free
LBB0_2:
	movl	%r15d, %edi
	callq	_malloc
	movq	%rax, 8(%r13)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	%r15d, (%r13)
	movq	16(%r13), %rdi
	movq	%r12, %rsi
	movl	$3, %edx
	callq	_memcpy
	testl	%r15d, %r15d
	jle	LBB0_17
## %bb.5:
	movl	%r15d, %esi
	cmpl	$1, %r15d
	jne	LBB0_7
## %bb.6:
	xorl	%eax, %eax
LBB0_13:
	testb	$1, %sil
	je	LBB0_17
## %bb.14:
	movb	(%r14,%rax), %cl
	testq	%rbx, %rbx
	je	LBB0_16
## %bb.15:
	xorb	(%rbx,%rax), %cl
LBB0_16:
	movq	8(%r13), %rdx
	movb	%cl, (%rdx,%rax)
LBB0_17:
	movl	(%r13), %esi
	movq	16(%r13), %rax
	movzbl	(%rax), %edx
	movzbl	1(%rax), %ecx
	movzbl	2(%rax), %r8d
	leaq	L_.str.1(%rip), %rdi
	callq	_time_print
	movq	8(%r13), %rdi
	movl	(%r13), %esi
	callq	_hexdump
	testq	%rbx, %rbx
	je	LBB0_26
## %bb.18:
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_S_IRUSR@GOTPCREL(%rip), %rax
	movq	_S_IWUSR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_PRGA_FILE@GOTPCREL(%rip), %rax
	movq	_S_IRGRP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movl	(%rax), %edi
	movq	_S_IROTH@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_19
## %bb.20:
	movl	%eax, %ebx
	movq	16(%r13), %rsi
	movl	%eax, %edi
	movl	$3, %edx
	callq	_write
	cmpl	$3, %eax
	jne	LBB0_21
## %bb.24:
	movq	8(%r13), %rsi
	movl	(%r13), %edx
	movl	%ebx, %edi
	callq	_write
	cmpl	$-1, %eax
	je	LBB0_25
## %bb.27:
	movl	(%r13), %edx
	cmpl	%edx, %eax
	jne	LBB0_28
## %bb.30:
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_close                          ## TAILCALL
LBB0_7:
	movl	%esi, %edx
	andl	$-2, %edx
	xorl	%eax, %eax
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	8(%r13), %rdi
	movb	%cl, 1(%rdi,%rax)
	addq	$2, %rax
	cmpq	%rax, %rdx
	je	LBB0_13
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r14,%rax), %ecx
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	xorb	(%rbx,%rax), %cl
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	8(%r13), %rdi
	movb	%cl, (%rdi,%rax)
	movzbl	1(%r14,%rax), %ecx
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	xorb	1(%rbx,%rax), %cl
	jmp	LBB0_12
LBB0_3:
	callq	_set_prga.cold.1
	jmp	LBB0_26
LBB0_19:
	callq	_set_prga.cold.2
	jmp	LBB0_26
LBB0_21:
	cmpl	$-1, %eax
	jne	LBB0_23
## %bb.22:
	callq	_set_prga.cold.3
	jmp	LBB0_26
LBB0_25:
	callq	_set_prga.cold.4
LBB0_26:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	movl	$3, %edx
	jmp	LBB0_29
LBB0_28:
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
LBB0_29:
	callq	_printf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function set_prga.cold.1
_set_prga.cold.1:                       ## @set_prga.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str(%rip), %rdi
	callq	_perror
	pushq	$1
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function set_prga.cold.2
_set_prga.cold.2:                       ## @set_prga.cold.2
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.2(%rip), %rdi
	callq	_perror
	pushq	$1
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function set_prga.cold.3
_set_prga.cold.3:                       ## @set_prga.cold.3
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.3(%rip), %rdi
	callq	_perror
	pushq	$1
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function set_prga.cold.4
_set_prga.cold.4:                       ## @set_prga.cold.4
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.3(%rip), %rdi
	callq	_perror
	pushq	$1
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_prgainfo,24,3                  ## @prgainfo
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"malloc()"

L_.str.1:                               ## @.str.1
	.asciz	"Got %d bytes of prga IV=(%.02x:%.02x:%.02x) PRGA="

	.comm	_PRGA_FILE,4,2                  ## @PRGA_FILE
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_S_IRUSR,4,2                    ## @S_IRUSR
	.comm	_S_IWUSR,4,2                    ## @S_IWUSR
	.comm	_S_IRGRP,4,2                    ## @S_IRGRP
	.comm	_S_IROTH,4,2                    ## @S_IROTH
L_.str.2:                               ## @.str.2
	.asciz	"open()"

L_.str.3:                               ## @.str.3
	.asciz	"write()"

L_.str.4:                               ## @.str.4
	.asciz	"Wrote %d out of %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_prga                       ; -- Begin function set_prga
	.p2align	2
_set_prga:                              ; @set_prga
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x3
	mov	x20, x2
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x23, _prgainfo@GOTPAGE
Lloh1:
	ldr	x23, [x23, _prgainfo@GOTPAGEOFF]
	ldr	w8, [x23]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	x0, [x23, #8]
	bl	_free
LBB0_2:
	mov	x0, x21
	bl	_malloc
	str	x0, [x23, #8]
	cbz	x0, LBB0_17
; %bb.3:
	str	w21, [x23]
	ldr	x0, [x23, #16]
	mov	x1, x22
	mov	w2, #3
	bl	_memcpy
	cmp	w21, #1
	b.lt	LBB0_8
; %bb.4:
	mov	x8, #0
	mov	w9, w21
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x11, [x23, #8]
	strb	w10, [x11, x8]
	add	x8, x8, #1
	cmp	x9, x8
	b.eq	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w10, [x20, x8]
	cbz	x19, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w11, [x19, x8]
	eor	w10, w11, w10
	b	LBB0_5
LBB0_8:
	ldr	w1, [x23]
	ldr	x8, [x23, #16]
	ldrb	w2, [x8]
	ldrb	w3, [x8, #1]
	ldrb	w4, [x8, #2]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_time_print
	ldr	x0, [x23, #8]
	ldr	w1, [x23]
	bl	_hexdump
	cbz	x19, LBB0_14
; %bb.9:
Lloh4:
	adrp	x8, _PRGA_FILE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PRGA_FILE@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
Lloh7:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh9:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh13:
	adrp	x8, _S_IRUSR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _S_IRUSR@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _S_IWUSR@GOTPAGE
Lloh17:
	ldr	x9, [x9, _S_IWUSR@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh19:
	adrp	x9, _S_IRGRP@GOTPAGE
Lloh20:
	ldr	x9, [x9, _S_IRGRP@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh22:
	adrp	x9, _S_IROTH@GOTPAGE
Lloh23:
	ldr	x9, [x9, _S_IROTH@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w2, w8, w9
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_18
; %bb.10:
	mov	x19, x0
	ldr	x1, [x23, #16]
	mov	w2, #3
	bl	_write
	cmp	w0, #3
	b.ne	LBB0_15
; %bb.11:
	ldr	x1, [x23, #8]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_write
	cmn	w0, #1
	b.eq	LBB0_19
; %bb.12:
	mov	x1, x0
	ldr	w2, [x23]
	cmp	w0, w2
	b.ne	LBB0_20
; %bb.13:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_close
LBB0_14:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_15:
	mov	x1, x0
	cmn	w0, #1
	b.ne	LBB0_21
; %bb.16:
	bl	_set_prga.cold.3
LBB0_17:
	bl	_set_prga.cold.1
LBB0_18:
	bl	_set_prga.cold.2
LBB0_19:
	bl	_set_prga.cold.4
LBB0_20:
Lloh25:
	adrp	x0, l_.str.4@PAGE
Lloh26:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_22
LBB0_21:
Lloh27:
	adrp	x0, l_.str.4@PAGE
Lloh28:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	w2, #3
LBB0_22:
	bl	_printf
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh11
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function set_prga.cold.1
_set_prga.cold.1:                       ; @set_prga.cold.1
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh29:
	adrp	x0, l_.str@PAGE
Lloh30:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror
	bl	_OUTLINED_FUNCTION_0
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function set_prga.cold.2
_set_prga.cold.2:                       ; @set_prga.cold.2
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh31:
	adrp	x0, l_.str.2@PAGE
Lloh32:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror
	bl	_OUTLINED_FUNCTION_0
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function set_prga.cold.3
_set_prga.cold.3:                       ; @set_prga.cold.3
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh33:
	adrp	x0, l_.str.3@PAGE
Lloh34:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_perror
	bl	_OUTLINED_FUNCTION_0
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function set_prga.cold.4
_set_prga.cold.4:                       ; @set_prga.cold.4
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh35:
	adrp	x0, l_.str.3@PAGE
Lloh36:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_perror
	bl	_OUTLINED_FUNCTION_0
	.loh AdrpAdd	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function OUTLINED_FUNCTION_0
_OUTLINED_FUNCTION_0:                   ; @OUTLINED_FUNCTION_0 Thunk
	.cfi_startproc
; %bb.0:
	mov	w0, #1
	b	_exit
	.cfi_endproc
                                        ; -- End function
	.comm	_prgainfo,24,3                  ; @prgainfo
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"malloc()"

l_.str.1:                               ; @.str.1
	.asciz	"Got %d bytes of prga IV=(%.02x:%.02x:%.02x) PRGA="

	.comm	_PRGA_FILE,4,2                  ; @PRGA_FILE
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_S_IRUSR,4,2                    ; @S_IRUSR
	.comm	_S_IWUSR,4,2                    ; @S_IWUSR
	.comm	_S_IRGRP,4,2                    ; @S_IRGRP
	.comm	_S_IROTH,4,2                    ; @S_IROTH
l_.str.2:                               ; @.str.2
	.asciz	"open()"

l_.str.3:                               ; @.str.3
	.asciz	"write()"

l_.str.4:                               ; @.str.4
	.asciz	"Wrote %d out of %d\n"

.subsections_via_symbols
