xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ modify(int const *, int *);
int /*<<< orphan*/ printf(char *, int const, int);
void main(void) {
  const int a = 13;
  int b = 1;
  modify(&a, &b);
  printf("%d\n%d\n", a, b);
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xd,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <modify@plt>
mov    -0x8(%rbp),%edx
lea    0xeb3(%rip),%rdi
mov    $0xd,%esi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0xd,0x4(%rsp)
movl   $0x1,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <modify@plt>
mov    (%rsp),%edx
lea    0xeb9(%rip),%rdi
mov    $0xd,%esi
call   1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d\0A%d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
store i32 13, i32* %1
store i32 1, i32* %2
%3 = call i32 @modify(i32* %1, i32* %2)
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 13, i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d\0A%d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 13, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%5 = call i32 @modify(i32* %1, i32* %2)
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 13, i32 %6)
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *protobuf_c_system_alloc(void *allocator_data __attribute__((unused)),
                              size_t size) {
  return malloc(size);
}


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

x86 assembly (clang, -O2):
<protobuf_c_system_alloc>:
mov    %rsi,%rdi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @protobuf_c_system_alloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = call i8* @malloc(i64 %5)
ret i8* %6
}

LLVM IR (-O2):
define noalias i8* @protobuf_c_system_alloc(i8* nocapture readnone %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, double, double, double, double);
void mcdis_circle(char *plane, double x, double y, double z, double r) {
  printf("MCDISPLAY: circle('%s',%g,%g,%g,%g)\n", plane, x, y, z, r);
}


x86 assembly (clang, -O0):
<mcdis_circle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
mov    -0x8(%rbp),%rsi
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcdis_circle>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"MCDISPLAY: circle('%s',%g,%g,%g,%g)\0A\00"
define void @mcdis_circle(i8* %0, double %1, double %2, double %3, double %4) {
%6 = alloca i8*
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store i8* %0, i8** %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%11 = load i8*, i8** %6
%12 = load double, double* %7
%13 = load double, double* %8
%14 = load double, double* %9
%15 = load double, double* %10
%16 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %11, double %12, double %13, double %14, double %15)
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"MCDISPLAY: circle('%s',%g,%g,%g,%g)\0A\00"
define void @mcdis_circle(i8* %0, double %1, double %2, double %3, double %4) {
%6 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %0, double %1, double %2, double %3, double %4)
ret void
}
/* Variables and functions */
int bbm_bulk_read(void *, int, unsigned char *, unsigned char);
int fci_hpi_read(void *handle, unsigned char chip, unsigned char addr,
                 unsigned char alen, unsigned char *data, unsigned char len) {
  return bbm_bulk_read(handle, 0x0f00 | addr, data, len);
}


x86 assembly (clang, -O0):
<fci_hpi_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %r9b,%al
mov    %rdi,-0x8(%rbp)
mov    %sil,-0x9(%rbp)
mov    %dl,-0xa(%rbp)
mov    %cl,-0xb(%rbp)
mov    %r8,-0x18(%rbp)
mov    %al,-0x19(%rbp)
mov    -0x8(%rbp),%rdi
movzbl -0xa(%rbp),%esi
or     $0xf00,%esi
mov    -0x18(%rbp),%rdx
movzbl -0x19(%rbp),%ecx
call   1030 <bbm_bulk_read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fci_hpi_read>:
mov    %r9d,%ecx
lea    0xf00(%rdx),%esi
mov    %r8,%rdx
jmp    1030 <bbm_bulk_read@plt>

LLVM IR (-O0):
define i32 @fci_hpi_read(i8* %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3, i8* %4, i8 zeroext %5) {
%7 = alloca i8*
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
%11 = alloca i8*
%12 = alloca i8
store i8* %0, i8** %7
store i8 %1, i8* %8
store i8 %2, i8* %9
store i8 %3, i8* %10
store i8* %4, i8** %11
store i8 %5, i8* %12
%13 = load i8*, i8** %7
%14 = load i8, i8* %9
%15 = zext i8 %14 to i32
%16 = or i32 3840, %15
%17 = load i8*, i8** %11
%18 = load i8, i8* %12
%19 = call i32 @bbm_bulk_read(i8* %13, i32 %16, i8* %17, i8 zeroext %18)
ret i32 %19
}

LLVM IR (-O2):
define i32 @fci_hpi_read(i8* %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3, i8* %4, i8 zeroext %5) {
%7 = zext i8 %2 to i32
%8 = or i32 %7, 3840
%9 = tail call i32 @bbm_bulk_read(i8* %0, i32 %8, i8* %4, i8 zeroext %5)
ret i32 %9
}
void I_UnloadSong() {}


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

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

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

LLVM IR (-O2):
define void @I_UnloadSong() {
ret void
}
/* Variables and functions */
long double exp2l(long double);
long double test2l(long double x) { return exp2l(x); }


x86 assembly (clang, -O0):
<test2l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <exp2l@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2l>:
jmp    1030 <exp2l@plt>

LLVM IR (-O0):
define x86_fp80 @test2l(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call x86_fp80 @exp2l(x86_fp80 %3)
ret x86_fp80 %4
}

LLVM IR (-O2):
define x86_fp80 @test2l(x86_fp80 %0) {
%2 = tail call x86_fp80 @exp2l(x86_fp80 %0)
ret x86_fp80 %2
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t __swap16(uint16_t x) {
  return (((x & 0x00ffU) << 8) | (((x & 0xff00U) >> 8)));
}


x86 assembly (clang, -O0):
<__swap16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x8,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
shr    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__swap16>:
rol    $0x8,%di
movzwl %di,%eax
ret

LLVM IR (-O0):
define i32 @__swap16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = shl i32 %4, 8
%6 = load i32, i32* %2
%7 = and i32 %6, 65280
%8 = lshr i32 %7, 8
%9 = or i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @__swap16(i32 %0) {
%2 = trunc i32 %0 to i16
%3 = tail call i16 @llvm.bswap.i16(i16 %2)
%4 = zext i16 %3 to i32
ret i32 %4
}
int d2iz(double a) { return (int)a; }


x86 assembly (clang, -O0):
<d2iz>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2iz>:
cvttsd2si %xmm0,%eax
ret

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

LLVM IR (-O2):
define i32 @d2iz(double %0) {
%2 = fptosi double %0 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void PrintResult(int i, int step) { printf("%d\n%d", i, step); }


x86 assembly (clang, -O0):
<PrintResult>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintResult>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%d\0A%d\00"
define void @PrintResult(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 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d\0A%d\00"
define void @PrintResult(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
void collect_subjects() {}


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

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

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

LLVM IR (-O2):
define void @collect_subjects() {
ret void
}
/* Variables and functions */
#define SIGHUP 131
#define SIGINT 130
#define SIGQUIT 129
#define SIGTERM 128
int /*<<< orphan*/ close_gpio_channel(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void signal_handler(int sig) {
  switch (sig) {
  case SIGTERM:
  case SIGHUP:
  case SIGQUIT:
  case SIGINT:
    close_gpio_channel(902);
    close_gpio_channel(894);
    exit(0);
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<signal_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffff80,%eax
sub    $0x3,%eax
ja     115a <signal_handler+0x3a>
jmp    113f <signal_handler+0x1f>
mov    $0x386,%edi
call   1030 <close_gpio_channel@plt>
mov    $0x37e,%edi
call   1030 <close_gpio_channel@plt>
xor    %edi,%edi
call   1040 <exit@plt>
jmp    115f <signal_handler+0x3f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signal_handler>:
and    $0xfffffffc,%edi
cmp    $0x80,%edi
je     112c <signal_handler+0xc>
ret
push   %rax
mov    $0x386,%edi
call   1030 <close_gpio_channel@plt>
mov    $0x37e,%edi
call   1030 <close_gpio_channel@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %8 [
i32 128, label %4
i32 131, label %4
i32 129, label %4
i32 130, label %4
]
4: ; preds = %1, %1, %1, %1
%5 = call i32 @close_gpio_channel(i32 902)
%6 = call i32 @close_gpio_channel(i32 894)
%7 = call i32 @exit(i32 0)
unreachable
8: ; preds = %1
br label %9
9: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @signal_handler(i32 %0) {
%2 = and i32 %0, -4
%3 = icmp eq i32 %2, 128
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @close_gpio_channel(i32 902)
%6 = tail call i32 @close_gpio_channel(i32 894)
%7 = tail call i32 @exit(i32 0)
unreachable
8: ; preds = %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_rwlock_t;

/* Variables and functions */
int ENOSYS;
int pthread_rwlock_destroy(pthread_rwlock_t *rwlock) { return -ENOSYS; }


x86 assembly (clang, -O0):
<pthread_rwlock_destroy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    0x2ed7(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_rwlock_destroy>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

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

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @pthread_rwlock_destroy(i32* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
%3 = sub nsw i32 0, %2
ret i32 %3
}
void INT_Excep_RTC_ALM(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_RTC_ALM() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ first();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ second();
int main(void) {
  first();
  second();
  printf("Main function...\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <first@plt>
mov    $0x0,%al
call   1040 <second@plt>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <first@plt>
xor    %eax,%eax
call   1040 <second@plt>
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Main function...\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @first()
%3 = call i32 (...) @second()
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [17 x i8] c"Main function...\00"
define i32 @main() {
%1 = tail call i32 (...) @first()
%2 = tail call i32 (...) @second()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ output(char *);
void printThermalZoneTemperatureInfo(const char *cmd) {
  (void)cmd;
  output("Current temperature\t0\t0\tC\n");
}


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"Current temperature\090\090\09C\0A\00"
define void @printThermalZoneTemperatureInfo(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @output(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"Current temperature\090\090\09C\0A\00"
define void @printThermalZoneTemperatureInfo(i8* nocapture readnone %0) {
%2 = tail call i32 @output(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}
void ControlsMouseJoyStick_GetCvars(void) {}


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

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

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

LLVM IR (-O2):
define void @ControlsMouseJoyStick_GetCvars() {
ret void
}
/* Variables and functions */
int rand();
int rand_uniform(int a, int b) {
  if (a >= b)
    return a;
  else
    return a + rand() % (b - a);
}


x86 assembly (clang, -O0):
<rand_uniform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1135 <rand_uniform+0x25>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <rand_uniform+0x43>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0xc(%rbp),%ecx
sub    -0x8(%rbp),%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_uniform>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
sub    %edi,%ebp
jle    1127 <rand_uniform+0x17>
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebp
add    %edx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rand_uniform(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = icmp sge i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %4
store i32 %10, i32* %3
br label %19
11: ; preds = %2
%12 = load i32, i32* %4
%13 = call i32 (...) @rand()
%14 = load i32, i32* %5
%15 = load i32, i32* %4
%16 = sub nsw i32 %14, %15
%17 = srem i32 %13, %16
%18 = add nsw i32 %12, %17
store i32 %18, i32* %3
br label %19
19: ; preds = %11, %9
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @rand_uniform(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, %0
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = tail call i32 (...) @rand()
%6 = sub nsw i32 %1, %0
%7 = srem i32 %5, %6
%8 = add nsw i32 %7, %0
br label %9
9: ; preds = %2, %4
%10 = phi i32 [ %8, %4 ], [ %0, %2 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char, char);
int /*<<< orphan*/ system(char *);
void set_num_and_caps_lights(int lights) {
  char command[32];
  sprintf(command, "xset %cled 2 %cled 1", (lights & 2) ? ' ' : '-',
          (lights & 1) ? ' ' : '-');
  system(command);
}


x86 assembly (clang, -O0):
<set_num_and_caps_lights>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x4(%rbp),%edx
and    $0x2,%edx
mov    $0x2d,%eax
mov    $0x20,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %al,%cl
mov    -0x4(%rbp),%esi
and    $0x1,%esi
mov    $0x2d,%eax
mov    $0x20,%edx
cmp    $0x0,%esi
cmovne %edx,%eax
lea    0xe9c(%rip),%rsi
movsbl %cl,%edx
movsbl %al,%ecx
call   1040 <sprintf@plt>
lea    -0x30(%rbp),%rdi
call   1030 <system@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_num_and_caps_lights>:
push   %rbx
sub    $0x20,%rsp
test   $0x2,%dil
mov    $0x2d,%eax
mov    $0x20,%edx
cmove  %eax,%edx
mov    $0x20,%ecx
test   $0x1,%dil
cmove  %eax,%ecx
lea    0xeb7(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"xset %cled 2 %cled 1\00"
define void @set_num_and_caps_lights(i32 %0) {
%2 = alloca i32
%3 = alloca [32 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = and i32 %5, 2
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 32, i32 45
%10 = trunc i32 %9 to i8
%11 = load i32, i32* %2
%12 = and i32 %11, 1
%13 = icmp ne i32 %12, 0
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 32, i32 45
%16 = trunc i32 %15 to i8
%17 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8 signext %10, i8 signext %16)
%18 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%19 = call i32 @system(i8* %18)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"xset %cled 2 %cled 1\00"
define void @set_num_and_caps_lights(i32 %0) {
%2 = alloca [32 x i8]
%3 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%4 = and i32 %0, 2
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i8 45, i8 32
%7 = and i32 %0, 1
%8 = icmp eq i32 %7, 0
%9 = select i1 %8, i8 45, i8 32
%10 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8 signext %6, i8 signext %9)
%11 = call i32 @system(i8* %3)
ret void
}
void fc195(int n) {
  {
    typedef int(*b)[n];
    {
      typedef int(*c)[n];
      0;
    }
    {
      typedef int(*d)[n];
      0;
    };
    typedef int(*e)[n];
    0;
  };
  {
    typedef int(*f)[n];
  a : {
    typedef int(*g)[n];
    0;
  };
    {
      typedef int(*h)[n];
      goto a;
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
  0;
}


x86 assembly (clang, -O0):
<fc195>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fc195+0x7>

x86 assembly (clang, -O2):
<fc195>:
jmp    1100 <fc195>

LLVM IR (-O0):
define void @fc195(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = load i32, i32* %2
%12 = zext i32 %11 to i64
br label %13
13: ; preds = %13, %1
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
%16 = load i32, i32* %2
%17 = zext i32 %16 to i64
br label %13
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = load i32, i32* %2
%22 = zext i32 %21 to i64
ret void
}

LLVM IR (-O2):
define void @fc195(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ func(char, int, int);
int /*<<< orphan*/ scanf(char *, char *, int *, int *);
int main(void) {
  char ch;
  int row, col;
  scanf("%c%d%d", &ch, &col, &row);
  func(ch, col, row);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x5(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    -0xc(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x5(%rbp),%al
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
movsbl %al,%edi
call   1030 <func@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0xf(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x14(%rsp),%rcx
call   1040 <scanf@plt>
movsbl 0xf(%rsp),%edi
mov    0x10(%rsp),%esi
mov    0x14(%rsp),%edx
call   1030 <func@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%c%d%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %2, i32* %4, i32* %3)
%6 = load i8, i8* %2
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = call i32 @func(i8 signext %6, i32 %7, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%c%d%d\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1, i32* %3, i32* %2)
%7 = load i8, i8* %1
%8 = load i32, i32* %3
%9 = load i32, i32* %2
%10 = call i32 @func(i8 signext %7, i32 %8, i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void diesys(char *s) {
  fprintf(stderr, "%s: %s\n", s, strerror(errno));
  exit(errno);
}


x86 assembly (clang, -O0):
<diesys>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    %rax,%rcx
lea    0xe91(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e5d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<diesys>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    0x2ea2(%rip),%rax
mov    (%rax),%ebp
mov    0x2e91(%rip),%r14
mov    (%r14),%edi
call   1050 <strerror@plt>
lea    0xeaa(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1030 <fprintf@plt>
mov    (%r14),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [8 x i8] c"%s: %s\0A\00"
@errno = global i32 0
define void @diesys(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i32, i32* @errno
%6 = call i8* @strerror(i32 %5)
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %6)
%8 = load i32, i32* @errno
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"%s: %s\0A\00"
@errno = global i32 0
define void @diesys(i8* %0) {
%2 = load i32, i32* @stderr
%3 = load i32, i32* @errno
%4 = tail call i8* @strerror(i32 %3)
%5 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %4)
%6 = load i32, i32* @errno
%7 = tail call i32 @exit(i32 %6)
unreachable
}
/* Type definitions */
struct __test_metadata {
  int dummy;
};
struct __fixture_variant_metadata {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ epoll30(struct __test_metadata *);
void wrapper_epoll30(struct __test_metadata *_metadata,
                     struct __fixture_variant_metadata *variant) {
  epoll30(_metadata);
}


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

x86 assembly (clang, -O2):
<wrapper_epoll30>:
jmp    1030 <epoll30@plt>

LLVM IR (-O0):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll30(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* %1) {
%3 = alloca %struct.__test_metadata*
%4 = alloca %struct.__fixture_variant_metadata*
store %struct.__test_metadata* %0, %struct.__test_metadata** %3
store %struct.__fixture_variant_metadata* %1, %struct.__fixture_variant_metadata** %4
%5 = load %struct.__test_metadata*, %struct.__test_metadata** %3
%6 = call i32 @epoll30(%struct.__test_metadata* %5)
ret void
}

LLVM IR (-O2):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll30(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* nocapture readnone %1) {
%3 = tail call i32 @epoll30(%struct.__test_metadata* %0)
ret void
}
int ascend(const void *a, const void *b) { return (*(float *)a - *(float *)b); }


x86 assembly (clang, -O0):
<ascend>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subss  (%rax),%xmm0
cvttss2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ascend>:
movss  (%rdi),%xmm0
subss  (%rsi),%xmm0
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @ascend(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 = bitcast i8* %5 to float*
%7 = load float, float* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to float*
%10 = load float, float* %9
%11 = fsub float %7, %10
%12 = fptosi float %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @ascend(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to float*
%4 = load float, float* %3
%5 = bitcast i8* %1 to float*
%6 = load float, float* %5
%7 = fsub float %4, %6
%8 = fptosi float %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ binary(int);
int convert();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int digit = convert();
  printf("The number is %d\n", digit);
  binary(digit);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <convert@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xead(%rip),%rdi
call   1050 <printf@plt>
mov    -0x8(%rbp),%edi
call   1040 <binary@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <convert@plt>
mov    %eax,%ebx
lea    0xebf(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
mov    %ebx,%edi
call   1040 <binary@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"The number is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @convert()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @binary(i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"The number is %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @convert()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @binary(i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Name:\n");
  printf("	archive - concatenate files and create an archive\n");
  printf("Usage:\n");
  printf("	archive archive_name create file0 file1 ...\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
lea    0xf09(%rip),%rdi
call   1030 <puts@plt>
lea    0xf04(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"Name:\0A\00"
@.str.1 = [52 x i8] c"\09archive - concatenate files and create an archive\0A\00"
@.str.2 = [8 x i8] c"Usage:\0A\00"
@.str.3 = [46 x i8] c"\09archive archive_name create file0 file1 ...\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [6 x i8] c"Name:\00"
@str.4 = [51 x i8] c"\09archive - concatenate files and create an archive\00"
@str.5 = [7 x i8] c"Usage:\00"
@str.6 = [45 x i8] c"\09archive archive_name create file0 file1 ...\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.6, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("sizeof(char)  -> %ld\n", sizeof(char));
  printf("sizeof(int)   -> %ld\n", sizeof(int));
  printf("sizeof(float) -> %ld\n", sizeof(float));
  printf("sizeof(long)  -> %ld\n", sizeof(long));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"sizeof(char) -> %ld\0A\00"
@.str.1 = [22 x i8] c"sizeof(int) -> %ld\0A\00"
@.str.2 = [22 x i8] c"sizeof(float) -> %ld\0A\00"
@.str.3 = [22 x i8] c"sizeof(long) -> %ld\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 4)
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 4)
%5 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 8)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"sizeof(char) -> %ld\0A\00"
@.str.1 = [22 x i8] c"sizeof(int) -> %ld\0A\00"
@.str.2 = [22 x i8] c"sizeof(float) -> %ld\0A\00"
@.str.3 = [22 x i8] c"sizeof(long) -> %ld\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 4)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 4)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SAFE_FREE(void *);
void safe_free(void *p) { SAFE_FREE(p); }


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

x86 assembly (clang, -O2):
<safe_free>:
jmp    1030 <SAFE_FREE@plt>

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

LLVM IR (-O2):
define void @safe_free(i8* %0) {
%2 = tail call i32 @SAFE_FREE(i8* %0)
ret void
}
int isnan(double x) {
  int hx, lx;
  hx = (*(1 + (int *)&x) & 0x7fffffff);
  lx = *(int *)&x;
  hx |= (unsigned)(lx | (-lx)) >> 31;
  hx = 0x7ff00000 - hx;
  return ((unsigned)(hx)) >> 31;
}


x86 assembly (clang, -O0):
<isnan>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x7fffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    %ecx,%ecx
sub    -0x10(%rbp),%ecx
or     %ecx,%eax
shr    $0x1f,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x7ff00000,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x1f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isnan>:
movq   %xmm0,%rax
mov    %rax,%rcx
shr    $0x20,%rcx
and    $0x7fffffff,%ecx
xor    %edx,%edx
test   %eax,%eax
setne  %dl
or     %ecx,%edx
xor    %eax,%eax
cmp    $0x7ff00001,%edx
setae  %al
ret

LLVM IR (-O0):
define i32 @isnan(double %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca i32
store double %0, double* %2
%5 = bitcast double* %2 to i32*
%6 = getelementptr inbounds i32, i32* %5, i64 1
%7 = load i32, i32* %6
%8 = and i32 %7, 2147483647
store i32 %8, i32* %3
%9 = bitcast double* %2 to i32*
%10 = load i32, i32* %9
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = load i32, i32* %4
%13 = sub nsw i32 0, %12
%14 = or i32 %11, %13
%15 = lshr i32 %14, 31
%16 = load i32, i32* %3
%17 = or i32 %16, %15
store i32 %17, i32* %3
%18 = load i32, i32* %3
%19 = sub nsw i32 2146435072, %18
store i32 %19, i32* %3
%20 = load i32, i32* %3
%21 = lshr i32 %20, 31
ret i32 %21
}

LLVM IR (-O2):
define i32 @isnan(double %0) {
%2 = bitcast double %0 to i64
%3 = lshr i64 %2, 32
%4 = trunc i64 %3 to i32
%5 = and i32 %4, 2147483647
%6 = trunc i64 %2 to i32
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i32
%9 = or i32 %5, %8
%10 = icmp ugt i32 %9, 2146435072
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
void ModularReduction(uint64_t a3_unmasked, uint64_t a2, uint64_t a1,
                      uint64_t a0, uint64_t *m1, uint64_t *m0) {
  uint64_t a3 = a3_unmasked & 0x3FFFFFFFFFFFFFFFull;
  *m1 = a1 ^ ((a3 << 1) | (a2 >> 63)) ^ ((a3 << 2) | (a2 >> 62));
  *m0 = a0 ^ (a2 << 1) ^ (a2 << 2);
}


x86 assembly (clang, -O0):
<ModularReduction>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movslq -0x4(%rbp),%rax
movabs $0x3fffffffffffffff,%rcx
ff ff 3f
and    %rcx,%rax
mov    %eax,-0x24(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x24(%rbp),%ecx
shl    $0x1,%ecx
mov    %ecx,-0x2c(%rbp)
mov    -0x8(%rbp),%edx
mov    $0x3f,%ecx
sar    %cl,%edx
mov    -0x2c(%rbp),%ecx
or     %edx,%ecx
xor    %ecx,%eax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%eax
shl    $0x2,%eax
mov    -0x8(%rbp),%edx
mov    $0x3e,%ecx
sar    %cl,%edx
mov    -0x28(%rbp),%ecx
or     %edx,%eax
xor    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
xor    %eax,%ecx
mov    -0x8(%rbp),%eax
shl    $0x2,%eax
xor    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ModularReduction>:
lea    (%rsi,%rsi,1),%eax
shl    $0x2,%esi
xor    %eax,%esi
xor    %ecx,%esi
mov    %esi,(%r9)
ret

LLVM IR (-O0):
define void @ModularReduction(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32* %4, i32** %11
store i32* %5, i32** %12
%14 = load i32, i32* %7
%15 = sext i32 %14 to i64
%16 = and i64 %15, 4611686018427387903
%17 = trunc i64 %16 to i32
store i32 %17, i32* %13
%18 = load i32, i32* %9
%19 = load i32, i32* %13
%20 = shl i32 %19, 1
%21 = load i32, i32* %8
%22 = ashr i32 %21, 63
%23 = or i32 %20, %22
%24 = xor i32 %18, %23
%25 = load i32, i32* %13
%26 = shl i32 %25, 2
%27 = load i32, i32* %8
%28 = ashr i32 %27, 62
%29 = or i32 %26, %28
%30 = xor i32 %24, %29
%31 = load i32*, i32** %11
store i32 %30, i32* %31
%32 = load i32, i32* %10
%33 = load i32, i32* %8
%34 = shl i32 %33, 1
%35 = xor i32 %32, %34
%36 = load i32, i32* %8
%37 = shl i32 %36, 2
%38 = xor i32 %35, %37
%39 = load i32*, i32** %12
store i32 %38, i32* %39
ret void
}

LLVM IR (-O2):
define void @ModularReduction(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture writeonly %5) {
%7 = shl i32 %1, 1
%8 = shl i32 %1, 2
%9 = xor i32 %8, %7
%10 = xor i32 %9, %3
store i32 %10, i32* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int inotify_init();
int main(void) {
  int fd = inotify_init();
  if (fd >= 0)
    close(fd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <inotify_init@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     114b <main+0x2b>
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <inotify_init@plt>
test   %eax,%eax
js     1133 <main+0x13>
mov    %eax,%edi
call   1030 <close@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @inotify_init()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* %2
%8 = call i32 @close(i32 %7)
br label %9
9: ; preds = %6, %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @inotify_init()
%2 = icmp sgt i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @close(i32 %1)
br label %5
5: ; preds = %3, %0
ret i32 0
}
/* Variables and functions */
double cos(int /*<<< orphan*/);
int /*<<< orphan*/ ln_deg_to_rad(int /*<<< orphan*/);
int /*<<< orphan*/ ln_get_hyp_true_anomaly(double, double, double);
double ln_get_hyp_radius_vector(double q, double e, double t) {
  return q * (1.0 + e) /
         (1.0 + e * cos(ln_deg_to_rad(ln_get_hyp_true_anomaly(q, e, t))));
}


x86 assembly (clang, -O0):
<ln_get_hyp_radius_vector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeac(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1030 <ln_get_hyp_true_anomaly@plt>
mov    %eax,%edi
call   1050 <ln_deg_to_rad@plt>
mov    %eax,%edi
call   1040 <cos@plt>
movsd  -0x28(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm2,%xmm1
movsd  0xe59(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ln_get_hyp_radius_vector>:
sub    $0x18,%rsp
movsd  %xmm1,0x8(%rsp)
movapd %xmm1,%xmm3
addsd  0xeba(%rip),%xmm3
mulsd  %xmm0,%xmm3
movsd  %xmm3,0x10(%rsp)
call   1030 <ln_get_hyp_true_anomaly@plt>
mov    %eax,%edi
call   1050 <ln_deg_to_rad@plt>
mov    %eax,%edi
call   1040 <cos@plt>
mulsd  0x8(%rsp),%xmm0
addsd  0xe8f(%rip),%xmm0
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @ln_get_hyp_radius_vector(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fadd double 1.000000e+00, %8
%10 = fmul double %7, %9
%11 = load double, double* %5
%12 = load double, double* %4
%13 = load double, double* %5
%14 = load double, double* %6
%15 = call i32 @ln_get_hyp_true_anomaly(double %12, double %13, double %14)
%16 = call i32 @ln_deg_to_rad(i32 %15)
%17 = call double @cos(i32 %16)
%18 = call double @llvm.fmuladd.f64(double %11, double %17, double 1.000000e+00)
%19 = fdiv double %10, %18
ret double %19
}

LLVM IR (-O2):
define double @ln_get_hyp_radius_vector(double %0, double %1, double %2) {
%4 = fadd double %1, 1.000000e+00
%5 = fmul double %4, %0
%6 = tail call i32 @ln_get_hyp_true_anomaly(double %0, double %1, double %2)
%7 = tail call i32 @ln_deg_to_rad(i32 %6)
%8 = tail call double @cos(i32 %7)
%9 = tail call double @llvm.fmuladd.f64(double %1, double %8, double 1.000000e+00)
%10 = fdiv double %5, %9
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ f();
int nondet_int();
void main() {
  int status;
  int tmp;
  tmp = nondet_int();
  int x;
  if (tmp) {
    status = -1073741823L;
    x = 0;
  } else {
    status = 0;
  }
  f();
  if (status < 0L) {
  ERROR:
    goto ERROR;
  } else {
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     114f <main+0x2f>
movl   $0xc0000001,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
jmp    1156 <main+0x36>
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <f@plt>
movslq -0x4(%rbp),%rax
cmp    $0x0,%rax
jge    1175 <main+0x55>
jmp    1170 <main+0x50>
jmp    1170 <main+0x50>
jmp    117a <main+0x5a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <nondet_int@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <f@plt>
test   %ebx,%ebx
je     1142 <main+0x22>
cs nopw 0x0(%rax,%rax,1)
nop
jmp    1140 <main+0x20>
pop    %rbx
ret

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (...) @nondet_int()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 -1073741823, i32* %1
store i32 0, i32* %3
br label %9
8: ; preds = %0
store i32 0, i32* %1
br label %9
9: ; preds = %8, %7
%10 = call i32 (...) @f()
%11 = load i32, i32* %1
%12 = sext i32 %11 to i64
%13 = icmp slt i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %9
br label %15
15: ; preds = %15, %14
br label %15
16: ; preds = %9
br label %17
17: ; preds = %16
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @nondet_int()
%2 = icmp eq i32 %1, 0
%3 = tail call i32 (...) @f()
br i1 %2, label %5, label %4
4: ; preds = %0, %4
br label %4
5: ; preds = %0
ret void
}
void gs_exit(n) { exit(n); }


x86 assembly (clang, -O0):
<gs_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<gs_exit>:
push   %rax
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @gs_exit(i32 %0) {
tail call void @exit(i32 %0)
unreachable
}
void XkbGetCompatMap() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define i32 @security_getenforce() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x79() {
  Assert_real((isbdigit(121) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              610, ("isbdigit should be 0 for y"));
}


x86 assembly (clang, -O0):
<t_isbdigit_0x79>:
push   %rbp
mov    %rsp,%rbp
mov    $0x79,%edi
call   1040 <isbdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x262,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isbdigit_0x79>:
push   %rax
mov    $0x79,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x262,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for y\00"
define void @t_isbdigit_0x79() {
%1 = call i64 @isbdigit(i32 121)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 610, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for y\00"
define void @t_isbdigit_0x79() {
%1 = tail call i64 @isbdigit(i32 121)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 610, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}