	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function choose_random_filter
_choose_random_filter:                  ## @choose_random_filter
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movl	%edi, %r14d
	movq	_PNG_ALL_FILTERS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$256, %edi                      ## imm = 0x100
	callq	_random_mod
	andl	%ebx, %eax
	je	LBB0_1
## %bb.2:
	movq	_PNG_FILTER_UP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	xorl	%ecx, %ecx
	cmpl	%edx, %eax
	cmovgel	%ecx, %edx
	testl	%r15d, %r15d
	cmovel	%r15d, %edx
	orl	%eax, %edx
	movl	%r14d, %edi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_png_set_filter                 ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PNG_ALL_FILTERS,4,2            ## @PNG_ALL_FILTERS
	.comm	_PNG_FILTER_UP,4,2              ## @PNG_FILTER_UP
	.no_dead_strip	_choose_random_filter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function choose_random_filter
_choose_random_filter:                  ; @choose_random_filter
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _PNG_ALL_FILTERS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PNG_ALL_FILTERS@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	mov	w0, #256
	bl	_random_mod
	ands	w8, w0, w21
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x9, _PNG_FILTER_UP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PNG_FILTER_UP@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w9, w9, wzr, lt
	cmp	w20, #0
	csel	w9, wzr, w9, eq
	orr	w2, w9, w8
	mov	x0, x19
	mov	w1, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_png_set_filter
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PNG_ALL_FILTERS,4,2            ; @PNG_ALL_FILTERS
	.comm	_PNG_FILTER_UP,4,2              ; @PNG_FILTER_UP
	.no_dead_strip	_choose_random_filter
.subsections_via_symbols
