// File: /workspace/github_c_makefile_star2_O0/Sigabort42[P]WoodyWoodPacker/libft/ft_printf/ft_wchar.c
// Function: ft_wchar2
void		ft_wchar2(wchar_t chr, t_var *var, int i)
{
	if (chr > 0)
		var->i_buf -= i;
	if (chr <= 127)
		var->buf[var->i_buf++] = chr;
	else if (chr <= 2047)
	{
		var->buf[var->i_buf++] = (chr >> 6) + 192;
		var->buf[var->i_buf++] = (chr & 63) + 128;
	}
	else if (chr <= 65535)
	{
		var->buf[var->i_buf++] = (chr >> 12) + 224;
		var->buf[var->i_buf++] = ((chr >> 6) & 63) + 128;
		var->buf[var->i_buf++] = (chr & 63) + 128;
	}
	else if (chr <= 1114111)
	{
		var->buf[var->i_buf++] = (chr >> 18) + 240;
		var->buf[var->i_buf++] = ((chr >> 12) & 63) + 128;
		var->buf[var->i_buf++] = ((chr >> 6) & 63) + 128;
		var->buf[var->i_buf++] = (chr & 63) + 128;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
cmpl $0x0, -0x4(%rbp)
jle 0x3e73
movl -0x14(%rbp), %edx
movq -0x10(%rbp), %rax
movl 0x60(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x60(%rax)
cmpl $0x7f, -0x4(%rbp)
jg 0x3ea0
movl -0x4(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rsi
movl 0x60(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x60(%rsi)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x4056
cmpl $0x7ff, -0x4(%rbp)      # imm = 0x7FF
jg 0x3f02
movl -0x4(%rbp), %eax
sarl $0x6, %eax
addl $0xc0, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rsi
movl 0x60(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x60(%rsi)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x4(%rbp), %eax
andl $0x3f, %eax
addl $0x80, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rsi
movl 0x60(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x60(%rsi)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x4054
cmpl $0xffff, -0x4(%rbp)     # imm = 0xFFFF
jg 0x3f95
movl -0x4(%rbp), %eax
sarl $0xc, %eax
addl $0xe0, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rsi
movl 0x60(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x60(%rsi)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x4(%rbp), %eax
sarl $0x6, %eax
andl $0x3f, %eax
addl $0x80, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rsi
movl 0x60(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x60(%rsi)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x4(%rbp), %eax
andl $0x3f, %eax
addl $0x80, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rsi
movl 0x60(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x60(%rsi)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x4052
cmpl $0x10ffff, -0x4(%rbp)   # imm = 0x10FFFF
jg 0x4050
movl -0x4(%rbp), %eax
sarl $0x12, %eax
addl $0xf0, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rsi
movl 0x60(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x60(%rsi)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x4(%rbp), %eax
sarl $0xc, %eax
andl $0x3f, %eax
addl $0x80, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rsi
movl 0x60(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x60(%rsi)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x4(%rbp), %eax
sarl $0x6, %eax
andl $0x3f, %eax
addl $0x80, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rsi
movl 0x60(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x60(%rsi)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x4(%rbp), %eax
andl $0x3f, %eax
addl $0x80, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rsi
movl 0x60(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x60(%rsi)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x4052
jmp 0x4054
jmp 0x4056
popq %rbp
retq
nopl (%rax,%rax)