	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d3d9_init_multipass
_d3d9_init_multipass:                   ## @d3d9_init_multipass
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_video_shader_read_preset
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_video_shader_read_conf_preset
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_config_file_free
	testl	%r12d, %r12d
	je	LBB0_3
## %bb.4:
	movl	(%r14), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_RARCH_LOG
	movl	(%r14), %eax
	movabsq	$4575657222473777152, %r8       ## imm = 0x3F8000003F800000
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	movq	8(%r14), %rdx
	movq	%rax, %rsi
	shlq	$5, %rsi
	xorl	%edi, %edi
	movq	_RARCH_SCALE_INPUT@GOTPCREL(%rip), %rbx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	addq	$32, %rdi
	cmpq	%rdi, %rsi
	je	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 8(%rdx,%rdi)
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r8, (%rdx,%rdi)
	movq	(%rbx), %rcx
	movq	%rcx, 24(%rdx,%rdi)
	movq	(%rbx), %rcx
	movq	%rcx, 16(%rdx,%rdi)
	jmp	LBB0_8
LBB0_9:
	movq	_GFX_MAX_SHADERS@GOTPCREL(%rip), %rcx
	leal	-1(%rax), %esi
	movq	8(%r14), %rdx
	cmpl	(%rcx), %eax
	jae	LBB0_12
## %bb.10:
	movq	%rsi, %rcx
	shlq	$5, %rcx
	cmpq	$0, 8(%rdx,%rcx)
	je	LBB0_12
## %bb.11:
	leal	1(%rax), %ecx
	movl	%ecx, (%r14)
	shlq	$5, %rax
	movq	%r8, (%rdx,%rax)
	movq	_RARCH_SCALE_VIEWPORT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movq	%rsi, 16(%rdx,%rax)
	movq	(%rcx), %rcx
	movq	%rcx, 8(%rdx,%rax)
	movq	_RARCH_FILTER_UNSPEC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 24(%rdx,%rax)
	jmp	LBB0_13
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_RARCH_ERR
	xorl	%r15d, %r15d
	jmp	LBB0_14
LBB0_12:
	shlq	$5, %rsi
	movq	%r8, (%rdx,%rsi)
	movq	_RARCH_SCALE_VIEWPORT@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, 16(%rdx,%rsi)
	movq	(%rax), %rax
	movq	%rax, 8(%rdx,%rsi)
LBB0_13:
	movl	$1, %r15d
	jmp	LBB0_14
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	callq	_RARCH_ERR
LBB0_14:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[D3D9]: Failed to load preset.\n"

L_.str.1:                               ## @.str.1
	.asciz	"[D3D9]: Failed to parse shader preset.\n"

L_.str.2:                               ## @.str.2
	.asciz	"[D3D9]: Found %u shaders.\n"

	.comm	_RARCH_SCALE_INPUT,8,3          ## @RARCH_SCALE_INPUT
	.comm	_GFX_MAX_SHADERS,4,2            ## @GFX_MAX_SHADERS
	.comm	_RARCH_SCALE_VIEWPORT,8,3       ## @RARCH_SCALE_VIEWPORT
	.comm	_RARCH_FILTER_UNSPEC,4,2        ## @RARCH_FILTER_UNSPEC
	.no_dead_strip	_d3d9_init_multipass
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d3d9_init_multipass
_d3d9_init_multipass:                   ; @d3d9_init_multipass
	.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	x19, x0
	mov	x0, x1
	bl	_video_shader_read_preset
	cbz	x0, LBB0_10
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	mov	x0, x20
	mov	x1, x19
	bl	_video_shader_read_conf_preset
	mov	x21, x0
	mov	x0, x20
	bl	_config_file_free
	cbz	w21, LBB0_13
; %bb.2:
	ldr	w1, [x19]
Lloh0:
	adrp	x0, l_.str.2@PAGE
Lloh1:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_RARCH_LOG
	ldr	w8, [x19]
	fmov.2s	v0, #1.00000000
	cbz	w8, LBB0_7
; %bb.3:
	ldr	x9, [x19, #8]
	add	x9, x9, #16
Lloh2:
	adrp	x10, _RARCH_SCALE_INPUT@GOTPAGE
Lloh3:
	ldr	x10, [x10, _RARCH_SCALE_INPUT@GOTPAGEOFF]
	mov	x11, x8
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x9, #32
	subs	x11, x11, #1
	b.eq	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x12, [x9, #-8]
	cbnz	x12, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	stur	d0, [x9, #-16]
	ldr	x12, [x10]
	str	x12, [x9, #8]
	ldr	x12, [x10]
	str	x12, [x9]
	b	LBB0_4
LBB0_7:
Lloh4:
	adrp	x9, _GFX_MAX_SHADERS@GOTPAGE
Lloh5:
	ldr	x9, [x9, _GFX_MAX_SHADERS@GOTPAGEOFF]
Lloh6:
	ldr	w11, [x9]
	ldr	x9, [x19, #8]
	sub	w10, w8, #1
	cmp	w8, w11
	b.hs	LBB0_11
; %bb.8:
	add	x11, x9, x10, lsl #5
	ldr	x11, [x11, #8]
	cbz	x11, LBB0_11
; %bb.9:
	add	w10, w8, #1
	str	w10, [x19]
	add	x8, x9, x8, lsl #5
	str	d0, [x8]
Lloh7:
	adrp	x9, _RARCH_SCALE_VIEWPORT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _RARCH_SCALE_VIEWPORT@GOTPAGEOFF]
	ldr	x10, [x9]
	str	x10, [x8, #16]
	ldr	x9, [x9]
	str	x9, [x8, #8]
Lloh9:
	adrp	x9, _RARCH_FILTER_UNSPEC@GOTPAGE
Lloh10:
	ldr	x9, [x9, _RARCH_FILTER_UNSPEC@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	str	w9, [x8, #24]
	b	LBB0_12
LBB0_10:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_14
LBB0_11:
	add	x8, x9, x10, lsl #5
Lloh14:
	adrp	x9, _RARCH_SCALE_VIEWPORT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _RARCH_SCALE_VIEWPORT@GOTPAGEOFF]
	str	d0, [x8]
	ldr	x10, [x9]
	str	x10, [x8, #16]
	ldr	x9, [x9]
	str	x9, [x8, #8]
LBB0_12:
	mov	w0, #1
	b	LBB0_15
LBB0_13:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_14:
	bl	_RARCH_ERR
	mov	w0, #0
LBB0_15:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[D3D9]: Failed to load preset.\n"

l_.str.1:                               ; @.str.1
	.asciz	"[D3D9]: Failed to parse shader preset.\n"

l_.str.2:                               ; @.str.2
	.asciz	"[D3D9]: Found %u shaders.\n"

	.comm	_RARCH_SCALE_INPUT,8,3          ; @RARCH_SCALE_INPUT
	.comm	_GFX_MAX_SHADERS,4,2            ; @GFX_MAX_SHADERS
	.comm	_RARCH_SCALE_VIEWPORT,8,3       ; @RARCH_SCALE_VIEWPORT
	.comm	_RARCH_FILTER_UNSPEC,4,2        ; @RARCH_FILTER_UNSPEC
	.no_dead_strip	_d3d9_init_multipass
.subsections_via_symbols
