#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct utest {
  int dummy;
};
struct ndiff {
  int dummy;
};

/* Variables and functions */
scalar_t__ pow(int, int);
scalar_t__ pow10(int);
int /*<<< orphan*/ utest_test(struct utest *, int, char *, char *, int);
void ut_testPow10(struct utest *utest, struct ndiff *dif) {
  (void)dif;
  for (int k = -100; k < 100; k++)
    utest_test(
        utest, (pow10(k) == pow(10, k)), "pow10(k) == pow(10, k)",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/jbakosi/ndiff/refs/heads/master/src/ndiff.c",
        1036);
}


x86 assembly (clang, -O0):
<ut_testPow10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffff9c,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jge    11af <ut_testPow10+0x7f>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <pow10@plt>
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%esi
mov    $0xa,%edi
call   1040 <pow@plt>
mov    -0x28(%rbp),%rdi
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe71(%rip),%rdx
lea    0xe81(%rip),%rcx
mov    $0x40c,%r8d
call   1050 <utest_test@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1147 <ut_testPow10+0x17>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ut_testPow10>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdi,%r12
mov    $0xffffff9c,%ebp
lea    0xeb9(%rip),%r14
lea    0xec9(%rip),%r15
xchg   %ax,%ax
mov    %ebp,%edi
call   1030 <pow10@plt>
mov    %rax,%rbx
mov    $0xa,%edi
mov    %ebp,%esi
call   1040 <pow@plt>
xor    %esi,%esi
cmp    %rax,%rbx
sete   %sil
mov    %r12,%rdi
mov    %r14,%rdx
mov    %r15,%rcx
mov    $0x40c,%r8d
call   1050 <utest_test@plt>
add    $0x1,%ebp
cmp    $0x64,%ebp
jne    1150 <ut_testPow10+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.utest = type { i32 }
%struct.ndiff = type { i32 }
@.str = [23 x i8] c"pow10(k) == pow(10, k)\00"
@.str.1 = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jbakosi/ndiff/refs/heads/master/src/ndiff.c\00"
define void @ut_testPow10(%struct.utest* %0, %struct.ndiff* %1) {
%3 = alloca %struct.utest*
%4 = alloca %struct.ndiff*
%5 = alloca i32
store %struct.utest* %0, %struct.utest** %3
store %struct.ndiff* %1, %struct.ndiff** %4
%6 = load %struct.ndiff*, %struct.ndiff** %4
store i32 -100, i32* %5
br label %7
7: ; preds = %19, %2
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 100
br i1 %9, label %10, label %22
10: ; preds = %7
%11 = load %struct.utest*, %struct.utest** %3
%12 = load i32, i32* %5
%13 = call i64 @pow10(i32 %12)
%14 = load i32, i32* %5
%15 = call i64 @pow(i32 10, i32 %14)
%16 = icmp eq i64 %13, %15
%17 = zext i1 %16 to i32
%18 = call i32 @utest_test(%struct.utest* %11, i32 %17, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0), i32 1036)
br label %19
19: ; preds = %10
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %7
22: ; preds = %7
ret void
}

LLVM IR (-O2):
%struct.utest = type { i32 }
%struct.ndiff = type { i32 }
@.str = [23 x i8] c"pow10(k) == pow(10, k)\00"
@.str.1 = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jbakosi/ndiff/refs/heads/master/src/ndiff.c\00"
define void @ut_testPow10(%struct.utest* %0, %struct.ndiff* nocapture readnone %1) {
br label %4
3: ; preds = %4
ret void
4: ; preds = %2, %4
%5 = phi i32 [ -100, %2 ], [ %11, %4 ]
%6 = tail call i64 @pow10(i32 %5)
%7 = tail call i64 @pow(i32 10, i32 %5)
%8 = icmp eq i64 %6, %7
%9 = zext i1 %8 to i32
%10 = tail call i32 @utest_test(%struct.utest* %0, i32 %9, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0), i32 1036)
%11 = add nsw i32 %5, 1
%12 = icmp eq i32 %11, 100
br i1 %12, label %3, label %4
}