#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 */

/* Variables and functions */
int /*<<< orphan*/ gmx_fatal(int /*<<< orphan*/, char *, int, char *, char *,
                             int);
int _mod(int a, int b, char *file, int line) {
  if (b == 0)
    gmx_fatal(0,
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/tectronics/"
              "force-distribution-analysis.gromacs-4-0-5/refs/heads/master/"
              "include/vec.h",
              782, "Modulo zero, file %s, line %d", file, line);
  return a % b;
}


x86 assembly (clang, -O0):
<_mod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1151 <_mod+0x41>
mov    -0x10(%rbp),%r8
mov    -0x14(%rbp),%r9d
xor    %edi,%edi
lea    0xec0(%rip),%rsi
mov    $0x30e,%edx
lea    0xf63(%rip),%rcx
call   1030 <gmx_fatal@plt>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mod>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
test   %esi,%esi
jne    113b <_mod+0x2b>
mov    %ecx,%r9d
mov    %rdx,%r8
lea    0xed8(%rip),%rsi
lea    0xf80(%rip),%rcx
xor    %edi,%edi
mov    $0x30e,%edx
call   1030 <gmx_fatal@plt>
mov    %ebp,%eax
cltd
idiv   %ebx
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [175 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tectronics/force-distribution-analysis.gromacs-4-0-5/refs/heads/master/include/vec.h\00"
@.str.1 = [30 x i8] c"Modulo zero, file %s, line %d\00"
define i32 @_mod(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32, i32* %6
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %4
%12 = load i8*, i8** %7
%13 = load i32, i32* %8
%14 = call i32 @gmx_fatal(i32 0, i8* getelementptr inbounds ([175 x i8], [175 x i8]* @.str, i64 0, i64 0), i32 782, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* %12, i32 %13)
br label %15
15: ; preds = %11, %4
%16 = load i32, i32* %5
%17 = load i32, i32* %6
%18 = srem i32 %16, %17
ret i32 %18
}

LLVM IR (-O2):
@.str = [175 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tectronics/force-distribution-analysis.gromacs-4-0-5/refs/heads/master/include/vec.h\00"
@.str.1 = [30 x i8] c"Modulo zero, file %s, line %d\00"
define i32 @_mod(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = icmp eq i32 %1, 0
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @gmx_fatal(i32 0, i8* getelementptr inbounds ([175 x i8], [175 x i8]* @.str, i64 0, i64 0), i32 782, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* %2, i32 %3)
br label %8
8: ; preds = %6, %4
%9 = srem i32 %0, %1
ret i32 %9
}