	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$4, %edi
	jg	LBB0_2
## %bb.1:
	leaq	L_str(%rip), %rdi
	callq	_puts
	movl	$1, %ebx
	jmp	LBB0_20
LBB0_2:
	movq	%rsi, %rbx
	movq	8(%rsi), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r15
	movq	16(%rbx), %rdi
	callq	_atoi
	movq	%rax, %r14
	movq	24(%rbx), %rdi
	callq	_atoi
	movq	%rax, %r13
	movq	32(%rbx), %rdi
	callq	_atoi
	movq	_state@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_SEEK_END@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_checked_seek
	movq	%r15, %rdi
	callq	_ftell
	movl	%eax, %r12d
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_checked_seek
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	testl	%r14d, %r14d
	je	LBB0_20
## %bb.5:
	movl	%r13d, %ecx
	negl	%ecx
	movl	%r13d, %eax
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	cmovnsl	%ecx, %eax
	decl	%eax
	cltq
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movslq	%r12d, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_UINT32_MAX@GOTPCREL(%rip), %r14
	movl	%r12d, -56(%rbp)                ## 4-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_19
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
	xorl	%eax, %eax
	callq	_ran
	imulq	-72(%rbp), %rax                 ## 8-byte Folded Reload
	movslq	(%r14), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %rbx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_6 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %ebx
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	incl	%ebx
	xorl	%eax, %eax
	callq	_ran
	imulq	-64(%rbp), %rax                 ## 8-byte Folded Reload
	movslq	(%r14), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %r12
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r12d
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	decl	%eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_checked_seek
	testl	%r13d, %r13d
	cmovsl	-52(%rbp), %ebx                 ## 4-byte Folded Reload
	addl	%ebx, %r12d
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	cmpl	%eax, %r12d
	jle	LBB0_13
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=2
	xorl	%edx, %edx
	divq	%rcx
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=2
	testl	%r13d, %r13d
	movsbl	%al, %edi
	movl	$0, %eax
	cmovsl	%eax, %edi
	movq	%r15, %rsi
	callq	_fputc
LBB0_13:                                ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testl	%ebx, %ebx
	je	LBB0_18
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=2
	decl	%ebx
	xorl	%eax, %eax
	callq	_ran
	shlq	$8, %rax
	movslq	(%r14), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=2
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	jmp	LBB0_17
LBB0_19:
	xorl	%ebx, %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	8(%rbx), %rdi
	callq	_perror
	movl	$2, %ebx
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"rb+"

	.comm	_state,8,3                      ## @state
	.comm	_SEEK_END,4,2                   ## @SEEK_END
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_UINT32_MAX,4,2                 ## @UINT32_MAX
L_str:                                  ## @str
	.asciz	"USAGE: trasher <filename> <count> <maxburst> <seed>"

.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
	cmp	w0, #4
	b.gt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_str@PAGE
Lloh1:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	mov	w0, #1
	b	LBB0_10
LBB0_2:
	mov	x22, x1
	ldr	x0, [x1, #8]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_11
; %bb.3:
	mov	x19, x0
	ldr	x0, [x22, #16]
	bl	_atoi
	mov	x20, x0
	ldr	x0, [x22, #24]
	bl	_atoi
	mov	x21, x0
	ldr	x0, [x22, #32]
	bl	_atoi
Lloh4:
	adrp	x8, _state@GOTPAGE
Lloh5:
	ldr	x8, [x8, _state@GOTPAGEOFF]
Lloh6:
	str	x0, [x8]
Lloh7:
	adrp	x8, _SEEK_END@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SEEK_END@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_checked_seek
	mov	x0, x19
	bl	_ftell
	mov	x22, x0
Lloh10:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_checked_seek
	cbz	w20, LBB0_9
; %bb.4:
	cmp	w21, #0
	cneg	w8, w21, mi
	sub	w8, w8, #1
	sxtw	x25, w8
	sxtw	x26, w22
	neg	w27, w21
Lloh13:
	adrp	x28, _UINT32_MAX@GOTPAGE
Lloh14:
	ldr	x28, [x28, _UINT32_MAX@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	cbz	w20, LBB0_9
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	sub	w20, w20, #1
	bl	_ran
	mul	x8, x0, x25
	ldrsw	x9, [x28]
	udiv	x24, x8, x9
	bl	_ran
	mul	x8, x0, x26
	ldrsw	x9, [x28]
Lloh15:
	adrp	x10, _SEEK_SET@GOTPAGE
Lloh16:
	ldr	x10, [x10, _SEEK_SET@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x10]
	udiv	x23, x8, x9
	mov	x0, x19
	mov	x1, x23
	bl	_checked_seek
	cmp	w21, #0
	csinc	w24, w27, w24, lt
	add	w8, w24, w23
	cmp	w8, w22
	b.gt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	cbz	w24, LBB0_5
LBB0_8:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	w24, w24, #1
	bl	_ran
	lsl	x8, x0, #8
	ldrsw	x9, [x28]
	udiv	x8, x8, x9
	sxtb	w8, w8
	cmp	w21, #0
	csel	w0, wzr, w8, lt
	mov	x1, x19
	bl	_fputc
	cbnz	w24, LBB0_8
	b	LBB0_5
LBB0_9:
	mov	w0, #0
LBB0_10:
	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
LBB0_11:
	ldr	x0, [x22, #8]
	bl	_perror
	mov	w0, #2
	b	LBB0_10
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"rb+"

	.comm	_state,8,3                      ; @state
	.comm	_SEEK_END,4,2                   ; @SEEK_END
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_UINT32_MAX,4,2                 ; @UINT32_MAX
l_str:                                  ; @str
	.asciz	"USAGE: trasher <filename> <count> <maxburst> <seed>"

.subsections_via_symbols
