	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d3d9_set_viewport
_d3d9_set_viewport:                     ## @d3d9_set_viewport
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movl	%ecx, %r9d
	movq	%rdi, %rbx
	movl	%esi, -24(%rbp)
	movl	%edx, -20(%rbp)
	movl	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	movl	%r8d, (%rsp)
	leaq	-24(%rbp), %rsi
	leaq	-20(%rbp), %rdx
	leaq	-16(%rbp), %rcx
	leaq	-12(%rbp), %r8
	callq	_d3d9_calculate_rect
	movl	-16(%rbp), %eax
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movl	$0, -16(%rbp)
	xorl	%eax, %eax
LBB0_2:
	movl	-12(%rbp), %ecx
	testl	%ecx, %ecx
	jns	LBB0_4
## %bb.3:
	movl	$0, -12(%rbp)
	xorl	%ecx, %ecx
LBB0_4:
	movl	%eax, (%rbx)
	movl	%ecx, 4(%rbx)
	movl	-24(%rbp), %eax
	movl	%eax, 8(%rbx)
	movl	-20(%rbp), %eax
	movl	%eax, 12(%rbx)
	movabsq	$4575657221408423936, %rax      ## imm = 0x3F80000000000000
	movq	%rax, 16(%rbx)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_d3d9_set_font_rect
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_d3d9_set_viewport
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function d3d9_set_viewport
lCPI0_0:
	.long	0x00000000                      ; float 0
	.long	0x3f800000                      ; float 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_d3d9_set_viewport:                     ; @d3d9_set_viewport
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x6, x4
	mov	x5, x3
	mov	x19, x0
	stp	w2, w1, [sp, #8]
	str	xzr, [sp]
	add	x1, sp, #12
	add	x2, sp, #8
	add	x3, sp, #4
	mov	x4, sp
	bl	_d3d9_calculate_rect
	ldr	w8, [sp, #4]
	tbnz	w8, #31, LBB0_3
; %bb.1:
	ldr	w9, [sp]
	tbnz	w9, #31, LBB0_4
LBB0_2:
	stp	w8, w9, [x19]
	ldp	w9, w8, [sp, #8]
	stp	w8, w9, [x19, #8]
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19, #16]
	mov	x0, x19
	mov	x1, #0
	bl	_d3d9_set_font_rect
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_3:
	mov	w8, #0
	str	wzr, [sp, #4]
	ldr	w9, [sp]
	tbz	w9, #31, LBB0_2
LBB0_4:
	mov	w9, #0
	str	wzr, [sp]
	b	LBB0_2
	.loh AdrpLdr	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_d3d9_set_viewport
.subsections_via_symbols
