xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int print_json(void *ignore, const char *buffer, size_t len) {
  fputs(buffer, stdout);
  return (0);
}


x86 assembly (clang, -O0):
<print_json>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_json>:
push   %rax
mov    %rsi,%rdi
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
define i32 @print_json(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* @stdout
%9 = call i32 @fputs(i8* %7, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @print_json(i8* nocapture readnone %0, i8* %1, i64 %2) {
%4 = load i32, i32* @stdout
%5 = tail call i32 @fputs(i8* %1, i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(unsigned char *);
void free_2_array(unsigned char **buf, int r) {
  int i;
  for (i = 0; i < r; i++) {
    free(buf[i]);
    buf[i] = NULL;
  }
}


x86 assembly (clang, -O0):
<free_2_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1161 <free_2_array+0x51>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <free_2_array+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_2_array>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    114a <free_2_array+0x3a>
mov    %rdi,%r15
mov    %esi,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rdi
call   1030 <free@plt>
movq   $0x0,(%r15,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <free_2_array+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @free_2_array(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %21, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %24
10: ; preds = %6
%11 = load i8**, i8*** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8*, i8** %11, i64 %13
%15 = load i8*, i8** %14
%16 = call i32 @free(i8* %15)
%17 = load i8**, i8*** %3
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8*, i8** %17, i64 %19
store i8* null, i8** %20
br label %21
21: ; preds = %10
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %6
24: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @free_2_array(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @free(i8* %9)
store i8* null, i8** %8
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_pwm(int, int);
void set_pwm_right(int pwm) { set_pwm(2, pwm); }


x86 assembly (clang, -O0):
<set_pwm_right>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x2,%edi
call   1030 <set_pwm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_pwm_right>:
mov    %edi,%esi
mov    $0x2,%edi
jmp    1030 <set_pwm@plt>

LLVM IR (-O0):
define void @set_pwm_right(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @set_pwm(i32 2, i32 %3)
ret void
}

LLVM IR (-O2):
define void @set_pwm_right(i32 %0) {
%2 = tail call i32 @set_pwm(i32 2, i32 %0)
ret void
}
double KPAtoINHG(double KPA) {
  double INHG = 0.295300 * KPA;
  return INHG;
}


x86 assembly (clang, -O0):
<KPAtoINHG>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<KPAtoINHG>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @KPAtoINHG(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double 2.953000e-01, %4
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @KPAtoINHG(double %0) {
%2 = fmul double %0, 2.953000e-01
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ lcd_wr_command(int);
void lcd_home() { lcd_wr_command(0x80); }


x86 assembly (clang, -O0):
<lcd_home>:
push   %rbp
mov    %rsp,%rbp
mov    $0x80,%edi
call   1030 <lcd_wr_command@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_home>:
mov    $0x80,%edi
jmp    1030 <lcd_wr_command@plt>

LLVM IR (-O0):
define void @lcd_home() {
%1 = call i32 @lcd_wr_command(i32 128)
ret void
}

LLVM IR (-O2):
define void @lcd_home() {
%1 = tail call i32 @lcd_wr_command(i32 128)
ret void
}
int sysfs_create_file(struct kobject *x, struct attribute *y) {
  int a;
  return a;
}


x86 assembly (clang, -O0):
<sysfs_create_file>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sysfs_create_file>:
ret

LLVM IR (-O0):
%struct.kobject = type opaque
%struct.attribute = type opaque
define i32 @sysfs_create_file(%struct.kobject* %0, %struct.attribute* %1) {
%3 = alloca %struct.kobject*
%4 = alloca %struct.attribute*
%5 = alloca i32
store %struct.kobject* %0, %struct.kobject** %3
store %struct.attribute* %1, %struct.attribute** %4
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
%struct.kobject = type opaque
%struct.attribute = type opaque
define i32 @sysfs_create_file(%struct.kobject* nocapture readnone %0, %struct.attribute* nocapture readnone %1) {
ret i32 undef
}
int fun1(unsigned word) { return (int)((word << 24) >> 24); }


x86 assembly (clang, -O0):
<fun1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x18,%eax
shr    $0x18,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun1>:
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @fun1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 24
%5 = lshr i32 %4, 24
ret i32 %5
}

LLVM IR (-O2):
define i32 @fun1(i32 %0) {
%2 = and i32 %0, 255
ret i32 %2
}
int main(void) { return __alignof__(short); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
ret i32 2
}

LLVM IR (-O2):
define i32 @main() {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void printHelp(void) {
  puts("\nPixels\nUsage:\n pixels [-o outfile] infile\n");
}


x86 assembly (clang, -O0):
<printHelp>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printHelp>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"\0APixels\0AUsage:\0A pixels [-o outfile] infile\0A\00"
define void @printHelp() {
%1 = call i32 @puts(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"\0APixels\0AUsage:\0A pixels [-o outfile] infile\0A\00"
define void @printHelp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MinusculasMayusculas(char *);
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *, ...);
main() {
  char cadena[81];
  int i = 0;
  printf("Introducir una cadena: ");
  gets(cadena);
  MinusculasMayusculas(cadena);
  printf("%s\n", cadena);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x64(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x60(%rbp),%rdi
call   1050 <gets@plt>
lea    -0x60(%rbp),%rdi
call   1030 <MinusculasMayusculas@plt>
lea    -0x60(%rbp),%rsi
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
lea    0xeb4(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1060 <gets@plt>
mov    %rbx,%rdi
call   1030 <MinusculasMayusculas@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Introducir una cadena: \00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [81 x i8]
%2 = alloca i32
store i32 0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [81 x i8], [81 x i8]* %1, i64 0, i64 0
%5 = call i32 @gets(i8* %4)
%6 = getelementptr inbounds [81 x i8], [81 x i8]* %1, i64 0, i64 0
%7 = call i32 @MinusculasMayusculas(i8* %6)
%8 = getelementptr inbounds [81 x i8], [81 x i8]* %1, i64 0, i64 0
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"Introducir una cadena: \00"
define i32 @main() {
%1 = alloca [81 x i8]
%2 = getelementptr inbounds [81 x i8], [81 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @gets(i8* %2)
%5 = call i32 @MinusculasMayusculas(i8* %2)
%6 = call i32 @puts(i8* %2)
ret i32 0
}
/* Variables and functions */
void ext_configuration_store(const char *buffer, size_t buffer_size) {}


x86 assembly (clang, -O0):
<ext_configuration_store>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ext_configuration_store>:
ret

LLVM IR (-O0):
define void @ext_configuration_store(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
ret void
}

LLVM IR (-O2):
define void @ext_configuration_store(i8* nocapture %0, i64 %1) {
ret void
}
int snd_hda_create_hwdep(struct hda_codec *codec) { return 0; }


x86 assembly (clang, -O0):
<snd_hda_create_hwdep>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<snd_hda_create_hwdep>:
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.hda_codec = type opaque
define i32 @snd_hda_create_hwdep(%struct.hda_codec* %0) {
%2 = alloca %struct.hda_codec*
store %struct.hda_codec* %0, %struct.hda_codec** %2
ret i32 0
}

LLVM IR (-O2):
%struct.hda_codec = type opaque
define i32 @snd_hda_create_hwdep(%struct.hda_codec* nocapture readnone %0) {
ret i32 0
}
void update_users_rx_frequency(void) {}


x86 assembly (clang, -O0):
<update_users_rx_frequency>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_users_rx_frequency>:
ret

LLVM IR (-O0):
define void @update_users_rx_frequency() {
ret void
}

LLVM IR (-O2):
define void @update_users_rx_frequency() {
ret void
}
int DymolaNoInterrupt(void) { return 0; }


x86 assembly (clang, -O0):
<DymolaNoInterrupt>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<DymolaNoInterrupt>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @DymolaNoInterrupt() {
ret i32 0
}

LLVM IR (-O2):
define i32 @DymolaNoInterrupt() {
ret i32 0
}
void gtk_entry_get_layout() {}


x86 assembly (clang, -O0):
<gtk_entry_get_layout>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtk_entry_get_layout>:
ret

LLVM IR (-O0):
define void @gtk_entry_get_layout() {
ret void
}

LLVM IR (-O2):
define void @gtk_entry_get_layout() {
ret void
}
void RTAvlroIOPortDoWithAll(void) {}


x86 assembly (clang, -O0):
<RTAvlroIOPortDoWithAll>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTAvlroIOPortDoWithAll>:
ret

LLVM IR (-O0):
define void @RTAvlroIOPortDoWithAll() {
ret void
}

LLVM IR (-O2):
define void @RTAvlroIOPortDoWithAll() {
ret void
}
extern unsigned int iduns(unsigned int x) { return x; }


x86 assembly (clang, -O0):
<iduns>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iduns>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @iduns(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @iduns(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
void cast2_Good_FP() {
  int32_t arr[4];
  *(((char *)arr) + 4) = 123;
}


x86 assembly (clang, -O0):
<cast2_Good_FP>:
push   %rbp
mov    %rsp,%rbp
movb   $0x7b,-0xc(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cast2_Good_FP>:
ret

LLVM IR (-O0):
define void @cast2_Good_FP() {
%1 = alloca [4 x i32]
%2 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%3 = bitcast i32* %2 to i8*
%4 = getelementptr inbounds i8, i8* %3, i64 4
store i8 123, i8* %4
ret void
}

LLVM IR (-O2):
define void @cast2_Good_FP() {
ret void
}
int gll3(int j, unsigned short *b, long long i) { return j + b[i]; }


x86 assembly (clang, -O0):
<gll3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rdx
movzwl (%rcx,%rdx,2),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gll3>:
movzwl (%rsi,%rdx,2),%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @gll3(i32 %0, i16* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i16*
%6 = alloca i64
store i32 %0, i32* %4
store i16* %1, i16** %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = load i16*, i16** %5
%9 = load i64, i64* %6
%10 = getelementptr inbounds i16, i16* %8, i64 %9
%11 = load i16, i16* %10
%12 = zext i16 %11 to i32
%13 = add nsw i32 %7, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @gll3(i32 %0, i16* nocapture %1, i64 %2) {
%4 = getelementptr inbounds i16, i16* %1, i64 %2
%5 = load i16, i16* %4
%6 = zext i16 %5 to i32
%7 = add nsw i32 %6, %0
ret i32 %7
}
void RTVfsObjToIoStream(void) {}


x86 assembly (clang, -O0):
<RTVfsObjToIoStream>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTVfsObjToIoStream>:
ret

LLVM IR (-O0):
define void @RTVfsObjToIoStream() {
ret void
}

LLVM IR (-O2):
define void @RTVfsObjToIoStream() {
ret void
}
int axp_set_prechargetime(int pre) {
  int ret = 0;
  return ret;
}


x86 assembly (clang, -O0):
<axp_set_prechargetime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<axp_set_prechargetime>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @axp_set_prechargetime(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %3
ret i32 %4
}

LLVM IR (-O2):
define i32 @axp_set_prechargetime(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ PreConnection(char *, char, int);
void Retr(char *param) { PreConnection(param, 'r', 1); }


x86 assembly (clang, -O0):
<Retr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x72,%esi
mov    $0x1,%edx
call   1030 <PreConnection@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Retr>:
mov    $0x72,%esi
mov    $0x1,%edx
jmp    1030 <PreConnection@plt>

LLVM IR (-O0):
define void @Retr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @PreConnection(i8* %3, i8 signext 114, i32 1)
ret void
}

LLVM IR (-O2):
define void @Retr(i8* %0) {
%2 = tail call i32 @PreConnection(i8* %0, i8 signext 114, i32 1)
ret void
}
int transopeIntMatrix(int **array, unsigned int cols, unsigned int rows) {
  return 0;
}


x86 assembly (clang, -O0):
<transopeIntMatrix>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<transopeIntMatrix>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @transopeIntMatrix(i32** %0, i32 %1, i32 %2) {
%4 = alloca i32**
%5 = alloca i32
%6 = alloca i32
store i32** %0, i32*** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @transopeIntMatrix(i32** nocapture readnone %0, i32 %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ccivector_free_(int *pVector) { free((void *)pVector); }


x86 assembly (clang, -O0):
<ccivector_free_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ccivector_free_>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @ccivector_free_(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = bitcast i32* %3 to i8*
%5 = call i32 @free(i8* %4)
ret void
}

LLVM IR (-O2):
define void @ccivector_free_(i32* nocapture %0) {
%2 = bitcast i32* %0 to i8*
%3 = tail call i32 @free(i8* %2)
ret void
}
int test_imm_D9int16_reg(short val) {
  return ((val) & (-0xD9 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_D9int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffff27,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_D9int16_reg>:
test   $0xff27,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_D9int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -217
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_D9int16_reg(i16 signext %0) {
%2 = and i16 %0, -217
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void gtk_window_begin_move_drag() {}


x86 assembly (clang, -O0):
<gtk_window_begin_move_drag>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtk_window_begin_move_drag>:
ret

LLVM IR (-O0):
define void @gtk_window_begin_move_drag() {
ret void
}

LLVM IR (-O2):
define void @gtk_window_begin_move_drag() {
ret void
}
int exynos_drm_debugfs_init(struct drm_minor *minor) { return 0; }


x86 assembly (clang, -O0):
<exynos_drm_debugfs_init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<exynos_drm_debugfs_init>:
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.drm_minor = type opaque
define i32 @exynos_drm_debugfs_init(%struct.drm_minor* %0) {
%2 = alloca %struct.drm_minor*
store %struct.drm_minor* %0, %struct.drm_minor** %2
ret i32 0
}

LLVM IR (-O2):
%struct.drm_minor = type opaque
define i32 @exynos_drm_debugfs_init(%struct.drm_minor* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef double time_t;

/* Variables and functions */
double difftime(time_t end, time_t beginning) { return end - beginning; }


x86 assembly (clang, -O0):
<difftime>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<difftime>:
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @difftime(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fsub double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @difftime(double %0, double %1) {
%3 = fsub double %0, %1
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ can_rx(int);
void FDCAN2_IT0_IRQ_Handler(void) { can_rx(1); }


x86 assembly (clang, -O0):
<FDCAN2_IT0_IRQ_Handler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <can_rx@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FDCAN2_IT0_IRQ_Handler>:
mov    $0x1,%edi
jmp    1030 <can_rx@plt>

LLVM IR (-O0):
define void @FDCAN2_IT0_IRQ_Handler() {
%1 = call i32 @can_rx(i32 1)
ret void
}

LLVM IR (-O2):
define void @FDCAN2_IT0_IRQ_Handler() {
%1 = tail call i32 @can_rx(i32 1)
ret void
}
/* Variables and functions */
int cfg_processor_get_hex_int_attr(void *, char *);
int cfg_io_get_gpio_out_addr(void *port) {
  return cfg_processor_get_hex_int_attr(port, "out");
}


x86 assembly (clang, -O0):
<cfg_io_get_gpio_out_addr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <cfg_processor_get_hex_int_attr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfg_io_get_gpio_out_addr>:
lea    0xee9(%rip),%rsi
jmp    1030 <cfg_processor_get_hex_int_attr@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"out\00"
define i32 @cfg_io_get_gpio_out_addr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @cfg_processor_get_hex_int_attr(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
@.str = [4 x i8] c"out\00"
define i32 @cfg_io_get_gpio_out_addr(i8* %0) {
%2 = tail call i32 @cfg_processor_get_hex_int_attr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void validaParametrosInput(int argc, char *argv[]) {
  if (argc != 2) {
    printf("\nDebe recibir el número de jugador\n\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<validaParametrosInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x4(%rbp)
je     114f <validaParametrosInput+0x2f>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<validaParametrosInput>:
cmp    $0x2,%edi
jne    1126 <validaParametrosInput+0x6>
ret
push   %rax
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"\0ADebe recibir el n\C3\BAmero de jugador\0A\0A\00"
define void @validaParametrosInput(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 2
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @exit(i32 1)
unreachable
10: ; preds = %2
ret void
}

LLVM IR (-O2):
@str = [37 x i8] c"\0ADebe recibir el n\C3\BAmero de jugador\0A\00"
define void @validaParametrosInput(i32 %0, i8** nocapture readnone %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %2
ret void
}
/* Variables and functions */
int SIGCHLD;
int /*<<< orphan*/ printf(char *, int, int);
int wait(int *);
void child_exit_handler(int signum) {
  if (signum == SIGCHLD) {
    int status;
    int pid = wait(&status);
    printf("Child exit. %d status: %d\n", pid, status);
  }
}


x86 assembly (clang, -O0):
<child_exit_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eb3(%rip),%rcx
cmp    (%rcx),%eax
jne    115b <child_exit_handler+0x3b>
lea    -0x8(%rbp),%rdi
call   1040 <wait@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<child_exit_handler>:
push   %rax
mov    0x2ec0(%rip),%rax
cmp    %edi,(%rax)
jne    1148 <child_exit_handler+0x28>
lea    0x4(%rsp),%rdi
call   1040 <wait@plt>
mov    0x4(%rsp),%edx
lea    0xebf(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@SIGCHLD = global i32 0
@.str = [27 x i8] c"Child exit. %d status: %d\0A\00"
define void @child_exit_handler(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = load i32, i32* @SIGCHLD
%7 = icmp eq i32 %5, %6
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = call i32 @wait(i32* %3)
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %11)
br label %13
13: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
@SIGCHLD = global i32 0
@.str = [27 x i8] c"Child exit. %d status: %d\0A\00"
define void @child_exit_handler(i32 %0) {
%2 = alloca i32
%3 = load i32, i32* @SIGCHLD
%4 = icmp eq i32 %3, %0
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = bitcast i32* %2 to i8*
%7 = call i32 @wait(i32* %2)
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
br label %10
10: ; preds = %5, %1
ret void
}
/* Variables and functions */
double atof(char *);
double native___NativeString_atof___impl(char *self) { return atof(self); }


x86 assembly (clang, -O0):
<native___NativeString_atof___impl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <atof@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<native___NativeString_atof___impl>:
jmp    1030 <atof@plt>

LLVM IR (-O0):
define double @native___NativeString_atof___impl(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call double @atof(i8* %3)
ret double %4
}

LLVM IR (-O2):
define double @native___NativeString_atof___impl(i8* nocapture %0) {
%2 = tail call double @atof(i8* %0)
ret double %2
}
/* Variables and functions */
scalar_t__ ETH_ALEN;
scalar_t__ memcmp(void *, void *, scalar_t__);
int data_compare(void *d1, void *d2) {
  return ((memcmp(d1, d2, ETH_ALEN + 1) == 0) ? 1 : 0);
}


x86 assembly (clang, -O0):
<data_compare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2eb9(%rip),%rax
mov    (%rax),%rdx
add    $0x1,%rdx
call   1030 <memcmp@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<data_compare>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%rdx
add    $0x1,%rdx
call   1030 <memcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ETH_ALEN = global i64 0
define i32 @data_compare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i64, i64* @ETH_ALEN
%8 = add nsw i64 %7, 1
%9 = call i64 @memcmp(i8* %5, i8* %6, i64 %8)
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 1, i32 0
ret i32 %12
}

LLVM IR (-O2):
@ETH_ALEN = global i64 0
define i32 @data_compare(i8* %0, i8* %1) {
%3 = load i64, i64* @ETH_ALEN
%4 = add nsw i64 %3, 1
%5 = tail call i64 @memcmp(i8* %0, i8* %1, i64 %4)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int fun_stub_base_3_stub(char);
int /*<<< orphan*/ printf(char *, int);
int fun_stub_base_3_call(char a) {
  printf("fun_stub_base_3_call:a = %d \n", a);
  int x = fun_stub_base_3_stub(a);
  printf("fun_stub_base_3_stub return %d\n", x);
  return x;
}


x86 assembly (clang, -O0):
<fun_stub_base_3_call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x1(%rbp),%edi
call   1040 <fun_stub_base_3_stub@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_stub_base_3_call>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <fun_stub_base_3_stub@plt>
mov    %eax,%ebx
lea    0xedd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"fun_stub_base_3_call:a = %d \0A\00"
@.str.1 = [32 x i8] c"fun_stub_base_3_stub return %d\0A\00"
define i32 @fun_stub_base_3_call(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8, i8* %2
%8 = call i32 @fun_stub_base_3_stub(i8 signext %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
@.str = [30 x i8] c"fun_stub_base_3_call:a = %d \0A\00"
@.str.1 = [32 x i8] c"fun_stub_base_3_stub return %d\0A\00"
define i32 @fun_stub_base_3_call(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 @fun_stub_base_3_stub(i8 signext %0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ss_free(void *sPtr) {
  if (NULL == sPtr)
    return;
  free(sPtr);
}


x86 assembly (clang, -O0):
<ss_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%rax
jne    112d <ss_free+0x1d>
jmp    1136 <ss_free+0x26>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ss_free>:
test   %rdi,%rdi
je     111a <ss_free+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @ss_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* null, %3
br i1 %4, label %5, label %6
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @free(i8* %7)
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
define void @ss_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %1, %3
ret void
}
/* Type definitions */
struct stat {
  int st_nlink;
};

/* Variables and functions */
scalar_t__ stat(char const *, struct stat *);
int check_link_count(const char *file) {
  struct stat sb;
  if (stat(file, &sb) != 0)
    return 0;
  if (sb.st_nlink != 2)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<check_link_count>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
je     113f <check_link_count+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    115c <check_link_count+0x4c>
cmpl   $0x2,-0x18(%rbp)
je     1155 <check_link_count+0x45>
movl   $0x0,-0x4(%rbp)
jmp    115c <check_link_count+0x4c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_link_count>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
test   %rax,%rax
sete   %al
cmpl   $0x2,(%rsp)
sete   %cl
and    %al,%cl
movzbl %cl,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @check_link_count(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %15
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = icmp ne i32 %11, 2
br i1 %12, label %13, label %14
13: ; preds = %9
store i32 0, i32* %2
br label %15
14: ; preds = %9
store i32 1, i32* %2
br label %15
15: ; preds = %14, %13, %8
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @check_link_count(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, 2
%9 = select i1 %5, i1 %8, i1 false
%10 = zext i1 %9 to i32
ret i32 %10
}
int FastIntMin(int a, int b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<FastIntMin>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <FastIntMin+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <FastIntMin+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FastIntMin>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define i32 @FastIntMin(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @FastIntMin(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
int xscom_write(int, int, int);
int xscom_write_ex(uint32_t ex_target_id, uint64_t addr, uint64_t val) {
  uint32_t chip_id = ex_target_id >> 4;
  ;
  addr |= (ex_target_id & 0xf) << 24;
  return xscom_write(chip_id, addr, val);
}


x86 assembly (clang, -O0):
<xscom_write_ex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
shl    $0x18,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <xscom_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xscom_write_ex>:
mov    %edi,%eax
sar    $0x4,%eax
and    $0xf,%edi
shl    $0x18,%edi
or     %edi,%esi
mov    %eax,%edi
jmp    1030 <xscom_write@plt>

LLVM IR (-O0):
define i32 @xscom_write_ex(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = ashr i32 %8, 4
store i32 %9, i32* %7
%10 = load i32, i32* %4
%11 = and i32 %10, 15
%12 = shl i32 %11, 24
%13 = load i32, i32* %5
%14 = or i32 %13, %12
store i32 %14, i32* %5
%15 = load i32, i32* %7
%16 = load i32, i32* %5
%17 = load i32, i32* %6
%18 = call i32 @xscom_write(i32 %15, i32 %16, i32 %17)
ret i32 %18
}

LLVM IR (-O2):
define i32 @xscom_write_ex(i32 %0, i32 %1, i32 %2) {
%4 = ashr i32 %0, 4
%5 = shl i32 %0, 24
%6 = and i32 %5, 251658240
%7 = or i32 %6, %1
%8 = tail call i32 @xscom_write(i32 %4, i32 %7, i32 %2)
ret i32 %8
}
void test_setup() {}


x86 assembly (clang, -O0):
<test_setup>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_setup>:
ret

LLVM IR (-O0):
define void @test_setup() {
ret void
}

LLVM IR (-O2):
define void @test_setup() {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ chr8setBank0(int);
int /*<<< orphan*/ m200SetPrgROMBank(int);
void m203_setParams(uint16_t addr, uint8_t val) {
  (void)addr;
  m200SetPrgROMBank((val >> 2) << 14);
  chr8setBank0((val & 3) << 13);
}


x86 assembly (clang, -O0):
<m203_setParams>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
sar    $0x2,%edi
shl    $0xe,%edi
call   1030 <m200SetPrgROMBank@plt>
mov    -0x8(%rbp),%edi
and    $0x3,%edi
shl    $0xd,%edi
call   1040 <chr8setBank0@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m203_setParams>:
push   %rbx
mov    %esi,%ebx
mov    %esi,%edi
and    $0xfffffffc,%edi
shl    $0xc,%edi
call   1030 <m200SetPrgROMBank@plt>
and    $0x3,%ebx
shl    $0xd,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <chr8setBank0@plt>

LLVM IR (-O0):
define void @m203_setParams(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = ashr i32 %6, 2
%8 = shl i32 %7, 14
%9 = call i32 @m200SetPrgROMBank(i32 %8)
%10 = load i32, i32* %4
%11 = and i32 %10, 3
%12 = shl i32 %11, 13
%13 = call i32 @chr8setBank0(i32 %12)
ret void
}

LLVM IR (-O2):
define void @m203_setParams(i32 %0, i32 %1) {
%3 = shl i32 %1, 12
%4 = and i32 %3, -16384
%5 = tail call i32 @m200SetPrgROMBank(i32 %4)
%6 = shl i32 %1, 13
%7 = and i32 %6, 24576
%8 = tail call i32 @chr8setBank0(i32 %7)
ret void
}
/* Variables and functions */
char *_s2_f2cstr(char *, long);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ s2textxy(float, float, float, char *);
void s2textxy_(float *x, float *y, float *z, char *text, long int textlen) {
  char *t1 = _s2_f2cstr(text, textlen);
  s2textxy(*x, *y, *z, t1);
  free(t1);
}


x86 assembly (clang, -O0):
<s2textxy_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1050 <_s2_f2cstr@plt>
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x30(%rbp),%rdi
call   1040 <s2textxy@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2textxy_>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r12
mov    %rcx,%rdi
mov    %r8,%rsi
call   1050 <_s2_f2cstr@plt>
mov    %rax,%rbx
movss  (%r12),%xmm0
movss  (%r15),%xmm1
movss  (%r14),%xmm2
mov    %rax,%rdi
call   1040 <s2textxy@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @s2textxy_(float* %0, float* %1, float* %2, i8* %3, i64 %4) {
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i8*
store float* %0, float** %6
store float* %1, float** %7
store float* %2, float** %8
store i8* %3, i8** %9
store i64 %4, i64* %10
%12 = load i8*, i8** %9
%13 = load i64, i64* %10
%14 = call i8* @_s2_f2cstr(i8* %12, i64 %13)
store i8* %14, i8** %11
%15 = load float*, float** %6
%16 = load float, float* %15
%17 = load float*, float** %7
%18 = load float, float* %17
%19 = load float*, float** %8
%20 = load float, float* %19
%21 = load i8*, i8** %11
%22 = call i32 @s2textxy(float %16, float %18, float %20, i8* %21)
%23 = load i8*, i8** %11
%24 = call i32 @free(i8* %23)
ret void
}

LLVM IR (-O2):
define void @s2textxy_(float* nocapture %0, float* nocapture %1, float* nocapture %2, i8* %3, i64 %4) {
%6 = tail call i8* @_s2_f2cstr(i8* %3, i64 %4)
%7 = load float, float* %0
%8 = load float, float* %1
%9 = load float, float* %2
%10 = tail call i32 @s2textxy(float %7, float %8, float %9, i8* %6)
%11 = tail call i32 @free(i8* %6)
ret void
}
/* Variables and functions */
scalar_t__ pow(double, double);
int operation_pow(int a, int b) { return (int)pow((double)a, (double)b); }


x86 assembly (clang, -O0):
<operation_pow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
call   1030 <pow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<operation_pow>:
cvtsi2sd %edi,%xmm0
cvtsi2sd %esi,%xmm1
jmp    1030 <pow@plt>

LLVM IR (-O0):
define i32 @operation_pow(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = sitofp i32 %5 to double
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to double
%9 = call i64 @pow(double %6, double %8)
%10 = trunc i64 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @operation_pow(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to double
%4 = sitofp i32 %1 to double
%5 = tail call i64 @pow(double %3, double %4)
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage() {
  printf("\nUsage:\n   %s\n\n",
         "fill_holes"
         " [-log <logfile>] [-quiet] [-cutoff <height>] <infile> <outfile>\n"
         "              [-license] [-version] [-help]");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeee(%rip),%rsi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
lea    0xee9(%rip),%rdi
lea    0xef2(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"\0AUsage:\0A %s\0A\0A\00"
@.str.1 = [119 x i8] c"fill_holes [-log <logfile>] [-quiet] [-cutoff <height>] <infile> <outfile>\0A [-license] [-version] [-help]\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([119 x i8], [119 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"\0AUsage:\0A %s\0A\0A\00"
@.str.1 = [119 x i8] c"fill_holes [-log <logfile>] [-quiet] [-cutoff <height>] <infile> <outfile>\0A [-license] [-version] [-help]\00"
define void @usage() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([119 x i8], [119 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int runningBigEndian(void) {
  unsigned char cbuf[4] = "\x01\x00\x00\x00";
  unsigned int *pcbuf = (unsigned int *)cbuf;
  if (1 == *pcbuf)
    return 0;
  if (1 * 256 * 256 * 256 == *pcbuf)
    return 1;
  return 2;
}


x86 assembly (clang, -O0):
<runningBigEndian>:
push   %rbp
mov    %rsp,%rbp
mov    0xef6(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    $0x1,%eax
cmp    (%rcx),%eax
jne    1132 <runningBigEndian+0x32>
movl   $0x0,-0x4(%rbp)
jmp    1156 <runningBigEndian+0x56>
mov    -0x10(%rbp),%rcx
mov    $0x1000000,%eax
cmp    (%rcx),%eax
jne    114f <runningBigEndian+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    1156 <runningBigEndian+0x56>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<runningBigEndian>:
xor    %eax,%eax
ret

LLVM IR (-O0):
@__const.runningBigEndian.cbuf = [4 x i8] c"\01\00\00\00"
define i32 @runningBigEndian() {
%1 = alloca i32
%2 = alloca [4 x i8]
%3 = alloca i32*
%4 = bitcast [4 x i8]* %2 to i8*
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%6 = bitcast i8* %5 to i32*
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
%9 = icmp eq i32 1, %8
br i1 %9, label %10, label %11
10: ; preds = %0
store i32 0, i32* %1
br label %17
11: ; preds = %0
%12 = load i32*, i32** %3
%13 = load i32, i32* %12
%14 = icmp eq i32 16777216, %13
br i1 %14, label %15, label %16
15: ; preds = %11
store i32 1, i32* %1
br label %17
16: ; preds = %11
store i32 2, i32* %1
br label %17
17: ; preds = %16, %15, %10
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
define i32 @runningBigEndian() {
ret i32 0
}
long long llabs(long long n) { return n >= 0 ? n : -n; }


x86 assembly (clang, -O0):
<llabs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jl     1120 <llabs+0x20>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    112a <llabs+0x2a>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<llabs>:
mov    %rdi,%rax
neg    %rax
cmovs  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @llabs(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp sge i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i64, i64* %2
br label %10
7: ; preds = %1
%8 = load i64, i64* %2
%9 = sub nsw i64 0, %8
br label %10
10: ; preds = %7, %5
%11 = phi i64 [ %6, %5 ], [ %9, %7 ]
ret i64 %11
}

LLVM IR (-O2):
define i64 @llabs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ break_link_map();
int /*<<< orphan*/ recursive(int);
scalar_t__ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  if (argc >= 2 && 0 == strcmp(argv[1], "--break-link-map")) {
    break_link_map();
  }
  recursive(2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jl     1179 <main+0x49>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xea1(%rip),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    1179 <main+0x49>
mov    $0x0,%al
call   1050 <break_link_map@plt>
mov    $0x2,%edi
call   1040 <recursive@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jl     1152 <main+0x22>
mov    0x8(%rsi),%rdi
lea    0xebf(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
jne    1152 <main+0x22>
xor    %eax,%eax
call   1050 <break_link_map@plt>
mov    $0x2,%edi
call   1040 <recursive@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"--break-link-map\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp sge i32 %6, 2
br i1 %7, label %8, label %16
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i64 @strcmp(i8* %11, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%13 = icmp eq i64 0, %12
br i1 %13, label %14, label %16
14: ; preds = %8
%15 = call i32 (...) @break_link_map()
br label %16
16: ; preds = %14, %8, %2
%17 = call i32 @recursive(i32 2)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"--break-link-map\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = tail call i32 (...) @break_link_map()
br label %11
11: ; preds = %9, %4, %2
%12 = tail call i32 @recursive(i32 2)
ret i32 0
}