// File: /workspace/github_c_makefile_star2_O0/MikeyLHolm[P]Hive-lem-in/libftprintf/srcs/number_cast.c
// Function: cast_number
intmax_t	cast_number(t_tags *ids, intmax_t nbr)
{
	if (ft_strcmp(ids->current_modifier, "\0") == 0)
		nbr = (int)va_arg(ids->arguments, int);
	if (ft_strcmp(ids->current_modifier, "h") == 0)
		nbr = (short)va_arg(ids->arguments, int);
	if (ft_strcmp(ids->current_modifier, "l") == 0)
		nbr = (long)va_arg(ids->arguments, long int);
	if (ft_strcmp(ids->current_modifier, "hh") == 0)
		nbr = (signed char)va_arg(ids->arguments, int);
	if (ft_strcmp(ids->current_modifier, "ll") == 0)
		nbr = (long long)va_arg(ids->arguments, long long int);
	if (nbr < 0)
		ids->negative = -1;
	return ((intmax_t)nbr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x5f, %rdi
leaq 0x3363(%rip), %rsi      # 0xca65
callq 0x6f10
cmpl $0x0, %eax
jne 0x9761
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x68, %rcx
movq %rcx, -0x20(%rbp)
movl 0x68(%rax), %eax
movl %eax, -0x14(%rbp)
cmpl $0x28, %eax
ja 0x973f
movq -0x20(%rbp), %rcx
movl -0x14(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x28(%rbp)
jmp 0x9756
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movslq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x5f, %rdi
leaq 0x32f8(%rip), %rsi      # 0xca68
callq 0x6f10
cmpl $0x0, %eax
jne 0x97d2
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x68, %rcx
movq %rcx, -0x38(%rbp)
movl 0x68(%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x28, %eax
ja 0x97ad
movq -0x38(%rbp), %rcx
movl -0x2c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x40(%rbp)
jmp 0x97c4
movq -0x38(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl (%rax), %eax
movswq %ax, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x5f, %rdi
leaq 0x328a(%rip), %rsi      # 0xca6b
callq 0x6f10
cmpl $0x0, %eax
jne 0x9840
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x68, %rcx
movq %rcx, -0x50(%rbp)
movl 0x68(%rax), %eax
movl %eax, -0x44(%rbp)
cmpl $0x28, %eax
ja 0x981e
movq -0x50(%rbp), %rcx
movl -0x44(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x58(%rbp)
jmp 0x9835
movq -0x50(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x5f, %rdi
leaq 0x3218(%rip), %rsi      # 0xca67
callq 0x6f10
cmpl $0x0, %eax
jne 0x98b1
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x68, %rcx
movq %rcx, -0x68(%rbp)
movl 0x68(%rax), %eax
movl %eax, -0x5c(%rbp)
cmpl $0x28, %eax
ja 0x988c
movq -0x68(%rbp), %rcx
movl -0x5c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x70(%rbp)
jmp 0x98a3
movq -0x68(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movl (%rax), %eax
movsbq %al, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x5f, %rdi
leaq 0x31aa(%rip), %rsi      # 0xca6a
callq 0x6f10
cmpl $0x0, %eax
jne 0x9928
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x68, %rcx
movq %rcx, -0x80(%rbp)
movl 0x68(%rax), %eax
movl %eax, -0x74(%rbp)
cmpl $0x28, %eax
ja 0x9900
movq -0x80(%rbp), %rcx
movl -0x74(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x88(%rbp)
jmp 0x991a
movq -0x80(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jge 0x993a
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x40(%rax) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)