LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/ulisses[P]ftp-client-server/./datagrama.h
// Function: demuxDatagrama
Datagrama *demuxDatagrama(char *buffer){
	int res;
	Datagrama *novo = (Datagrama *) malloc(sizeof(struct segmento));
	res = sscanf(buffer, "%d %d %d %d %d %d %[^ ]", &novo->seq, &novo->ack, &novo->len, &novo->win_size, &novo->flags, &novo->cksum,novo->data);
	if(res< 7){ 
		free(novo); 
		return NULL;
	}
	else {
		int i, diff = (strlen(buffer)) - novo->len;
		for(i = 0; i < novo->len && i< TAM; i++) novo->data[i] = buffer[diff + i];
		novo->data[i] = '\0';
		return novo;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movl $0xe0, %edi
callq 0x1120
movq %rax, %rbx
leaq 0x4(%rax), %rcx
leaq 0x8(%rax), %r15
leaq 0xc(%rax), %r9
leaq 0x10(%rax), %r10
leaq 0x14(%rax), %r11
leaq 0x18(%rax), %r12
subq $0x8, %rsp
leaq 0x17d7(%rip), %rsi      # 0x3023
movq %r14, %rdi
movq %rax, %rdx
movq %r15, %r8
xorl %eax, %eax
pushq %r12
pushq %r11
pushq %r10
callq 0x1130
addq $0x20, %rsp
cmpl $0x6, %eax
jg 0x1877
movq %rbx, %rdi
callq 0x1030
xorl %ebx, %ebx
jmp 0x18bb
movl (%r15), %r15d
testl %r15d, %r15d
jle 0x18b4
movq %r14, %rdi
callq 0x1070
subl %r15d, %eax
decl %r15d
movl $0xc7, %ecx
cmpl %ecx, %r15d
cmovael %ecx, %r15d
cltq
incl %r15d
addq %r14, %rax
xorl %ecx, %ecx
movb (%rax,%rcx), %dl
movb %dl, (%r12,%rcx)
incq %rcx
cmpq %rcx, %r15
jne 0x18a3
jmp 0x18b6
xorl %ecx, %ecx
movb $0x0, (%r12,%rcx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ulisses[P]ftp-client-server/./datagrama.h
// Function: muxDatagrama
char *muxDatagrama(Datagrama *novo){
	if(novo){
	char *buffer = (char *)malloc(sizeof(char)*(TAM+24));
	sprintf(buffer, "%d %d %d %d %d %d %s", novo->seq, novo->ack, novo->len, novo->win_size, novo->flags, novo->cksum, novo->data);
	return buffer;
	}
	else return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x191f
movq %rdi, %r14
movl $0xe0, %edi
callq 0x1120
movq %rax, %rbx
movl (%r14), %edx
movl 0x4(%r14), %ecx
movl 0x8(%r14), %r8d
movl 0xc(%r14), %r9d
movl 0x10(%r14), %r10d
movl 0x14(%r14), %r11d
addq $0x18, %r14
subq $0x8, %rsp
leaq 0x1732(%rip), %rsi      # 0x303b
movq %rax, %rdi
xorl %eax, %eax
pushq %r14
pushq %r11
pushq %r10
callq 0x11a0
addq $0x20, %rsp
jmp 0x1921
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ulisses[P]ftp-client-server/./datagrama.h
// Function: mostraFlagsActivas
void mostraFlagsActivas(int flags){
	if(flags & FL_SYN) printf("FL_SYN\n");
	if(flags & FL_ACK) printf("FL_ACK\n");
	if(flags & FL_FIN) printf("FL_FIN\n");
	if(flags & FL_GET) printf("FL_GET\n");
	if(flags & FL_ERRO) printf("FL_ERRO\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
testb $0x1, %bl
je 0x1942
leaq 0x17ea(%rip), %rdi      # 0x3127
callq 0x1060
testb $0x2, %bl
je 0x1953
leaq 0x17e0(%rip), %rdi      # 0x312e
callq 0x1060
testb $0x4, %bl
je 0x1964
leaq 0x17d6(%rip), %rdi      # 0x3135
callq 0x1060
testb $0x8, %bl
je 0x1975
leaq 0x17cc(%rip), %rdi      # 0x313c
callq 0x1060
testb $0x10, %bl
jne 0x1981
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x17bb(%rip), %rdi      # 0x3143
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O1/ulisses[P]ftp-client-server/./datagrama.h
// Function: mostraDatagrama
void mostraDatagrama(Datagrama *data){
if(data){
	printf("Ack: %d\n", data->ack);
	printf("Seq: %d\n", data->seq);
	printf("Len: %d\n", data->len);
	printf("Win_size: %d\n", data->win_size);
	printf("checksum: %d\n", data->cksum);
	mostraFlagsActivas(data->flags);
	printf("Data:%s", data->data);
	}
	else printf("Formato desconhecido");
}

// Assembly:
testq %rdi, %rdi
je 0x1a1c
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x4(%rdi), %esi
leaq 0x16a1(%rip), %rdi      # 0x3050
xorl %eax, %eax
callq 0x1080
movl (%rbx), %esi
leaq 0x169a(%rip), %rdi      # 0x3059
xorl %eax, %eax
callq 0x1080
movl 0x8(%rbx), %esi
leaq 0x1692(%rip), %rdi      # 0x3062
xorl %eax, %eax
callq 0x1080
movl 0xc(%rbx), %esi
leaq 0x168a(%rip), %rdi      # 0x306b
xorl %eax, %eax
callq 0x1080
movl 0x14(%rbx), %esi
leaq 0x1687(%rip), %rdi      # 0x3079
xorl %eax, %eax
callq 0x1080
movl 0x10(%rbx), %edi
callq 0x1929
addq $0x18, %rbx
leaq 0x167b(%rip), %rdi      # 0x3087
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1080
leaq 0x166c(%rip), %rdi      # 0x308f
xorl %eax, %eax
jmp 0x1080
// File: /workspace/github_c_makefile_star2_O1/ulisses[P]ftp-client-server/./datagrama.h
// Function: readFile
int readFile(int file, int nbytes, char *buffer){
	int n, i = 0;
	n = 1;
	while(i < nbytes && n > 0){
	n = read(file, &(buffer[i]), 1);
	i++;
	}
	buffer[i] = '\0';
	return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
testl %esi, %esi
jle 0x1a64
movl %edi, %r15d
movl %esi, %r12d
xorl %r14d, %r14d
leaq (%rbx,%r14), %rsi
movl $0x1, %edx
movl %r15d, %edi
callq 0x10d0
incq %r14
testl %eax, %eax
jle 0x1a67
cmpq %r12, %r14
jb 0x1a45
jmp 0x1a67
xorl %r14d, %r14d
movl %r14d, %eax
movb $0x0, (%rbx,%rax)
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ulisses[P]ftp-client-server/./datagrama.h
// Function: parteFicheiro
Datagrama *parteFicheiro(int fich, int nbytes, int seq){
	int length, bytesRead = 0;
	Datagrama *novo = initDatagrama();
	
	if(nbytes < TAM){
		length = nbytes;
	}else length = TAM;
		
	bytesRead = readFile(fich, length, novo->data);
	
	if(bytesRead == length){
	//numero de bytes lidos
		novo->seq = seq + bytesRead;
		novo->ack = 0;
		novo->len = strlen(novo->data);
		novo->win_size = 1;
		return novo;
	}
	else {
		novo->seq = seq + bytesRead;
		if(strlen(novo->data)==1) strcpy(novo->data,"c");
		novo->len = strlen(novo->data);
		novo->flags = FL_FIN;
		return novo;
		}
			
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r15d
movl %esi, %r13d
movl %edi, %r12d
movl $0xe0, %edi
callq 0x1120
movq %rax, %rbx
leaq 0x18(%rax), %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movw $0x63, 0x18(%rax)
movl $0xc8, %ecx
cmpl %ecx, %r13d
cmovll %r13d, %ecx
testl %r13d, %r13d
jle 0x1afa
movl %r15d, -0x30(%rbp)
movl %ecx, -0x2c(%rbp)
movl %ecx, %r15d
xorl %r13d, %r13d
leaq (%r14,%r13), %rsi
movl $0x1, %edx
movl %r12d, %edi
callq 0x10d0
incq %r13
cmpq %r15, %r13
jae 0x1af1
testl %eax, %eax
jg 0x1ad4
movl -0x30(%rbp), %r15d
movl -0x2c(%rbp), %ecx
jmp 0x1afd
xorl %r13d, %r13d
movl %r13d, %eax
movb $0x0, 0x18(%rbx,%rax)
addl %r13d, %r15d
movl %r15d, (%rbx)
cmpl %ecx, %r13d
jne 0x1b25
movl $0x0, 0x4(%rbx)
movl $0x1, %r15d
movl $0xc, %r12d
jmp 0x1b45
movq %r14, %rdi
callq 0x1070
movl $0x4, %r15d
movl $0x10, %r12d
cmpq $0x1, %rax
jne 0x1b45
movw $0x63, (%r14)
movq %r14, %rdi
callq 0x1070
movl %eax, 0x8(%rbx)
movl %r15d, (%rbx,%r12)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ulisses[P]ftp-client-server/clientec2.c
// Function: transfereFich
int transfereFich(int te, int tp, int sock, char *file, int destBuffer, ConState *con ,struct sockaddr_in *from, int fromlen){
	int trans, f, fin,  seq = 0;
	char *buffer;
	Datagrama *enviar;
	if((f = open(file, O_RDONLY))< 0){ //Ocorreu um erro na abertura do ficheiro. Possivelmente não existe
		enviar = initDatagrama();
		enviar->flags = (FL_ERRO | FL_FIN);
		buffer = muxDatagrama(enviar);
		free(enviar);
		sendto(sock,buffer,strlen(buffer), 0, (struct sockaddr *)from, fromlen);
		free(buffer);
		perror("open");
		return -1;
	}
	else {
		fin  = 0;
		trans = 1;
		while(!fin && trans){
			enviar = parteFicheiro(f, destBuffer, seq); //Segmento com atenção ao buffer do cliente
			enviar->cksum = checksum(enviar->data);     //Calcula o cksum da informação e junta ao segmento
			seq = enviar->seq;
			
			fin = (enviar->flags & FL_FIN);
			buffer = muxDatagrama(enviar);
			
			trans = sendMsg(te, tp, sock, buffer, con, seq, from, &fromlen);
			free(enviar);
			free(buffer);
		}
	return fin;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, -0x48(%rbp)
movl %r8d, -0x3c(%rbp)
movl %edx, -0x2c(%rbp)
movl %esi, -0x38(%rbp)
movl %edi, -0x34(%rbp)
xorl %r14d, %r14d
movq %rcx, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x1150
movl %eax, -0x30(%rbp)
testl %eax, %eax
js 0x1e27
movl -0x30(%rbp), %edi
movl -0x3c(%rbp), %esi
movl %r14d, %edx
callq 0x1a7a
movq %rax, %r15
leaq 0x18(%rax), %rdi
callq 0x1539
movl %eax, 0x14(%r15)
movl (%r15), %r14d
movl 0x10(%r15), %r12d
movq %r15, %rdi
callq 0x18c7
movq %rax, %rbx
movl -0x34(%rbp), %edi
movl -0x38(%rbp), %esi
movl -0x2c(%rbp), %edx
movq %rax, %rcx
movq -0x48(%rbp), %r8
movl %r14d, %r9d
leaq 0x18(%rbp), %rax
pushq %rax
pushq 0x10(%rbp)
callq 0x1b66
addq $0x10, %rsp
movl %eax, %r13d
movq %r15, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1030
andl $0x4, %r12d
jne 0x1e15
testl %r13d, %r13d
jne 0x1da3
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq 0x10(%rbp), %rdx
callq 0x1237
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jmp 0x1e15
// File: /workspace/github_c_makefile_star2_O1/ulisses[P]ftp-client-server/clientec2.c
// Function: trataPedido
Datagrama* trataPedido(char *pedido){
	if(strstr(pedido, "dir") && strstr(pedido, "get")==NULL){
	Datagrama *novo = initDatagrama();
	novo->flags = (FL_DIR);
	//strcpy(novo->data, "dir.cmd");
	novo->len = strlen("dir.cmd");
	novo->win_size = 1;
	return novo;
	}
	if(strstr(pedido, "get")){
	Datagrama *novo = initDatagrama();
	char ptr[5];
	novo->flags = (FL_GET);
	sscanf(pedido, "%s %s", ptr, novo->data);
	novo->len = strlen(novo->data);
	novo->win_size = 1;
	return novo;
	}
	if(strstr(pedido, "wait")){
	Datagrama *novo = initDatagrama();
	novo->flags = (FL_GET);
	strcpy(novo->data, "wait");
	novo->len = strlen(novo->data);
	novo->win_size = 1;
	return novo;
	}
	if(strstr(pedido, "put")){
	Datagrama *novo = initDatagrama();
	char ptr[5];
	novo->flags = (FL_PUT);
	sscanf(pedido, "%s %s", ptr, novo->data);
	novo->len = strlen(novo->data);
	novo->win_size = 1;
	return novo;
	}
	
	else return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
leaq 0xcd2(%rip), %rsi       # 0x30e5
callq 0x11e0
testq %rax, %rax
je 0x2435
leaq 0xcc5(%rip), %rsi       # 0x30e9
movq %r14, %rdi
callq 0x11e0
testq %rax, %rax
je 0x24ec
leaq 0xcad(%rip), %rsi       # 0x30e9
movq %r14, %rdi
callq 0x11e0
testq %rax, %rax
je 0x2492
movl $0xe0, %edi
callq 0x1120
movq %rax, %rbx
leaq 0x18(%rax), %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movw $0x63, 0x18(%rax)
movl $0x8, 0x10(%rax)
leaq 0xc71(%rip), %rsi       # 0x30ed
leaq -0x22(%rbp), %rdx
movq %r14, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x1130
movq %r15, %rdi
jmp 0x24db
leaq 0xc5a(%rip), %rsi       # 0x30f3
movq %r14, %rdi
callq 0x11e0
testq %rax, %rax
je 0x2530
movl $0xe0, %edi
callq 0x1120
movq %rax, %rbx
leaq 0x18(%rax), %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movl $0x8, 0x10(%rax)
movl $0x74696177, 0x18(%rax) # imm = 0x74696177
movb $0x0, 0x1c(%rax)
callq 0x1070
movl %eax, 0x8(%rbx)
movl $0x1, 0xc(%rbx)
jmp 0x2522
movl $0xe0, %edi
callq 0x1120
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movw $0x63, 0x18(%rax)
movl $0x20, 0x10(%rax)
movabsq $0x100000007, %rax      # imm = 0x100000007
movq %rax, 0x8(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xbc1(%rip), %rsi       # 0x30f8
movq %r14, %rdi
callq 0x11e0
testq %rax, %rax
je 0x2580
movl $0xe0, %edi
callq 0x1120
movq %rax, %rbx
leaq 0x18(%rax), %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movw $0x63, 0x18(%rax)
movl $0x40, 0x10(%rax)
leaq 0xb76(%rip), %rsi       # 0x30ed
leaq -0x1d(%rbp), %rdx
jmp 0x2480
xorl %ebx, %ebx
jmp 0x2522
// File: /workspace/github_c_makefile_star2_O1/ulisses[P]ftp-client-server/clientec2.c
// Function: enviaPedido
int enviaPedido(int sock, char *buffer, struct sockaddr_in *servidor,int te, int tp){
	if(!buffer){
		printf("erro no comando\n");
		return 0;
	}else {
		n = sendto(sock,buffer, strlen(buffer),0,(struct sockaddr *)servidor ,(socklen_t)length);
              	if (n < 0) { 
              		perror("Sendto");
              		exit(1);
              	}
            	return 1;	
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x25d5
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %r15d
movq %rsi, %rdi
callq 0x1070
movl 0x3055(%rip), %r9d      # 0x5600
movl %r15d, %edi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x10b0
movq %rax, %rcx
movl %ecx, 0x304d(%rip)      # 0x5614
movl $0x1, %eax
testl %ecx, %ecx
jns 0x25e3
callq 0x13c5
leaq 0xb8e(%rip), %rdi       # 0x316a
callq 0x1060
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ulisses[P]ftp-client-server/clientec2.c
// Function: contem
Flag *contem(char **argv, char *token) {
        Flag *flag = NULL;
        int i;

        for(i=0; argv[i]!=NULL; i++) {
                if(strcasecmp(argv[i], token) == 0) { /* encontrei */
                        flag = (Flag *) malloc(sizeof(Flag));
                        flag->bool = 1;
                        flag->pos = i;
                        return flag;
                }
        }
        return flag;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r15
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x27dd
movq %rsi, %r14
xorl %ebx, %ebx
xorl %r12d, %r12d
movq %r14, %rsi
callq 0x1040
testl %eax, %eax
je 0x27e1
movq 0x8(%r15,%r12,8), %rdi
incq %r12
testq %rdi, %rdi
jne 0x27c2
jmp 0x27f8
xorl %ebx, %ebx
jmp 0x27f8
movl $0x8, %edi
callq 0x1120
movq %rax, %rbx
movl $0x1, (%rax)
movl %r12d, 0x4(%rax)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ulisses[P]ftp-client-server/clientec2.c
// Function: main
int main(int args, char **argv) {
        Flag *tp = NULL;
        Flag *te = NULL;

        if((tp = contem(argv,"-tp"))==NULL) {
                errorMsg();
                exit(2);
        }

        if((te = contem(argv,"-te"))==NULL) {
                errorMsg();
                exit(3);
        }

        if(tp->bool && te->bool && args >5) {//a alterar aquando da programação da camada da aplicação
                cliente(atoi(argv[te->pos+1]),atoi(argv[tp->pos+1]), argv[5], argv[4]);
                /*Datagrama *teste = trataPedido(pedido);
                if(teste) mostraDatagrama(teste);
                free(teste);*/
        }
        return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r15d
leaq 0x904(%rip), %rsi       # 0x311f
movq %rbx, %rdi
callq 0x27a4
testq %rax, %rax
je 0x288e
movq %rax, %r14
leaq 0x8f1(%rip), %rsi       # 0x3123
movq %rbx, %rdi
callq 0x27a4
testq %rax, %rax
je 0x289d
cmpl $0x0, (%r14)
je 0x2881
cmpl $0x6, %r15d
jl 0x2881
cmpl $0x0, (%rax)
je 0x2881
movslq 0x4(%rax), %rax
movq 0x8(%rbx,%rax,8), %rdi
callq 0x1180
movl %eax, %r15d
movslq 0x4(%r14), %rax
movq 0x8(%rbx,%rax,8), %rdi
callq 0x1180
movq 0x20(%rbx), %rcx
movq 0x28(%rbx), %rdx
movl %r15d, %edi
movl %eax, %esi
callq 0x25ee
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x2793
movl $0x2, %edi
callq 0x11b0
callq 0x2793
movl $0x3, %edi
callq 0x11b0
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/tst/uint256.c
// Function: test_bits
void test_bits() {
    uint256_t a;
    clear256(&a);
    assert(bits256(&a) == 0);

    LOWER(LOWER(a)) = 1;
    assert(bits256(&a) == 1);

    LOWER(UPPER(a)) = 1;
    assert(bits128(&UPPER(a)) == 1);
    assert(bits256(&a) == 129);

    UPPER(UPPER(a)) = 0xff00000000000000;
    assert(bits128(&UPPER(a)) == 128);
    assert(bits256(&a) == 256);

    UPPER(UPPER(a)) = 0x7f00000000000000;
    assert(bits128(&UPPER(a)) == 127);
    assert(bits256(&a) == 255);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x33ce
movq %rbx, %rdi
callq 0x3b35
testl %eax, %eax
jne 0x1b4a
movq %rsp, %rdi
movq $0x1, 0x18(%rdi)
callq 0x3b35
cmpl $0x1, %eax
jne 0x1b69
movq %rsp, %rdi
movq $0x1, 0x8(%rdi)
callq 0x3b09
cmpl $0x1, %eax
jne 0x1b88
movq %rsp, %rdi
callq 0x3b35
cmpl $0x81, %eax
jne 0x1ba7
movabsq $-0x100000000000000, %rax # imm = 0xFF00000000000000
movq %rsp, %rdi
movq %rax, (%rdi)
callq 0x3b09
cmpl $0x80, %eax
jne 0x1bc6
movq %rsp, %rdi
callq 0x3b35
cmpl $0x100, %eax            # imm = 0x100
jne 0x1be5
movabsq $0x7f00000000000000, %rax # imm = 0x7F00000000000000
movq %rsp, %rdi
movq %rax, (%rdi)
callq 0x3b09
cmpl $0x7f, %eax
jne 0x1c04
movq %rsp, %rdi
callq 0x3b35
cmpl $0xff, %eax
jne 0x1c23
addq $0x20, %rsp
popq %rbx
retq
leaq 0x4bb1(%rip), %rdi      # 0x6702
leaq 0x451f(%rip), %rsi      # 0x6077
leaq 0x4bb4(%rip), %rcx      # 0x6713
movl $0x58, %edx
callq 0x1030
leaq 0x4bb4(%rip), %rdi      # 0x6724
leaq 0x4500(%rip), %rsi      # 0x6077
leaq 0x4b95(%rip), %rcx      # 0x6713
movl $0x5b, %edx
callq 0x1030
leaq 0x4ba6(%rip), %rdi      # 0x6735
leaq 0x44e1(%rip), %rsi      # 0x6077
leaq 0x4b76(%rip), %rcx      # 0x6713
movl $0x5e, %edx
callq 0x1030
leaq 0x4b9f(%rip), %rdi      # 0x674d
leaq 0x44c2(%rip), %rsi      # 0x6077
leaq 0x4b57(%rip), %rcx      # 0x6713
movl $0x5f, %edx
callq 0x1030
leaq 0x4b93(%rip), %rdi      # 0x6760
leaq 0x44a3(%rip), %rsi      # 0x6077
leaq 0x4b38(%rip), %rcx      # 0x6713
movl $0x62, %edx
callq 0x1030
leaq 0x4b8e(%rip), %rdi      # 0x677a
leaq 0x4484(%rip), %rsi      # 0x6077
leaq 0x4b19(%rip), %rcx      # 0x6713
movl $0x63, %edx
callq 0x1030
leaq 0x4b82(%rip), %rdi      # 0x678d
leaq 0x4465(%rip), %rsi      # 0x6077
leaq 0x4afa(%rip), %rcx      # 0x6713
movl $0x66, %edx
callq 0x1030
leaq 0x4b7d(%rip), %rdi      # 0x67a7
leaq 0x4446(%rip), %rsi      # 0x6077
leaq 0x4adb(%rip), %rcx      # 0x6713
movl $0x67, %edx
callq 0x1030
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/tst/uint256.c
// Function: main
int main() {
    test_bitwise();
    test_bits();
    test_math();
    test_shiftar();
    test_exp();
    test_signextend();
    test_mulmod();
    return 0;
}

// Assembly:
pushq %rax
callq 0x114c
callq 0x1a7b
callq 0x1c42
callq 0x1fc3
callq 0x27d4
callq 0x2b48
callq 0x2fdb
xorl %eax, %eax
popq %rcx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/uint256.c
// Function: shiftl128
void shiftl128(const uint128_t *number, uint32_t value, uint128_t *target) {
    if (value >= 128) {
        clear128(target);
    } else if (value == 64) {
        UPPER_P(target) = LOWER_P(number);
        LOWER_P(target) = 0;
    } else if (value == 0) {
        copy128(target, number);
    } else if (value < 64) {
        UPPER_P(target) =
            (UPPER_P(number) << value) + (LOWER_P(number) >> (64 - value));
        LOWER_P(target) = (LOWER_P(number) << value);
    } else if ((128 > value) && (value > 64)) {
        UPPER_P(target) = LOWER_P(number) << (value - 64);
        LOWER_P(target) = 0;
    } else {
        clear128(target);
    }
}

// Assembly:
cmpl $0x80, %esi
jb 0x33fb
xorps %xmm0, %xmm0
movups %xmm0, (%rdx)
retq
testl %esi, %esi
je 0x340a
cmpl $0x40, %esi
jne 0x3416
movq 0x8(%rdi), %rax
jmp 0x3446
movq (%rdi), %rax
movq %rax, (%rdx)
movq 0x8(%rdi), %rax
jmp 0x3438
jae 0x343d
movq (%rdi), %rax
movl %esi, %ecx
shlq %cl, %rax
movq 0x8(%rdi), %r8
negb %cl
shrq %cl, %r8
addq %rax, %r8
movq %r8, (%rdx)
movq 0x8(%rdi), %rax
movl %esi, %ecx
shlq %cl, %rax
movq %rax, 0x8(%rdx)
retq
movq 0x8(%rdi), %rax
movl %esi, %ecx
shlq %cl, %rax
movq %rax, (%rdx)
movq $0x0, 0x8(%rdx)
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/uint256.c
// Function: shiftl256
void shiftl256(const uint256_t *number, uint32_t value, uint256_t *target) {
    if (value >= 256) {
        clear256(target);
    } else if (value == 128) {
        copy128(&UPPER_P(target), &LOWER_P(number));
        clear128(&LOWER_P(target));
    } else if (value == 0) {
        copy256(target, number);
    } else if (value < 128) {
        uint128_t tmp1;
        uint128_t tmp2;
        uint256_t result;
        shiftl128(&UPPER_P(number), value, &tmp1);
        shiftr128(&LOWER_P(number), (128 - value), &tmp2);
        add128(&tmp1, &tmp2, &UPPER(result));
        shiftl128(&LOWER_P(number), value, &LOWER(result));
        copy256(target, &result);
    } else if ((256 > value) && (value > 128)) {
        shiftl128(&LOWER_P(number), (value - 128), &UPPER_P(target));
        clear128(&LOWER_P(target));
    } else {
        clear256(target);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %rbx
cmpl $0x100, %esi            # imm = 0x100
jb 0x3478
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
jmp 0x3552
movl %esi, %ebp
movq %rdi, %r14
testb %bpl, %bpl
je 0x34a1
movzbl %bpl, %eax
cmpl $0x80, %eax
jne 0x34bd
movq 0x10(%r14), %rax
movq %rax, (%rbx)
movq 0x18(%r14), %rax
movq %rax, 0x8(%rbx)
jmp 0x354b
movq (%r14), %rax
movq %rax, (%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movq 0x18(%r14), %rax
jmp 0x3531
cmpl $0x7f, %ebp
ja 0x3537
leaq 0x10(%rsp), %r15
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x33ec
addq $0x10, %r14
movl $0x80, %esi
subl %ebp, %esi
movq %rsp, %r12
movq %r14, %rdi
movq %r12, %rdx
callq 0x355f
movq 0x8(%r15), %rax
addq 0x8(%r12), %rax
movq (%r12), %rcx
adcq (%r15), %rcx
leaq 0x30(%rsp), %r15
movq %rcx, -0x10(%r15)
movq %rax, -0x8(%r15)
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x33ec
movq -0x10(%r15), %rax
movq %rax, (%rbx)
movq -0x8(%r15), %rax
movq %rax, 0x8(%rbx)
movq (%r15), %rax
movq %rax, 0x10(%rbx)
movq 0x8(%r15), %rax
movq %rax, 0x18(%rbx)
jmp 0x3552
addq $0x10, %r14
addl $-0x80, %ebp
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x33ec
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/uint256.c
// Function: shiftr128
void shiftr128(const uint128_t *number, uint32_t value, uint128_t *target) {
    if (value >= 128) {
        clear128(target);
    } else if (value == 64) {
        UPPER_P(target) = 0;
        LOWER_P(target) = UPPER_P(number);
    } else if (value == 0) {
        copy128(target, number);
    } else if (value < 64) {
        uint128_t result;
        UPPER(result) = UPPER_P(number) >> value;
        LOWER(result) =
            (UPPER_P(number) << (64 - value)) + (LOWER_P(number) >> value);
        copy128(target, &result);
    } else if ((128 > value) && (value > 64)) {
        LOWER_P(target) = UPPER_P(number) >> (value - 64);
        UPPER_P(target) = 0;
    } else {
        clear128(target);
    }
}

// Assembly:
cmpl $0x80, %esi
jb 0x356e
xorps %xmm0, %xmm0
movups %xmm0, (%rdx)
retq
testl %esi, %esi
je 0x3583
cmpl $0x40, %esi
jne 0x3592
movq $0x0, (%rdx)
movq (%rdi), %rax
jmp 0x358d
movq (%rdi), %rax
movq %rax, (%rdx)
movq 0x8(%rdi), %rax
movq %rax, 0x8(%rdx)
retq
movq (%rdi), %rax
jae 0x35b8
movq %rax, %r8
movl %esi, %ecx
shrq %cl, %r8
negb %cl
shlq %cl, %rax
movq 0x8(%rdi), %rdi
movl %esi, %ecx
shrq %cl, %rdi
addq %rax, %rdi
movq %r8, (%rdx)
movq %rdi, 0x8(%rdx)
retq
movl %esi, %ecx
shrq %cl, %rax
movq %rax, 0x8(%rdx)
movq $0x0, (%rdx)
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/uint256.c
// Function: add256
void add128(const uint128_t *number1, const uint128_t *number2, uint128_t *target) {
    UPPER_P(target) =
        UPPER_P(number1) + UPPER_P(number2) +
        ((LOWER_P(number1) + LOWER_P(number2)) < LOWER_P(number1));
    LOWER_P(target) = LOWER_P(number1) + LOWER_P(number2);
}

// Assembly:
movq 0x8(%rdi), %rax
addq 0x8(%rsi), %rax
movq (%rsi), %rax
adcq (%rdi), %rax
movq %rax, (%rdx)
movq 0x8(%rsi), %rcx
addq 0x8(%rdi), %rcx
movq %rcx, 0x8(%rdx)
movq 0x10(%rdi), %r8
movq 0x18(%rdi), %r9
xorl %r10d, %r10d
addq 0x18(%rsi), %r9
setb %r10b
movq 0x10(%rsi), %r9
adcq %r8, %r9
xorl %r11d, %r11d
cmpq %r9, %r8
seta %r11b
cmovel %r10d, %r11d
cmpb $0x1, %r11b
jne 0x38bc
addq $0x1, %rcx
adcq $0x0, %rax
movq %rax, (%rdx)
movq %rcx, 0x8(%rdx)
movq 0x10(%rsi), %rax
movq 0x18(%rdi), %rcx
addq 0x18(%rsi), %rcx
adcq 0x10(%rdi), %rax
movq %rax, 0x10(%rdx)
movq 0x18(%rsi), %rax
addq 0x18(%rdi), %rax
movq %rax, 0x18(%rdx)
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/uint256.c
// Function: shiftl512
void shiftl512(const uint512_t *number, uint32_t value, uint512_t *target) {
    if (value >= 512) {
        clear512(target);
    } else if (value == 256) {
        copy256(&UPPER_P(target), &LOWER_P(number));
        clear256(&LOWER_P(target));
    } else if (value == 0) {
        copy512(target, number);
    } else if (value < 256) {
        uint256_t tmp1;
        uint256_t tmp2;
        uint512_t result;
        shiftl256(&UPPER_P(number), value, &tmp1);
        shiftr256(&LOWER_P(number), (256 - value), &tmp2);
        add256(&tmp1, &tmp2, &UPPER(result));
        shiftl256(&LOWER_P(number), value, &LOWER(result));
        copy512(target, &result);
    } else if ((512 > value) && (value > 256)) {
        shiftl256(&LOWER_P(number), (value - 256), &UPPER_P(target));
        clear256(&LOWER_P(target));
    } else {
        clear512(target);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdx, %rbx
cmpl $0x200, %esi            # imm = 0x200
jb 0x3618
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
jmp 0x374c
movl %esi, %ebp
movq %rdi, %r14
testl %esi, %esi
je 0x3658
cmpl $0x100, %ebp            # imm = 0x100
jne 0x3697
movq 0x20(%r14), %rax
movq %rax, (%rbx)
movq 0x28(%r14), %rax
movq %rax, 0x8(%rbx)
movq 0x30(%r14), %rax
movq %rax, 0x10(%rbx)
movq 0x38(%r14), %rax
movq %rax, 0x18(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x30(%rbx)
jmp 0x374c
movq (%r14), %rax
movq %rax, (%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movq 0x18(%r14), %rax
movq %rax, 0x18(%rbx)
movq 0x20(%r14), %rax
movq %rax, 0x20(%rbx)
movq 0x28(%r14), %rax
movq %rax, 0x28(%rbx)
movq 0x30(%r14), %rax
movq %rax, 0x30(%rbx)
movq 0x38(%r14), %rax
jmp 0x3724
jae 0x372a
leaq 0x60(%rsp), %r15
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x3452
addq $0x20, %r14
movl $0x100, %esi            # imm = 0x100
subl %ebp, %esi
leaq 0x40(%rsp), %r12
movq %r14, %rdi
movq %r12, %rdx
callq 0x375c
movq %rsp, %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3862
leaq 0x20(%rsp), %r15
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x3452
movq -0x20(%r15), %rax
movq %rax, (%rbx)
movq -0x18(%r15), %rax
movq %rax, 0x8(%rbx)
movq -0x10(%r15), %rax
movq %rax, 0x10(%rbx)
movq -0x8(%r15), %rax
movq %rax, 0x18(%rbx)
movq (%r15), %rax
movq %rax, 0x20(%rbx)
movq 0x8(%r15), %rax
movq %rax, 0x28(%rbx)
movq 0x10(%r15), %rax
movq %rax, 0x30(%rbx)
movq 0x18(%r15), %rax
movq %rax, 0x38(%rbx)
jmp 0x374c
addq $0x20, %r14
addl $0xffffff00, %ebp       # imm = 0xFFFFFF00
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x3452
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/uint256.c
// Function: shiftr256
void shiftr256(const uint256_t *number, uint32_t value, uint256_t *target) {
    if (value >= 256) {
        clear256(target);
    } else if (value == 128) {
        copy128(&LOWER_P(target), &UPPER_P(number));
        clear128(&UPPER_P(target));
    } else if (value == 0) {
        copy256(target, number);
    } else if (value < 128) {
        uint128_t tmp1;
        uint128_t tmp2;
        uint256_t result;
        shiftr128(&UPPER_P(number), value, &UPPER(result));
        shiftr128(&LOWER_P(number), value, &tmp1);
        shiftl128(&UPPER_P(number), (128 - value), &tmp2);
        add128(&tmp1, &tmp2, &LOWER(result));
        copy256(target, &result);
    } else if ((256 > value) && (value > 128)) {
        shiftr128(&UPPER_P(number), (value - 128), &LOWER_P(target));
        clear128(&UPPER_P(target));
    } else {
        clear256(target);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
cmpl $0x100, %esi            # imm = 0x100
jb 0x3781
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
jmp 0x3850
movl %esi, %ebp
movq %rdi, %r14
testb %bpl, %bpl
je 0x37aa
movzbl %bpl, %eax
cmpl $0x80, %eax
jne 0x37c6
movq (%r14), %rax
movq %rax, 0x10(%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x18(%rbx)
jmp 0x384d
movq (%r14), %rax
movq %rax, (%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movq 0x18(%r14), %rax
jmp 0x3836
cmpl $0x7f, %ebp
ja 0x383c
leaq 0x28(%rsp), %r15
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x355f
leaq 0x10(%r14), %rdi
leaq 0x18(%rsp), %r12
movl %ebp, %esi
movq %r12, %rdx
callq 0x355f
movl $0x80, %esi
subl %ebp, %esi
leaq 0x8(%rsp), %r13
movq %r14, %rdi
movq %r13, %rdx
callq 0x33ec
movq (%r13), %rax
movq 0x8(%r12), %rcx
addq 0x8(%r13), %rcx
adcq (%r12), %rax
movq %rax, 0x10(%r15)
movq %rcx, 0x18(%r15)
movq (%r15), %rcx
movq %rcx, (%rbx)
movq 0x8(%r15), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movq 0x18(%r15), %rax
movq %rax, 0x18(%rbx)
jmp 0x3853
addl $-0x80, %ebp
leaq 0x10(%rbx), %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0x355f
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/uint256.c
// Function: shiftr512
void shiftr512(const uint512_t *number, uint32_t value, uint512_t *target) {
    if (value >= 512) {
        clear512(target);
    } else if (value == 256) {
        copy256(&LOWER_P(target), &UPPER_P(number));
        clear256(&UPPER_P(target));
    } else if (value == 0) {
        copy512(target, number);
    } else if (value < 256) {
        uint256_t tmp1;
        uint256_t tmp2;
        uint512_t result;
        shiftr256(&UPPER_P(number), value, &UPPER(result));
        shiftr256(&LOWER_P(number), value, &tmp1);
        shiftl256(&UPPER_P(number), (256 - value), &tmp2);
        add256(&tmp1, &tmp2, &LOWER(result));
        copy512(target, &result);
    } else if ((512 > value) && (value > 256)) {
        shiftr256(&UPPER_P(number), (value - 256), &LOWER_P(target));
        clear256(&UPPER_P(target));
    } else {
        clear512(target);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdx, %rbx
cmpl $0x200, %esi            # imm = 0x200
jb 0x390e
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
jmp 0x3a1a
movl %esi, %ebp
movq %rdi, %r14
testl %esi, %esi
je 0x394d
cmpl $0x100, %ebp            # imm = 0x100
jne 0x398c
movq (%r14), %rax
movq %rax, 0x20(%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x28(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x30(%rbx)
movq 0x18(%r14), %rax
movq %rax, 0x38(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
jmp 0x3a1a
movq (%r14), %rax
movq %rax, (%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movq 0x18(%r14), %rax
movq %rax, 0x18(%rbx)
movq 0x20(%r14), %rax
movq %rax, 0x20(%rbx)
movq 0x28(%r14), %rax
movq %rax, 0x28(%rbx)
movq 0x30(%r14), %rax
movq %rax, 0x30(%rbx)
movq 0x38(%r14), %rax
jmp 0x3a16
jae 0x3a2a
movq %rsp, %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0x375c
leaq 0x20(%r14), %rdi
leaq 0x60(%rsp), %r15
movl %ebp, %esi
movq %r15, %rdx
callq 0x375c
movl $0x100, %esi            # imm = 0x100
subl %ebp, %esi
leaq 0x40(%rsp), %r12
movq %r14, %rdi
movq %r12, %rdx
callq 0x3452
leaq 0x20(%rsp), %r14
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x3862
movq -0x20(%r14), %rax
movq %rax, (%rbx)
movq -0x18(%r14), %rax
movq %rax, 0x8(%rbx)
movq -0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movq -0x8(%r14), %rax
movq %rax, 0x18(%rbx)
movq (%r14), %rax
movq %rax, 0x20(%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x28(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x30(%rbx)
movq 0x18(%r14), %rax
movq %rax, 0x38(%rbx)
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
addl $0xffffff00, %ebp       # imm = 0xFFFFFF00
leaq 0x20(%rbx), %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0x375c
xorps %xmm0, %xmm0
jmp 0x3902
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/uint256.c
// Function: shiftar256
void shiftar256(const uint256_t *number, uint32_t value, uint256_t *target) {
    bool positive = (UPPER(UPPER_P(number)) < 0x8000000000000000);
    shiftr256(number, value, target);
    if (positive) return;
    if (!value) return;
    if (value >= 64) {
        UPPER(UPPER_P(target)) = 0xffffffffffffffffllu;
        if (value >= 128) {
            LOWER(UPPER_P(target)) = 0xffffffffffffffffllu;
            if (value >= 192) {
                UPPER(LOWER_P(target)) = 0xffffffffffffffffllu;
                if (value >= 256) {
                    LOWER(LOWER_P(target)) = 0xffffffffffffffffllu;
                } else if (value > 192) {
                    LOWER(LOWER_P(target)) |= 0xffffffffffffffffllu - ((1llu << (256 - value)) - 1llu);
                }
            } else if (value > 128) {
                UPPER(LOWER_P(target)) |= 0xffffffffffffffffllu - ((1llu << (192 - value)) - 1llu);
            }
        } else if (value > 64) {
            LOWER(UPPER_P(target)) |= 0xffffffffffffffffllu - ((1llu << (128 - value)) - 1llu);
        }
    } else {
        UPPER(UPPER_P(target)) |= 0xffffffffffffffffllu - ((1llu << (64 - value)) - 1llu);
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq (%rdi), %r14
callq 0x375c
testl %ebp, %ebp
je 0x3ab0
testq %r14, %r14
jns 0x3ab0
cmpl $0x40, %ebp
jb 0x3a9e
movq $-0x1, (%rbx)
cmpl $0x80, %ebp
jb 0x3ab5
movq $-0x1, 0x8(%rbx)
cmpl $0xc0, %ebp
jb 0x3acf
movq $-0x1, 0x10(%rbx)
cmpl $0x100, %ebp            # imm = 0x100
jb 0x3aec
movq $-0x1, 0x18(%rbx)
jmp 0x3ab0
negb %bpl
movq $-0x1, %rax
movl %ebp, %ecx
shlq %cl, %rax
orq %rax, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
cmpl $0x40, %ebp
je 0x3ab0
negb %bpl
movq $-0x1, %rax
movl %ebp, %ecx
shlq %cl, %rax
orq %rax, 0x8(%rbx)
jmp 0x3ab0
cmpl $0x80, %ebp
je 0x3ab0
negb %bpl
movq $-0x1, %rax
movl %ebp, %ecx
shlq %cl, %rax
orq %rax, 0x10(%rbx)
jmp 0x3ab0
cmpl $0xc0, %ebp
je 0x3ab0
negb %bpl
movq $-0x1, %rax
movl %ebp, %ecx
shlq %cl, %rax
orq %rax, 0x18(%rbx)
jmp 0x3ab0
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/uint256.c
// Function: bits256
uint32_t bits256(const uint256_t *number) {
    if (!zero128(&UPPER_P(number))) {
        return 128 + bits128(&UPPER_P(number));
    } else {
        return bits128(&LOWER_P(number));
    }
}

// Assembly:
movq 0x8(%rdi), %rax
testq %rax, %rax
jne 0x3b44
cmpq $0x0, (%rdi)
je 0x3b6b
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x3b5a
bsrq %rcx, %rax
xorl $-0x40, %eax
addl $0x81, %eax
jmp 0x3b83
testq %rax, %rax
je 0x3b81
bsrq %rax, %rax
xorl $-0x40, %eax
addl $0x41, %eax
jmp 0x3b83
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x3b87
bsrq %rax, %rax
xorl $-0x40, %eax
addl $0x81, %eax
retq
xorl %eax, %eax
subl $-0x80, %eax
retq
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x3b9b
bsrq %rax, %rax
xorl $-0x40, %eax
addl $0x41, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/uint256.c
// Function: sgt256
bool sgt256(const uint256_t *number1, const uint256_t *number2) {
    return (
        UPPER(UPPER_P(number1)) >= 0x8000000000000000 == UPPER(UPPER_P(number2)) >= 0x8000000000000000
        ? gt256(number1, number2)
        : gt256(number2, number1)
    );
}

// Assembly:
movq %rdi, %rax
movq (%rsi), %rcx
xorq (%rdi), %rcx
js 0x3db2
movq %rax, %rdi
jmp 0x3c78
movq %rsi, %rdi
movq %rax, %rsi
jmp 0x3c78
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/uint256.c
// Function: add512
void add512(const uint512_t *number1, const uint512_t *number2, uint512_t *target) {
    uint256_t tmp;
    add256(&UPPER_P(number1), &UPPER_P(number2), &UPPER_P(target));
    add256(&LOWER_P(number1), &LOWER_P(number2), &tmp);
    if (gt256(&LOWER_P(number1), &tmp)) {
        uint256_t one;
        clear128(&UPPER(one));
        UPPER(LOWER(one)) = 0;
        LOWER(LOWER(one)) = 1;
        add256(&UPPER_P(target), &one, &UPPER_P(target));
    }
    copy256(&LOWER_P(target), &tmp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0x3862
leaq 0x20(%r14), %rdi
addq $0x20, %r15
movq %rsp, %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0x3862
movq (%r12), %r15
cmpq %r15, 0x20(%r14)
jne 0x3e15
movq 0x8(%rsp), %rax
cmpq %rax, 0x28(%r14)
jne 0x3e15
movq 0x10(%rsp), %rax
cmpq %rax, 0x30(%r14)
jne 0x3e15
movq 0x38(%r14), %rax
cmpq 0x18(%rsp), %rax
seta %al
testb %al, %al
je 0x3e42
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq $0x1, 0x18(%rsi)
movq %rbx, %rdi
movq %rbx, %rdx
callq 0x3862
movq %r15, 0x20(%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rbx)
movq 0x18(%rsp), %rax
movq %rax, 0x38(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/uint256.c
// Function: minus512
void minus512(const uint512_t *number1, const uint512_t *number2, uint512_t *target) {
    uint256_t tmp;
    minus256(&UPPER_P(number1), &UPPER_P(number2), &UPPER_P(target));
    minus256(&LOWER_P(number1), &LOWER_P(number2), &tmp);
    if (gt256(&tmp, &LOWER_P(number1))) {
        uint256_t one;
        clear128(&UPPER(one));
        UPPER(LOWER(one)) = 0;
        LOWER(LOWER(one)) = 1;
        minus256(&UPPER_P(target), &one, &UPPER_P(target));
    }
    minus256(&LOWER_P(number1), &LOWER_P(number2), &LOWER_P(target));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
callq 0x3e8b
leaq 0x20(%r12), %r15
addq $0x20, %r14
movq %rsp, %r13
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x3e8b
movq 0x20(%r12), %rax
cmpq %rax, (%r13)
jne 0x3f7c
movq 0x28(%r12), %rax
cmpq %rax, 0x8(%rsp)
jne 0x3f7c
movq 0x30(%r12), %rax
cmpq %rax, 0x10(%rsp)
jne 0x3f7c
movq 0x18(%rsp), %rax
cmpq 0x38(%r12), %rax
seta %al
testb %al, %al
je 0x3fa9
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq $0x1, 0x18(%rsi)
movq %rbx, %rdi
movq %rbx, %rdx
callq 0x3e8b
addq $0x20, %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3e8b
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/uint256.c
// Function: mul128
void mul128(const uint128_t *number1, const uint128_t *number2, uint128_t *target) {
    uint64_t top[4] = {UPPER_P(number1) >> 32, UPPER_P(number1) & 0xffffffff,
                       LOWER_P(number1) >> 32, LOWER_P(number1) & 0xffffffff};
    uint64_t bottom[4] = {UPPER_P(number2) >> 32, UPPER_P(number2) & 0xffffffff,
                          LOWER_P(number2) >> 32,
                          LOWER_P(number2) & 0xffffffff};
    uint64_t products[4][4];
    uint128_t tmp, tmp2;

    for (uint8_t y = 4; y --> 0;) {
        for (uint8_t x = 4; x --> 0;) {
            products[3 - x][y] = top[x] * bottom[y];
        }
    }

    uint64_t fourth32 = products[0][3] & 0xffffffff;
    uint64_t third32 = (products[0][2] & 0xffffffff) + (products[0][3] >> 32);
    uint64_t second32 = (products[0][1] & 0xffffffff) + (products[0][2] >> 32);
    uint64_t first32 = (products[0][0] & 0xffffffff) + (products[0][1] >> 32);

    third32 += products[1][3] & 0xffffffff;
    second32 += (products[1][2] & 0xffffffff) + (products[1][3] >> 32);
    first32 += (products[1][1] & 0xffffffff) + (products[1][2] >> 32);

    second32 += products[2][3] & 0xffffffff;
    first32 += (products[2][2] & 0xffffffff) + (products[2][3] >> 32);

    first32 += products[3][3] & 0xffffffff;

    UPPER(tmp) = first32 << 32;
    LOWER(tmp) = 0;
    UPPER(tmp2) = third32 >> 32;
    LOWER(tmp2) = third32 << 32;
    add128(&tmp, &tmp2, target);
    UPPER(tmp) = second32;
    LOWER(tmp) = 0;
    add128(&tmp, target, &tmp2);
    UPPER(tmp) = 0;
    LOWER(tmp) = fourth32;
    add128(&tmp, &tmp2, target);
}

// Assembly:
subq $0x48, %rsp
movq (%rdi), %rax
movl %eax, %ecx
shrq $0x20, %rax
movq %rax, -0x60(%rsp)
movq %rcx, -0x58(%rsp)
movq 0x8(%rdi), %rax
movl %eax, %ecx
shrq $0x20, %rax
movq %rax, -0x50(%rsp)
movq %rcx, -0x48(%rsp)
movq (%rsi), %rax
movl %eax, %ecx
shrq $0x20, %rax
movq %rax, -0x80(%rsp)
movq %rcx, -0x78(%rsp)
movq 0x8(%rsi), %rax
movl %eax, %ecx
shrq $0x20, %rax
movq %rax, -0x70(%rsp)
movq %rcx, -0x68(%rsp)
movl $0x3, %eax
leaq -0x28(%rsp), %rcx
movq -0x80(%rsp,%rax,8), %rsi
movl $0x3, %edi
movq %rcx, %r8
movq -0x60(%rsp,%rdi,8), %r9
imulq %rsi, %r9
movq %r9, (%r8)
addq $0x20, %r8
addq $-0x1, %rdi
jb 0x419b
addq $-0x8, %rcx
subq $0x1, %rax
jae 0x418e
movq -0x28(%rsp), %r9
movl %r9d, %eax
movq -0x38(%rsp), %rsi
movq -0x30(%rsp), %r8
movl %r8d, %ecx
shrq $0x20, %r9
addq %rcx, %r9
movl %esi, %ecx
shrq $0x20, %r8
addq %rcx, %r8
shrq $0x20, %rsi
movq -0x8(%rsp), %rdi
movl %edi, %ecx
addq %r9, %rcx
movq -0x10(%rsp), %r9
movl %r9d, %r10d
shrq $0x20, %rdi
addq %r10, %rdi
addq %r8, %rdi
shrq $0x20, %r9
movq 0x18(%rsp), %r8
movl %r8d, %r10d
shrq $0x20, %r8
addl -0x40(%rsp), %esi
addl %esi, %r9d
addl -0x18(%rsp), %r9d
addl %r9d, %r8d
addl 0x10(%rsp), %r8d
addl 0x38(%rsp), %r8d
addq %rdi, %r10
shldq $0x20, %rcx, %r8
shlq $0x20, %rcx
orq %rax, %rcx
addq %r10, %r8
movq %r8, (%rdx)
movq %rcx, 0x8(%rdx)
addq $0x48, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/uint256.c
// Function: exp256
void exp256(const uint256_t *base, const uint256_t *power, uint256_t *target) {
    uint256_t remaining, result;
    copy256(&remaining, power);
    UPPER(UPPER(result)) = 0;
    LOWER(UPPER(result)) = 0;
    UPPER(LOWER(result)) = 0;
    LOWER(LOWER(result)) = 1;
    uint256_t multiplier;
    copy256(&multiplier, base);
    while (!zero256(&remaining)) {
        if (LOWER(LOWER(remaining)) & 1) {
            mul256(&result, &multiplier, &result);
        }
        mul256(&multiplier, &multiplier, &multiplier);
        shiftr256(&remaining, 1, &remaining);
    }
    copy256(target, &result);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %rbx
movq (%rsi), %rcx
movq %rcx, (%rsp)
movq 0x8(%rsi), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rsi), %r8
movq %r8, 0x10(%rsp)
movq 0x18(%rsi), %rax
movq %rax, 0x18(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x1, 0x38(%rsp)
movq (%rdi), %rsi
movq %rsi, 0x48(%rsp)
movq 0x8(%rdi), %rsi
movq %rsi, 0x50(%rsp)
movq 0x10(%rdi), %rsi
movq %rsi, 0x58(%rsp)
movq 0x18(%rdi), %rsi
movq %rsi, 0x60(%rsp)
testq %rax, %rax
jne 0x4906
testq %r8, %r8
jne 0x4906
testq %rdx, %rdx
jne 0x4906
testq %rcx, %rcx
je 0x4964
leaq 0x48(%rsp), %r14
movq %rsp, %r15
leaq 0x20(%rsp), %r12
testb $0x1, %al
je 0x4925
movq %r12, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x4247
movq %r14, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x4247
movq %r15, %rdi
movl $0x1, %esi
movq %r15, %rdx
callq 0x375c
movq 0x18(%rsp), %rax
testq %rax, %rax
jne 0x4913
cmpq $0x0, 0x10(%rsp)
jne 0x4913
cmpq $0x0, 0x8(%rsp)
jne 0x4913
cmpq $0x0, (%rsp)
jne 0x4913
movq 0x20(%rsp), %rax
movq %rax, (%rbx)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rbx)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rbx)
movq 0x38(%rsp), %rax
movq %rax, 0x18(%rbx)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/uint256.c
// Function: addmod256
void addmod256(const uint256_t *number1, const uint256_t *number2, const uint256_t *divisor, uint256_t *target) {
    uint512_t one, two, sum, three, result;
    clear256(&UPPER_P(&one));
    clear256(&UPPER_P(&two));
    clear256(&UPPER_P(&three));
    copy256(&LOWER_P(&one), number1);
    copy256(&LOWER_P(&two), number2);
    copy256(&LOWER_P(&three), divisor);
    add512(&one, &two, &sum);
    if (zero256(&UPPER(sum))) {
        divmod256(&LOWER(sum), divisor, &LOWER(one), target);
    } else {
        copy256(&LOWER(two), divisor);
        divmod512(&sum, &two, &one, &result);
        copy256(target, &LOWER(result));
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rcx, %rbx
movq %rdx, %r14
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rax
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
leaq 0x80(%rsp), %rcx
movaps %xmm0, (%rcx)
movaps %xmm0, 0x10(%rcx)
movq (%rdi), %rdx
movq %rdx, 0x20(%rax)
movq 0x8(%rdi), %rdx
movq %rdx, 0x28(%rax)
movq 0x10(%rdi), %rdx
movq %rdx, 0x30(%rax)
movq 0x18(%rdi), %rdx
movq %rdx, 0x38(%rax)
movq (%rsi), %rdx
movq %rdx, 0x20(%rcx)
movq 0x8(%rsi), %rdx
movq %rdx, 0x28(%rcx)
movq 0x10(%rsi), %rdx
movq %rdx, 0x30(%rcx)
movq 0x18(%rsi), %rdx
movq %rdx, 0x38(%rcx)
movq %rsp, %r15
movq %rax, %rdi
movq %rcx, %rsi
movq %r15, %rdx
callq 0x3dbd
cmpq $0x0, 0x18(%r15)
jne 0x523d
cmpq $0x0, 0x10(%rsp)
jne 0x523d
cmpq $0x0, 0x8(%rsp)
jne 0x523d
cmpq $0x0, (%rsp)
jne 0x523d
leaq 0x60(%rsp), %rdx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x4b96
jmp 0x529b
movq (%r14), %rax
leaq 0x80(%rsp), %rsi
movq %rax, 0x20(%rsi)
movq 0x8(%r14), %rax
movq %rax, 0x28(%rsi)
movq 0x10(%r14), %rax
movq %rax, 0x30(%rsi)
movq 0x18(%r14), %rax
movq %rax, 0x38(%rsi)
movq %rsp, %rdi
leaq 0x40(%rsp), %rdx
leaq 0xc0(%rsp), %r14
movq %r14, %rcx
callq 0x4dd3
movq 0x20(%r14), %rax
movq %rax, (%rbx)
movq 0x28(%r14), %rax
movq %rax, 0x8(%rbx)
movq 0x30(%r14), %rax
movq %rax, 0x10(%rbx)
movq 0x38(%r14), %rax
movq %rax, 0x18(%rbx)
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/uint256.c
// Function: mulmod256
void mulmod256(const uint256_t *number1, const uint256_t *number2, const uint256_t *divisor, uint256_t *target) {
    uint512_t one, two, product, three, result;
    clear256(&UPPER_P(&one));
    clear256(&UPPER_P(&two));
    clear256(&UPPER_P(&three));
    copy256(&LOWER_P(&one), number1);
    copy256(&LOWER_P(&two), number2);
    copy256(&LOWER_P(&three), divisor);
    mul512(&one, &two, &product);
    if (zero256(&UPPER(product))) {
        divmod256(&LOWER(product), divisor, &LOWER(one), target);
    } else {
        copy256(&LOWER(two), divisor);
        divmod512(&product, &two, &one, &result);
        copy256(target, &LOWER(result));
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rcx, %rbx
movq %rdx, %r14
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rax
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
leaq 0x80(%rsp), %rcx
movaps %xmm0, (%rcx)
movaps %xmm0, 0x10(%rcx)
movq (%rdi), %rdx
movq %rdx, 0x20(%rax)
movq 0x8(%rdi), %rdx
movq %rdx, 0x28(%rax)
movq 0x10(%rdi), %rdx
movq %rdx, 0x30(%rax)
movq 0x18(%rdi), %rdx
movq %rdx, 0x38(%rax)
movq (%rsi), %rdx
movq %rdx, 0x20(%rcx)
movq 0x8(%rsi), %rdx
movq %rdx, 0x28(%rcx)
movq 0x10(%rsi), %rdx
movq %rdx, 0x30(%rcx)
movq 0x18(%rsi), %rdx
movq %rdx, 0x38(%rcx)
movq %rsp, %r15
movq %rax, %rdi
movq %rcx, %rsi
movq %r15, %rdx
callq 0x444e
cmpq $0x0, 0x18(%r15)
jne 0x535c
cmpq $0x0, 0x10(%rsp)
jne 0x535c
cmpq $0x0, 0x8(%rsp)
jne 0x535c
cmpq $0x0, (%rsp)
jne 0x535c
leaq 0x60(%rsp), %rdx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x4b96
jmp 0x53ba
movq (%r14), %rax
leaq 0x80(%rsp), %rsi
movq %rax, 0x20(%rsi)
movq 0x8(%r14), %rax
movq %rax, 0x28(%rsi)
movq 0x10(%r14), %rax
movq %rax, 0x30(%rsi)
movq 0x18(%r14), %rax
movq %rax, 0x38(%rsi)
movq %rsp, %rdi
leaq 0x40(%rsp), %rdx
leaq 0xc0(%rsp), %r14
movq %r14, %rcx
callq 0x4dd3
movq 0x20(%r14), %rax
movq %rax, (%rbx)
movq 0x28(%r14), %rax
movq %rax, 0x8(%rbx)
movq 0x30(%r14), %rax
movq %rax, 0x10(%rbx)
movq 0x38(%r14), %rax
movq %rax, 0x18(%rbx)
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
retq