task_name string | source_code string | x86_64 string | aarch64_linux string | riscv64 string | aarch64_apple string |
|---|---|---|---|---|---|
C_1 | #include <assert.h>
#include <string.h>
// Return "Hello, MMCODEEVAL: Masssively Multilingual Code Evaluation"
char *hello_mmcodeeval(){
return "Hello, MMCODEEVAL: Masssively Multilingual Code Evaluation";
} | .text
.intel_syntax noprefix
.file "code.c"
.globl hello_mmcodeeval # -- Begin function hello_mmcodeeval
.p2align 4, 0x90
.type hello_mmcodeeval,@function
hello_mmcodeeval: # @hello_mmcodeeval
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mo... | .text
.file "code.c"
.globl hello_mmcodeeval // -- Begin function hello_mmcodeeval
.p2align 2
.type hello_mmcodeeval,@function
hello_mmcodeeval: // @hello_mmcodeeval
.cfi_startproc
// %bb.0:
adrp x0, .L.str
add x0, x0, :lo12:.L.str
ret
.Lfunc_end0:
.size hello_mmcodeeval, ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl hello_mmcodeeval # -- Begin function hello_mmcodeeval
.p2align 1
.type hello_mmcodeeval,@function
hello_mmcodeeval: # @hello_mmcodeeval
.cfi_startproc
# %bb.0:... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _hello_mmcodeeval ; -- Begin function hello_mmcodeeval
.p2align 2
_hello_mmcodeeval: ; @hello_mmcodeeval
.cfi_startproc
; %bb.0:
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
ret
.cfi_endpro... |
C_10 | #include <assert.h>
#include <stdio.h>
/*
Calculate the sum of even numbers in a given list.
Parameters:
- numbers (list): A list of integers.
- size (int): The size of the list.
Returns:
int: The sum of even numbers in the input list.
>>> calculate_even_sum([1,4,3,2,5], 5)
6
*/
int calculate_even_s... | .text
.intel_syntax noprefix
.file "code.c"
.globl calculate_even_sum # -- Begin function calculate_even_sum
.p2align 4, 0x90
.type calculate_even_sum,@function
calculate_even_sum: # @calculate_even_sum
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -... | .text
.file "code.c"
.globl calculate_even_sum // -- Begin function calculate_even_sum
.p2align 2
.type calculate_even_sum,@function
calculate_even_sum: // @calculate_even_sum
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl calculate_even_sum # -- Begin function calculate_even_sum
.p2align 1
.type calculate_even_sum,@function
calculate_even_sum: # @calculate_even_sum
.cfi_startproc
# ... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _calculate_even_sum ; -- Begin function calculate_even_sum
.p2align 2
_calculate_even_sum: ; @calculate_even_sum
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
st... |
C_11 | #include <assert.h>
#include <stdio.h>
/*
Determine if two closed intervals intersect.
β Args:
β a, b: Representing the first closed interval [a, b] where 0 <= a <= b <= 1000.
β c, d: Representing the second closed interval [c, d] where 0 <= c <= d <= 1000.
β Returns:
β int: 1 if the intervals intersect,... | .text
.intel_syntax noprefix
.file "code.c"
.globl are_intervals_intersecting # -- Begin function are_intervals_intersecting
.p2align 4, 0x90
.type are_intervals_intersecting,@function
are_intervals_intersecting: # @are_intervals_intersecting
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offse... | .text
.file "code.c"
.globl are_intervals_intersecting // -- Begin function are_intervals_intersecting
.p2align 2
.type are_intervals_intersecting,@function
are_intervals_intersecting: // @are_intervals_intersecting
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl are_intervals_intersecting # -- Begin function are_intervals_intersecting
.p2align 1
.type are_intervals_intersecting,@function
are_intervals_intersecting: # @are_intervals_interse... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _are_intervals_intersecting ; -- Begin function are_intervals_intersecting
.p2align 2
_are_intervals_intersecting: ; @are_intervals_intersecting
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w... |
C_12 | #include <assert.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
/*
You are given three digits a, b, c. Two of them are equal, but the third one is different from the other two. Find the value that occurs exactly once.
>>> extraNumber(0,0,1)
1
>>> extraNumber(4,3,4)
3
*/
int extraNumber(int... | .text
.intel_syntax noprefix
.file "code.c"
.globl extraNumber # -- Begin function extraNumber
.p2align 4, 0x90
.type extraNumber,@function
extraNumber: # @extraNumber
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cf... | .text
.file "code.c"
.globl extraNumber // -- Begin function extraNumber
.p2align 2
.type extraNumber,@function
extraNumber: // @extraNumber
.cfi_startproc
// %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #8]
str w1, [sp, #4]
str w2, [sp]
ldr w8, [... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl extraNumber # -- Begin function extraNumber
.p2align 1
.type extraNumber,@function
extraNumber: # @extraNumber
.cfi_startproc
# %bb.0:
addi sp, sp, ... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _extraNumber ; -- Begin function extraNumber
.p2align 2
_extraNumber: ; @extraNumber
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #8]
str w1, [sp, #4]
... |
C_13 | #include <assert.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
/*
Calculate the total score for a student based on the scores in different subjects.
Parameters:
- subject_scores (list): A list containing the scores for each subject.
Returns:
int: The total score obtained b... | .text
.intel_syntax noprefix
.file "code.c"
.globl calculate_total_score # -- Begin function calculate_total_score
.p2align 4, 0x90
.type calculate_total_score,@function
calculate_total_score: # @calculate_total_score
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offs... | .text
.file "code.c"
.globl calculate_total_score // -- Begin function calculate_total_score
.p2align 2
.type calculate_total_score,@function
calculate_total_score: // @calculate_total_score
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #28]
str w1, [s... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl calculate_total_score # -- Begin function calculate_total_score
.p2align 1
.type calculate_total_score,@function
calculate_total_score: # @calculate_total_score
.cfi_sta... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _calculate_total_score ; -- Begin function calculate_total_score
.p2align 2
_calculate_total_score: ; @calculate_total_score
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #2... |
C_14 | #include <assert.h>
#include <stdio.h>
#include <string.h>
/*
Decode a series of numbers to reveal the pattern and understand the actual values
each digit represents.
0000=4 8888=8 1234=1 5678=3 9012=2 1357=0 2468=4
Parameters:
- data_str: A string representing a series of numbers. Length does not exceed 100.
Return... | .text
.intel_syntax noprefix
.file "code.c"
.globl decode_numbers # -- Begin function decode_numbers
.p2align 4, 0x90
.type decode_numbers,@function
decode_numbers: # @decode_numbers
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp,... | .text
.file "code.c"
.globl decode_numbers // -- Begin function decode_numbers
.p2align 2
.type decode_numbers,@function
decode_numbers: // @decode_numbers
.cfi_startproc
// %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
stp x29, x30, [sp, #64] // 16-byte Fol... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl decode_numbers # -- Begin function decode_numbers
.p2align 1
.type decode_numbers,@function
decode_numbers: # @decode_numbers
.cfi_startproc
# %bb.0:
addi... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _decode_numbers ; -- Begin function decode_numbers
.p2align 2
_decode_numbers: ; @decode_numbers
.cfi_startproc
; %bb.0:
sub sp, sp, #96
stp x29, x30, [sp, #80] ; 16-byte Folded ... |
C_15 | #include <assert.h>
#include <stdio.h>
/*
Counts the number of different coloring methods for n squares with m colors,
considering the requirement that adjacent squares and the first/last squares
must have different colors.
Args:
- n (int): The number of squares.
- m (int): The number of colors.
Returns:
in... | .text
.intel_syntax noprefix
.file "code.c"
.globl count_coloring_methods # -- Begin function count_coloring_methods
.p2align 4, 0x90
.type count_coloring_methods,@function
count_coloring_methods: # @count_coloring_methods
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_o... | .text
.file "code.c"
.globl count_coloring_methods // -- Begin function count_coloring_methods
.p2align 2
.type count_coloring_methods,@function
count_coloring_methods: // @count_coloring_methods
.cfi_startproc
// %bb.0:
str x29, [sp, #-16]! // 8-byte Folded Spill
.cfi_de... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.section .sdata,"aw",@progbits
.p2align 3 # -- Begin function count_coloring_methods
.LCPI0_0:
.quad -8775366530925146571 # 0x8637a2a24e5ace35
.text
.globl count... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _count_coloring_methods ; -- Begin function count_coloring_methods
.p2align 2
_count_coloring_methods: ; @count_coloring_methods
.cfi_startproc
; %bb.0:
stp x28, x27, [sp, #-32]! ; 16-byte Folded S... |
C_16 | #include <assert.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
/*
Count the number of valid coin toss sequences with no consecutive heads in n tosses.
β Parameters:
- n (int): The number of coin tosses.
β Returns:
β unsigned long long: The count of valid sequences.
>>> co... | .text
.intel_syntax noprefix
.file "code.c"
.globl count_valid_coin_toss_sequences # -- Begin function count_valid_coin_toss_sequences
.p2align 4, 0x90
.type count_valid_coin_toss_sequences,@function
count_valid_coin_toss_sequences: # @count_valid_coin_toss_sequences
.cfi_startproc
# %bb.0:
push rbp
.cf... | .text
.file "code.c"
.globl count_valid_coin_toss_sequences // -- Begin function count_valid_coin_toss_sequences
.p2align 2
.type count_valid_coin_toss_sequences,@function
count_valid_coin_toss_sequences: // @count_valid_coin_toss_sequences
.cfi_startproc
// %bb.0:
str x29, [sp, #-16]! // 8... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl count_valid_coin_toss_sequences # -- Begin function count_valid_coin_toss_sequences
.p2align 1
.type count_valid_coin_toss_sequences,@function
count_valid_coin_toss_sequences: # @count_valid... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _count_valid_coin_toss_sequences ; -- Begin function count_valid_coin_toss_sequences
.p2align 2
_count_valid_coin_toss_sequences: ; @count_valid_coin_toss_sequences
.cfi_startproc
; %bb.0:
stp x28, x27, [sp, #-32]! ... |
C_17 | #include <assert.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
/*
Find the length of the longest consecutive sequence of 1s in the binary representation of a non-negative integer.
β Parameters:
- n (unsigned long long): A non-negative integer (0 β€ n β€ 2^64 - 1).
β Returns:
β ... | .text
.intel_syntax noprefix
.file "code.c"
.globl find_longest_consecutive_ones_length # -- Begin function find_longest_consecutive_ones_length
.p2align 4, 0x90
.type find_longest_consecutive_ones_length,@function
find_longest_consecutive_ones_length: # @find_longest_consecutive_ones_length
.cfi_startproc
# %... | .text
.file "code.c"
.globl find_longest_consecutive_ones_length // -- Begin function find_longest_consecutive_ones_length
.p2align 2
.type find_longest_consecutive_ones_length,@function
find_longest_consecutive_ones_length: // @find_longest_consecutive_ones_length
.cfi_startproc
// %bb.0:
sub sp, sp, #16
.cf... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl find_longest_consecutive_ones_length # -- Begin function find_longest_consecutive_ones_length
.p2align 1
.type find_longest_consecutive_ones_length,@function
find_longest_consecutive_ones_length: ... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _find_longest_consecutive_ones_length ; -- Begin function find_longest_consecutive_ones_length
.p2align 2
_find_longest_consecutive_ones_length: ; @find_longest_consecutive_ones_length
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cf... |
C_18 | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
/*
Creates an ID by combining two words in a specific manner.
βParameters:
- word1 (char*): The first word to be used in the ID.
- word2 (char*): The second word to be used in the ID.
βReturns:
βchar*: A divine ID formed by reversing every o... | .text
.intel_syntax noprefix
.file "code.c"
.globl create_id # -- Begin function create_id
.p2align 4, 0x90
.type create_id,@function
create_id: # @create_id
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_... | .text
.file "code.c"
.globl create_id // -- Begin function create_id
.p2align 2
.type create_id,@function
create_id: // @create_id
.cfi_startproc
// %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
stp x29, x30, [sp, #64] // 16-byte Folded Spill
add ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl create_id # -- Begin function create_id
.p2align 1
.type create_id,@function
create_id: # @create_id
.cfi_startproc
# %bb.0:
addi sp, sp, -80
.... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _create_id ; -- Begin function create_id
.p2align 2
_create_id: ; @create_id
.cfi_startproc
; %bb.0:
sub sp, sp, #80
stp x29, x30, [sp, #64] ; 16-byte Folded Spill
add... |
C_19 | #include <assert.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
/*
Count the number of different permutation schemes for a binary string of length n,
where the number of '1's is m and the number of '0's is n - m.
β Parameters:
- n (int): Length of the binary string.
- m (int): Numbe... | .text
.intel_syntax noprefix
.file "code.c"
.section .rodata.cst8,"aM",@progbits,8
.p2align 3, 0x0 # -- Begin function count_permutations_of_binary_string
.LCPI0_0:
.quad 0x3ff0000000000000 # double 1
.LCPI0_1:
.quad 0x3fe0000000000000 # double 0.5
.text
.glob... | .text
.file "code.c"
.globl count_permutations_of_binary_string // -- Begin function count_permutations_of_binary_string
.p2align 2
.type count_permutations_of_binary_string,@function
count_permutations_of_binary_string: // @count_permutations_of_binary_string
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_de... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.section .sdata,"aw",@progbits
.p2align 3 # -- Begin function count_permutations_of_binary_string
.LCPI0_0:
.quad 0x3fe0000000000000 # double 0.5
.text
.globl ... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _count_permutations_of_binary_string ; -- Begin function count_permutations_of_binary_string
.p2align 2
_count_permutations_of_binary_string: ; @count_permutations_of_binary_string
.cfi_startproc
; %bb.0:
sub sp, sp, #64
.cfi_d... |
C_2 | #include <assert.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
/*
Calculate the area of a triangle given its three sides.
β Parameters:
- a (float): Length of side 'a'.
- b (float): Length of side 'b'.
- c (float): Length of side 'c'.
β Returns:
- str: If the provided sides form... | .text
.intel_syntax noprefix
.file "code.c"
.section .rodata.cst8,"aM",@progbits,8
.p2align 3, 0x0 # -- Begin function calculate_triangle_area
.LCPI0_0:
.quad 0xbff0000000000000 # double -1
.LCPI0_1:
.quad 0x4000000000000000 # double 2
.text
.globl calculate_t... | .text
.file "code.c"
.globl calculate_triangle_area // -- Begin function calculate_triangle_area
.p2align 2
.type calculate_triangle_area,@function
calculate_triangle_area: // @calculate_triangle_area
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x29, x30, [sp, #48]... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.section .sdata,"aw",@progbits
.p2align 3 # -- Begin function calculate_triangle_area
.LCPI0_0:
.quad 0x4000000000000000 # double 2
.text
.globl calculate_tria... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _calculate_triangle_area ; -- Begin function calculate_triangle_area
.p2align 2
_calculate_triangle_area: ; @calculate_triangle_area
.cfi_startproc
; %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
str d0, [sp... |
C_20 | #include <assert.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
/*
β Answer a series of questions by providing choices A, B, C, or D for each question.
β Question 1:
β Constants like 1e6 belong to which data type?
β A. unsigned int
β B. int
β C. float
β ... | .text
.intel_syntax noprefix
.file "code.c"
.globl answer_questions # -- Begin function answer_questions
.p2align 4, 0x90
.type answer_questions,@function
answer_questions: # @answer_questions
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mo... | .text
.file "code.c"
.globl answer_questions // -- Begin function answer_questions
.p2align 2
.type answer_questions,@function
answer_questions: // @answer_questions
.cfi_startproc
// %bb.0:
adrp x0, .L.str
add x0, x0, :lo12:.L.str
ret
.Lfunc_end0:
.size answer_questions, ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl answer_questions # -- Begin function answer_questions
.p2align 1
.type answer_questions,@function
answer_questions: # @answer_questions
.cfi_startproc
# %bb.0:... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _answer_questions ; -- Begin function answer_questions
.p2align 2
_answer_questions: ; @answer_questions
.cfi_startproc
; %bb.0:
adrp x0, l_.str@PAGE
add x0, x0, l_.str@PAGEOFF
ret
.cfi_endpro... |
C_21 | #include <assert.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
/*
The task is to determine if it is possible to assemble the wooden squares from n buckets,
where each bucket contains $a_i$ squares with a side length of 1, into a single larger square.
Input: length of list, array of nu... | .text
.intel_syntax noprefix
.file "code.c"
.globl Is_Square # -- Begin function Is_Square
.p2align 4, 0x90
.type Is_Square,@function
Is_Square: # @Is_Square
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_... | .text
.file "code.c"
.globl Is_Square // -- Begin function Is_Square
.p2align 2
.type Is_Square,@function
Is_Square: // @Is_Square
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x29, x30, [sp, #32] // 16-byte Folded Spill
add ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl Is_Square # -- Begin function Is_Square
.p2align 1
.type Is_Square,@function
Is_Square: # @Is_Square
.cfi_startproc
# %bb.0:
addi sp, sp, -48
.... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _Is_Square ; -- Begin function Is_Square
.p2align 2
_Is_Square: ; @Is_Square
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #28]
str x1, [sp, #16]
s... |
C_22 | #include <assert.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
/*
Given integers c and d, where a + b = c and a * b = d, find and return the possible value of a (a <= b). If there are multiple groups, output the group with the smallest a.
Parameters:
- c (int): The sum of a an... | .text
.intel_syntax noprefix
.file "code.c"
.globl find_integers # -- Begin function find_integers
.p2align 4, 0x90
.type find_integers,@function
find_integers: # @find_integers
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rs... | .text
.file "code.c"
.globl find_integers // -- Begin function find_integers
.p2align 2
.type find_integers,@function
find_integers: // @find_integers
.cfi_startproc
// %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #8]
str w1, [sp, #4]
str wzr, [sp]
b ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl find_integers # -- Begin function find_integers
.p2align 1
.type find_integers,@function
find_integers: # @find_integers
.cfi_startproc
# %bb.0:
addi sp... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _find_integers ; -- Begin function find_integers
.p2align 2
_find_integers: ; @find_integers
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #8]
str w1, [sp, ... |
C_23 | #include <assert.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <stdlib.h>
/*
Count the number of acute-angled triangles that can be formed by selecting any 3 edges out of a given set of edges.
Args:
- edges_count: The number of edges passed.
- An arbi... | .text
.intel_syntax noprefix
.file "code.c"
.globl count_acute_triangles # -- Begin function count_acute_triangles
.p2align 4, 0x90
.type count_acute_triangles,@function
count_acute_triangles: # @count_acute_triangles
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offs... | .text
.file "code.c"
.globl count_acute_triangles // -- Begin function count_acute_triangles
.p2align 2
.type count_acute_triangles,@function
count_acute_triangles: // @count_acute_triangles
.cfi_startproc
// %bb.0:
sub sp, sp, #336
.cfi_def_cfa_offset 336
stp x29, x30, [sp, #304] ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl count_acute_triangles # -- Begin function count_acute_triangles
.p2align 1
.type count_acute_triangles,@function
count_acute_triangles: # @count_acute_triangles
.cfi_sta... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _count_acute_triangles ; -- Begin function count_acute_triangles
.p2align 2
_count_acute_triangles: ; @count_acute_triangles
.cfi_startproc
; %bb.0:
sub sp, sp, #80
stp x29, x30, [sp, #64] ; 1... |
C_24 | #include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
Reads an integer and a character, then returns them as a formatted string separated by a comma.
Parameters:
- integer_value (int): The input integer.
- char_value (char): The input character.
Returns:
- char*: A string containing the inte... | .text
.intel_syntax noprefix
.file "code.c"
.globl process_integer_and_char # -- Begin function process_integer_and_char
.p2align 4, 0x90
.type process_integer_and_char,@function
process_integer_and_char: # @process_integer_and_char
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
... | .text
.file "code.c"
.globl process_integer_and_char // -- Begin function process_integer_and_char
.p2align 2
.type process_integer_and_char,@function
process_integer_and_char: // @process_integer_and_char
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
stp x29, x30, [sp, #... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl process_integer_and_char # -- Begin function process_integer_and_char
.p2align 1
.type process_integer_and_char,@function
process_integer_and_char: # @process_integer_and_char
... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _process_integer_and_char ; -- Begin function process_integer_and_char
.p2align 2
_process_integer_and_char: ; @process_integer_and_char
.cfi_startproc
; %bb.0:
sub sp, sp, #48
stp x29, x30, [sp, #32] ... |
C_25 | #include <assert.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
/*
Shifts all characters by 5 positions in alphabetical order. Only letters are replaced, and all letters are in uppercase.
β Parameters:
β text (str): The input text to be processed.
β
β Returns:
β str: The tr... | .text
.intel_syntax noprefix
.file "code.c"
.globl shift_characters # -- Begin function shift_characters
.p2align 4, 0x90
.type shift_characters,@function
shift_characters: # @shift_characters
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mo... | .text
.file "code.c"
.globl shift_characters // -- Begin function shift_characters
.p2align 2
.type shift_characters,@function
shift_characters: // @shift_characters
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x29, x30, [sp, #32] // 16-by... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl shift_characters # -- Begin function shift_characters
.p2align 1
.type shift_characters,@function
shift_characters: # @shift_characters
.cfi_startproc
# %bb.0:... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _shift_characters ; -- Begin function shift_characters
.p2align 2
_shift_characters: ; @shift_characters
.cfi_startproc
; %bb.0:
sub sp, sp, #48
stp x29, x30, [sp, #32] ; 16-byte Fol... |
C_26 | #include <assert.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
/*
Classify the integer x based on the following method:
If x is a single-digit number, x belongs to its own class.
Otherwise, sum the digits of x, get a new x, and iterate until the class is determined.
Parameters:
- x (c... | .text
.intel_syntax noprefix
.file "code.c"
.globl classify_integer # -- Begin function classify_integer
.p2align 4, 0x90
.type classify_integer,@function
classify_integer: # @classify_integer
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mo... | .text
.file "code.c"
.globl classify_integer // -- Begin function classify_integer
.p2align 2
.type classify_integer,@function
classify_integer: // @classify_integer
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x29, x30, [sp, #32] // 16-by... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl classify_integer # -- Begin function classify_integer
.p2align 1
.type classify_integer,@function
classify_integer: # @classify_integer
.cfi_startproc
# %bb.0:... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _classify_integer ; -- Begin function classify_integer
.p2align 2
_classify_integer: ; @classify_integer
.cfi_startproc
; %bb.0:
sub sp, sp, #48
stp x29, x30, [sp, #32] ; 16-byte Fol... |
C_27 | #include <assert.h>
#include <stdio.h>
/*
Transforms the case of a given letter.
Parameters:
- letter (char): The input letter to be transformed.
Returns:
- char: The letter with its case reversed. If the input is lowercase, it returns the uppercase version,
and if the input is uppercase, it returns the lowerca... | .text
.intel_syntax noprefix
.file "code.c"
.globl transform_letter_case # -- Begin function transform_letter_case
.p2align 4, 0x90
.type transform_letter_case,@function
transform_letter_case: # @transform_letter_case
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offs... | .text
.file "code.c"
.globl transform_letter_case // -- Begin function transform_letter_case
.p2align 2
.type transform_letter_case,@function
transform_letter_case: // @transform_letter_case
.cfi_startproc
// %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
strb w0, [sp, #14]
ldrb w8, ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl transform_letter_case # -- Begin function transform_letter_case
.p2align 1
.type transform_letter_case,@function
transform_letter_case: # @transform_letter_case
.cfi_sta... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _transform_letter_case ; -- Begin function transform_letter_case
.p2align 2
_transform_letter_case: ; @transform_letter_case
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
strb w0, [sp, #... |
C_28 | #include <stdio.h>
#include <assert.h>
/*
Display the ASCII information for a given character.
β Parameters:
- character (char): The input character for which ASCII information is to be displayed.
β Returns:
- int: corresponding ASCII code
>>> display_ascii_info('A')
65
*/
int display_ascii_info(char char... | .text
.intel_syntax noprefix
.file "code.c"
.globl display_ascii_info # -- Begin function display_ascii_info
.p2align 4, 0x90
.type display_ascii_info,@function
display_ascii_info: # @display_ascii_info
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -... | .text
.file "code.c"
.globl display_ascii_info // -- Begin function display_ascii_info
.p2align 2
.type display_ascii_info,@function
display_ascii_info: // @display_ascii_info
.cfi_startproc
// %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
strb w0, [sp, #15]
ldrb w0, [sp, #15]... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl display_ascii_info # -- Begin function display_ascii_info
.p2align 1
.type display_ascii_info,@function
display_ascii_info: # @display_ascii_info
.cfi_startproc
# ... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _display_ascii_info ; -- Begin function display_ascii_info
.p2align 2
_display_ascii_info: ; @display_ascii_info
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
strb w0, [sp, #15]
l... |
C_29 | #include <assert.h> // Used for testing the function with assertions
#include <math.h> // Not needed for this function
#include <stdbool.h> // Not needed for this function
#include <stdio.h> // Needed for input/output functions
#include <string.h> // Not needed for this function
/*
Evaluate the grade for an input integ... | .text
.intel_syntax noprefix
.file "code.c"
.globl evaluate_integer_grade # -- Begin function evaluate_integer_grade
.p2align 4, 0x90
.type evaluate_integer_grade,@function
evaluate_integer_grade: # @evaluate_integer_grade
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_o... | .text
.file "code.c"
.globl evaluate_integer_grade // -- Begin function evaluate_integer_grade
.p2align 2
.type evaluate_integer_grade,@function
evaluate_integer_grade: // @evaluate_integer_grade
.cfi_startproc
// %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #12]
ldr w9,... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl evaluate_integer_grade # -- Begin function evaluate_integer_grade
.p2align 1
.type evaluate_integer_grade,@function
evaluate_integer_grade: # @evaluate_integer_grade
.cfi_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _evaluate_integer_grade ; -- Begin function evaluate_integer_grade
.p2align 2
_evaluate_integer_grade: ; @evaluate_integer_grade
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, ... |
C_3 | #include <assert.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
/*
Calculate the value of the function for a given input.
Parameters:
- x (int): Input value for the function.
Returns:
- double or string: If x is not in the defined domain, returns "Not define".
Otherwise, return... | .text
.intel_syntax noprefix
.file "code.c"
.section .rodata.cst8,"aM",@progbits,8
.p2align 3, 0x0 # -- Begin function calculate_function_value
.LCPI0_0:
.quad 0x4010000000000000 # double 4
.LCPI0_1:
.quad 0x4000000000000000 # double 2
.LCPI0_2:
.quad 0x401e000... | .text
.file "code.c"
.globl calculate_function_value // -- Begin function calculate_function_value
.p2align 2
.type calculate_function_value,@function
calculate_function_value: // @calculate_function_value
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x29, x30, [sp, #... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.section .sdata,"aw",@progbits
.p2align 3 # -- Begin function calculate_function_value
.LCPI0_0:
.quad 0x4010000000000000 # double 4
.LCPI0_1:
.quad 0x401e00000... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _calculate_function_value ; -- Begin function calculate_function_value
.p2align 2
_calculate_function_value: ; @calculate_function_value
.cfi_startproc
; %bb.0:
sub sp, sp, #48
stp x29, x30, [sp, #32] ... |
C_30 | #include <assert.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
/*
Checks if a three-character string has exactly two characters that are the same.
β
Args:
s (char array): The three-character string to be checked.
β
Returns:
str: Returns 'Yes' if the input has exactly two equal characters, other... | .text
.intel_syntax noprefix
.file "code.c"
.globl check_two_equal_digits # -- Begin function check_two_equal_digits
.p2align 4, 0x90
.type check_two_equal_digits,@function
check_two_equal_digits: # @check_two_equal_digits
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_o... | .text
.file "code.c"
.globl check_two_equal_digits // -- Begin function check_two_equal_digits
.p2align 2
.type check_two_equal_digits,@function
check_two_equal_digits: // @check_two_equal_digits
.cfi_startproc
// %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp]
ldr x8, [sp]... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl check_two_equal_digits # -- Begin function check_two_equal_digits
.p2align 1
.type check_two_equal_digits,@function
check_two_equal_digits: # @check_two_equal_digits
.cfi_... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _check_two_equal_digits ; -- Begin function check_two_equal_digits
.p2align 2
_check_two_equal_digits: ; @check_two_equal_digits
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp]
... |
C_31 | #include <assert.h>
#include <stdio.h>
#include <string.h>
/*
Given a string consisting of lowercase English letters, in each round you can change one of the characters to another character. The question is: what is the minimum number of rounds needed to make the string composed of the same character?
For example:
... | .text
.intel_syntax noprefix
.file "code.c"
.globl minRoundsToSameChar # -- Begin function minRoundsToSameChar
.p2align 4, 0x90
.type minRoundsToSameChar,@function
minRoundsToSameChar: # @minRoundsToSameChar
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp... | .text
.file "code.c"
.globl minRoundsToSameChar // -- Begin function minRoundsToSameChar
.p2align 2
.type minRoundsToSameChar,@function
minRoundsToSameChar: // @minRoundsToSameChar
.cfi_startproc
// %bb.0:
sub sp, sp, #144
.cfi_def_cfa_offset 144
stp x29, x30, [sp, #128] ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl minRoundsToSameChar # -- Begin function minRoundsToSameChar
.p2align 1
.type minRoundsToSameChar,@function
minRoundsToSameChar: # @minRoundsToSameChar
.cfi_startproc... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _minRoundsToSameChar ; -- Begin function minRoundsToSameChar
.p2align 2
_minRoundsToSameChar: ; @minRoundsToSameChar
.cfi_startproc
; %bb.0:
sub sp, sp, #160
stp x29, x30, [sp, #144] ; 16-b... |
C_32 | #include <assert.h>
#include <stdio.h>
/*
Given a sequence of n events, each occurring with a periodicity of a_i years, the problem is to find the year Y_n when the n-th event occurs, under the condition that the countdown for event i+1 can only commence in the year immediately following the occurrence of event i.
... | .text
.intel_syntax noprefix
.file "code.c"
.globl apocalypseYear # -- Begin function apocalypseYear
.p2align 4, 0x90
.type apocalypseYear,@function
apocalypseYear: # @apocalypseYear
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp,... | .text
.file "code.c"
.globl apocalypseYear // -- Begin function apocalypseYear
.p2align 2
.type apocalypseYear,@function
apocalypseYear: // @apocalypseYear
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #28]
str x1, [sp, #16]
str wzr, [sp... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl apocalypseYear # -- Begin function apocalypseYear
.p2align 1
.type apocalypseYear,@function
apocalypseYear: # @apocalypseYear
.cfi_startproc
# %bb.0:
addi... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _apocalypseYear ; -- Begin function apocalypseYear
.p2align 2
_apocalypseYear: ; @apocalypseYear
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #28]
str x1, [s... |
C_33 | #include <stdio.h>
#include <assert.h>
#include <stdbool.h>
/*
This problem introduces a new modulo operation, denoted by the symbol "β". When calculating x β y, if x is not a multiple of y, the result is the remainder of x divided by y. Otherwise, divide x by y repeatedly until x is no longer a multiple of y, denoting... | .text
.intel_syntax noprefix
.file "code.c"
.globl newModuloFactorial # -- Begin function newModuloFactorial
.p2align 4, 0x90
.type newModuloFactorial,@function
newModuloFactorial: # @newModuloFactorial
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -... | .text
.file "code.c"
.globl newModuloFactorial // -- Begin function newModuloFactorial
.p2align 2
.type newModuloFactorial,@function
newModuloFactorial: // @newModuloFactorial
.cfi_startproc
// %bb.0:
stp x29, x30, [sp, #-16]! // 16-byte Folded Spill
.cfi_def_cfa_offse... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl newModuloFactorial # -- Begin function newModuloFactorial
.p2align 1
.type newModuloFactorial,@function
newModuloFactorial: # @newModuloFactorial
.cfi_startproc
# ... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _newModuloFactorial ; -- Begin function newModuloFactorial
.p2align 2
_newModuloFactorial: ; @newModuloFactorial
.cfi_startproc
; %bb.0:
stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
mo... |
C_34 | #include <stdio.h>
#include <assert.h>
/*
You are given an array a of n integers. You can perform at most one operation where you select three integers i, j, x (1 <= i <= j <= n) and replace all elements from a[i] to a[j] with x, at a cost of (j - i + 1).
Find the minimum cost to make all elements in the array equal.
... | .text
.intel_syntax noprefix
.file "code.c"
.globl makeEqualAgain # -- Begin function makeEqualAgain
.p2align 4, 0x90
.type makeEqualAgain,@function
makeEqualAgain: # @makeEqualAgain
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp,... | .text
.file "code.c"
.globl makeEqualAgain // -- Begin function makeEqualAgain
.p2align 2
.type makeEqualAgain,@function
makeEqualAgain: // @makeEqualAgain
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
str w0, [sp, #40]
str x1, [sp, #32]
mov w8, #1 ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl makeEqualAgain # -- Begin function makeEqualAgain
.p2align 1
.type makeEqualAgain,@function
makeEqualAgain: # @makeEqualAgain
.cfi_startproc
# %bb.0:
addi... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _makeEqualAgain ; -- Begin function makeEqualAgain
.p2align 2
_makeEqualAgain: ; @makeEqualAgain
.cfi_startproc
; %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
str w0, [sp, #40]
str x1, [s... |
C_35 | #include <assert.h>
#include <stdio.h>
/*
Given a sequence of N piles of stones numbered from 1 to N, with each pile containing a positive number of stones, determine the winner of a game played by Charlie and Dan. Charlie goes first, and they take turns moving a positive number of stones from the leftmost non-empty pi... | .text
.intel_syntax noprefix
.file "code.c"
.globl gameWinner # -- Begin function gameWinner
.p2align 4, 0x90
.type gameWinner,@function
gameWinner: # @gameWinner
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_d... | .text
.file "code.c"
.globl gameWinner // -- Begin function gameWinner
.p2align 2
.type gameWinner,@function
gameWinner: // @gameWinner
.cfi_startproc
// %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #20]
str x1, [sp, #8]
ldr x8, [sp, #8]
ldr w8,... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl gameWinner # -- Begin function gameWinner
.p2align 1
.type gameWinner,@function
gameWinner: # @gameWinner
.cfi_startproc
# %bb.0:
addi sp, sp, -48... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _gameWinner ; -- Begin function gameWinner
.p2align 2
_gameWinner: ; @gameWinner
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #20]
str x1, [sp, #8]
... |
C_36 | #include <assert.h>
#include <stdio.h>
/*
Given n doors arranged in a circle, the player starts in front of door 1. Each turn, the player can choose a number i and pay a cost C_i to move i steps to the right and then open the door at that position. It is guaranteed that C_i >= C_{i+1} for 1 <= i < n.
The task is to det... | .text
.intel_syntax noprefix
.file "code.c"
.globl minTotalCost # -- Begin function minTotalCost
.p2align 4, 0x90
.type minTotalCost,@function
minTotalCost: # @minTotalCost
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
... | .text
.file "code.c"
.globl minTotalCost // -- Begin function minTotalCost
.p2align 2
.type minTotalCost,@function
minTotalCost: // @minTotalCost
.cfi_startproc
// %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #12]
str x1, [sp]
ldr x8, [sp]
ldr w9, [... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl minTotalCost # -- Begin function minTotalCost
.p2align 1
.type minTotalCost,@function
minTotalCost: # @minTotalCost
.cfi_startproc
# %bb.0:
addi sp, s... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _minTotalCost ; -- Begin function minTotalCost
.p2align 2
_minTotalCost: ; @minTotalCost
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #12]
str x1, [sp]
... |
C_37 | #include <assert.h>
#include <stdio.h>
/*
Given a sequence of student IDs entering a classroom, where the IDs range from 0 to N-1, calculate the total number of handshakes that occur. Each student will shake hands with every student already in the classroom with a smaller ID number. The sequence represents the order in... | .text
.intel_syntax noprefix
.file "code.c"
.globl countHandshakes # -- Begin function countHandshakes
.p2align 4, 0x90
.type countHandshakes,@function
countHandshakes: # @countHandshakes
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov r... | .text
.file "code.c"
.globl countHandshakes // -- Begin function countHandshakes
.p2align 2
.type countHandshakes,@function
countHandshakes: // @countHandshakes
.cfi_startproc
// %bb.0:
stp x29, x30, [sp, #-32]! // 16-byte Folded Spill
.cfi_def_cfa_offset 32
str... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl countHandshakes # -- Begin function countHandshakes
.p2align 1
.type countHandshakes,@function
countHandshakes: # @countHandshakes
.cfi_startproc
# %bb.0:
a... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _countHandshakes ; -- Begin function countHandshakes
.p2align 2
_countHandshakes: ; @countHandshakes
.cfi_startproc
; %bb.0:
stp x28, x27, [sp, #-32]! ; 16-byte Folded Spill
stp x29,... |
C_38 | #include <assert.h>
#include <stdio.h>
/*
Given n positive integers representing the count of each number from 1 to n,
find the maximum sum of the mode (most frequent element) for all prefixes of
a sequence constructed from these numbers. The mode is the largest number among
the most frequent elements in a sequence.... | .text
.intel_syntax noprefix
.file "code.c"
.globl maxModeSum # -- Begin function maxModeSum
.p2align 4, 0x90
.type maxModeSum,@function
maxModeSum: # @maxModeSum
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_d... | .text
.file "code.c"
.globl maxModeSum // -- Begin function maxModeSum
.p2align 2
.type maxModeSum,@function
maxModeSum: // @maxModeSum
.cfi_startproc
// %bb.0:
str x29, [sp, #-16]! // 8-byte Folded Spill
.cfi_def_cfa_offset 16
.cfi_offset w29, -1... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl maxModeSum # -- Begin function maxModeSum
.p2align 1
.type maxModeSum,@function
maxModeSum: # @maxModeSum
.cfi_startproc
# %bb.0:
addi sp, sp, -20... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _maxModeSum ; -- Begin function maxModeSum
.p2align 2
_maxModeSum: ; @maxModeSum
.cfi_startproc
; %bb.0:
stp x28, x27, [sp, #-32]! ; 16-byte Folded Spill
stp x29, x30, [sp,... |
C_39 | #include <assert.h>
#include <stdio.h>
/*
Given an array A of integers, the task is to calculate the sum of the XOR of all subarrays.
A subarray is defined by a pair of indices (L, R) such that 1 <= L <= R <= n, where n is the size of the array.
The XOR sum of a subarray is the result of XORing all elements from L to R... | .text
.intel_syntax noprefix
.file "code.c"
.globl sumOfXorSubarrays # -- Begin function sumOfXorSubarrays
.p2align 4, 0x90
.type sumOfXorSubarrays,@function
sumOfXorSubarrays: # @sumOfXorSubarrays
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
... | .text
.file "code.c"
.globl sumOfXorSubarrays // -- Begin function sumOfXorSubarrays
.p2align 2
.type sumOfXorSubarrays,@function
sumOfXorSubarrays: // @sumOfXorSubarrays
.cfi_startproc
// %bb.0:
stp x29, x30, [sp, #-32]! // 16-byte Folded Spill
.cfi_def_cfa_offset 3... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl sumOfXorSubarrays # -- Begin function sumOfXorSubarrays
.p2align 1
.type sumOfXorSubarrays,@function
sumOfXorSubarrays: # @sumOfXorSubarrays
.cfi_startproc
# %bb... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _sumOfXorSubarrays ; -- Begin function sumOfXorSubarrays
.p2align 2
_sumOfXorSubarrays: ; @sumOfXorSubarrays
.cfi_startproc
; %bb.0:
stp x28, x27, [sp, #-32]! ; 16-byte Folded Spill
stp ... |
C_4 | #include <assert.h>
#include <stdio.h>
/*
Find the maximum and minimum of three distinct integers.
Parameters:
a (int): The first integer.
b (int): The second integer.
c (int): The third integer.
Returns:
Tuple[int, int]: A tuple is not a concept in C; instead, we will return by reference.
>>> Example call:
int max,... | .text
.intel_syntax noprefix
.file "code.c"
.globl find_max_min # -- Begin function find_max_min
.p2align 4, 0x90
.type find_max_min,@function
find_max_min: # @find_max_min
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
... | .text
.file "code.c"
.globl find_max_min // -- Begin function find_max_min
.p2align 2
.type find_max_min,@function
find_max_min: // @find_max_min
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
str w0, [sp, #44]
str w1, [sp, #40]
str w2, [sp, #36]
... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl find_max_min # -- Begin function find_max_min
.p2align 1
.type find_max_min,@function
find_max_min: # @find_max_min
.cfi_startproc
# %bb.0:
addi sp, s... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _find_max_min ; -- Begin function find_max_min
.p2align 2
_find_max_min: ; @find_max_min
.cfi_startproc
; %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
str w0, [sp, #44]
str w1, [sp, #... |
C_40 | #include <assert.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
/*
Given two positive integers n and k, find the number of positive integers x, where 1 <= x <= n, that can be expressed as x = a^b with a and b being positive integers and b >= k.
Different legal representations of the sa... | .text
.intel_syntax noprefix
.file "code.c"
.globl countPowerNumbers # -- Begin function countPowerNumbers
.p2align 4, 0x90
.type countPowerNumbers,@function
countPowerNumbers: # @countPowerNumbers
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
... | .text
.file "code.c"
.globl countPowerNumbers // -- Begin function countPowerNumbers
.p2align 2
.type countPowerNumbers,@function
countPowerNumbers: // @countPowerNumbers
.cfi_startproc
// %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
stp x29, x30, [sp, #64] // 16... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl countPowerNumbers # -- Begin function countPowerNumbers
.p2align 1
.type countPowerNumbers,@function
countPowerNumbers: # @countPowerNumbers
.cfi_startproc
# %bb... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _countPowerNumbers ; -- Begin function countPowerNumbers
.p2align 2
_countPowerNumbers: ; @countPowerNumbers
.cfi_startproc
; %bb.0:
sub sp, sp, #80
stp x29, x30, [sp, #64] ; 16-byte F... |
C_41 | #include <stdio.h>
#include <assert.h>
/*
Given three integers n, m, and k, find the number of sequences consisting of n '(' and m ')', such that the longest balanced subsequence is of length 2 * k. The result should be calculated modulo 1,000,000,007 (10^9 + 7).
For example:
>>> countBalancedSubsequences(2, 2, 2)... | .text
.intel_syntax noprefix
.file "code.c"
.globl countBalancedSubsequences # -- Begin function countBalancedSubsequences
.p2align 4, 0x90
.type countBalancedSubsequences,@function
countBalancedSubsequences: # @countBalancedSubsequences
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 1... | .text
.file "code.c"
.globl countBalancedSubsequences // -- Begin function countBalancedSubsequences
.p2align 2
.type countBalancedSubsequences,@function
countBalancedSubsequences: // @countBalancedSubsequences
.cfi_startproc
// %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
mov x8, #51719 ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.section .sdata,"aw",@progbits
.p2align 3 # -- Begin function countBalancedSubsequences
.LCPI0_0:
.quad -8543223828751151131 # 0x89705f3112a28fe5
.text
.globl co... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _countBalancedSubsequences ; -- Begin function countBalancedSubsequences
.p2align 2
_countBalancedSubsequences: ; @countBalancedSubsequences
.cfi_startproc
; %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
mov x8,... |
C_42 | #include <stdio.h>
#include <assert.h>
/*
Given a rectangle paper of size n x m placed on a plane Cartesian coordinate system with its bottom-left corner at (0,0) and top-right corner at (n,m),
you need to calculate the expected number of operations to cut the paper such that the remaining area is less than k.
In eac... | .text
.intel_syntax noprefix
.file "code.c"
.globl expectedCuts # -- Begin function expectedCuts
.p2align 4, 0x90
.type expectedCuts,@function
expectedCuts: # @expectedCuts
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
... | .text
.file "code.c"
.globl expectedCuts // -- Begin function expectedCuts
.p2align 2
.type expectedCuts,@function
expectedCuts: // @expectedCuts
.cfi_startproc
// %bb.0:
str x29, [sp, #-16]! // 8-byte Folded Spill
.cfi_def_cfa_offset 16
.cfi_offset w... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.section .sdata,"aw",@progbits
.p2align 3 # -- Begin function expectedCuts
.LCPI0_0:
.quad -8543223828751151131 # 0x89705f3112a28fe5
.text
.globl expectedCuts
.... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _expectedCuts ; -- Begin function expectedCuts
.p2align 2
_expectedCuts: ; @expectedCuts
.cfi_startproc
; %bb.0:
stp x28, x27, [sp, #-32]! ; 16-byte Folded Spill
stp x29, x30, ... |
C_43 | #include <stdio.h>
#include <assert.h>
#include <string.h>
/*
Given a permutation q of n elements and an integer k, find the number of permutations p of n elements such that f(p) = q, where f(p) is the lexicographically smallest permutation that can be obtained by dividing p into exactly k non-empty contiguous segments... | .text
.intel_syntax noprefix
.file "code.c"
.globl countPermutations # -- Begin function countPermutations
.p2align 4, 0x90
.type countPermutations,@function
countPermutations: # @countPermutations
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
... | .text
.file "code.c"
.globl countPermutations // -- Begin function countPermutations
.p2align 2
.type countPermutations,@function
countPermutations: // @countPermutations
.cfi_startproc
// %bb.0:
stp x29, x30, [sp, #-32]! // 16-byte Folded Spill
.cfi_def_cfa_offset 3... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.section .sdata,"aw",@progbits
.p2align 3 # -- Begin function countPermutations
.LCPI0_0:
.quad 155014655926305585 # 0x226b9021d778331
.text
.globl countPermut... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _countPermutations ; -- Begin function countPermutations
.p2align 2
_countPermutations: ; @countPermutations
.cfi_startproc
; %bb.0:
stp x28, x27, [sp, #-32]! ; 16-byte Folded Spill
stp ... |
C_44 | #include <stdio.h>
#include <assert.h>
#include <stdbool.h>
/*
Given an array of n distinct integers representing the heights of Kira's friends,
find the number of ways to choose a triplet (a, b, c) such that the greatest common divisor (GCD)
of the maximum and minimum values of the triplet is 1.
>>> countTriplet... | .text
.intel_syntax noprefix
.file "code.c"
.globl countTriplets # -- Begin function countTriplets
.p2align 4, 0x90
.type countTriplets,@function
countTriplets: # @countTriplets
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rs... | .text
.file "code.c"
.globl countTriplets // -- Begin function countTriplets
.p2align 2
.type countTriplets,@function
countTriplets: // @countTriplets
.cfi_startproc
// %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
str x0, [sp, #72]
str w1, [sp, #68]
str wzr, [sp, #... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl countTriplets # -- Begin function countTriplets
.p2align 1
.type countTriplets,@function
countTriplets: # @countTriplets
.cfi_startproc
# %bb.0:
addi sp... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _countTriplets ; -- Begin function countTriplets
.p2align 2
_countTriplets: ; @countTriplets
.cfi_startproc
; %bb.0:
sub sp, sp, #80
.cfi_def_cfa_offset 80
str x0, [sp, #72]
str w1, [sp,... |
C_45 | #include <stdio.h>
#include <assert.h>
/*
You are given a 1 by n pixel image, where each pixel has a color represented by an integer. You can perform an operation where you pick a color and change all connected pixels of the same color to the chosen color. Two pixels are connected if they are adjacent and have the same... | .text
.intel_syntax noprefix
.file "code.c"
.globl minOperations # -- Begin function minOperations
.p2align 4, 0x90
.type minOperations,@function
minOperations: # @minOperations
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rs... | .text
.file "code.c"
.globl minOperations // -- Begin function minOperations
.p2align 2
.type minOperations,@function
minOperations: // @minOperations
.cfi_startproc
// %bb.0:
stp x29, x30, [sp, #-16]! // 16-byte Folded Spill
.cfi_def_cfa_offset 16
mov x29, ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl minOperations # -- Begin function minOperations
.p2align 1
.type minOperations,@function
minOperations: # @minOperations
.cfi_startproc
# %bb.0:
addi sp... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _minOperations ; -- Begin function minOperations
.p2align 2
_minOperations: ; @minOperations
.cfi_startproc
; %bb.0:
stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
mov x29, sp
... |
C_46 | #include <assert.h>
#include <stdio.h>
/*
Given an integer n, write a function to compute the sum of all numbers from 1 to n that are multiples of either 3 or 5. If a number is a multiple of both 3 and 5, it should only be counted once.
For example:
>>> sumOfMultiples(10)
33 // (3 + 5 + 6 + 9 + 10)
*/
int sumOf... | .text
.intel_syntax noprefix
.file "code.c"
.globl sumOfMultiples # -- Begin function sumOfMultiples
.p2align 4, 0x90
.type sumOfMultiples,@function
sumOfMultiples: # @sumOfMultiples
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp,... | .text
.file "code.c"
.globl sumOfMultiples // -- Begin function sumOfMultiples
.p2align 2
.type sumOfMultiples,@function
sumOfMultiples: // @sumOfMultiples
.cfi_startproc
// %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #12]
str wzr, [sp, #8]
mov w8, #1 ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl sumOfMultiples # -- Begin function sumOfMultiples
.p2align 1
.type sumOfMultiples,@function
sumOfMultiples: # @sumOfMultiples
.cfi_startproc
# %bb.0:
addi... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _sumOfMultiples ; -- Begin function sumOfMultiples
.p2align 2
_sumOfMultiples: ; @sumOfMultiples
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #12]
str wzr, [... |
C_47 | #include <assert.h>
#include <ctype.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
/*
Determine if a given string is a palindrome. A palindrome is a word, phrase, number, or other sequence of characters that reads the same forward and backward (ignoring spaces, punctuation, and capitalization).
>>> ... | .text
.intel_syntax noprefix
.file "code.c"
.globl isPalindrome # -- Begin function isPalindrome
.p2align 4, 0x90
.type isPalindrome,@function
isPalindrome: # @isPalindrome
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
... | .text
.file "code.c"
.globl isPalindrome // -- Begin function isPalindrome
.p2align 2
.type isPalindrome,@function
isPalindrome: // @isPalindrome
.cfi_startproc
// %bb.0:
sub sp, sp, #64
.cfi_def_cfa_offset 64
stp x29, x30, [sp, #48] // 16-byte Folded Sp... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl isPalindrome # -- Begin function isPalindrome
.p2align 1
.type isPalindrome,@function
isPalindrome: # @isPalindrome
.cfi_startproc
# %bb.0:
addi sp, s... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _isPalindrome ; -- Begin function isPalindrome
.p2align 2
_isPalindrome: ; @isPalindrome
.cfi_startproc
; %bb.0:
sub sp, sp, #64
stp x29, x30, [sp, #48] ; 16-byte Folded Spil... |
C_48 | #include <assert.h>
#include <stdio.h>
/*
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.
For example:
>>> addDigits(38)
2
Because 3 + 8 = 11, and 1 + 1 = 2. Since 2 has only one digit, 2 is the result.
*/
int addDigits(int num){
while (num >= 10) {
... | .text
.intel_syntax noprefix
.file "code.c"
.globl addDigits # -- Begin function addDigits
.p2align 4, 0x90
.type addDigits,@function
addDigits: # @addDigits
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_... | .text
.file "code.c"
.globl addDigits // -- Begin function addDigits
.p2align 2
.type addDigits,@function
addDigits: // @addDigits
.cfi_startproc
// %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #12]
b .LBB0_1
.LBB0_1: ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl addDigits # -- Begin function addDigits
.p2align 1
.type addDigits,@function
addDigits: # @addDigits
.cfi_startproc
# %bb.0:
addi sp, sp, -32
.... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _addDigits ; -- Begin function addDigits
.p2align 2
_addDigits: ; @addDigits
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #12]
b LBB0_1
LBB0_1: ... |
C_49 | #include <assert.h>
#include <stdbool.h>
#include <stdio.h>
/*
You are playing a game called Nim. In this game, you start with a pile of n stones, and you and your opponent take turns to remove 1 to 3 stones from the pile. The one who removes the last stone wins the game. Given the number of stones n, determine if you ... | .text
.intel_syntax noprefix
.file "code.c"
.globl canWinNim # -- Begin function canWinNim
.p2align 4, 0x90
.type canWinNim,@function
canWinNim: # @canWinNim
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_... | .text
.file "code.c"
.globl canWinNim // -- Begin function canWinNim
.p2align 2
.type canWinNim,@function
canWinNim: // @canWinNim
.cfi_startproc
// %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #12]
ldr w8, [sp, #12]
mov w10, #4 ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl canWinNim # -- Begin function canWinNim
.p2align 1
.type canWinNim,@function
canWinNim: # @canWinNim
.cfi_startproc
# %bb.0:
addi sp, sp, -32
.... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _canWinNim ; -- Begin function canWinNim
.p2align 2
_canWinNim: ; @canWinNim
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #12]
ldr w8, [sp, #12]
m... |
C_5 | #include <assert.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
/*
Calculate the distance between two points A (xa, ya) and B (xb, yb).
Parameters:
- xa (double): x-coordinate of point A.
- ya (double): y-coordinate of point A.
- xb (double): x-coordinate of point B.
- yb (double):... | .text
.intel_syntax noprefix
.file "code.c"
.globl calculate_distance # -- Begin function calculate_distance
.p2align 4, 0x90
.type calculate_distance,@function
calculate_distance: # @calculate_distance
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -... | .text
.file "code.c"
.globl calculate_distance // -- Begin function calculate_distance
.p2align 2
.type calculate_distance,@function
calculate_distance: // @calculate_distance
.cfi_startproc
// %bb.0:
sub sp, sp, #48
.cfi_def_cfa_offset 48
stp x29, x30, [sp, #32] //... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl calculate_distance # -- Begin function calculate_distance
.p2align 1
.type calculate_distance,@function
calculate_distance: # @calculate_distance
.cfi_startproc
# ... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _calculate_distance ; -- Begin function calculate_distance
.p2align 2
_calculate_distance: ; @calculate_distance
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str d0, [sp, #24]
st... |
C_50 | #include <assert.h>
#include <stdio.h>
/*
Given two integers a and b, return the sum if the sum is even, or return the product of a and b if the sum is odd.
>>> evenSumOrOddProduct(2, 3)
6
>>> evenSumOrOddProduct(5, 5)
10
*/
int evenSumOrOddProduct(int a, int b);int evenSumOrOddProduct(int a, int b) {
... | .text
.intel_syntax noprefix
.file "code.c"
.globl evenSumOrOddProduct # -- Begin function evenSumOrOddProduct
.p2align 4, 0x90
.type evenSumOrOddProduct,@function
evenSumOrOddProduct: # @evenSumOrOddProduct
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp... | .text
.file "code.c"
.globl evenSumOrOddProduct // -- Begin function evenSumOrOddProduct
.p2align 2
.type evenSumOrOddProduct,@function
evenSumOrOddProduct: // @evenSumOrOddProduct
.cfi_startproc
// %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #8]
str w1, [sp, #4]
... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl evenSumOrOddProduct # -- Begin function evenSumOrOddProduct
.p2align 1
.type evenSumOrOddProduct,@function
evenSumOrOddProduct: # @evenSumOrOddProduct
.cfi_startproc... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _evenSumOrOddProduct ; -- Begin function evenSumOrOddProduct
.p2align 2
_evenSumOrOddProduct: ; @evenSumOrOddProduct
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #8]
s... |
C_6 | #include <assert.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
/*
Find the factorial of N and take the modulo 10007 of the result.
β Parameters:
- N (int): An integer representing the input value (N <= 10000).
β Returns:
β int: The result after taking the modulo 10007 of the ... | .text
.intel_syntax noprefix
.file "code.c"
.globl process_request # -- Begin function process_request
.p2align 4, 0x90
.type process_request,@function
process_request: # @process_request
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov r... | .text
.file "code.c"
.globl process_request // -- Begin function process_request
.p2align 2
.type process_request,@function
process_request: // @process_request
.cfi_startproc
// %bb.0:
str x29, [sp, #-16]! // 8-byte Folded Spill
.cfi_def_cfa_offset 16
.cfi... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl process_request # -- Begin function process_request
.p2align 1
.type process_request,@function
process_request: # @process_request
.cfi_startproc
# %bb.0:
a... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _process_request ; -- Begin function process_request
.p2align 2
_process_request: ; @process_request
.cfi_startproc
; %bb.0:
stp x28, x27, [sp, #-32]! ; 16-byte Folded Spill
stp x29,... |
C_7 | #include <assert.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
/*
Calculate the area of a triangle given its base and height.
β Parameters:
- base (int): The base length of the triangle.
- height (int): The height of the triangle.
β Returns:
β float: The calculated area of th... | .text
.intel_syntax noprefix
.file "code.c"
.section .rodata.cst8,"aM",@progbits,8
.p2align 3, 0x0 # -- Begin function calculate_triangle_area
.LCPI0_0:
.quad 0x4000000000000000 # double 2
.text
.globl calculate_triangle_area
.p2align 4, 0x90
.type calculate_triangle_area... | .text
.file "code.c"
.globl calculate_triangle_area // -- Begin function calculate_triangle_area
.p2align 2
.type calculate_triangle_area,@function
calculate_triangle_area: // @calculate_triangle_area
.cfi_startproc
// %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #12]
str ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.section .sdata,"aw",@progbits
.p2align 3 # -- Begin function calculate_triangle_area
.LCPI0_0:
.quad 0x4000000000000000 # double 2
.text
.globl calculate_tria... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _calculate_triangle_area ; -- Begin function calculate_triangle_area
.p2align 2
_calculate_triangle_area: ; @calculate_triangle_area
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp... |
C_8 | #include <assert.h>
#include <stdio.h>
/*
Calculate the Hamming distance between two integers in binary representation.
β Parameters:
- x (int): The first positive integer (x <= 1,000,000,000).
- y (int): The second positive integer (y <= 1,000,000,000).
β Returns:
β int: The Hamming distance between x and y, ... | .text
.intel_syntax noprefix
.file "code.c"
.globl hamming_distance # -- Begin function hamming_distance
.p2align 4, 0x90
.type hamming_distance,@function
hamming_distance: # @hamming_distance
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mo... | .text
.file "code.c"
.globl hamming_distance // -- Begin function hamming_distance
.p2align 2
.type hamming_distance,@function
hamming_distance: // @hamming_distance
.cfi_startproc
// %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #12]
str w1, [sp, #8]
str wzr... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl hamming_distance # -- Begin function hamming_distance
.p2align 1
.type hamming_distance,@function
hamming_distance: # @hamming_distance
.cfi_startproc
# %bb.0:... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _hamming_distance ; -- Begin function hamming_distance
.p2align 2
_hamming_distance: ; @hamming_distance
.cfi_startproc
; %bb.0:
sub sp, sp, #16
.cfi_def_cfa_offset 16
str w0, [sp, #12]
str w1... |
C_9 | #include <assert.h>
#include <stdarg.h>
/*
Count the number of odd integers in a given list of numbers.
Parameters:
- count (int): The count of numbers to evaluate.
- ... (int): A sequence of integers.
Returns:
int: The count of odd numbers in the input list.
>>> count_odd_numbers(5, 1, 4, 3, 2, 5)
... | .text
.intel_syntax noprefix
.file "code.c"
.globl count_odd_numbers # -- Begin function count_odd_numbers
.p2align 4, 0x90
.type count_odd_numbers,@function
count_odd_numbers: # @count_odd_numbers
.cfi_startproc
# %bb.0:
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
... | .text
.file "code.c"
.globl count_odd_numbers // -- Begin function count_odd_numbers
.p2align 2
.type count_odd_numbers,@function
count_odd_numbers: // @count_odd_numbers
.cfi_startproc
// %bb.0:
sub sp, sp, #288
.cfi_def_cfa_offset 288
str x29, [sp, #272] // ... | .text
.attribute 4, 16
.attribute 5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.file "code.c"
.globl count_odd_numbers # -- Begin function count_odd_numbers
.p2align 1
.type count_odd_numbers,@function
count_odd_numbers: # @count_odd_numbers
.cfi_startproc
# %bb... | .section __TEXT,__text,regular,pure_instructions
.build_version macos, 15, 0
.globl _count_odd_numbers ; -- Begin function count_odd_numbers
.p2align 2
_count_odd_numbers: ; @count_odd_numbers
.cfi_startproc
; %bb.0:
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, #28]
add ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.