	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%edi, %edi
	callq	_time
	movl	%eax, %edi
	callq	_srand
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_fopen
	movq	_f@GOTPCREL(%rip), %r12
	movl	%eax, (%r12)
	testl	%eax, %eax
	je	LBB0_25
## %bb.1:
	movl	$16744448, %edi                 ## imm = 0xFF8000
	callq	_write32
	movl	$768, %edi                      ## imm = 0x300
	callq	_write32
	movl	$760, %ebx                      ## imm = 0x2F8
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_write32
	addl	$-4, %ebx
	cmpl	$512, %ebx                      ## imm = 0x200
	jne	LBB0_2
## %bb.3:
	movl	$-64, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	callq	_write32
	incl	%ebx
	jne	LBB0_4
## %bb.5:
	movl	$-64, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1316179571, %edi               ## imm = 0x4E734E73
	callq	_write32
	incl	%ebx
	jne	LBB0_6
## %bb.7:
	movl	$776, %r13d                     ## imm = 0x308
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_10 Depth=1
	testb	%bl, %bl
	je	LBB0_12
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=1
	incl	%ebx
	addl	$8, %r13d
	cmpl	$65536, %ebx                    ## imm = 0x10000
	je	LBB0_24
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	andl	$61440, %eax                    ## imm = 0xF000
	cmpl	$24576, %eax                    ## imm = 0x6000
	je	LBB0_8
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	%ebx, %ecx
	andl	$61688, %ecx                    ## imm = 0xF0F8
	cmpl	$20680, %ecx                    ## imm = 0x50C8
	jne	LBB0_15
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	%ebx, %edi
	movl	$6, %esi
	xorl	%edx, %edx
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	xorl	%ecx, %ecx
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	callq	_write_op
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	%ebx, %ecx
	andl	$65408, %ecx                    ## imm = 0xFF80
	cmpl	$20096, %ecx                    ## imm = 0x4E80
	jne	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	%ebx, %eax
	andl	$63, %eax
	cmpl	$57, %eax
	jne	LBB0_9
## %bb.17:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	%r13d, %esi
	shrl	$16, %esi
	movl	%r13d, %edx
	andl	$65528, %edx                    ## imm = 0xFFF8
	movl	%ebx, %edi
	jmp	LBB0_13
LBB0_18:                                ##   in Loop: Header=BB0_10 Depth=1
	cmpl	$40960, %eax                    ## imm = 0xA000
	je	LBB0_9
## %bb.19:                              ##   in Loop: Header=BB0_10 Depth=1
	movzwl	%ax, %eax
	cmpl	$61440, %eax                    ## imm = 0xF000
	je	LBB0_9
## %bb.20:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	%ebx, %eax
	andl	$65528, %eax                    ## imm = 0xFFF8
	cmpl	$20080, %eax                    ## imm = 0x4E70
	jne	LBB0_23
## %bb.21:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpl	$20086, %ebx                    ## imm = 0x4E76
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpl	$20081, %ebx                    ## imm = 0x4E71
	jne	LBB0_9
LBB0_23:                                ##   in Loop: Header=BB0_10 Depth=1
	xorl	%eax, %eax
	callq	_safe_rand
	movl	%eax, %r14d
	xorl	%eax, %eax
	callq	_safe_rand
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_safe_rand
	movl	%ebx, %edi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	%eax, %ecx
	jmp	LBB0_14
LBB0_24:
	movl	$20216, %edi                    ## imm = 0x4EF8
	movl	$768, %esi                      ## imm = 0x300
	movl	$20216, %edx                    ## imm = 0x4EF8
	movl	$768, %ecx                      ## imm = 0x300
	callq	_write_op
	movl	$20216, %edi                    ## imm = 0x4EF8
	movl	$768, %esi                      ## imm = 0x300
	movl	$20216, %edx                    ## imm = 0x4EF8
	movl	$768, %ecx                      ## imm = 0x300
	callq	_write_op
	movl	(%r12), %edi
	callq	_fclose
	xorl	%eax, %eax
	jmp	LBB0_26
LBB0_25:
	movl	$1, %eax
LBB0_26:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"test_misc2.bin"

L_.str.1:                               ## @.str.1
	.asciz	"wb"

	.comm	_f,4,2                          ## @f
.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:
	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	w0, #0
	bl	_time
	bl	_srand
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fopen
Lloh4:
	adrp	x22, _f@GOTPAGE
Lloh5:
	ldr	x22, [x22, _f@GOTPAGEOFF]
	str	w0, [x22]
	cbz	w0, LBB0_25
; %bb.1:
	mov	w0, #16744448
	bl	_write32
	mov	w0, #768
	bl	_write32
	mov	w19, #760
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_write32
	sub	w19, w19, #4
	cmp	w19, #512
	b.ne	LBB0_2
; %bb.3:
	mov	w19, #-64
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #0
	bl	_write32
	adds	w19, w19, #1
	b.lo	LBB0_4
; %bb.5:
	mov	w19, #-64
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #20083
	movk	w0, #20083, lsl #16
	bl	_write32
	adds	w19, w19, #1
	b.lo	LBB0_6
; %bb.7:
	mov	w19, #0
	mov	w23, #776
	mov	w24, #61688
	mov	w25, #20680
	mov	w26, #20096
	mov	w27, #20080
	mov	w28, #20086
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	tst	w19, #0xff
	b.eq	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	w19, w19, #1
	add	w23, w23, #8
	cmp	w19, #16, lsl #12               ; =65536
	b.eq	LBB0_24
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	and	w8, w19, #0xf000
	cmp	w8, #6, lsl #12                 ; =24576
	b.eq	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	and	w9, w19, w24
	cmp	w9, w25
	b.ne	LBB0_15
LBB0_12:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x19
	mov	w1, #6
	mov	w2, #0
LBB0_13:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	w3, #0
LBB0_14:                                ;   in Loop: Header=BB0_10 Depth=1
	bl	_write_op
	b	LBB0_9
LBB0_15:                                ;   in Loop: Header=BB0_10 Depth=1
	and	w9, w19, #0xff80
	cmp	w9, w26
	b.ne	LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_10 Depth=1
	and	w8, w19, #0x3f
	cmp	w8, #57
	b.ne	LBB0_9
; %bb.17:                               ;   in Loop: Header=BB0_10 Depth=1
	lsr	w1, w23, #16
	and	w2, w23, #0xfff8
	mov	x0, x19
	b	LBB0_13
LBB0_18:                                ;   in Loop: Header=BB0_10 Depth=1
	cmp	w8, #10, lsl #12                ; =40960
	b.eq	LBB0_9
; %bb.19:                               ;   in Loop: Header=BB0_10 Depth=1
	cmp	w8, #15, lsl #12                ; =61440
	b.eq	LBB0_9
; %bb.20:                               ;   in Loop: Header=BB0_10 Depth=1
	and	w8, w19, #0xfff8
	cmp	w8, w27
	b.ne	LBB0_23
; %bb.21:                               ;   in Loop: Header=BB0_10 Depth=1
	cmp	w19, w28
	b.eq	LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	w8, #20081
	cmp	w19, w8
	b.ne	LBB0_9
LBB0_23:                                ;   in Loop: Header=BB0_10 Depth=1
	bl	_safe_rand
	mov	x20, x0
	bl	_safe_rand
	mov	x21, x0
	bl	_safe_rand
	mov	x3, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	b	LBB0_14
LBB0_24:
	mov	w0, #20216
	mov	w1, #768
	mov	w2, #20216
	mov	w3, #768
	bl	_write_op
	mov	w0, #20216
	mov	w1, #768
	mov	w2, #20216
	mov	w3, #768
	bl	_write_op
	ldr	w0, [x22]
	bl	_fclose
	mov	w0, #0
	b	LBB0_26
LBB0_25:
	mov	w0, #1
LBB0_26:
	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
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"test_misc2.bin"

l_.str.1:                               ; @.str.1
	.asciz	"wb"

	.comm	_f,4,2                          ; @f
.subsections_via_symbols
